From 46bc6e545a17e77202aaf01ec0cd8d5a46567525 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 25 Aug 2015 08:08:24 -0300 Subject: Move main pfSense content to src/ --- src/usr/local/www/apple-touch-icon.png | Bin 0 -> 4068 bytes src/usr/local/www/bandwidth_by_ip.php | 150 + src/usr/local/www/carp_status.php | 252 + src/usr/local/www/classes/maintable.inc | 206 + .../code-syntax-highlighter/SyntaxHighlighter.css | 166 + src/usr/local/www/code-syntax-highlighter/gpl.txt | 340 ++ .../www/code-syntax-highlighter/shBrushCSharp.js | 30 + .../www/code-syntax-highlighter/shBrushCpp.js | 72 + .../www/code-syntax-highlighter/shBrushCss.js | 50 + .../www/code-syntax-highlighter/shBrushDelphi.js | 31 + .../www/code-syntax-highlighter/shBrushJScript.js | 22 + .../www/code-syntax-highlighter/shBrushJava.js | 26 + .../www/code-syntax-highlighter/shBrushPhp.js | 23 + .../www/code-syntax-highlighter/shBrushPython.js | 71 + .../www/code-syntax-highlighter/shBrushRuby.js | 26 + .../www/code-syntax-highlighter/shBrushSql.js | 40 + .../local/www/code-syntax-highlighter/shBrushVb.js | 29 + .../www/code-syntax-highlighter/shBrushXml.js | 61 + .../local/www/code-syntax-highlighter/shCore.js | 589 ++ .../code-syntax-highlighter/shCore.uncompressed.js | 636 ++ src/usr/local/www/crash_reporter.php | 156 + src/usr/local/www/csrf/csrf-magic.js | 186 + src/usr/local/www/csrf/csrf-magic.php | 403 ++ src/usr/local/www/css/table.css | 46 + src/usr/local/www/diag_arp.php | 365 ++ src/usr/local/www/diag_authentication.php | 138 + src/usr/local/www/diag_backup.php | 818 +++ src/usr/local/www/diag_confbak.php | 301 + src/usr/local/www/diag_defaults.php | 90 + src/usr/local/www/diag_dns.php | 320 ++ src/usr/local/www/diag_dump_states.php | 280 + src/usr/local/www/diag_dump_states_sources.php | 211 + src/usr/local/www/diag_gmirror.php | 406 ++ src/usr/local/www/diag_ipsec.php | 555 ++ src/usr/local/www/diag_ipsec_leases.php | 131 + src/usr/local/www/diag_ipsec_sad.php | 141 + src/usr/local/www/diag_ipsec_spd.php | 138 + src/usr/local/www/diag_ipsec_xml.php | 84 + src/usr/local/www/diag_limiter_info.php | 121 + src/usr/local/www/diag_logs.php | 145 + src/usr/local/www/diag_logs_auth.php | 112 + src/usr/local/www/diag_logs_dhcp.php | 115 + src/usr/local/www/diag_logs_filter.php | 503 ++ src/usr/local/www/diag_logs_filter_dynamic.php | 223 + src/usr/local/www/diag_logs_filter_summary.php | 249 + src/usr/local/www/diag_logs_gateways.php | 147 + src/usr/local/www/diag_logs_ipsec.php | 123 + src/usr/local/www/diag_logs_ntpd.php | 110 + src/usr/local/www/diag_logs_openvpn.php | 111 + src/usr/local/www/diag_logs_ppp.php | 109 + src/usr/local/www/diag_logs_relayd.php | 111 + src/usr/local/www/diag_logs_resolver.php | 152 + src/usr/local/www/diag_logs_routing.php | 123 + src/usr/local/www/diag_logs_settings.php | 517 ++ src/usr/local/www/diag_logs_vpn.php | 211 + src/usr/local/www/diag_logs_wireless.php | 125 + src/usr/local/www/diag_nanobsd.php | 289 + src/usr/local/www/diag_ndp.php | 184 + src/usr/local/www/diag_packet_capture.php | 485 ++ src/usr/local/www/diag_patterns.php | 97 + src/usr/local/www/diag_pf_info.php | 117 + src/usr/local/www/diag_ping.php | 202 + src/usr/local/www/diag_pkglogs.php | 147 + src/usr/local/www/diag_resetstate.php | 143 + src/usr/local/www/diag_routes.php | 247 + src/usr/local/www/diag_smart.php | 453 ++ src/usr/local/www/diag_sockets.php | 181 + src/usr/local/www/diag_states_summary.php | 206 + src/usr/local/www/diag_system_activity.php | 115 + src/usr/local/www/diag_system_pftop.php | 216 + src/usr/local/www/diag_tables.php | 191 + src/usr/local/www/diag_testport.php | 290 + src/usr/local/www/diag_traceroute.php | 218 + src/usr/local/www/easyrule.php | 89 + src/usr/local/www/edit.php | 254 + src/usr/local/www/exec.php | 355 ++ src/usr/local/www/favicon.ico | Bin 0 -> 1406 bytes src/usr/local/www/fbegin.inc | 459 ++ src/usr/local/www/fend.inc | 27 + src/usr/local/www/filebrowser/browser.js | 48 + src/usr/local/www/filebrowser/browser.php | 165 + src/usr/local/www/filebrowser/images/file_code.gif | Bin 0 -> 610 bytes .../local/www/filebrowser/images/file_database.gif | Bin 0 -> 621 bytes src/usr/local/www/filebrowser/images/file_doc.gif | Bin 0 -> 1061 bytes .../local/www/filebrowser/images/file_flash.gif | Bin 0 -> 627 bytes .../local/www/filebrowser/images/file_generic.gif | Bin 0 -> 1068 bytes .../local/www/filebrowser/images/file_image.gif | Bin 0 -> 608 bytes src/usr/local/www/filebrowser/images/file_js.gif | Bin 0 -> 1077 bytes src/usr/local/www/filebrowser/images/file_pdf.gif | Bin 0 -> 603 bytes src/usr/local/www/filebrowser/images/file_php.gif | Bin 0 -> 603 bytes src/usr/local/www/filebrowser/images/file_ppt.gif | Bin 0 -> 1071 bytes .../local/www/filebrowser/images/file_system.gif | Bin 0 -> 601 bytes src/usr/local/www/filebrowser/images/file_xls.gif | Bin 0 -> 1060 bytes src/usr/local/www/filebrowser/images/file_zip.gif | Bin 0 -> 612 bytes .../www/filebrowser/images/folder_generic.gif | Bin 0 -> 996 bytes .../local/www/filebrowser/images/icon_cancel.gif | Bin 0 -> 1024 bytes .../local/www/filebrowser/images/icon_contract.gif | Bin 0 -> 599 bytes .../local/www/filebrowser/images/icon_expand.gif | Bin 0 -> 613 bytes src/usr/local/www/filebrowser/images/icon_home.gif | Bin 0 -> 1027 bytes src/usr/local/www/filebrowser/images/icon_left.gif | Bin 0 -> 306 bytes .../www/filebrowser/images/icon_magnifier.gif | Bin 0 -> 568 bytes src/usr/local/www/firewall_aliases.php | 311 + src/usr/local/www/firewall_aliases_edit.php | 890 +++ src/usr/local/www/firewall_aliases_import.php | 246 + src/usr/local/www/firewall_nat.php | 399 ++ src/usr/local/www/firewall_nat_1to1.php | 371 ++ src/usr/local/www/firewall_nat_1to1_edit.php | 592 ++ src/usr/local/www/firewall_nat_edit.php | 1016 ++++ src/usr/local/www/firewall_nat_npt.php | 195 + src/usr/local/www/firewall_nat_npt_edit.php | 311 + src/usr/local/www/firewall_nat_out.php | 695 +++ src/usr/local/www/firewall_nat_out_edit.php | 905 +++ src/usr/local/www/firewall_rules.php | 944 +++ src/usr/local/www/firewall_rules_edit.php | 1946 +++++++ src/usr/local/www/firewall_schedule.php | 255 + src/usr/local/www/firewall_schedule_edit.php | 1151 ++++ src/usr/local/www/firewall_shaper.php | 486 ++ src/usr/local/www/firewall_shaper_layer7.php | 584 ++ src/usr/local/www/firewall_shaper_queues.php | 244 + src/usr/local/www/firewall_shaper_vinterface.php | 475 ++ src/usr/local/www/firewall_shaper_wizards.php | 146 + src/usr/local/www/firewall_virtual_ip.php | 373 ++ src/usr/local/www/firewall_virtual_ip_edit.php | 572 ++ src/usr/local/www/getserviceproviders.php | 150 + src/usr/local/www/getstats.php | 50 + src/usr/local/www/graph.php | 408 ++ src/usr/local/www/graph_cpu.php | 211 + src/usr/local/www/green_dot.jpg | Bin 0 -> 65 bytes src/usr/local/www/gui.css | 363 ++ src/usr/local/www/guiconfig.inc | 1252 ++++ src/usr/local/www/halt.php | 77 + src/usr/local/www/head.inc | 120 + src/usr/local/www/headjs.php | 186 + src/usr/local/www/help.php | 377 ++ src/usr/local/www/ifstats.php | 66 + src/usr/local/www/includes/functions.inc.php | 407 ++ src/usr/local/www/index.php | 799 +++ src/usr/local/www/interfaces.php | 3882 +++++++++++++ src/usr/local/www/interfaces_assign.php | 597 ++ src/usr/local/www/interfaces_bridge.php | 179 + src/usr/local/www/interfaces_bridge_edit.php | 708 +++ src/usr/local/www/interfaces_gif.php | 162 + src/usr/local/www/interfaces_gif_edit.php | 272 + src/usr/local/www/interfaces_gre.php | 158 + src/usr/local/www/interfaces_gre_edit.php | 262 + src/usr/local/www/interfaces_groups.php | 171 + src/usr/local/www/interfaces_groups_edit.php | 378 ++ src/usr/local/www/interfaces_lagg.php | 169 + src/usr/local/www/interfaces_lagg_edit.php | 278 + src/usr/local/www/interfaces_ppps.php | 159 + src/usr/local/www/interfaces_ppps_edit.php | 903 +++ src/usr/local/www/interfaces_qinq.php | 181 + src/usr/local/www/interfaces_qinq_edit.php | 444 ++ src/usr/local/www/interfaces_vlan.php | 165 + src/usr/local/www/interfaces_vlan_edit.php | 236 + src/usr/local/www/interfaces_wireless.php | 160 + src/usr/local/www/interfaces_wireless_edit.php | 230 + src/usr/local/www/javascript/autosuggest.js | 337 ++ src/usr/local/www/javascript/base64.js | 142 + .../www/javascript/carp_status/carp_status.js | 5 + .../local/www/javascript/chosen/chosen-sprite.png | Bin 0 -> 1866 bytes src/usr/local/www/javascript/chosen/chosen.css | 317 + .../local/www/javascript/chosen/chosen.jquery.js | 755 +++ .../www/javascript/chosen/chosen.jquery.min.js | 9 + .../local/www/javascript/chosen/chosen.proto.js | 765 +++ .../www/javascript/chosen/chosen.proto.min.js | 9 + .../javascript/chosen/coffee/chosen.jquery.coffee | 633 ++ .../javascript/chosen/coffee/chosen.proto.coffee | 629 ++ .../www/javascript/datepicker/css/datepicker.css | 178 + .../local/www/javascript/datepicker/js/blank.html | 6 + .../www/javascript/datepicker/js/datepicker.js | 1111 ++++ .../www/javascript/datepicker/media/bg_header.jpg | Bin 0 -> 1792 bytes .../www/javascript/datepicker/media/bullet1.gif | Bin 0 -> 55 bytes .../www/javascript/datepicker/media/bullet2.gif | Bin 0 -> 262 bytes .../local/www/javascript/datepicker/media/cal.gif | Bin 0 -> 127 bytes .../datepicker/media/gradient-e5e5e5-ffffff.gif | Bin 0 -> 526 bytes src/usr/local/www/javascript/domTT/LICENSE | 202 + src/usr/local/www/javascript/domTT/behaviour.js | 254 + src/usr/local/www/javascript/domTT/domLib.js | 706 +++ src/usr/local/www/javascript/domTT/domTT.js | 1132 ++++ src/usr/local/www/javascript/domTT/fadomatic.js | 180 + src/usr/local/www/javascript/filter_log.js | 168 + src/usr/local/www/javascript/firebug-lite.js | 1000 ++++ .../javascript/firewall_nat_edit/autosuggest.js | 337 ++ .../javascript/firewall_nat_edit/disablekeys.js | 6 + .../firewall_nat_edit/firewall_nat_edit.js | 203 + .../javascript/firewall_nat_edit/suggestions.js | 33 + .../javascript/firewall_rules_edit/autosuggest.js | 337 ++ .../javascript/firewall_rules_edit/disablekeys.js | 6 + .../firewall_rules_edit/firewall_rules_edit.js | 237 + .../javascript/firewall_rules_edit/suggestions.js | 33 + .../javascript/firewall_shaper_edit/autosuggest.js | 337 ++ .../javascript/firewall_shaper_edit/disablekeys.js | 6 + .../firewall_shaper_edit/firewall_shaper_edit.js | 37 + .../javascript/firewall_shaper_edit/suggestions.js | 33 + src/usr/local/www/javascript/global.js | 43 + src/usr/local/www/javascript/index/ajax.js | 196 + .../javascript/interfaces_ppps_edit/ppps_edit.js | 253 + src/usr/local/www/javascript/jquery-1.11.1.min.js | 4 + .../www/javascript/jquery-migrate-1.2.1.min.js | 2 + .../css/jquery-ui-timepicker-addon.css | 7 + .../js/jquery-ui-timepicker-addon.js | 1326 +++++ src/usr/local/www/javascript/jquery.ipv4v6ify.js | 140 + .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 0 -> 260 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 251 bytes .../jquery/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 180 bytes .../jquery/images/ui-bg_flat_0_eeeeee_40x100.png | Bin 0 -> 180 bytes .../jquery/images/ui-bg_flat_10_000000_40x100.png | Bin 0 -> 178 bytes .../jquery/images/ui-bg_flat_55_c0402a_40x100.png | Bin 0 -> 213 bytes .../jquery/images/ui-bg_flat_55_eeeeee_40x100.png | Bin 0 -> 180 bytes .../jquery/images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 0 -> 104 bytes .../jquery/images/ui-bg_glass_100_f8f8f8_1x400.png | Bin 0 -> 105 bytes .../jquery/images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 0 -> 125 bytes .../jquery/images/ui-bg_glass_35_dddddd_1x400.png | Bin 0 -> 109 bytes .../jquery/images/ui-bg_glass_60_eeeeee_1x400.png | Bin 0 -> 110 bytes .../jquery/images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../images/ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 0 -> 3762 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 0 -> 90 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 0 -> 129 bytes .../images/ui-bg_inset-hard_75_999999_1x100.png | Bin 0 -> 114 bytes .../images/ui-bg_inset-soft_50_c9c9c9_1x100.png | Bin 0 -> 96 bytes .../jquery/images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../jquery/images/ui-icons_228ef1_256x240.png | Bin 0 -> 4369 bytes .../jquery/images/ui-icons_3383bb_256x240.png | Bin 0 -> 4369 bytes .../jquery/images/ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes .../jquery/images/ui-icons_70b2e1_256x240.png | Bin 0 -> 4369 bytes .../jquery/images/ui-icons_999999_256x240.png | Bin 0 -> 4369 bytes .../jquery/images/ui-icons_ef8c08_256x240.png | Bin 0 -> 4369 bytes .../jquery/images/ui-icons_fbc856_256x240.png | Bin 0 -> 5355 bytes .../jquery/images/ui-icons_ffd27a_256x240.png | Bin 0 -> 4369 bytes .../jquery/images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes .../www/javascript/jquery/jquery-ui-1.11.1.min.js | 13 + .../www/javascript/load_balancer_pool_edit/pool.js | 191 + .../load_balancer_relay_protocol_edit.js | 56 + src/usr/local/www/javascript/niftyjsCode.js | 174 + .../javascript/numericupdown/css/numericupdown.css | 40 + .../www/javascript/numericupdown/images/down.gif | Bin 0 -> 60 bytes .../www/javascript/numericupdown/images/up.gif | Bin 0 -> 60 bytes .../javascript/numericupdown/js/numericupdown.js | 287 + src/usr/local/www/javascript/pi.js | 682 +++ src/usr/local/www/javascript/row_helper.js | 97 + src/usr/local/www/javascript/row_helper_dynamic.js | 98 + src/usr/local/www/javascript/row_toggle.js | 66 + .../local/www/javascript/scriptaculous/builder.js | 136 + .../local/www/javascript/scriptaculous/controls.js | 965 ++++ .../local/www/javascript/scriptaculous/dragdrop.js | 974 ++++ .../local/www/javascript/scriptaculous/effects.js | 1123 ++++ .../www/javascript/scriptaculous/prototype.js | 6079 ++++++++++++++++++++ .../www/javascript/scriptaculous/scriptaculous.js | 68 + .../local/www/javascript/scriptaculous/slider.js | 275 + .../local/www/javascript/scriptaculous/sound.js | 59 + .../local/www/javascript/scriptaculous/unittest.js | 568 ++ src/usr/local/www/javascript/sorttable.js | 584 ++ src/usr/local/www/javascript/suggestions.js | 33 + src/usr/local/www/javascript/ticker.js | 73 + src/usr/local/www/javascript/wizard/autosuggest.js | 337 ++ src/usr/local/www/javascript/wizard/disablekeys.js | 6 + src/usr/local/www/javascript/wizard/suggestions.js | 33 + src/usr/local/www/license.php | 133 + src/usr/local/www/load_balancer_monitor.php | 138 + src/usr/local/www/load_balancer_monitor_edit.php | 390 ++ src/usr/local/www/load_balancer_pool.php | 159 + src/usr/local/www/load_balancer_pool_edit.php | 368 ++ src/usr/local/www/load_balancer_setting.php | 173 + src/usr/local/www/load_balancer_virtual_server.php | 152 + .../www/load_balancer_virtual_server_edit.php | 315 + src/usr/local/www/logobig.jpg | Bin 0 -> 7540 bytes src/usr/local/www/niftycssCode.css | 21 + src/usr/local/www/niftycssprintCode.css | 1 + src/usr/local/www/pkg.php | 582 ++ src/usr/local/www/pkg_edit.php | 1267 ++++ src/usr/local/www/pkg_mgr.php | 221 + src/usr/local/www/pkg_mgr_install.php | 323 ++ src/usr/local/www/pkg_mgr_installed.php | 259 + src/usr/local/www/pkg_mgr_settings.php | 163 + src/usr/local/www/protochart/ProtoChart.js | 2653 +++++++++ .../local/www/protochart/excanvas-compressed.js | 19 + src/usr/local/www/protochart/excanvas.js | 785 +++ src/usr/local/www/reboot.php | 72 + src/usr/local/www/restart_httpd.php | 68 + src/usr/local/www/services_captiveportal.php | 1253 ++++ .../www/services_captiveportal_filemanager.php | 267 + .../local/www/services_captiveportal_hostname.php | 232 + .../www/services_captiveportal_hostname_edit.php | 244 + src/usr/local/www/services_captiveportal_ip.php | 208 + .../local/www/services_captiveportal_ip_edit.php | 253 + src/usr/local/www/services_captiveportal_mac.php | 244 + .../local/www/services_captiveportal_mac_edit.php | 270 + .../local/www/services_captiveportal_vouchers.php | 715 +++ .../www/services_captiveportal_vouchers_edit.php | 230 + src/usr/local/www/services_captiveportal_zones.php | 154 + .../www/services_captiveportal_zones_edit.php | 124 + src/usr/local/www/services_dhcp.php | 1442 +++++ src/usr/local/www/services_dhcp_edit.php | 625 ++ src/usr/local/www/services_dhcp_relay.php | 216 + src/usr/local/www/services_dhcpv6.php | 995 ++++ src/usr/local/www/services_dhcpv6_edit.php | 285 + src/usr/local/www/services_dhcpv6_relay.php | 216 + src/usr/local/www/services_dnsmasq.php | 582 ++ .../www/services_dnsmasq_domainoverride_edit.php | 197 + src/usr/local/www/services_dnsmasq_edit.php | 345 ++ src/usr/local/www/services_dyndns.php | 229 + src/usr/local/www/services_dyndns_edit.php | 485 ++ src/usr/local/www/services_igmpproxy.php | 189 + src/usr/local/www/services_igmpproxy_edit.php | 312 + src/usr/local/www/services_ntpd.php | 462 ++ src/usr/local/www/services_ntpd_gps.php | 619 ++ src/usr/local/www/services_ntpd_pps.php | 251 + src/usr/local/www/services_rfc2136.php | 206 + src/usr/local/www/services_rfc2136_edit.php | 276 + .../local/www/services_router_advertisements.php | 480 ++ src/usr/local/www/services_snmp.php | 443 ++ src/usr/local/www/services_unbound.php | 626 ++ src/usr/local/www/services_unbound_acls.php | 421 ++ src/usr/local/www/services_unbound_advanced.php | 469 ++ .../www/services_unbound_domainoverride_edit.php | 183 + src/usr/local/www/services_unbound_host_edit.php | 337 ++ src/usr/local/www/services_wol.php | 233 + src/usr/local/www/services_wol_edit.php | 180 + src/usr/local/www/shortcuts.inc | 289 + src/usr/local/www/shortcuts/pkg_upnp.inc | 11 + src/usr/local/www/stats.php | 46 + src/usr/local/www/status.php | 281 + src/usr/local/www/status_captiveportal.php | 260 + src/usr/local/www/status_captiveportal_expire.php | 126 + src/usr/local/www/status_captiveportal_test.php | 128 + .../www/status_captiveportal_voucher_rolls.php | 147 + .../local/www/status_captiveportal_vouchers.php | 150 + src/usr/local/www/status_dhcp_leases.php | 457 ++ src/usr/local/www/status_dhcpv6_leases.php | 581 ++ src/usr/local/www/status_filter_reload.php | 179 + src/usr/local/www/status_gateway_groups.php | 173 + src/usr/local/www/status_gateways.php | 169 + src/usr/local/www/status_graph.php | 352 ++ src/usr/local/www/status_graph_cpu.php | 55 + src/usr/local/www/status_interfaces.php | 607 ++ src/usr/local/www/status_lb_pool.php | 231 + src/usr/local/www/status_lb_vs.php | 158 + src/usr/local/www/status_ntpd.php | 320 ++ src/usr/local/www/status_openvpn.php | 443 ++ src/usr/local/www/status_queues.php | 310 + src/usr/local/www/status_rrd_graph.php | 834 +++ src/usr/local/www/status_rrd_graph_img.php | 1278 ++++ src/usr/local/www/status_rrd_graph_settings.php | 316 + src/usr/local/www/status_services.php | 135 + src/usr/local/www/status_upnp.php | 130 + src/usr/local/www/status_wireless.php | 201 + src/usr/local/www/system.php | 565 ++ src/usr/local/www/system_advanced_admin.php | 657 +++ src/usr/local/www/system_advanced_firewall.php | 807 +++ src/usr/local/www/system_advanced_misc.php | 738 +++ src/usr/local/www/system_advanced_network.php | 320 ++ .../local/www/system_advanced_notifications.php | 413 ++ src/usr/local/www/system_advanced_sysctl.php | 305 + src/usr/local/www/system_authservers.php | 912 +++ src/usr/local/www/system_camanager.php | 770 +++ src/usr/local/www/system_certmanager.php | 1349 +++++ src/usr/local/www/system_crlmanager.php | 722 +++ src/usr/local/www/system_firmware.php | 343 ++ src/usr/local/www/system_firmware_auto.php | 296 + src/usr/local/www/system_firmware_check.php | 206 + .../www/system_firmware_restorefullbackup.php | 220 + src/usr/local/www/system_firmware_settings.php | 318 + src/usr/local/www/system_gateway_groups.php | 235 + src/usr/local/www/system_gateway_groups_edit.php | 378 ++ src/usr/local/www/system_gateways.php | 436 ++ src/usr/local/www/system_gateways_edit.php | 950 +++ src/usr/local/www/system_groupmanager.php | 607 ++ src/usr/local/www/system_groupmanager_addprivs.php | 255 + src/usr/local/www/system_hasync.php | 365 ++ src/usr/local/www/system_routes.php | 407 ++ src/usr/local/www/system_routes_edit.php | 445 ++ src/usr/local/www/system_usermanager.php | 1040 ++++ src/usr/local/www/system_usermanager_addprivs.php | 220 + .../local/www/system_usermanager_passwordmg.php | 155 + src/usr/local/www/system_usermanager_settings.php | 185 + .../system_usermanager_settings_ldapacpicker.php | 131 + .../local/www/system_usermanager_settings_test.php | 134 + src/usr/local/www/themes/_corporate/all.css | 1209 ++++ .../local/www/themes/_corporate/bottom-loader.js | 10 + src/usr/local/www/themes/_corporate/graphlink.css | 43 + .../www/themes/_corporate/images/alert_bgr.gif | Bin 0 -> 3415 bytes .../local/www/themes/_corporate/images/footer.gif | Bin 0 -> 5630 bytes .../local/www/themes/_corporate/images/header.gif | Bin 0 -> 16536 bytes .../local/www/themes/_corporate/images/help.png | Bin 0 -> 324 bytes .../www/themes/_corporate/images/horizontal.gif | Bin 0 -> 460 bytes .../www/themes/_corporate/images/icons/favicon.ico | Bin 0 -> 1406 bytes .../www/themes/_corporate/images/icons/icon_3g.gif | Bin 0 -> 200 bytes .../_corporate/images/icons/icon_3g_inactive.gif | Bin 0 -> 200 bytes .../_corporate/images/icons/icon_advanced.gif | Bin 0 -> 306 bytes .../_corporate/images/icons/icon_advanced_s.gif | Bin 0 -> 314 bytes .../themes/_corporate/images/icons/icon_alert.gif | Bin 0 -> 1015 bytes .../_corporate/images/icons/icon_alias_host.gif | Bin 0 -> 348 bytes .../_corporate/images/icons/icon_alias_net.gif | Bin 0 -> 331 bytes .../_corporate/images/icons/icon_alias_port.gif | Bin 0 -> 346 bytes .../_corporate/images/icons/icon_alias_url.gif | Bin 0 -> 314 bytes .../images/icons/icon_alias_url_reload.gif | Bin 0 -> 1111 bytes .../themes/_corporate/images/icons/icon_block.gif | Bin 0 -> 193 bytes .../_corporate/images/icons/icon_block_add.gif | Bin 0 -> 192 bytes .../_corporate/images/icons/icon_block_d.gif | Bin 0 -> 193 bytes .../_corporate/images/icons/icon_cablenic.gif | Bin 0 -> 91 bytes .../themes/_corporate/images/icons/icon_cal.gif | Bin 0 -> 646 bytes .../themes/_corporate/images/icons/icon_cal_mo.gif | Bin 0 -> 1060 bytes .../themes/_corporate/images/icons/icon_carp.gif | Bin 0 -> 352 bytes .../themes/_corporate/images/icons/icon_carp_d.gif | Bin 0 -> 357 bytes .../themes/_corporate/images/icons/icon_chain.png | Bin 0 -> 161 bytes .../themes/_corporate/images/icons/icon_check.gif | Bin 0 -> 1291 bytes .../_corporate/images/icons/icon_clock_green.gif | Bin 0 -> 308 bytes .../_corporate/images/icons/icon_clock_grey.gif | Bin 0 -> 308 bytes .../_corporate/images/icons/icon_clock_red.gif | Bin 0 -> 308 bytes .../themes/_corporate/images/icons/icon_close.gif | Bin 0 -> 64 bytes .../_corporate/images/icons/icon_configure.gif | Bin 0 -> 64 bytes .../themes/_corporate/images/icons/icon_down.gif | Bin 0 -> 1114 bytes .../themes/_corporate/images/icons/icon_down_d.gif | Bin 0 -> 689 bytes .../_corporate/images/icons/icon_down_mo.gif | Bin 0 -> 1117 bytes .../www/themes/_corporate/images/icons/icon_e.gif | Bin 0 -> 1106 bytes .../themes/_corporate/images/icons/icon_e_mo.gif | Bin 0 -> 1120 bytes .../themes/_corporate/images/icons/icon_error.gif | Bin 0 -> 1312 bytes .../themes/_corporate/images/icons/icon_exclam.gif | Bin 0 -> 1274 bytes .../_corporate/images/icons/icon_flag_de.png | Bin 0 -> 114 bytes .../_corporate/images/icons/icon_flag_en.png | Bin 0 -> 618 bytes .../_corporate/images/icons/icon_flag_es.png | Bin 0 -> 281 bytes .../_corporate/images/icons/icon_flag_pt_BR.png | Bin 0 -> 502 bytes .../_corporate/images/icons/icon_frmfld_cert.png | Bin 0 -> 1528 bytes .../_corporate/images/icons/icon_frmfld_file.png | Bin 0 -> 687 bytes .../_corporate/images/icons/icon_frmfld_group.png | Bin 0 -> 748 bytes .../_corporate/images/icons/icon_frmfld_host.png | Bin 0 -> 513 bytes .../_corporate/images/icons/icon_frmfld_imp.png | Bin 0 -> 644 bytes .../_corporate/images/icons/icon_frmfld_mail.png | Bin 0 -> 371 bytes .../_corporate/images/icons/icon_frmfld_pwd.png | Bin 0 -> 620 bytes .../_corporate/images/icons/icon_frmfld_search.png | Bin 0 -> 593 bytes .../_corporate/images/icons/icon_frmfld_time.png | Bin 0 -> 646 bytes .../images/icons/icon_frmfld_unknown.png | Bin 0 -> 487 bytes .../_corporate/images/icons/icon_frmfld_url.png | Bin 0 -> 704 bytes .../_corporate/images/icons/icon_frmfld_user.png | Bin 0 -> 654 bytes .../_corporate/images/icons/icon_fw-update.gif | Bin 0 -> 43785 bytes .../themes/_corporate/images/icons/icon_help.gif | Bin 0 -> 1669 bytes .../_corporate/images/icons/icon_ifalias.gif | Bin 0 -> 315 bytes .../_corporate/images/icons/icon_ifalias_d.gif | Bin 0 -> 315 bytes .../_corporate/images/icons/icon_import_alias.gif | Bin 0 -> 1109 bytes .../www/themes/_corporate/images/icons/icon_in.gif | Bin 0 -> 177 bytes .../themes/_corporate/images/icons/icon_in_d.gif | Bin 0 -> 190 bytes .../_corporate/images/icons/icon_info_pkg.gif | Bin 0 -> 1131 bytes .../images/icons/icon_interface_down.gif | Bin 0 -> 88 bytes .../_corporate/images/icons/icon_interface_up.gif | Bin 0 -> 87 bytes .../themes/_corporate/images/icons/icon_left.gif | Bin 0 -> 1120 bytes .../themes/_corporate/images/icons/icon_left_d.gif | Bin 0 -> 691 bytes .../_corporate/images/icons/icon_left_mo.gif | Bin 0 -> 1129 bytes .../themes/_corporate/images/icons/icon_log.gif | Bin 0 -> 297 bytes .../themes/_corporate/images/icons/icon_log_d.gif | Bin 0 -> 297 bytes .../themes/_corporate/images/icons/icon_log_s.gif | Bin 0 -> 305 bytes .../_corporate/images/icons/icon_log_s_d.gif | Bin 0 -> 305 bytes .../themes/_corporate/images/icons/icon_logs.gif | Bin 0 -> 2092 bytes .../themes/_corporate/images/icons/icon_match.gif | Bin 0 -> 847 bytes .../_corporate/images/icons/icon_match_d.gif | Bin 0 -> 843 bytes .../themes/_corporate/images/icons/icon_minus.gif | Bin 0 -> 61 bytes .../themes/_corporate/images/icons/icon_open.gif | Bin 0 -> 62 bytes .../themes/_corporate/images/icons/icon_other.gif | Bin 0 -> 125 bytes .../_corporate/images/icons/icon_other_d.gif | Bin 0 -> 125 bytes .../themes/_corporate/images/icons/icon_out.gif | Bin 0 -> 179 bytes .../themes/_corporate/images/icons/icon_out_d.gif | Bin 0 -> 189 bytes .../themes/_corporate/images/icons/icon_parp.gif | Bin 0 -> 303 bytes .../themes/_corporate/images/icons/icon_parp_d.gif | Bin 0 -> 303 bytes .../themes/_corporate/images/icons/icon_pass.gif | Bin 0 -> 182 bytes .../_corporate/images/icons/icon_pass_add.gif | Bin 0 -> 183 bytes .../themes/_corporate/images/icons/icon_pass_d.gif | Bin 0 -> 182 bytes .../themes/_corporate/images/icons/icon_plus.gif | Bin 0 -> 1100 bytes .../_corporate/images/icons/icon_plus_bl.gif | Bin 0 -> 1096 bytes .../_corporate/images/icons/icon_plus_bl_p.gif | Bin 0 -> 1079 bytes .../themes/_corporate/images/icons/icon_plus_d.gif | Bin 0 -> 682 bytes .../_corporate/images/icons/icon_plus_mo.gif | Bin 0 -> 1120 bytes .../themes/_corporate/images/icons/icon_plus_p.gif | Bin 0 -> 1087 bytes .../_corporate/images/icons/icon_reinstall.gif | Bin 0 -> 1119 bytes .../_corporate/images/icons/icon_reinstall_d.gif | Bin 0 -> 701 bytes .../_corporate/images/icons/icon_reinstall_mo.gif | Bin 0 -> 1130 bytes .../_corporate/images/icons/icon_reinstall_pkg.gif | Bin 0 -> 1109 bytes .../images/icons/icon_reinstall_pkg_d.gif | Bin 0 -> 694 bytes .../images/icons/icon_reinstall_pkg_mo.gif | Bin 0 -> 1135 bytes .../_corporate/images/icons/icon_reinstall_xml.gif | Bin 0 -> 1105 bytes .../images/icons/icon_reinstall_xml_d.gif | Bin 0 -> 686 bytes .../images/icons/icon_reinstall_xml_mo.gif | Bin 0 -> 1131 bytes .../themes/_corporate/images/icons/icon_reject.gif | Bin 0 -> 193 bytes .../_corporate/images/icons/icon_reject_d.gif | Bin 0 -> 193 bytes .../themes/_corporate/images/icons/icon_right.gif | Bin 0 -> 1117 bytes .../images/icons/icon_service_restart.gif | Bin 0 -> 1120 bytes .../images/icons/icon_service_restart_d.gif | Bin 0 -> 1115 bytes .../images/icons/icon_service_running.gif | Bin 0 -> 1390 bytes .../_corporate/images/icons/icon_service_start.gif | Bin 0 -> 1119 bytes .../images/icons/icon_service_start_d.gif | Bin 0 -> 1115 bytes .../images/icons/icon_service_status.gif | Bin 0 -> 2150 bytes .../_corporate/images/icons/icon_service_stop.gif | Bin 0 -> 1106 bytes .../images/icons/icon_service_stop_d.gif | Bin 0 -> 1100 bytes .../images/icons/icon_service_stopped.gif | Bin 0 -> 1695 bytes .../images/icons/icon_services_restart_mo.gif | Bin 0 -> 1129 bytes .../images/icons/icon_services_start_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_services_stop_mo.gif | Bin 0 -> 1126 bytes .../images/icons/icon_system-group-grey.png | Bin 0 -> 1566 bytes .../_corporate/images/icons/icon_system-group.png | Bin 0 -> 3128 bytes .../images/icons/icon_system-user-grey.png | Bin 0 -> 1107 bytes .../_corporate/images/icons/icon_system-user.png | Bin 0 -> 2084 bytes .../images/icons/icon_system_lock_screen.png | Bin 0 -> 1841 bytes .../_corporate/images/icons/icon_system_logout.png | Bin 0 -> 2087 bytes .../_corporate/images/icons/icon_trapped.gif | Bin 0 -> 1101 bytes .../_corporate/images/icons/icon_trapped_p.gif | Bin 0 -> 1079 bytes .../_corporate/images/icons/icon_ts_rule.gif | Bin 0 -> 194 bytes .../_corporate/images/icons/icon_ts_rule_d.gif | Bin 0 -> 193 bytes .../www/themes/_corporate/images/icons/icon_up.gif | Bin 0 -> 1116 bytes .../themes/_corporate/images/icons/icon_up_d.gif | Bin 0 -> 691 bytes .../themes/_corporate/images/icons/icon_up_mo.gif | Bin 0 -> 1129 bytes .../themes/_corporate/images/icons/icon_wlan.gif | Bin 0 -> 66 bytes .../themes/_corporate/images/icons/icon_wlan_d.gif | Bin 0 -> 100 bytes .../_corporate/images/icons/icon_wol_all.gif | Bin 0 -> 1126 bytes .../_corporate/images/icons/icon_wzd_nsaved.png | Bin 0 -> 512 bytes .../_corporate/images/icons/icon_wzd_saved.png | Bin 0 -> 399 bytes .../www/themes/_corporate/images/icons/icon_x.gif | Bin 0 -> 1111 bytes .../themes/_corporate/images/icons/icon_x_d.gif | Bin 0 -> 680 bytes .../themes/_corporate/images/icons/icon_x_mo.gif | Bin 0 -> 1126 bytes .../themes/_corporate/images/icons/icon_x_p.gif | Bin 0 -> 1090 bytes .../www/themes/_corporate/images/icons/in.gif | Bin 0 -> 177 bytes .../www/themes/_corporate/images/icons/in_d.gif | Bin 0 -> 190 bytes .../www/themes/_corporate/images/icons/out.gif | Bin 0 -> 179 bytes .../www/themes/_corporate/images/icons/out_d.gif | Bin 0 -> 189 bytes src/usr/local/www/themes/_corporate/images/log.png | Bin 0 -> 270 bytes .../local/www/themes/_corporate/images/logo.gif | Bin 0 -> 10012 bytes .../www/themes/_corporate/images/menu_down.gif | Bin 0 -> 61 bytes .../www/themes/_corporate/images/menu_footer.gif | Bin 0 -> 234 bytes .../www/themes/_corporate/images/menu_right.gif | Bin 0 -> 61 bytes .../www/themes/_corporate/images/metal_bgr.gif | Bin 0 -> 734 bytes .../www/themes/_corporate/images/metal_bgr_red.gif | Bin 0 -> 734 bytes .../www/themes/_corporate/images/misc/bar_blue.gif | Bin 0 -> 94 bytes .../www/themes/_corporate/images/misc/bar_gray.gif | Bin 0 -> 94 bytes .../www/themes/_corporate/images/misc/bar_left.gif | Bin 0 -> 63 bytes .../themes/_corporate/images/misc/bar_right.gif | Bin 0 -> 61 bytes .../_corporate/images/misc/bullet_toggle_minus.png | Bin 0 -> 154 bytes .../_corporate/images/misc/bullet_toggle_plus.png | Bin 0 -> 156 bytes .../www/themes/_corporate/images/misc/button.gif | Bin 0 -> 805 bytes .../www/themes/_corporate/images/misc/key_128.gif | Bin 0 -> 2766 bytes .../www/themes/_corporate/images/misc/key_152.gif | Bin 0 -> 2772 bytes .../www/themes/_corporate/images/misc/key_256.gif | Bin 0 -> 2808 bytes .../www/themes/_corporate/images/misc/key_64.gif | Bin 0 -> 2723 bytes .../_corporate/images/misc/left_background.gif | Bin 0 -> 38943 bytes .../www/themes/_corporate/images/misc/loader.gif | Bin 0 -> 5971 bytes .../themes/_corporate/images/misc/loader_tab.gif | Bin 0 -> 5852 bytes .../www/themes/_corporate/images/misc/logon.png | Bin 0 -> 27029 bytes .../www/themes/_corporate/images/misc/plogo_0.gif | Bin 0 -> 2195 bytes .../www/themes/_corporate/images/misc/plogo_1.gif | Bin 0 -> 3851 bytes .../www/themes/_corporate/images/misc/plogo_10.gif | Bin 0 -> 10624 bytes .../www/themes/_corporate/images/misc/plogo_2.gif | Bin 0 -> 4611 bytes .../www/themes/_corporate/images/misc/plogo_3.gif | Bin 0 -> 5572 bytes .../www/themes/_corporate/images/misc/plogo_4.gif | Bin 0 -> 7103 bytes .../www/themes/_corporate/images/misc/plogo_5.gif | Bin 0 -> 8717 bytes .../www/themes/_corporate/images/misc/plogo_6.gif | Bin 0 -> 9422 bytes .../www/themes/_corporate/images/misc/plogo_7.gif | Bin 0 -> 9443 bytes .../www/themes/_corporate/images/misc/plogo_8.gif | Bin 0 -> 10240 bytes .../www/themes/_corporate/images/misc/plogo_9.gif | Bin 0 -> 10823 bytes .../themes/_corporate/images/misc/progress_bar.gif | Bin 0 -> 44791 bytes .../www/themes/_corporate/images/misc/tri_c.gif | Bin 0 -> 61 bytes .../themes/_corporate/images/misc/tri_c_black.gif | Bin 0 -> 69 bytes .../www/themes/_corporate/images/misc/tri_o.gif | Bin 0 -> 58 bytes .../themes/_corporate/images/misc/tri_o_black.gif | Bin 0 -> 67 bytes .../_corporate/images/misc/widget_loader.gif | Bin 0 -> 1064 bytes .../www/themes/_corporate/images/new_tab_menu.png | Bin 0 -> 444 bytes .../local/www/themes/_corporate/images/status.png | Bin 0 -> 348 bytes .../www/themes/_corporate/images/transparent.gif | Bin 0 -> 146 bytes .../themes/_corporate/images/transparent_pixel.gif | Bin 0 -> 43 bytes .../www/themes/_corporate/javascript/ie7/blank.gif | Bin 0 -> 48 bytes .../_corporate/javascript/ie7/ie7-box-model.js | 2 + .../themes/_corporate/javascript/ie7/ie7-core.js | 2 + .../_corporate/javascript/ie7/ie7-css-strict.js | 2 + .../themes/_corporate/javascript/ie7/ie7-css2.js | 2 + .../themes/_corporate/javascript/ie7/ie7-css3.js | 2 + .../themes/_corporate/javascript/ie7/ie7-fixed.js | 2 + .../themes/_corporate/javascript/ie7/ie7-html4.js | 2 + .../themes/_corporate/javascript/ie7/ie7-ie5.js | 2 + .../themes/_corporate/javascript/ie7/ie7-lite-p.js | 3 + .../themes/_corporate/javascript/ie7/ie7-lite.js | 2 + .../themes/_corporate/javascript/ie7/ie7-png.js | 2 + .../_corporate/javascript/ie7/ie7-server.css | 43 + .../_corporate/javascript/ie7/ie7-standard-p.js | 3 + .../_corporate/javascript/ie7/ie7-standard.js | 2 + .../_corporate/javascript/ie7/test-trans.png | Bin 0 -> 106 bytes .../themes/_corporate/javascript/niftyjsCode.js | 174 + src/usr/local/www/themes/_corporate/loader.js | 29 + .../local/www/themes/_corporate/new_tab_menu.css | 101 + .../local/www/themes/_corporate/new_tab_menu.png | Bin 0 -> 444 bytes .../local/www/themes/_corporate/rrdcolors.inc.php | 89 + .../themes/_corporate/styles/jquery-ui-1.11.1.css | 1226 ++++ src/usr/local/www/themes/code-red/all.css | 1301 +++++ src/usr/local/www/themes/code-red/bottom-loader.js | 10 + src/usr/local/www/themes/code-red/favicon.ico | Bin 0 -> 1406 bytes src/usr/local/www/themes/code-red/graphlink.css | 43 + .../local/www/themes/code-red/images/alert_bgr.png | Bin 0 -> 1407 bytes .../www/themes/code-red/images/background.gif | Bin 0 -> 112090 bytes .../www/themes/code-red/images/background.png | Bin 0 -> 8502 bytes .../www/themes/code-red/images/button_left.gif | Bin 0 -> 534 bytes .../www/themes/code-red/images/button_mid.gif | Bin 0 -> 149 bytes .../www/themes/code-red/images/button_right.gif | Bin 0 -> 333 bytes .../local/www/themes/code-red/images/footer.png | Bin 0 -> 25072 bytes .../local/www/themes/code-red/images/header.png | Bin 0 -> 43633 bytes src/usr/local/www/themes/code-red/images/help.png | Bin 0 -> 324 bytes .../www/themes/code-red/images/horizontal.gif | Bin 0 -> 461 bytes .../www/themes/code-red/images/icons/favicon.ico | Bin 0 -> 1406 bytes .../www/themes/code-red/images/icons/icon_3g.gif | Bin 0 -> 200 bytes .../code-red/images/icons/icon_3g_inactive.gif | Bin 0 -> 200 bytes .../themes/code-red/images/icons/icon_advanced.gif | Bin 0 -> 306 bytes .../code-red/images/icons/icon_advanced_s.gif | Bin 0 -> 314 bytes .../themes/code-red/images/icons/icon_alert.gif | Bin 0 -> 1015 bytes .../code-red/images/icons/icon_alias_host.gif | Bin 0 -> 348 bytes .../code-red/images/icons/icon_alias_net.gif | Bin 0 -> 331 bytes .../code-red/images/icons/icon_alias_port.gif | Bin 0 -> 346 bytes .../code-red/images/icons/icon_alias_url.gif | Bin 0 -> 314 bytes .../images/icons/icon_alias_url_reload.gif | Bin 0 -> 1111 bytes .../themes/code-red/images/icons/icon_block.gif | Bin 0 -> 193 bytes .../code-red/images/icons/icon_block_add.gif | Bin 0 -> 192 bytes .../themes/code-red/images/icons/icon_block_d.gif | Bin 0 -> 193 bytes .../themes/code-red/images/icons/icon_cablenic.gif | Bin 0 -> 109 bytes .../www/themes/code-red/images/icons/icon_cal.gif | Bin 0 -> 646 bytes .../themes/code-red/images/icons/icon_cal_mo.gif | Bin 0 -> 1060 bytes .../www/themes/code-red/images/icons/icon_carp.gif | Bin 0 -> 352 bytes .../themes/code-red/images/icons/icon_carp_d.gif | Bin 0 -> 357 bytes .../themes/code-red/images/icons/icon_chain.png | Bin 0 -> 161 bytes .../themes/code-red/images/icons/icon_check.gif | Bin 0 -> 1291 bytes .../code-red/images/icons/icon_clock_green.gif | Bin 0 -> 308 bytes .../code-red/images/icons/icon_clock_grey.gif | Bin 0 -> 308 bytes .../code-red/images/icons/icon_clock_red.gif | Bin 0 -> 308 bytes .../themes/code-red/images/icons/icon_close.gif | Bin 0 -> 64 bytes .../code-red/images/icons/icon_configure.gif | Bin 0 -> 64 bytes .../www/themes/code-red/images/icons/icon_down.gif | Bin 0 -> 1114 bytes .../themes/code-red/images/icons/icon_down_d.gif | Bin 0 -> 689 bytes .../themes/code-red/images/icons/icon_down_mo.gif | Bin 0 -> 1117 bytes .../www/themes/code-red/images/icons/icon_e.gif | Bin 0 -> 1106 bytes .../www/themes/code-red/images/icons/icon_e_mo.gif | Bin 0 -> 1120 bytes .../themes/code-red/images/icons/icon_error.gif | Bin 0 -> 1312 bytes .../themes/code-red/images/icons/icon_exclam.gif | Bin 0 -> 1274 bytes .../themes/code-red/images/icons/icon_flag_de.png | Bin 0 -> 114 bytes .../themes/code-red/images/icons/icon_flag_en.png | Bin 0 -> 618 bytes .../themes/code-red/images/icons/icon_flag_es.png | Bin 0 -> 281 bytes .../code-red/images/icons/icon_flag_pt_BR.png | Bin 0 -> 502 bytes .../code-red/images/icons/icon_frmfld_cert.png | Bin 0 -> 1528 bytes .../code-red/images/icons/icon_frmfld_file.png | Bin 0 -> 687 bytes .../code-red/images/icons/icon_frmfld_group.png | Bin 0 -> 748 bytes .../code-red/images/icons/icon_frmfld_host.png | Bin 0 -> 513 bytes .../code-red/images/icons/icon_frmfld_imp.png | Bin 0 -> 644 bytes .../code-red/images/icons/icon_frmfld_mail.png | Bin 0 -> 371 bytes .../code-red/images/icons/icon_frmfld_pwd.png | Bin 0 -> 620 bytes .../code-red/images/icons/icon_frmfld_search.png | Bin 0 -> 593 bytes .../code-red/images/icons/icon_frmfld_time.png | Bin 0 -> 646 bytes .../code-red/images/icons/icon_frmfld_unknown.png | Bin 0 -> 487 bytes .../code-red/images/icons/icon_frmfld_url.png | Bin 0 -> 704 bytes .../code-red/images/icons/icon_frmfld_user.png | Bin 0 -> 654 bytes .../code-red/images/icons/icon_fw-update.gif | Bin 0 -> 43785 bytes .../www/themes/code-red/images/icons/icon_help.gif | Bin 0 -> 1669 bytes .../themes/code-red/images/icons/icon_ifalias.gif | Bin 0 -> 315 bytes .../code-red/images/icons/icon_ifalias_d.gif | Bin 0 -> 315 bytes .../code-red/images/icons/icon_import_alias.gif | Bin 0 -> 1109 bytes .../www/themes/code-red/images/icons/icon_in.gif | Bin 0 -> 177 bytes .../www/themes/code-red/images/icons/icon_in_d.gif | Bin 0 -> 190 bytes .../themes/code-red/images/icons/icon_info_pkg.gif | Bin 0 -> 1131 bytes .../code-red/images/icons/icon_interface_down.gif | Bin 0 -> 88 bytes .../code-red/images/icons/icon_interface_up.gif | Bin 0 -> 87 bytes .../www/themes/code-red/images/icons/icon_left.gif | Bin 0 -> 1120 bytes .../themes/code-red/images/icons/icon_left_d.gif | Bin 0 -> 691 bytes .../themes/code-red/images/icons/icon_left_mo.gif | Bin 0 -> 1129 bytes .../www/themes/code-red/images/icons/icon_log.gif | Bin 0 -> 297 bytes .../themes/code-red/images/icons/icon_log_d.gif | Bin 0 -> 297 bytes .../themes/code-red/images/icons/icon_log_s.gif | Bin 0 -> 305 bytes .../themes/code-red/images/icons/icon_log_s_d.gif | Bin 0 -> 305 bytes .../www/themes/code-red/images/icons/icon_logs.gif | Bin 0 -> 2092 bytes .../themes/code-red/images/icons/icon_match.gif | Bin 0 -> 847 bytes .../themes/code-red/images/icons/icon_match_d.gif | Bin 0 -> 843 bytes .../themes/code-red/images/icons/icon_minus.gif | Bin 0 -> 61 bytes .../www/themes/code-red/images/icons/icon_open.gif | Bin 0 -> 62 bytes .../themes/code-red/images/icons/icon_other.gif | Bin 0 -> 125 bytes .../themes/code-red/images/icons/icon_other_d.gif | Bin 0 -> 125 bytes .../www/themes/code-red/images/icons/icon_out.gif | Bin 0 -> 179 bytes .../themes/code-red/images/icons/icon_out_d.gif | Bin 0 -> 189 bytes .../www/themes/code-red/images/icons/icon_parp.gif | Bin 0 -> 303 bytes .../themes/code-red/images/icons/icon_parp_d.gif | Bin 0 -> 303 bytes .../www/themes/code-red/images/icons/icon_pass.gif | Bin 0 -> 182 bytes .../themes/code-red/images/icons/icon_pass_add.gif | Bin 0 -> 183 bytes .../themes/code-red/images/icons/icon_pass_d.gif | Bin 0 -> 182 bytes .../www/themes/code-red/images/icons/icon_plus.gif | Bin 0 -> 1100 bytes .../themes/code-red/images/icons/icon_plus_bl.gif | Bin 0 -> 1096 bytes .../code-red/images/icons/icon_plus_bl_p.gif | Bin 0 -> 1079 bytes .../themes/code-red/images/icons/icon_plus_d.gif | Bin 0 -> 682 bytes .../themes/code-red/images/icons/icon_plus_mo.gif | Bin 0 -> 1120 bytes .../themes/code-red/images/icons/icon_plus_p.gif | Bin 0 -> 1087 bytes .../code-red/images/icons/icon_reinstall.gif | Bin 0 -> 1119 bytes .../code-red/images/icons/icon_reinstall_d.gif | Bin 0 -> 701 bytes .../code-red/images/icons/icon_reinstall_mo.gif | Bin 0 -> 1130 bytes .../code-red/images/icons/icon_reinstall_pkg.gif | Bin 0 -> 1109 bytes .../code-red/images/icons/icon_reinstall_pkg_d.gif | Bin 0 -> 694 bytes .../images/icons/icon_reinstall_pkg_mo.gif | Bin 0 -> 1135 bytes .../code-red/images/icons/icon_reinstall_xml.gif | Bin 0 -> 1105 bytes .../code-red/images/icons/icon_reinstall_xml_d.gif | Bin 0 -> 686 bytes .../images/icons/icon_reinstall_xml_mo.gif | Bin 0 -> 1131 bytes .../themes/code-red/images/icons/icon_reject.gif | Bin 0 -> 193 bytes .../themes/code-red/images/icons/icon_reject_d.gif | Bin 0 -> 193 bytes .../themes/code-red/images/icons/icon_right.gif | Bin 0 -> 1117 bytes .../code-red/images/icons/icon_service_restart.gif | Bin 0 -> 1120 bytes .../images/icons/icon_service_restart_d.gif | Bin 0 -> 1115 bytes .../code-red/images/icons/icon_service_running.gif | Bin 0 -> 1390 bytes .../code-red/images/icons/icon_service_start.gif | Bin 0 -> 1119 bytes .../code-red/images/icons/icon_service_start_d.gif | Bin 0 -> 1115 bytes .../code-red/images/icons/icon_service_status.gif | Bin 0 -> 2150 bytes .../code-red/images/icons/icon_service_stop.gif | Bin 0 -> 1106 bytes .../code-red/images/icons/icon_service_stop_d.gif | Bin 0 -> 1100 bytes .../code-red/images/icons/icon_service_stopped.gif | Bin 0 -> 1695 bytes .../images/icons/icon_services_restart_mo.gif | Bin 0 -> 1129 bytes .../images/icons/icon_services_start_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_services_stop_mo.gif | Bin 0 -> 1126 bytes .../images/icons/icon_system-group-grey.png | Bin 0 -> 1566 bytes .../code-red/images/icons/icon_system-group.png | Bin 0 -> 3128 bytes .../images/icons/icon_system-user-grey.png | Bin 0 -> 1107 bytes .../code-red/images/icons/icon_system-user.png | Bin 0 -> 2084 bytes .../images/icons/icon_system_lock_screen.png | Bin 0 -> 1841 bytes .../code-red/images/icons/icon_system_logout.png | Bin 0 -> 2087 bytes .../themes/code-red/images/icons/icon_trapped.gif | Bin 0 -> 1101 bytes .../code-red/images/icons/icon_trapped_p.gif | Bin 0 -> 1079 bytes .../themes/code-red/images/icons/icon_ts_rule.gif | Bin 0 -> 194 bytes .../code-red/images/icons/icon_ts_rule_d.gif | Bin 0 -> 193 bytes .../www/themes/code-red/images/icons/icon_up.gif | Bin 0 -> 1116 bytes .../www/themes/code-red/images/icons/icon_up_d.gif | Bin 0 -> 691 bytes .../themes/code-red/images/icons/icon_up_mo.gif | Bin 0 -> 1129 bytes .../www/themes/code-red/images/icons/icon_wlan.gif | Bin 0 -> 66 bytes .../themes/code-red/images/icons/icon_wlan_d.gif | Bin 0 -> 100 bytes .../themes/code-red/images/icons/icon_wol_all.gif | Bin 0 -> 1126 bytes .../code-red/images/icons/icon_wzd_nsaved.png | Bin 0 -> 512 bytes .../code-red/images/icons/icon_wzd_saved.png | Bin 0 -> 399 bytes .../www/themes/code-red/images/icons/icon_x.gif | Bin 0 -> 1111 bytes .../www/themes/code-red/images/icons/icon_x_d.gif | Bin 0 -> 680 bytes .../www/themes/code-red/images/icons/icon_x_mo.gif | Bin 0 -> 1126 bytes .../www/themes/code-red/images/icons/icon_x_p.gif | Bin 0 -> 1090 bytes .../local/www/themes/code-red/images/icons/in.gif | Bin 0 -> 177 bytes .../www/themes/code-red/images/icons/in_d.gif | Bin 0 -> 190 bytes .../local/www/themes/code-red/images/icons/out.gif | Bin 0 -> 179 bytes .../www/themes/code-red/images/icons/out_d.gif | Bin 0 -> 189 bytes src/usr/local/www/themes/code-red/images/log.png | Bin 0 -> 270 bytes src/usr/local/www/themes/code-red/images/logo.gif | Bin 0 -> 7555 bytes .../local/www/themes/code-red/images/logobig.jpg | Bin 0 -> 7697 bytes .../themes/code-red/images/logon-background.gif | Bin 0 -> 114596 bytes .../local/www/themes/code-red/images/menu_down.gif | Bin 0 -> 61 bytes .../www/themes/code-red/images/menu_footer.gif | Bin 0 -> 234 bytes .../www/themes/code-red/images/menu_right.gif | Bin 0 -> 61 bytes .../local/www/themes/code-red/images/menubgr.png | Bin 0 -> 132 bytes .../www/themes/code-red/images/menubgr_footer.png | Bin 0 -> 372 bytes .../themes/code-red/images/menubgr_highlight.png | Bin 0 -> 129 bytes .../local/www/themes/code-red/images/metal_bgr.gif | Bin 0 -> 734 bytes .../www/themes/code-red/images/metal_bgr_red.gif | Bin 0 -> 734 bytes .../www/themes/code-red/images/misc/background.gif | Bin 0 -> 115138 bytes .../www/themes/code-red/images/misc/bar_blue.gif | Bin 0 -> 94 bytes .../www/themes/code-red/images/misc/bar_gray.gif | Bin 0 -> 94 bytes .../www/themes/code-red/images/misc/bar_left.gif | Bin 0 -> 289 bytes .../www/themes/code-red/images/misc/bar_right.gif | Bin 0 -> 288 bytes .../code-red/images/misc/bullet_toggle_minus.png | Bin 0 -> 154 bytes .../code-red/images/misc/bullet_toggle_plus.png | Bin 0 -> 156 bytes .../www/themes/code-red/images/misc/button.gif | Bin 0 -> 805 bytes .../www/themes/code-red/images/misc/graph.png | Bin 0 -> 2256 bytes .../www/themes/code-red/images/misc/key_128.gif | Bin 0 -> 2766 bytes .../www/themes/code-red/images/misc/key_152.gif | Bin 0 -> 2772 bytes .../www/themes/code-red/images/misc/key_256.gif | Bin 0 -> 2808 bytes .../www/themes/code-red/images/misc/key_64.gif | Bin 0 -> 2723 bytes .../code-red/images/misc/left_background.gif | Bin 0 -> 38943 bytes .../www/themes/code-red/images/misc/loader.gif | Bin 0 -> 5971 bytes .../www/themes/code-red/images/misc/loader_all.gif | Bin 0 -> 1398 bytes .../themes/code-red/images/misc/loader_filter.gif | Bin 0 -> 1436 bytes .../www/themes/code-red/images/misc/loader_tab.gif | Bin 0 -> 5852 bytes .../www/themes/code-red/images/misc/logon.png | Bin 0 -> 65956 bytes .../www/themes/code-red/images/misc/plogo_0.gif | Bin 0 -> 2195 bytes .../www/themes/code-red/images/misc/plogo_1.gif | Bin 0 -> 3851 bytes .../www/themes/code-red/images/misc/plogo_10.gif | Bin 0 -> 10624 bytes .../www/themes/code-red/images/misc/plogo_2.gif | Bin 0 -> 4611 bytes .../www/themes/code-red/images/misc/plogo_3.gif | Bin 0 -> 5572 bytes .../www/themes/code-red/images/misc/plogo_4.gif | Bin 0 -> 7103 bytes .../www/themes/code-red/images/misc/plogo_5.gif | Bin 0 -> 8717 bytes .../www/themes/code-red/images/misc/plogo_6.gif | Bin 0 -> 9422 bytes .../www/themes/code-red/images/misc/plogo_7.gif | Bin 0 -> 9443 bytes .../www/themes/code-red/images/misc/plogo_8.gif | Bin 0 -> 10240 bytes .../www/themes/code-red/images/misc/plogo_9.gif | Bin 0 -> 10823 bytes .../themes/code-red/images/misc/progress_bar.gif | Bin 0 -> 44791 bytes .../www/themes/code-red/images/misc/rrd_error.png | Bin 0 -> 38898 bytes .../themes/code-red/images/misc/status_alerter.gif | Bin 0 -> 2203 bytes .../code-red/images/misc/status_carpmaster.gif | Bin 0 -> 1558 bytes .../themes/code-red/images/misc/status_left.gif | Bin 0 -> 600 bytes .../code-red/images/misc/status_page_loading.gif | Bin 0 -> 1621 bytes .../code-red/images/misc/status_reload_all.gif | Bin 0 -> 1611 bytes .../code-red/images/misc/status_reload_filter.gif | Bin 0 -> 1612 bytes .../themes/code-red/images/misc/status_right.gif | Bin 0 -> 599 bytes .../www/themes/code-red/images/misc/tri_c.gif | Bin 0 -> 61 bytes .../themes/code-red/images/misc/tri_c_black.gif | Bin 0 -> 69 bytes .../www/themes/code-red/images/misc/tri_o.gif | Bin 0 -> 58 bytes .../themes/code-red/images/misc/tri_o_black.gif | Bin 0 -> 67 bytes .../themes/code-red/images/misc/widget_loader.gif | Bin 0 -> 2545 bytes .../www/themes/code-red/images/new_tab_menu.png | Bin 0 -> 444 bytes .../local/www/themes/code-red/images/status.png | Bin 0 -> 348 bytes .../www/themes/code-red/images/transparent.gif | Bin 0 -> 146 bytes .../themes/code-red/images/transparent_pixel.gif | Bin 0 -> 43 bytes .../www/themes/code-red/javascript/ie7/blank.gif | Bin 0 -> 48 bytes .../code-red/javascript/ie7/ie7-box-model.js | 2 + .../www/themes/code-red/javascript/ie7/ie7-core.js | 2 + .../code-red/javascript/ie7/ie7-css-strict.js | 2 + .../www/themes/code-red/javascript/ie7/ie7-css2.js | 2 + .../www/themes/code-red/javascript/ie7/ie7-css3.js | 2 + .../themes/code-red/javascript/ie7/ie7-fixed.js | 2 + .../themes/code-red/javascript/ie7/ie7-html4.js | 2 + .../www/themes/code-red/javascript/ie7/ie7-ie5.js | 2 + .../themes/code-red/javascript/ie7/ie7-lite-p.js | 3 + .../www/themes/code-red/javascript/ie7/ie7-lite.js | 2 + .../www/themes/code-red/javascript/ie7/ie7-png.js | 2 + .../themes/code-red/javascript/ie7/ie7-server.css | 43 + .../code-red/javascript/ie7/ie7-standard-p.js | 3 + .../themes/code-red/javascript/ie7/ie7-standard.js | 2 + .../themes/code-red/javascript/ie7/test-trans.png | Bin 0 -> 106 bytes .../www/themes/code-red/javascript/img/grey-40.png | Bin 0 -> 223 bytes .../themes/code-red/javascript/img/submenu-off.gif | Bin 0 -> 65 bytes .../themes/code-red/javascript/img/submenu-on.gif | Bin 0 -> 65 bytes .../themes/code-red/javascript/img/white-90.png | Bin 0 -> 223 bytes .../local/www/themes/code-red/javascript/img/x.gif | Bin 0 -> 43 bytes .../www/themes/code-red/javascript/niftyjsCode.js | 174 + .../themes/code-red/javascript/transmenu-body.php | 53 + .../themes/code-red/javascript/transmenu-head.php | 87 + .../www/themes/code-red/javascript/transmenu.org | 785 +++ .../www/themes/code-red/javascript/transmenuC.js | 86 + .../local/www/themes/code-red/jsevents/body.def | 7 + src/usr/local/www/themes/code-red/loader.js | 29 + src/usr/local/www/themes/code-red/login.css | 1136 ++++ src/usr/local/www/themes/code-red/menu.inc | 177 + src/usr/local/www/themes/code-red/new_tab_menu.css | 101 + src/usr/local/www/themes/code-red/no_big_logo | 1 + .../local/www/themes/code-red/rrdcolors.inc.php | 89 + .../themes/code-red/styles/jquery-ui-1.11.1.css | 1226 ++++ .../www/themes/code-red/styles/menustyles.css | 44 + .../local/www/themes/code-red/styles/transmenu.css | 75 + src/usr/local/www/themes/code-red/wizard.css | 1068 ++++ src/usr/local/www/themes/metallic/all.css | 1269 ++++ .../local/www/themes/metallic/apple-touch-icon.png | Bin 0 -> 4068 bytes src/usr/local/www/themes/metallic/bottom-loader.js | 10 + .../local/www/themes/metallic/images/alert_bgr.gif | Bin 0 -> 3415 bytes .../local/www/themes/metallic/images/footer.gif | Bin 0 -> 20440 bytes .../local/www/themes/metallic/images/header.gif | Bin 0 -> 33347 bytes src/usr/local/www/themes/metallic/images/help.png | Bin 0 -> 324 bytes .../www/themes/metallic/images/horizontal.gif | Bin 0 -> 461 bytes .../www/themes/metallic/images/icons/favicon.ico | Bin 0 -> 1406 bytes .../www/themes/metallic/images/icons/icon_3g.gif | Bin 0 -> 200 bytes .../metallic/images/icons/icon_3g_inactive.gif | Bin 0 -> 200 bytes .../themes/metallic/images/icons/icon_advanced.gif | Bin 0 -> 306 bytes .../metallic/images/icons/icon_advanced_s.gif | Bin 0 -> 314 bytes .../themes/metallic/images/icons/icon_alert.gif | Bin 0 -> 1015 bytes .../metallic/images/icons/icon_alias_host.gif | Bin 0 -> 348 bytes .../metallic/images/icons/icon_alias_net.gif | Bin 0 -> 331 bytes .../metallic/images/icons/icon_alias_port.gif | Bin 0 -> 346 bytes .../metallic/images/icons/icon_alias_url.gif | Bin 0 -> 314 bytes .../images/icons/icon_alias_url_reload.gif | Bin 0 -> 1111 bytes .../themes/metallic/images/icons/icon_block.gif | Bin 0 -> 193 bytes .../metallic/images/icons/icon_block_add.gif | Bin 0 -> 192 bytes .../themes/metallic/images/icons/icon_block_d.gif | Bin 0 -> 193 bytes .../themes/metallic/images/icons/icon_cablenic.gif | Bin 0 -> 91 bytes .../www/themes/metallic/images/icons/icon_cal.gif | Bin 0 -> 646 bytes .../themes/metallic/images/icons/icon_cal_mo.gif | Bin 0 -> 1060 bytes .../www/themes/metallic/images/icons/icon_carp.gif | Bin 0 -> 352 bytes .../themes/metallic/images/icons/icon_carp_d.gif | Bin 0 -> 357 bytes .../themes/metallic/images/icons/icon_chain.png | Bin 0 -> 161 bytes .../themes/metallic/images/icons/icon_check.gif | Bin 0 -> 1291 bytes .../metallic/images/icons/icon_clock_green.gif | Bin 0 -> 308 bytes .../metallic/images/icons/icon_clock_grey.gif | Bin 0 -> 308 bytes .../metallic/images/icons/icon_clock_red.gif | Bin 0 -> 308 bytes .../themes/metallic/images/icons/icon_close.gif | Bin 0 -> 64 bytes .../metallic/images/icons/icon_configure.gif | Bin 0 -> 64 bytes .../www/themes/metallic/images/icons/icon_down.gif | Bin 0 -> 1114 bytes .../themes/metallic/images/icons/icon_down_d.gif | Bin 0 -> 689 bytes .../themes/metallic/images/icons/icon_down_mo.gif | Bin 0 -> 1117 bytes .../www/themes/metallic/images/icons/icon_e.gif | Bin 0 -> 1106 bytes .../www/themes/metallic/images/icons/icon_e_mo.gif | Bin 0 -> 1120 bytes .../themes/metallic/images/icons/icon_error.gif | Bin 0 -> 1312 bytes .../themes/metallic/images/icons/icon_exclam.gif | Bin 0 -> 1274 bytes .../themes/metallic/images/icons/icon_flag_de.png | Bin 0 -> 114 bytes .../themes/metallic/images/icons/icon_flag_en.png | Bin 0 -> 618 bytes .../themes/metallic/images/icons/icon_flag_es.png | Bin 0 -> 281 bytes .../metallic/images/icons/icon_flag_pt_BR.png | Bin 0 -> 502 bytes .../metallic/images/icons/icon_frmfld_cert.png | Bin 0 -> 1528 bytes .../metallic/images/icons/icon_frmfld_file.png | Bin 0 -> 687 bytes .../metallic/images/icons/icon_frmfld_group.png | Bin 0 -> 748 bytes .../metallic/images/icons/icon_frmfld_host.png | Bin 0 -> 513 bytes .../metallic/images/icons/icon_frmfld_imp.png | Bin 0 -> 644 bytes .../metallic/images/icons/icon_frmfld_mail.png | Bin 0 -> 371 bytes .../metallic/images/icons/icon_frmfld_pwd.png | Bin 0 -> 620 bytes .../metallic/images/icons/icon_frmfld_search.png | Bin 0 -> 593 bytes .../metallic/images/icons/icon_frmfld_time.png | Bin 0 -> 646 bytes .../metallic/images/icons/icon_frmfld_unknown.png | Bin 0 -> 487 bytes .../metallic/images/icons/icon_frmfld_url.png | Bin 0 -> 704 bytes .../metallic/images/icons/icon_frmfld_user.png | Bin 0 -> 654 bytes .../metallic/images/icons/icon_fw-update.gif | Bin 0 -> 43785 bytes .../www/themes/metallic/images/icons/icon_help.gif | Bin 0 -> 1669 bytes .../themes/metallic/images/icons/icon_ifalias.gif | Bin 0 -> 315 bytes .../metallic/images/icons/icon_ifalias_d.gif | Bin 0 -> 315 bytes .../metallic/images/icons/icon_import_alias.gif | Bin 0 -> 1109 bytes .../www/themes/metallic/images/icons/icon_in.gif | Bin 0 -> 177 bytes .../www/themes/metallic/images/icons/icon_in_d.gif | Bin 0 -> 190 bytes .../themes/metallic/images/icons/icon_info_pkg.gif | Bin 0 -> 1131 bytes .../metallic/images/icons/icon_interface_down.gif | Bin 0 -> 88 bytes .../metallic/images/icons/icon_interface_up.gif | Bin 0 -> 87 bytes .../www/themes/metallic/images/icons/icon_left.gif | Bin 0 -> 1120 bytes .../themes/metallic/images/icons/icon_left_d.gif | Bin 0 -> 691 bytes .../themes/metallic/images/icons/icon_left_mo.gif | Bin 0 -> 1129 bytes .../www/themes/metallic/images/icons/icon_log.gif | Bin 0 -> 297 bytes .../themes/metallic/images/icons/icon_log_d.gif | Bin 0 -> 297 bytes .../themes/metallic/images/icons/icon_log_s.gif | Bin 0 -> 305 bytes .../themes/metallic/images/icons/icon_log_s_d.gif | Bin 0 -> 305 bytes .../www/themes/metallic/images/icons/icon_logs.gif | Bin 0 -> 2092 bytes .../themes/metallic/images/icons/icon_match.gif | Bin 0 -> 847 bytes .../themes/metallic/images/icons/icon_match_d.gif | Bin 0 -> 843 bytes .../themes/metallic/images/icons/icon_minus.gif | Bin 0 -> 61 bytes .../www/themes/metallic/images/icons/icon_open.gif | Bin 0 -> 62 bytes .../themes/metallic/images/icons/icon_other.gif | Bin 0 -> 125 bytes .../themes/metallic/images/icons/icon_other_d.gif | Bin 0 -> 125 bytes .../www/themes/metallic/images/icons/icon_out.gif | Bin 0 -> 179 bytes .../themes/metallic/images/icons/icon_out_d.gif | Bin 0 -> 189 bytes .../www/themes/metallic/images/icons/icon_parp.gif | Bin 0 -> 303 bytes .../themes/metallic/images/icons/icon_parp_d.gif | Bin 0 -> 303 bytes .../www/themes/metallic/images/icons/icon_pass.gif | Bin 0 -> 182 bytes .../themes/metallic/images/icons/icon_pass_add.gif | Bin 0 -> 183 bytes .../themes/metallic/images/icons/icon_pass_d.gif | Bin 0 -> 182 bytes .../www/themes/metallic/images/icons/icon_plus.gif | Bin 0 -> 1100 bytes .../themes/metallic/images/icons/icon_plus_bl.gif | Bin 0 -> 1096 bytes .../metallic/images/icons/icon_plus_bl_p.gif | Bin 0 -> 1079 bytes .../themes/metallic/images/icons/icon_plus_d.gif | Bin 0 -> 682 bytes .../themes/metallic/images/icons/icon_plus_mo.gif | Bin 0 -> 1120 bytes .../themes/metallic/images/icons/icon_plus_p.gif | Bin 0 -> 1087 bytes .../metallic/images/icons/icon_reinstall.gif | Bin 0 -> 1119 bytes .../metallic/images/icons/icon_reinstall_d.gif | Bin 0 -> 701 bytes .../metallic/images/icons/icon_reinstall_mo.gif | Bin 0 -> 1130 bytes .../metallic/images/icons/icon_reinstall_pkg.gif | Bin 0 -> 1109 bytes .../metallic/images/icons/icon_reinstall_pkg_d.gif | Bin 0 -> 694 bytes .../images/icons/icon_reinstall_pkg_mo.gif | Bin 0 -> 1135 bytes .../metallic/images/icons/icon_reinstall_xml.gif | Bin 0 -> 1105 bytes .../metallic/images/icons/icon_reinstall_xml_d.gif | Bin 0 -> 686 bytes .../images/icons/icon_reinstall_xml_mo.gif | Bin 0 -> 1131 bytes .../themes/metallic/images/icons/icon_reject.gif | Bin 0 -> 193 bytes .../themes/metallic/images/icons/icon_reject_d.gif | Bin 0 -> 193 bytes .../themes/metallic/images/icons/icon_right.gif | Bin 0 -> 1117 bytes .../metallic/images/icons/icon_service_restart.gif | Bin 0 -> 1120 bytes .../images/icons/icon_service_restart_d.gif | Bin 0 -> 1115 bytes .../metallic/images/icons/icon_service_running.gif | Bin 0 -> 1390 bytes .../metallic/images/icons/icon_service_start.gif | Bin 0 -> 1119 bytes .../metallic/images/icons/icon_service_start_d.gif | Bin 0 -> 1115 bytes .../metallic/images/icons/icon_service_status.gif | Bin 0 -> 2150 bytes .../metallic/images/icons/icon_service_stop.gif | Bin 0 -> 1106 bytes .../metallic/images/icons/icon_service_stop_d.gif | Bin 0 -> 1100 bytes .../metallic/images/icons/icon_service_stopped.gif | Bin 0 -> 1695 bytes .../images/icons/icon_services_restart_mo.gif | Bin 0 -> 1129 bytes .../images/icons/icon_services_start_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_services_stop_mo.gif | Bin 0 -> 1126 bytes .../images/icons/icon_system-group-grey.png | Bin 0 -> 1566 bytes .../metallic/images/icons/icon_system-group.png | Bin 0 -> 3128 bytes .../images/icons/icon_system-user-grey.png | Bin 0 -> 1107 bytes .../metallic/images/icons/icon_system-user.png | Bin 0 -> 2084 bytes .../images/icons/icon_system_lock_screen.png | Bin 0 -> 1841 bytes .../metallic/images/icons/icon_system_logout.png | Bin 0 -> 2087 bytes .../themes/metallic/images/icons/icon_trapped.gif | Bin 0 -> 1101 bytes .../metallic/images/icons/icon_trapped_p.gif | Bin 0 -> 1079 bytes .../themes/metallic/images/icons/icon_ts_rule.gif | Bin 0 -> 194 bytes .../metallic/images/icons/icon_ts_rule_d.gif | Bin 0 -> 193 bytes .../www/themes/metallic/images/icons/icon_up.gif | Bin 0 -> 1116 bytes .../www/themes/metallic/images/icons/icon_up_d.gif | Bin 0 -> 691 bytes .../themes/metallic/images/icons/icon_up_mo.gif | Bin 0 -> 1129 bytes .../www/themes/metallic/images/icons/icon_wlan.gif | Bin 0 -> 66 bytes .../themes/metallic/images/icons/icon_wlan_d.gif | Bin 0 -> 100 bytes .../themes/metallic/images/icons/icon_wol_all.gif | Bin 0 -> 1126 bytes .../metallic/images/icons/icon_wzd_nsaved.png | Bin 0 -> 512 bytes .../metallic/images/icons/icon_wzd_saved.png | Bin 0 -> 399 bytes .../www/themes/metallic/images/icons/icon_x.gif | Bin 0 -> 1111 bytes .../www/themes/metallic/images/icons/icon_x_d.gif | Bin 0 -> 680 bytes .../www/themes/metallic/images/icons/icon_x_mo.gif | Bin 0 -> 1126 bytes .../www/themes/metallic/images/icons/icon_x_p.gif | Bin 0 -> 1090 bytes .../local/www/themes/metallic/images/icons/in.gif | Bin 0 -> 177 bytes .../www/themes/metallic/images/icons/in_d.gif | Bin 0 -> 190 bytes .../local/www/themes/metallic/images/icons/out.gif | Bin 0 -> 179 bytes .../www/themes/metallic/images/icons/out_d.gif | Bin 0 -> 189 bytes src/usr/local/www/themes/metallic/images/log.png | Bin 0 -> 270 bytes src/usr/local/www/themes/metallic/images/logo.gif | Bin 0 -> 10012 bytes .../local/www/themes/metallic/images/logobig.jpg | Bin 0 -> 7540 bytes .../local/www/themes/metallic/images/menu_down.gif | Bin 0 -> 61 bytes .../www/themes/metallic/images/menu_footer.gif | Bin 0 -> 234 bytes .../www/themes/metallic/images/menu_right.gif | Bin 0 -> 61 bytes .../local/www/themes/metallic/images/metal_bgr.gif | Bin 0 -> 734 bytes .../www/themes/metallic/images/metal_bgr_red.gif | Bin 0 -> 734 bytes .../www/themes/metallic/images/misc/bar_blue.gif | Bin 0 -> 94 bytes .../www/themes/metallic/images/misc/bar_gray.gif | Bin 0 -> 94 bytes .../www/themes/metallic/images/misc/bar_left.gif | Bin 0 -> 289 bytes .../www/themes/metallic/images/misc/bar_right.gif | Bin 0 -> 288 bytes .../metallic/images/misc/bullet_toggle_minus.png | Bin 0 -> 154 bytes .../metallic/images/misc/bullet_toggle_plus.png | Bin 0 -> 156 bytes .../www/themes/metallic/images/misc/button.gif | Bin 0 -> 805 bytes .../www/themes/metallic/images/misc/graph.png | Bin 0 -> 2256 bytes .../www/themes/metallic/images/misc/key_128.gif | Bin 0 -> 2766 bytes .../www/themes/metallic/images/misc/key_152.gif | Bin 0 -> 2772 bytes .../www/themes/metallic/images/misc/key_256.gif | Bin 0 -> 2808 bytes .../www/themes/metallic/images/misc/key_64.gif | Bin 0 -> 2723 bytes .../metallic/images/misc/left_background.gif | Bin 0 -> 38943 bytes .../www/themes/metallic/images/misc/loader.gif | Bin 0 -> 5971 bytes .../www/themes/metallic/images/misc/loader_all.gif | Bin 0 -> 1398 bytes .../themes/metallic/images/misc/loader_filter.gif | Bin 0 -> 1436 bytes .../www/themes/metallic/images/misc/loader_tab.gif | Bin 0 -> 5852 bytes .../www/themes/metallic/images/misc/logon.png | Bin 0 -> 27029 bytes .../themes/metallic/images/misc/progress_bar.gif | Bin 0 -> 44791 bytes .../www/themes/metallic/images/misc/rrd_error.png | Bin 0 -> 38898 bytes .../themes/metallic/images/misc/status_alerter.gif | Bin 0 -> 2203 bytes .../metallic/images/misc/status_carpmaster.gif | Bin 0 -> 1558 bytes .../themes/metallic/images/misc/status_left.gif | Bin 0 -> 600 bytes .../metallic/images/misc/status_page_loading.gif | Bin 0 -> 1621 bytes .../metallic/images/misc/status_reload_all.gif | Bin 0 -> 1611 bytes .../metallic/images/misc/status_reload_filter.gif | Bin 0 -> 1612 bytes .../themes/metallic/images/misc/status_right.gif | Bin 0 -> 599 bytes .../www/themes/metallic/images/misc/tri_c.gif | Bin 0 -> 61 bytes .../themes/metallic/images/misc/tri_c_black.gif | Bin 0 -> 84 bytes .../www/themes/metallic/images/misc/tri_o.gif | Bin 0 -> 58 bytes .../themes/metallic/images/misc/tri_o_black.gif | Bin 0 -> 82 bytes .../themes/metallic/images/misc/widget_loader.gif | Bin 0 -> 1064 bytes .../www/themes/metallic/images/new_tab_menu.png | Bin 0 -> 444 bytes .../local/www/themes/metallic/images/status.png | Bin 0 -> 348 bytes .../www/themes/metallic/images/transparent.gif | Bin 0 -> 146 bytes .../themes/metallic/images/transparent_pixel.gif | Bin 0 -> 43 bytes .../www/themes/metallic/javascript/ie7/blank.gif | Bin 0 -> 48 bytes .../metallic/javascript/ie7/ie7-box-model.js | 2 + .../www/themes/metallic/javascript/ie7/ie7-core.js | 2 + .../metallic/javascript/ie7/ie7-css-strict.js | 2 + .../www/themes/metallic/javascript/ie7/ie7-css2.js | 2 + .../www/themes/metallic/javascript/ie7/ie7-css3.js | 2 + .../themes/metallic/javascript/ie7/ie7-fixed.js | 2 + .../themes/metallic/javascript/ie7/ie7-html4.js | 2 + .../www/themes/metallic/javascript/ie7/ie7-ie5.js | 2 + .../themes/metallic/javascript/ie7/ie7-lite-p.js | 3 + .../www/themes/metallic/javascript/ie7/ie7-lite.js | 2 + .../www/themes/metallic/javascript/ie7/ie7-png.js | 2 + .../themes/metallic/javascript/ie7/ie7-server.css | 43 + .../metallic/javascript/ie7/ie7-standard-p.js | 3 + .../themes/metallic/javascript/ie7/ie7-standard.js | 2 + .../themes/metallic/javascript/ie7/test-trans.png | Bin 0 -> 106 bytes .../www/themes/metallic/javascript/niftyjsCode.js | 174 + src/usr/local/www/themes/metallic/loader.js | 29 + src/usr/local/www/themes/metallic/login.css | 1127 ++++ src/usr/local/www/themes/metallic/new_tab_menu.css | 101 + src/usr/local/www/themes/metallic/no_big_logo | 1 + .../local/www/themes/metallic/rrdcolors.inc.php | 89 + .../themes/metallic/styles/jquery-ui-1.11.1.css | 1226 ++++ src/usr/local/www/themes/nervecenter/all.css | 1301 +++++ .../www/themes/nervecenter/apple-touch-icon.png | Bin 0 -> 4068 bytes .../local/www/themes/nervecenter/bottom-loader.js | 10 + src/usr/local/www/themes/nervecenter/favicon.ico | Bin 0 -> 1406 bytes src/usr/local/www/themes/nervecenter/graphlink.css | 43 + .../www/themes/nervecenter/images/alert_bgr.png | Bin 0 -> 10240 bytes .../www/themes/nervecenter/images/background.gif | Bin 0 -> 44574 bytes .../www/themes/nervecenter/images/background.png | Bin 0 -> 8502 bytes .../local/www/themes/nervecenter/images/footer.png | Bin 0 -> 41755 bytes .../local/www/themes/nervecenter/images/header.png | Bin 0 -> 49602 bytes .../local/www/themes/nervecenter/images/help.png | Bin 0 -> 324 bytes .../www/themes/nervecenter/images/horizontal.gif | Bin 0 -> 461 bytes .../themes/nervecenter/images/icons/favicon.ico | Bin 0 -> 1406 bytes .../themes/nervecenter/images/icons/icon_3g.gif | Bin 0 -> 200 bytes .../nervecenter/images/icons/icon_3g_inactive.gif | Bin 0 -> 200 bytes .../nervecenter/images/icons/icon_advanced.gif | Bin 0 -> 306 bytes .../nervecenter/images/icons/icon_advanced_s.gif | Bin 0 -> 314 bytes .../themes/nervecenter/images/icons/icon_alert.gif | Bin 0 -> 1015 bytes .../nervecenter/images/icons/icon_alias_host.gif | Bin 0 -> 348 bytes .../nervecenter/images/icons/icon_alias_net.gif | Bin 0 -> 331 bytes .../nervecenter/images/icons/icon_alias_port.gif | Bin 0 -> 346 bytes .../nervecenter/images/icons/icon_alias_url.gif | Bin 0 -> 314 bytes .../images/icons/icon_alias_url_reload.gif | Bin 0 -> 1111 bytes .../themes/nervecenter/images/icons/icon_block.gif | Bin 0 -> 193 bytes .../nervecenter/images/icons/icon_block_add.gif | Bin 0 -> 192 bytes .../nervecenter/images/icons/icon_block_d.gif | Bin 0 -> 193 bytes .../nervecenter/images/icons/icon_cablenic.gif | Bin 0 -> 91 bytes .../themes/nervecenter/images/icons/icon_cal.gif | Bin 0 -> 646 bytes .../nervecenter/images/icons/icon_cal_mo.gif | Bin 0 -> 1060 bytes .../themes/nervecenter/images/icons/icon_carp.gif | Bin 0 -> 352 bytes .../nervecenter/images/icons/icon_carp_d.gif | Bin 0 -> 357 bytes .../themes/nervecenter/images/icons/icon_chain.png | Bin 0 -> 161 bytes .../themes/nervecenter/images/icons/icon_check.gif | Bin 0 -> 1291 bytes .../nervecenter/images/icons/icon_clock_green.gif | Bin 0 -> 308 bytes .../nervecenter/images/icons/icon_clock_grey.gif | Bin 0 -> 308 bytes .../nervecenter/images/icons/icon_clock_red.gif | Bin 0 -> 308 bytes .../themes/nervecenter/images/icons/icon_close.gif | Bin 0 -> 64 bytes .../nervecenter/images/icons/icon_configure.gif | Bin 0 -> 64 bytes .../themes/nervecenter/images/icons/icon_down.gif | Bin 0 -> 1114 bytes .../nervecenter/images/icons/icon_down_d.gif | Bin 0 -> 689 bytes .../nervecenter/images/icons/icon_down_mo.gif | Bin 0 -> 1117 bytes .../www/themes/nervecenter/images/icons/icon_e.gif | Bin 0 -> 1106 bytes .../themes/nervecenter/images/icons/icon_e_mo.gif | Bin 0 -> 1120 bytes .../themes/nervecenter/images/icons/icon_error.gif | Bin 0 -> 1312 bytes .../nervecenter/images/icons/icon_exclam.gif | Bin 0 -> 1274 bytes .../nervecenter/images/icons/icon_flag_de.png | Bin 0 -> 114 bytes .../nervecenter/images/icons/icon_flag_en.png | Bin 0 -> 618 bytes .../nervecenter/images/icons/icon_flag_es.png | Bin 0 -> 281 bytes .../nervecenter/images/icons/icon_flag_pt_BR.png | Bin 0 -> 502 bytes .../nervecenter/images/icons/icon_frmfld_cert.png | Bin 0 -> 1528 bytes .../nervecenter/images/icons/icon_frmfld_file.png | Bin 0 -> 687 bytes .../nervecenter/images/icons/icon_frmfld_group.png | Bin 0 -> 748 bytes .../nervecenter/images/icons/icon_frmfld_host.png | Bin 0 -> 513 bytes .../nervecenter/images/icons/icon_frmfld_imp.png | Bin 0 -> 644 bytes .../nervecenter/images/icons/icon_frmfld_mail.png | Bin 0 -> 371 bytes .../nervecenter/images/icons/icon_frmfld_pwd.png | Bin 0 -> 620 bytes .../images/icons/icon_frmfld_search.png | Bin 0 -> 593 bytes .../nervecenter/images/icons/icon_frmfld_time.png | Bin 0 -> 646 bytes .../images/icons/icon_frmfld_unknown.png | Bin 0 -> 487 bytes .../nervecenter/images/icons/icon_frmfld_url.png | Bin 0 -> 704 bytes .../nervecenter/images/icons/icon_frmfld_user.png | Bin 0 -> 654 bytes .../nervecenter/images/icons/icon_fw-update.gif | Bin 0 -> 43785 bytes .../themes/nervecenter/images/icons/icon_help.gif | Bin 0 -> 1669 bytes .../nervecenter/images/icons/icon_ifalias.gif | Bin 0 -> 315 bytes .../nervecenter/images/icons/icon_ifalias_d.gif | Bin 0 -> 315 bytes .../nervecenter/images/icons/icon_import_alias.gif | Bin 0 -> 1109 bytes .../themes/nervecenter/images/icons/icon_in.gif | Bin 0 -> 177 bytes .../themes/nervecenter/images/icons/icon_in_d.gif | Bin 0 -> 190 bytes .../nervecenter/images/icons/icon_info_pkg.gif | Bin 0 -> 1131 bytes .../images/icons/icon_interface_down.gif | Bin 0 -> 88 bytes .../nervecenter/images/icons/icon_interface_up.gif | Bin 0 -> 87 bytes .../themes/nervecenter/images/icons/icon_left.gif | Bin 0 -> 1120 bytes .../nervecenter/images/icons/icon_left_d.gif | Bin 0 -> 691 bytes .../nervecenter/images/icons/icon_left_mo.gif | Bin 0 -> 1129 bytes .../themes/nervecenter/images/icons/icon_log.gif | Bin 0 -> 297 bytes .../themes/nervecenter/images/icons/icon_log_d.gif | Bin 0 -> 297 bytes .../themes/nervecenter/images/icons/icon_log_s.gif | Bin 0 -> 305 bytes .../nervecenter/images/icons/icon_log_s_d.gif | Bin 0 -> 305 bytes .../themes/nervecenter/images/icons/icon_logs.gif | Bin 0 -> 2092 bytes .../themes/nervecenter/images/icons/icon_match.gif | Bin 0 -> 847 bytes .../nervecenter/images/icons/icon_match_d.gif | Bin 0 -> 843 bytes .../themes/nervecenter/images/icons/icon_minus.gif | Bin 0 -> 61 bytes .../themes/nervecenter/images/icons/icon_open.gif | Bin 0 -> 62 bytes .../themes/nervecenter/images/icons/icon_other.gif | Bin 0 -> 125 bytes .../nervecenter/images/icons/icon_other_d.gif | Bin 0 -> 125 bytes .../themes/nervecenter/images/icons/icon_out.gif | Bin 0 -> 179 bytes .../themes/nervecenter/images/icons/icon_out_d.gif | Bin 0 -> 189 bytes .../themes/nervecenter/images/icons/icon_parp.gif | Bin 0 -> 303 bytes .../nervecenter/images/icons/icon_parp_d.gif | Bin 0 -> 303 bytes .../themes/nervecenter/images/icons/icon_pass.gif | Bin 0 -> 182 bytes .../nervecenter/images/icons/icon_pass_add.gif | Bin 0 -> 183 bytes .../nervecenter/images/icons/icon_pass_d.gif | Bin 0 -> 182 bytes .../themes/nervecenter/images/icons/icon_plus.gif | Bin 0 -> 1100 bytes .../nervecenter/images/icons/icon_plus_bl.gif | Bin 0 -> 1096 bytes .../nervecenter/images/icons/icon_plus_bl_p.gif | Bin 0 -> 1079 bytes .../nervecenter/images/icons/icon_plus_d.gif | Bin 0 -> 682 bytes .../nervecenter/images/icons/icon_plus_mo.gif | Bin 0 -> 1120 bytes .../nervecenter/images/icons/icon_plus_p.gif | Bin 0 -> 1087 bytes .../nervecenter/images/icons/icon_reinstall.gif | Bin 0 -> 1119 bytes .../nervecenter/images/icons/icon_reinstall_d.gif | Bin 0 -> 701 bytes .../nervecenter/images/icons/icon_reinstall_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_reinstall_pkg.gif | Bin 0 -> 1109 bytes .../images/icons/icon_reinstall_pkg_d.gif | Bin 0 -> 694 bytes .../images/icons/icon_reinstall_pkg_mo.gif | Bin 0 -> 1135 bytes .../images/icons/icon_reinstall_xml.gif | Bin 0 -> 1105 bytes .../images/icons/icon_reinstall_xml_d.gif | Bin 0 -> 686 bytes .../images/icons/icon_reinstall_xml_mo.gif | Bin 0 -> 1131 bytes .../nervecenter/images/icons/icon_reject.gif | Bin 0 -> 193 bytes .../nervecenter/images/icons/icon_reject_d.gif | Bin 0 -> 193 bytes .../themes/nervecenter/images/icons/icon_right.gif | Bin 0 -> 1117 bytes .../images/icons/icon_service_restart.gif | Bin 0 -> 1120 bytes .../images/icons/icon_service_restart_d.gif | Bin 0 -> 1115 bytes .../images/icons/icon_service_running.gif | Bin 0 -> 1390 bytes .../images/icons/icon_service_start.gif | Bin 0 -> 1119 bytes .../images/icons/icon_service_start_d.gif | Bin 0 -> 1115 bytes .../images/icons/icon_service_status.gif | Bin 0 -> 2150 bytes .../nervecenter/images/icons/icon_service_stop.gif | Bin 0 -> 1106 bytes .../images/icons/icon_service_stop_d.gif | Bin 0 -> 1100 bytes .../images/icons/icon_service_stopped.gif | Bin 0 -> 1695 bytes .../images/icons/icon_services_restart_mo.gif | Bin 0 -> 1129 bytes .../images/icons/icon_services_start_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_services_stop_mo.gif | Bin 0 -> 1126 bytes .../images/icons/icon_system-group-grey.png | Bin 0 -> 1566 bytes .../nervecenter/images/icons/icon_system-group.png | Bin 0 -> 3128 bytes .../images/icons/icon_system-user-grey.png | Bin 0 -> 1107 bytes .../nervecenter/images/icons/icon_system-user.png | Bin 0 -> 2084 bytes .../images/icons/icon_system_lock_screen.png | Bin 0 -> 1841 bytes .../images/icons/icon_system_logout.png | Bin 0 -> 2087 bytes .../nervecenter/images/icons/icon_trapped.gif | Bin 0 -> 1101 bytes .../nervecenter/images/icons/icon_trapped_p.gif | Bin 0 -> 1079 bytes .../nervecenter/images/icons/icon_ts_rule.gif | Bin 0 -> 194 bytes .../nervecenter/images/icons/icon_ts_rule_d.gif | Bin 0 -> 193 bytes .../themes/nervecenter/images/icons/icon_up.gif | Bin 0 -> 1116 bytes .../themes/nervecenter/images/icons/icon_up_d.gif | Bin 0 -> 691 bytes .../themes/nervecenter/images/icons/icon_up_mo.gif | Bin 0 -> 1129 bytes .../themes/nervecenter/images/icons/icon_wlan.gif | Bin 0 -> 66 bytes .../nervecenter/images/icons/icon_wlan_d.gif | Bin 0 -> 100 bytes .../nervecenter/images/icons/icon_wol_all.gif | Bin 0 -> 1126 bytes .../nervecenter/images/icons/icon_wzd_nsaved.png | Bin 0 -> 512 bytes .../nervecenter/images/icons/icon_wzd_saved.png | Bin 0 -> 399 bytes .../www/themes/nervecenter/images/icons/icon_x.gif | Bin 0 -> 1111 bytes .../themes/nervecenter/images/icons/icon_x_d.gif | Bin 0 -> 680 bytes .../themes/nervecenter/images/icons/icon_x_mo.gif | Bin 0 -> 1126 bytes .../themes/nervecenter/images/icons/icon_x_p.gif | Bin 0 -> 1090 bytes .../www/themes/nervecenter/images/icons/in.gif | Bin 0 -> 177 bytes .../www/themes/nervecenter/images/icons/in_d.gif | Bin 0 -> 190 bytes .../www/themes/nervecenter/images/icons/out.gif | Bin 0 -> 179 bytes .../www/themes/nervecenter/images/icons/out_d.gif | Bin 0 -> 189 bytes .../local/www/themes/nervecenter/images/log.png | Bin 0 -> 270 bytes .../local/www/themes/nervecenter/images/logo.gif | Bin 0 -> 7599 bytes .../www/themes/nervecenter/images/logobig.jpg | Bin 0 -> 7540 bytes .../www/themes/nervecenter/images/menu_down.gif | Bin 0 -> 61 bytes .../www/themes/nervecenter/images/menu_footer.gif | Bin 0 -> 234 bytes .../www/themes/nervecenter/images/menu_right.gif | Bin 0 -> 61 bytes .../www/themes/nervecenter/images/metal_bgr.gif | Bin 0 -> 734 bytes .../themes/nervecenter/images/metal_bgr_red.gif | Bin 0 -> 734 bytes .../themes/nervecenter/images/misc/bar_blue.gif | Bin 0 -> 94 bytes .../themes/nervecenter/images/misc/bar_gray.gif | Bin 0 -> 94 bytes .../themes/nervecenter/images/misc/bar_left.gif | Bin 0 -> 289 bytes .../themes/nervecenter/images/misc/bar_right.gif | Bin 0 -> 288 bytes .../images/misc/bullet_toggle_minus.png | Bin 0 -> 154 bytes .../nervecenter/images/misc/bullet_toggle_plus.png | Bin 0 -> 156 bytes .../www/themes/nervecenter/images/misc/button.gif | Bin 0 -> 805 bytes .../www/themes/nervecenter/images/misc/graph.png | Bin 0 -> 2256 bytes .../www/themes/nervecenter/images/misc/key_128.gif | Bin 0 -> 2766 bytes .../www/themes/nervecenter/images/misc/key_152.gif | Bin 0 -> 2772 bytes .../www/themes/nervecenter/images/misc/key_256.gif | Bin 0 -> 2808 bytes .../www/themes/nervecenter/images/misc/key_64.gif | Bin 0 -> 2723 bytes .../nervecenter/images/misc/left_background.gif | Bin 0 -> 38943 bytes .../www/themes/nervecenter/images/misc/loader.gif | Bin 0 -> 5971 bytes .../themes/nervecenter/images/misc/loader_all.gif | Bin 0 -> 1398 bytes .../nervecenter/images/misc/loader_filter.gif | Bin 0 -> 1436 bytes .../themes/nervecenter/images/misc/loader_tab.gif | Bin 0 -> 5852 bytes .../www/themes/nervecenter/images/misc/logon.png | Bin 0 -> 47467 bytes .../nervecenter/images/misc/progress_bar.gif | Bin 0 -> 44791 bytes .../themes/nervecenter/images/misc/rrd_error.png | Bin 0 -> 38898 bytes .../nervecenter/images/misc/status_alerter.gif | Bin 0 -> 2203 bytes .../nervecenter/images/misc/status_carpmaster.gif | Bin 0 -> 1558 bytes .../themes/nervecenter/images/misc/status_left.gif | Bin 0 -> 600 bytes .../images/misc/status_page_loading.gif | Bin 0 -> 1621 bytes .../nervecenter/images/misc/status_reload_all.gif | Bin 0 -> 1611 bytes .../images/misc/status_reload_filter.gif | Bin 0 -> 1612 bytes .../nervecenter/images/misc/status_right.gif | Bin 0 -> 599 bytes .../www/themes/nervecenter/images/misc/tri_c.gif | Bin 0 -> 61 bytes .../themes/nervecenter/images/misc/tri_c_black.gif | Bin 0 -> 69 bytes .../www/themes/nervecenter/images/misc/tri_o.gif | Bin 0 -> 58 bytes .../themes/nervecenter/images/misc/tri_o_black.gif | Bin 0 -> 67 bytes .../nervecenter/images/misc/widget_loader.gif | Bin 0 -> 2545 bytes .../www/themes/nervecenter/images/new_tab_menu.png | Bin 0 -> 444 bytes .../local/www/themes/nervecenter/images/status.png | Bin 0 -> 348 bytes .../www/themes/nervecenter/images/transparent.gif | Bin 0 -> 146 bytes .../nervecenter/images/transparent_pixel.gif | Bin 0 -> 43 bytes .../themes/nervecenter/javascript/ie7/blank.gif | Bin 0 -> 48 bytes .../nervecenter/javascript/ie7/ie7-box-model.js | 2 + .../themes/nervecenter/javascript/ie7/ie7-core.js | 2 + .../nervecenter/javascript/ie7/ie7-css-strict.js | 2 + .../themes/nervecenter/javascript/ie7/ie7-css2.js | 2 + .../themes/nervecenter/javascript/ie7/ie7-css3.js | 2 + .../themes/nervecenter/javascript/ie7/ie7-fixed.js | 2 + .../themes/nervecenter/javascript/ie7/ie7-html4.js | 2 + .../themes/nervecenter/javascript/ie7/ie7-ie5.js | 2 + .../nervecenter/javascript/ie7/ie7-lite-p.js | 3 + .../themes/nervecenter/javascript/ie7/ie7-lite.js | 2 + .../themes/nervecenter/javascript/ie7/ie7-png.js | 2 + .../nervecenter/javascript/ie7/ie7-server.css | 43 + .../nervecenter/javascript/ie7/ie7-standard-p.js | 3 + .../nervecenter/javascript/ie7/ie7-standard.js | 2 + .../nervecenter/javascript/ie7/test-trans.png | Bin 0 -> 106 bytes .../themes/nervecenter/javascript/img/grey-40.png | Bin 0 -> 223 bytes .../nervecenter/javascript/img/submenu-off.gif | Bin 0 -> 65 bytes .../nervecenter/javascript/img/submenu-on.gif | Bin 0 -> 65 bytes .../themes/nervecenter/javascript/img/white-90.png | Bin 0 -> 223 bytes .../www/themes/nervecenter/javascript/img/x.gif | Bin 0 -> 43 bytes .../themes/nervecenter/javascript/niftyjsCode.js | 174 + .../nervecenter/javascript/transmenu-body.php | 51 + .../nervecenter/javascript/transmenu-head.php | 85 + .../themes/nervecenter/javascript/transmenu.org | 785 +++ .../themes/nervecenter/javascript/transmenuC.js | 86 + .../local/www/themes/nervecenter/jsevents/body.def | 7 + src/usr/local/www/themes/nervecenter/loader.js | 29 + src/usr/local/www/themes/nervecenter/login.css | 1127 ++++ src/usr/local/www/themes/nervecenter/menu.inc | 177 + .../local/www/themes/nervecenter/new_tab_menu.css | 101 + src/usr/local/www/themes/nervecenter/no_big_logo | 1 + .../local/www/themes/nervecenter/rrdcolors.inc.php | 89 + .../themes/nervecenter/styles/jquery-ui-1.11.1.css | 1226 ++++ .../www/themes/nervecenter/styles/menustyles.css | 44 + .../www/themes/nervecenter/styles/transmenu.css | 75 + src/usr/local/www/themes/nervecenter/wizard.css | 1060 ++++ src/usr/local/www/themes/pfsense-dropdown/all.css | 1028 ++++ .../themes/pfsense-dropdown/apple-touch-icon.png | Bin 0 -> 4068 bytes .../www/themes/pfsense-dropdown/bottom-loader.js | 11 + .../themes/pfsense-dropdown/images/alert_bgr.gif | Bin 0 -> 1651 bytes .../pfsense-dropdown/images/header-alert.gif | Bin 0 -> 4910 bytes .../www/themes/pfsense-dropdown/images/header.gif | Bin 0 -> 7932 bytes .../www/themes/pfsense-dropdown/images/help.png | Bin 0 -> 324 bytes .../pfsense-dropdown/images/icons/favicon.ico | Bin 0 -> 1406 bytes .../pfsense-dropdown/images/icons/icon_3g.gif | Bin 0 -> 200 bytes .../images/icons/icon_3g_inactive.gif | Bin 0 -> 200 bytes .../images/icons/icon_advanced.gif | Bin 0 -> 306 bytes .../images/icons/icon_advanced_s.gif | Bin 0 -> 314 bytes .../pfsense-dropdown/images/icons/icon_alert.gif | Bin 0 -> 1044 bytes .../images/icons/icon_alias_host.gif | Bin 0 -> 348 bytes .../images/icons/icon_alias_net.gif | Bin 0 -> 331 bytes .../images/icons/icon_alias_port.gif | Bin 0 -> 346 bytes .../images/icons/icon_alias_url.gif | Bin 0 -> 314 bytes .../images/icons/icon_alias_url_reload.gif | Bin 0 -> 1111 bytes .../pfsense-dropdown/images/icons/icon_block.gif | Bin 0 -> 193 bytes .../images/icons/icon_block_add.gif | Bin 0 -> 192 bytes .../pfsense-dropdown/images/icons/icon_block_d.gif | Bin 0 -> 193 bytes .../images/icons/icon_cablenic.gif | Bin 0 -> 91 bytes .../pfsense-dropdown/images/icons/icon_cal.gif | Bin 0 -> 646 bytes .../pfsense-dropdown/images/icons/icon_cal_mo.gif | Bin 0 -> 1060 bytes .../pfsense-dropdown/images/icons/icon_carp.gif | Bin 0 -> 352 bytes .../pfsense-dropdown/images/icons/icon_carp_d.gif | Bin 0 -> 357 bytes .../pfsense-dropdown/images/icons/icon_chain.png | Bin 0 -> 161 bytes .../pfsense-dropdown/images/icons/icon_check.gif | Bin 0 -> 1291 bytes .../images/icons/icon_clock_green.gif | Bin 0 -> 308 bytes .../images/icons/icon_clock_grey.gif | Bin 0 -> 308 bytes .../images/icons/icon_clock_red.gif | Bin 0 -> 308 bytes .../pfsense-dropdown/images/icons/icon_close.gif | Bin 0 -> 64 bytes .../images/icons/icon_configure.gif | Bin 0 -> 64 bytes .../pfsense-dropdown/images/icons/icon_down.gif | Bin 0 -> 1114 bytes .../pfsense-dropdown/images/icons/icon_down_d.gif | Bin 0 -> 689 bytes .../pfsense-dropdown/images/icons/icon_down_mo.gif | Bin 0 -> 1117 bytes .../pfsense-dropdown/images/icons/icon_e.gif | Bin 0 -> 1106 bytes .../pfsense-dropdown/images/icons/icon_e_mo.gif | Bin 0 -> 1120 bytes .../pfsense-dropdown/images/icons/icon_error.gif | Bin 0 -> 1312 bytes .../pfsense-dropdown/images/icons/icon_exclam.gif | Bin 0 -> 1274 bytes .../pfsense-dropdown/images/icons/icon_flag_de.png | Bin 0 -> 114 bytes .../pfsense-dropdown/images/icons/icon_flag_en.png | Bin 0 -> 618 bytes .../pfsense-dropdown/images/icons/icon_flag_es.png | Bin 0 -> 281 bytes .../images/icons/icon_flag_pt_BR.png | Bin 0 -> 502 bytes .../images/icons/icon_frmfld_cert.png | Bin 0 -> 1528 bytes .../images/icons/icon_frmfld_file.png | Bin 0 -> 687 bytes .../images/icons/icon_frmfld_group.png | Bin 0 -> 748 bytes .../images/icons/icon_frmfld_host.png | Bin 0 -> 513 bytes .../images/icons/icon_frmfld_imp.png | Bin 0 -> 644 bytes .../images/icons/icon_frmfld_mail.png | Bin 0 -> 371 bytes .../images/icons/icon_frmfld_pwd.png | Bin 0 -> 620 bytes .../images/icons/icon_frmfld_search.png | Bin 0 -> 593 bytes .../images/icons/icon_frmfld_time.png | Bin 0 -> 646 bytes .../images/icons/icon_frmfld_unknown.png | Bin 0 -> 487 bytes .../images/icons/icon_frmfld_url.png | Bin 0 -> 704 bytes .../images/icons/icon_frmfld_user.png | Bin 0 -> 654 bytes .../images/icons/icon_fw-update.gif | Bin 0 -> 43785 bytes .../pfsense-dropdown/images/icons/icon_help.gif | Bin 0 -> 1669 bytes .../pfsense-dropdown/images/icons/icon_ifalias.gif | Bin 0 -> 315 bytes .../images/icons/icon_ifalias_d.gif | Bin 0 -> 315 bytes .../images/icons/icon_import_alias.gif | Bin 0 -> 1109 bytes .../pfsense-dropdown/images/icons/icon_in.gif | Bin 0 -> 177 bytes .../pfsense-dropdown/images/icons/icon_in_d.gif | Bin 0 -> 190 bytes .../images/icons/icon_info_pkg.gif | Bin 0 -> 1131 bytes .../images/icons/icon_interface_down.gif | Bin 0 -> 88 bytes .../images/icons/icon_interface_up.gif | Bin 0 -> 87 bytes .../pfsense-dropdown/images/icons/icon_left.gif | Bin 0 -> 1120 bytes .../pfsense-dropdown/images/icons/icon_left_d.gif | Bin 0 -> 691 bytes .../pfsense-dropdown/images/icons/icon_left_mo.gif | Bin 0 -> 1129 bytes .../pfsense-dropdown/images/icons/icon_log.gif | Bin 0 -> 297 bytes .../pfsense-dropdown/images/icons/icon_log_d.gif | Bin 0 -> 297 bytes .../pfsense-dropdown/images/icons/icon_log_s.gif | Bin 0 -> 305 bytes .../pfsense-dropdown/images/icons/icon_log_s_d.gif | Bin 0 -> 305 bytes .../pfsense-dropdown/images/icons/icon_logs.gif | Bin 0 -> 2092 bytes .../pfsense-dropdown/images/icons/icon_match.gif | Bin 0 -> 847 bytes .../pfsense-dropdown/images/icons/icon_match_d.gif | Bin 0 -> 843 bytes .../pfsense-dropdown/images/icons/icon_minus.gif | Bin 0 -> 61 bytes .../pfsense-dropdown/images/icons/icon_open.gif | Bin 0 -> 62 bytes .../pfsense-dropdown/images/icons/icon_other.gif | Bin 0 -> 125 bytes .../pfsense-dropdown/images/icons/icon_other_d.gif | Bin 0 -> 125 bytes .../pfsense-dropdown/images/icons/icon_out.gif | Bin 0 -> 179 bytes .../pfsense-dropdown/images/icons/icon_out_d.gif | Bin 0 -> 189 bytes .../pfsense-dropdown/images/icons/icon_parp.gif | Bin 0 -> 303 bytes .../pfsense-dropdown/images/icons/icon_parp_d.gif | Bin 0 -> 303 bytes .../pfsense-dropdown/images/icons/icon_pass.gif | Bin 0 -> 182 bytes .../images/icons/icon_pass_add.gif | Bin 0 -> 183 bytes .../pfsense-dropdown/images/icons/icon_pass_d.gif | Bin 0 -> 182 bytes .../pfsense-dropdown/images/icons/icon_plus.gif | Bin 0 -> 1100 bytes .../pfsense-dropdown/images/icons/icon_plus_bl.gif | Bin 0 -> 1096 bytes .../images/icons/icon_plus_bl_p.gif | Bin 0 -> 1079 bytes .../pfsense-dropdown/images/icons/icon_plus_d.gif | Bin 0 -> 682 bytes .../pfsense-dropdown/images/icons/icon_plus_mo.gif | Bin 0 -> 1120 bytes .../pfsense-dropdown/images/icons/icon_plus_p.gif | Bin 0 -> 1087 bytes .../images/icons/icon_reinstall.gif | Bin 0 -> 1119 bytes .../images/icons/icon_reinstall_d.gif | Bin 0 -> 701 bytes .../images/icons/icon_reinstall_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_reinstall_pkg.gif | Bin 0 -> 1109 bytes .../images/icons/icon_reinstall_pkg_d.gif | Bin 0 -> 694 bytes .../images/icons/icon_reinstall_pkg_mo.gif | Bin 0 -> 1135 bytes .../images/icons/icon_reinstall_xml.gif | Bin 0 -> 1105 bytes .../images/icons/icon_reinstall_xml_d.gif | Bin 0 -> 686 bytes .../images/icons/icon_reinstall_xml_mo.gif | Bin 0 -> 1131 bytes .../pfsense-dropdown/images/icons/icon_reject.gif | Bin 0 -> 193 bytes .../images/icons/icon_reject_d.gif | Bin 0 -> 193 bytes .../pfsense-dropdown/images/icons/icon_right.gif | Bin 0 -> 1117 bytes .../images/icons/icon_service_restart.gif | Bin 0 -> 1120 bytes .../images/icons/icon_service_restart_d.gif | Bin 0 -> 1115 bytes .../images/icons/icon_service_running.gif | Bin 0 -> 1390 bytes .../images/icons/icon_service_start.gif | Bin 0 -> 1119 bytes .../images/icons/icon_service_start_d.gif | Bin 0 -> 1115 bytes .../images/icons/icon_service_status.gif | Bin 0 -> 2150 bytes .../images/icons/icon_service_stop.gif | Bin 0 -> 1106 bytes .../images/icons/icon_service_stop_d.gif | Bin 0 -> 1100 bytes .../images/icons/icon_service_stopped.gif | Bin 0 -> 1695 bytes .../images/icons/icon_services_restart_mo.gif | Bin 0 -> 1129 bytes .../images/icons/icon_services_start_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_services_stop_mo.gif | Bin 0 -> 1126 bytes .../images/icons/icon_system-group-grey.png | Bin 0 -> 1566 bytes .../images/icons/icon_system-group.png | Bin 0 -> 3128 bytes .../images/icons/icon_system-user-grey.png | Bin 0 -> 1107 bytes .../images/icons/icon_system-user.png | Bin 0 -> 2084 bytes .../images/icons/icon_system_lock_screen.png | Bin 0 -> 1841 bytes .../images/icons/icon_system_logout.png | Bin 0 -> 2087 bytes .../pfsense-dropdown/images/icons/icon_trapped.gif | Bin 0 -> 1101 bytes .../images/icons/icon_trapped_p.gif | Bin 0 -> 1079 bytes .../pfsense-dropdown/images/icons/icon_ts_rule.gif | Bin 0 -> 194 bytes .../images/icons/icon_ts_rule_d.gif | Bin 0 -> 193 bytes .../pfsense-dropdown/images/icons/icon_up.gif | Bin 0 -> 1116 bytes .../pfsense-dropdown/images/icons/icon_up_d.gif | Bin 0 -> 691 bytes .../pfsense-dropdown/images/icons/icon_up_mo.gif | Bin 0 -> 1129 bytes .../pfsense-dropdown/images/icons/icon_wlan.gif | Bin 0 -> 66 bytes .../pfsense-dropdown/images/icons/icon_wlan_d.gif | Bin 0 -> 100 bytes .../pfsense-dropdown/images/icons/icon_wol_all.gif | Bin 0 -> 1114 bytes .../images/icons/icon_wzd_nsaved.png | Bin 0 -> 512 bytes .../images/icons/icon_wzd_saved.png | Bin 0 -> 399 bytes .../pfsense-dropdown/images/icons/icon_x.gif | Bin 0 -> 1111 bytes .../pfsense-dropdown/images/icons/icon_x_d.gif | Bin 0 -> 680 bytes .../pfsense-dropdown/images/icons/icon_x_mo.gif | Bin 0 -> 1126 bytes .../pfsense-dropdown/images/icons/icon_x_p.gif | Bin 0 -> 1090 bytes .../themes/pfsense-dropdown/images/icons/in.gif | Bin 0 -> 177 bytes .../themes/pfsense-dropdown/images/icons/in_d.gif | Bin 0 -> 190 bytes .../themes/pfsense-dropdown/images/icons/out.gif | Bin 0 -> 179 bytes .../themes/pfsense-dropdown/images/icons/out_d.gif | Bin 0 -> 189 bytes .../www/themes/pfsense-dropdown/images/log.png | Bin 0 -> 270 bytes .../www/themes/pfsense-dropdown/images/logo.gif | Bin 0 -> 4878 bytes .../www/themes/pfsense-dropdown/images/logobig.jpg | Bin 0 -> 7540 bytes .../www/themes/pfsense-dropdown/images/menu.gif | Bin 0 -> 460 bytes .../pfsense-dropdown/images/misc/bar_blue.gif | Bin 0 -> 94 bytes .../pfsense-dropdown/images/misc/bar_gray.gif | Bin 0 -> 94 bytes .../pfsense-dropdown/images/misc/bar_left.gif | Bin 0 -> 289 bytes .../pfsense-dropdown/images/misc/bar_right.gif | Bin 0 -> 288 bytes .../themes/pfsense-dropdown/images/misc/button.gif | Bin 0 -> 805 bytes .../pfsense-dropdown/images/misc/key_128.gif | Bin 0 -> 2766 bytes .../pfsense-dropdown/images/misc/key_152.gif | Bin 0 -> 2772 bytes .../pfsense-dropdown/images/misc/key_256.gif | Bin 0 -> 2808 bytes .../themes/pfsense-dropdown/images/misc/key_64.gif | Bin 0 -> 2723 bytes .../images/misc/left_background.gif | Bin 0 -> 38943 bytes .../themes/pfsense-dropdown/images/misc/loader.gif | Bin 0 -> 5971 bytes .../pfsense-dropdown/images/misc/loader_tab.gif | Bin 0 -> 5852 bytes .../themes/pfsense-dropdown/images/misc/logon.png | Bin 0 -> 27029 bytes .../pfsense-dropdown/images/misc/progress_bar.gif | Bin 0 -> 44791 bytes .../pfsense-dropdown/images/misc/rrd_error.png | Bin 0 -> 38898 bytes .../themes/pfsense-dropdown/images/misc/tri_c.gif | Bin 0 -> 61 bytes .../pfsense-dropdown/images/misc/tri_c_black.gif | Bin 0 -> 69 bytes .../themes/pfsense-dropdown/images/misc/tri_o.gif | Bin 0 -> 58 bytes .../pfsense-dropdown/images/misc/tri_o_black.gif | Bin 0 -> 67 bytes .../pfsense-dropdown/images/misc/widget_loader.gif | Bin 0 -> 1064 bytes .../pfsense-dropdown/images/new_tab_menu.png | Bin 0 -> 444 bytes .../www/themes/pfsense-dropdown/images/status.png | Bin 0 -> 348 bytes .../themes/pfsense-dropdown/images/transparent.gif | Bin 0 -> 146 bytes .../pfsense-dropdown/images/transparent_pixel.gif | Bin 0 -> 43 bytes .../pfsense-dropdown/javascript/ie7/blank.gif | Bin 0 -> 48 bytes .../javascript/ie7/ie7-box-model.js | 2 + .../pfsense-dropdown/javascript/ie7/ie7-core.js | 2 + .../javascript/ie7/ie7-css-strict.js | 2 + .../pfsense-dropdown/javascript/ie7/ie7-css2.js | 2 + .../pfsense-dropdown/javascript/ie7/ie7-css3.js | 2 + .../pfsense-dropdown/javascript/ie7/ie7-fixed.js | 2 + .../pfsense-dropdown/javascript/ie7/ie7-html4.js | 2 + .../pfsense-dropdown/javascript/ie7/ie7-ie5.js | 2 + .../pfsense-dropdown/javascript/ie7/ie7-lite-p.js | 3 + .../pfsense-dropdown/javascript/ie7/ie7-lite.js | 2 + .../pfsense-dropdown/javascript/ie7/ie7-png.js | 2 + .../pfsense-dropdown/javascript/ie7/ie7-server.css | 43 + .../javascript/ie7/ie7-standard-p.js | 3 + .../javascript/ie7/ie7-standard.js | 2 + .../pfsense-dropdown/javascript/ie7/test-trans.png | Bin 0 -> 106 bytes .../pfsense-dropdown/javascript/niftyjsCode.js | 174 + .../local/www/themes/pfsense-dropdown/loader.js | 29 + .../local/www/themes/pfsense-dropdown/login.css | 1127 ++++ .../www/themes/pfsense-dropdown/new_tab_menu.css | 101 + .../www/themes/pfsense-dropdown/rrdcolors.inc.php | 89 + .../pfsense-dropdown/styles/jquery-ui-1.11.1.css | 1226 ++++ src/usr/local/www/themes/pfsense/all.css | 1036 ++++ .../local/www/themes/pfsense/apple-touch-icon.png | Bin 0 -> 4068 bytes src/usr/local/www/themes/pfsense/bottom-loader.js | 12 + .../local/www/themes/pfsense/images/alert_bgr.gif | Bin 0 -> 1651 bytes .../www/themes/pfsense/images/header-alert.gif | Bin 0 -> 4910 bytes src/usr/local/www/themes/pfsense/images/header.gif | Bin 0 -> 18510 bytes src/usr/local/www/themes/pfsense/images/help.png | Bin 0 -> 324 bytes .../www/themes/pfsense/images/icons/favicon.ico | Bin 0 -> 1406 bytes .../www/themes/pfsense/images/icons/icon_3g.gif | Bin 0 -> 200 bytes .../pfsense/images/icons/icon_3g_inactive.gif | Bin 0 -> 200 bytes .../themes/pfsense/images/icons/icon_advanced.gif | Bin 0 -> 306 bytes .../pfsense/images/icons/icon_advanced_s.gif | Bin 0 -> 314 bytes .../www/themes/pfsense/images/icons/icon_alert.gif | Bin 0 -> 1044 bytes .../pfsense/images/icons/icon_alias_host.gif | Bin 0 -> 348 bytes .../themes/pfsense/images/icons/icon_alias_net.gif | Bin 0 -> 331 bytes .../pfsense/images/icons/icon_alias_port.gif | Bin 0 -> 346 bytes .../themes/pfsense/images/icons/icon_alias_url.gif | Bin 0 -> 314 bytes .../pfsense/images/icons/icon_alias_url_reload.gif | Bin 0 -> 1111 bytes .../www/themes/pfsense/images/icons/icon_block.gif | Bin 0 -> 193 bytes .../themes/pfsense/images/icons/icon_block_add.gif | Bin 0 -> 192 bytes .../themes/pfsense/images/icons/icon_block_d.gif | Bin 0 -> 193 bytes .../themes/pfsense/images/icons/icon_cablenic.gif | Bin 0 -> 91 bytes .../www/themes/pfsense/images/icons/icon_cal.gif | Bin 0 -> 646 bytes .../themes/pfsense/images/icons/icon_cal_mo.gif | Bin 0 -> 1060 bytes .../www/themes/pfsense/images/icons/icon_carp.gif | Bin 0 -> 352 bytes .../themes/pfsense/images/icons/icon_carp_d.gif | Bin 0 -> 357 bytes .../www/themes/pfsense/images/icons/icon_chain.png | Bin 0 -> 161 bytes .../www/themes/pfsense/images/icons/icon_check.gif | Bin 0 -> 1291 bytes .../pfsense/images/icons/icon_clock_green.gif | Bin 0 -> 308 bytes .../pfsense/images/icons/icon_clock_grey.gif | Bin 0 -> 308 bytes .../themes/pfsense/images/icons/icon_clock_red.gif | Bin 0 -> 308 bytes .../www/themes/pfsense/images/icons/icon_close.gif | Bin 0 -> 64 bytes .../themes/pfsense/images/icons/icon_configure.gif | Bin 0 -> 64 bytes .../www/themes/pfsense/images/icons/icon_down.gif | Bin 0 -> 1114 bytes .../themes/pfsense/images/icons/icon_down_d.gif | Bin 0 -> 689 bytes .../themes/pfsense/images/icons/icon_down_mo.gif | Bin 0 -> 1117 bytes .../www/themes/pfsense/images/icons/icon_e.gif | Bin 0 -> 1106 bytes .../www/themes/pfsense/images/icons/icon_e_mo.gif | Bin 0 -> 1120 bytes .../www/themes/pfsense/images/icons/icon_error.gif | Bin 0 -> 1312 bytes .../themes/pfsense/images/icons/icon_exclam.gif | Bin 0 -> 1274 bytes .../themes/pfsense/images/icons/icon_flag_de.png | Bin 0 -> 114 bytes .../themes/pfsense/images/icons/icon_flag_en.png | Bin 0 -> 618 bytes .../themes/pfsense/images/icons/icon_flag_es.png | Bin 0 -> 281 bytes .../pfsense/images/icons/icon_flag_pt_BR.png | Bin 0 -> 502 bytes .../pfsense/images/icons/icon_frmfld_cert.png | Bin 0 -> 1528 bytes .../pfsense/images/icons/icon_frmfld_file.png | Bin 0 -> 687 bytes .../pfsense/images/icons/icon_frmfld_group.png | Bin 0 -> 748 bytes .../pfsense/images/icons/icon_frmfld_host.png | Bin 0 -> 513 bytes .../pfsense/images/icons/icon_frmfld_imp.png | Bin 0 -> 644 bytes .../pfsense/images/icons/icon_frmfld_mail.png | Bin 0 -> 371 bytes .../pfsense/images/icons/icon_frmfld_pwd.png | Bin 0 -> 620 bytes .../pfsense/images/icons/icon_frmfld_search.png | Bin 0 -> 593 bytes .../pfsense/images/icons/icon_frmfld_time.png | Bin 0 -> 646 bytes .../pfsense/images/icons/icon_frmfld_unknown.png | Bin 0 -> 487 bytes .../pfsense/images/icons/icon_frmfld_url.png | Bin 0 -> 704 bytes .../pfsense/images/icons/icon_frmfld_user.png | Bin 0 -> 654 bytes .../themes/pfsense/images/icons/icon_fw-update.gif | Bin 0 -> 43785 bytes .../www/themes/pfsense/images/icons/icon_help.gif | Bin 0 -> 1669 bytes .../themes/pfsense/images/icons/icon_ifalias.gif | Bin 0 -> 315 bytes .../themes/pfsense/images/icons/icon_ifalias_d.gif | Bin 0 -> 315 bytes .../pfsense/images/icons/icon_import_alias.gif | Bin 0 -> 1109 bytes .../www/themes/pfsense/images/icons/icon_in.gif | Bin 0 -> 177 bytes .../www/themes/pfsense/images/icons/icon_in_d.gif | Bin 0 -> 190 bytes .../themes/pfsense/images/icons/icon_info_pkg.gif | Bin 0 -> 1131 bytes .../pfsense/images/icons/icon_interface_down.gif | Bin 0 -> 88 bytes .../pfsense/images/icons/icon_interface_up.gif | Bin 0 -> 87 bytes .../www/themes/pfsense/images/icons/icon_left.gif | Bin 0 -> 1120 bytes .../themes/pfsense/images/icons/icon_left_d.gif | Bin 0 -> 691 bytes .../themes/pfsense/images/icons/icon_left_mo.gif | Bin 0 -> 1129 bytes .../www/themes/pfsense/images/icons/icon_log.gif | Bin 0 -> 297 bytes .../www/themes/pfsense/images/icons/icon_log_d.gif | Bin 0 -> 297 bytes .../www/themes/pfsense/images/icons/icon_log_s.gif | Bin 0 -> 305 bytes .../themes/pfsense/images/icons/icon_log_s_d.gif | Bin 0 -> 305 bytes .../www/themes/pfsense/images/icons/icon_logs.gif | Bin 0 -> 2092 bytes .../www/themes/pfsense/images/icons/icon_match.gif | Bin 0 -> 847 bytes .../themes/pfsense/images/icons/icon_match_d.gif | Bin 0 -> 843 bytes .../www/themes/pfsense/images/icons/icon_minus.gif | Bin 0 -> 61 bytes .../www/themes/pfsense/images/icons/icon_open.gif | Bin 0 -> 62 bytes .../www/themes/pfsense/images/icons/icon_other.gif | Bin 0 -> 125 bytes .../themes/pfsense/images/icons/icon_other_d.gif | Bin 0 -> 125 bytes .../www/themes/pfsense/images/icons/icon_out.gif | Bin 0 -> 179 bytes .../www/themes/pfsense/images/icons/icon_out_d.gif | Bin 0 -> 189 bytes .../www/themes/pfsense/images/icons/icon_parp.gif | Bin 0 -> 303 bytes .../themes/pfsense/images/icons/icon_parp_d.gif | Bin 0 -> 303 bytes .../www/themes/pfsense/images/icons/icon_pass.gif | Bin 0 -> 182 bytes .../themes/pfsense/images/icons/icon_pass_add.gif | Bin 0 -> 183 bytes .../themes/pfsense/images/icons/icon_pass_d.gif | Bin 0 -> 182 bytes .../www/themes/pfsense/images/icons/icon_plus.gif | Bin 0 -> 1100 bytes .../themes/pfsense/images/icons/icon_plus_bl.gif | Bin 0 -> 1096 bytes .../themes/pfsense/images/icons/icon_plus_bl_p.gif | Bin 0 -> 1079 bytes .../themes/pfsense/images/icons/icon_plus_d.gif | Bin 0 -> 682 bytes .../themes/pfsense/images/icons/icon_plus_mo.gif | Bin 0 -> 1120 bytes .../themes/pfsense/images/icons/icon_plus_p.gif | Bin 0 -> 1087 bytes .../themes/pfsense/images/icons/icon_reinstall.gif | Bin 0 -> 1119 bytes .../pfsense/images/icons/icon_reinstall_d.gif | Bin 0 -> 701 bytes .../pfsense/images/icons/icon_reinstall_mo.gif | Bin 0 -> 1130 bytes .../pfsense/images/icons/icon_reinstall_pkg.gif | Bin 0 -> 1109 bytes .../pfsense/images/icons/icon_reinstall_pkg_d.gif | Bin 0 -> 694 bytes .../pfsense/images/icons/icon_reinstall_pkg_mo.gif | Bin 0 -> 1135 bytes .../pfsense/images/icons/icon_reinstall_xml.gif | Bin 0 -> 1105 bytes .../pfsense/images/icons/icon_reinstall_xml_d.gif | Bin 0 -> 686 bytes .../pfsense/images/icons/icon_reinstall_xml_mo.gif | Bin 0 -> 1131 bytes .../themes/pfsense/images/icons/icon_reject.gif | Bin 0 -> 193 bytes .../themes/pfsense/images/icons/icon_reject_d.gif | Bin 0 -> 193 bytes .../www/themes/pfsense/images/icons/icon_right.gif | Bin 0 -> 1117 bytes .../pfsense/images/icons/icon_service_restart.gif | Bin 0 -> 1120 bytes .../images/icons/icon_service_restart_d.gif | Bin 0 -> 1115 bytes .../pfsense/images/icons/icon_service_running.gif | Bin 0 -> 1390 bytes .../pfsense/images/icons/icon_service_start.gif | Bin 0 -> 1119 bytes .../pfsense/images/icons/icon_service_start_d.gif | Bin 0 -> 1115 bytes .../pfsense/images/icons/icon_service_status.gif | Bin 0 -> 2150 bytes .../pfsense/images/icons/icon_service_stop.gif | Bin 0 -> 1106 bytes .../pfsense/images/icons/icon_service_stop_d.gif | Bin 0 -> 1100 bytes .../pfsense/images/icons/icon_service_stopped.gif | Bin 0 -> 1695 bytes .../images/icons/icon_services_restart_mo.gif | Bin 0 -> 1129 bytes .../images/icons/icon_services_start_mo.gif | Bin 0 -> 1130 bytes .../pfsense/images/icons/icon_services_stop_mo.gif | Bin 0 -> 1126 bytes .../images/icons/icon_system-group-grey.png | Bin 0 -> 1566 bytes .../pfsense/images/icons/icon_system-group.png | Bin 0 -> 3128 bytes .../pfsense/images/icons/icon_system-user-grey.png | Bin 0 -> 1107 bytes .../pfsense/images/icons/icon_system-user.png | Bin 0 -> 2084 bytes .../images/icons/icon_system_lock_screen.png | Bin 0 -> 1841 bytes .../pfsense/images/icons/icon_system_logout.png | Bin 0 -> 2087 bytes .../themes/pfsense/images/icons/icon_trapped.gif | Bin 0 -> 1101 bytes .../themes/pfsense/images/icons/icon_trapped_p.gif | Bin 0 -> 1079 bytes .../themes/pfsense/images/icons/icon_ts_rule.gif | Bin 0 -> 194 bytes .../themes/pfsense/images/icons/icon_ts_rule_d.gif | Bin 0 -> 193 bytes .../www/themes/pfsense/images/icons/icon_up.gif | Bin 0 -> 1116 bytes .../www/themes/pfsense/images/icons/icon_up_d.gif | Bin 0 -> 691 bytes .../www/themes/pfsense/images/icons/icon_up_mo.gif | Bin 0 -> 1129 bytes .../www/themes/pfsense/images/icons/icon_wlan.gif | Bin 0 -> 66 bytes .../themes/pfsense/images/icons/icon_wlan_d.gif | Bin 0 -> 100 bytes .../themes/pfsense/images/icons/icon_wol_all.gif | Bin 0 -> 1126 bytes .../pfsense/images/icons/icon_wzd_nsaved.png | Bin 0 -> 512 bytes .../themes/pfsense/images/icons/icon_wzd_saved.png | Bin 0 -> 399 bytes .../www/themes/pfsense/images/icons/icon_x.gif | Bin 0 -> 1111 bytes .../www/themes/pfsense/images/icons/icon_x_d.gif | Bin 0 -> 680 bytes .../www/themes/pfsense/images/icons/icon_x_mo.gif | Bin 0 -> 1126 bytes .../www/themes/pfsense/images/icons/icon_x_p.gif | Bin 0 -> 1090 bytes .../local/www/themes/pfsense/images/icons/in.gif | Bin 0 -> 177 bytes .../local/www/themes/pfsense/images/icons/in_d.gif | Bin 0 -> 190 bytes .../local/www/themes/pfsense/images/icons/out.gif | Bin 0 -> 179 bytes .../www/themes/pfsense/images/icons/out_d.gif | Bin 0 -> 189 bytes src/usr/local/www/themes/pfsense/images/log.png | Bin 0 -> 270 bytes src/usr/local/www/themes/pfsense/images/logo.gif | Bin 0 -> 4878 bytes .../local/www/themes/pfsense/images/logobig.jpg | Bin 0 -> 7540 bytes .../www/themes/pfsense/images/misc/bar_blue.gif | Bin 0 -> 94 bytes .../www/themes/pfsense/images/misc/bar_gray.gif | Bin 0 -> 94 bytes .../www/themes/pfsense/images/misc/bar_left.gif | Bin 0 -> 289 bytes .../www/themes/pfsense/images/misc/bar_right.gif | Bin 0 -> 288 bytes .../www/themes/pfsense/images/misc/button.gif | Bin 0 -> 805 bytes .../www/themes/pfsense/images/misc/key_128.gif | Bin 0 -> 2766 bytes .../www/themes/pfsense/images/misc/key_152.gif | Bin 0 -> 2772 bytes .../www/themes/pfsense/images/misc/key_256.gif | Bin 0 -> 2808 bytes .../www/themes/pfsense/images/misc/key_64.gif | Bin 0 -> 2723 bytes .../themes/pfsense/images/misc/left_background.gif | Bin 0 -> 38943 bytes .../www/themes/pfsense/images/misc/loader.gif | Bin 0 -> 5971 bytes .../www/themes/pfsense/images/misc/loader_tab.gif | Bin 0 -> 5852 bytes .../local/www/themes/pfsense/images/misc/logon.png | Bin 0 -> 27029 bytes .../themes/pfsense/images/misc/progress_bar.gif | Bin 0 -> 44791 bytes .../www/themes/pfsense/images/misc/rrd_error.png | Bin 0 -> 38898 bytes .../local/www/themes/pfsense/images/misc/tri_c.gif | Bin 0 -> 61 bytes .../www/themes/pfsense/images/misc/tri_c_black.gif | Bin 0 -> 69 bytes .../local/www/themes/pfsense/images/misc/tri_o.gif | Bin 0 -> 58 bytes .../www/themes/pfsense/images/misc/tri_o_black.gif | Bin 0 -> 67 bytes .../themes/pfsense/images/misc/widget_loader.gif | Bin 0 -> 1064 bytes .../www/themes/pfsense/images/new_tab_menu.png | Bin 0 -> 444 bytes src/usr/local/www/themes/pfsense/images/status.png | Bin 0 -> 348 bytes .../www/themes/pfsense/images/transparent.gif | Bin 0 -> 146 bytes .../themes/pfsense/images/transparent_pixel.gif | Bin 0 -> 43 bytes .../www/themes/pfsense/javascript/niftyjsCode.js | 174 + src/usr/local/www/themes/pfsense/loader.js | 30 + src/usr/local/www/themes/pfsense/login.css | 1127 ++++ src/usr/local/www/themes/pfsense/new_tab_menu.css | 101 + src/usr/local/www/themes/pfsense/rrdcolors.inc.php | 89 + .../www/themes/pfsense/styles/jquery-ui-1.11.1.css | 1226 ++++ src/usr/local/www/themes/pfsense_ng/all.css | 1414 +++++ .../www/themes/pfsense_ng/apple-touch-icon.png | Bin 0 -> 4068 bytes .../local/www/themes/pfsense_ng/bottom-loader.js | 10 + src/usr/local/www/themes/pfsense_ng/favicon.ico | Bin 0 -> 1406 bytes src/usr/local/www/themes/pfsense_ng/graphlink.css | 43 + .../www/themes/pfsense_ng/images/alert_bgr.png | Bin 0 -> 2483 bytes .../local/www/themes/pfsense_ng/images/alerter.png | Bin 0 -> 3748 bytes .../www/themes/pfsense_ng/images/background.jpg | Bin 0 -> 49431 bytes .../local/www/themes/pfsense_ng/images/footer.png | Bin 0 -> 2956 bytes .../local/www/themes/pfsense_ng/images/header.png | Bin 0 -> 4994 bytes .../local/www/themes/pfsense_ng/images/help.png | Bin 0 -> 324 bytes .../www/themes/pfsense_ng/images/horizontal.png | Bin 0 -> 191 bytes .../www/themes/pfsense_ng/images/hostname.png | Bin 0 -> 1899 bytes .../www/themes/pfsense_ng/images/icons/favicon.ico | Bin 0 -> 1406 bytes .../www/themes/pfsense_ng/images/icons/icon_3g.gif | Bin 0 -> 200 bytes .../pfsense_ng/images/icons/icon_3g_inactive.gif | Bin 0 -> 200 bytes .../pfsense_ng/images/icons/icon_advanced.gif | Bin 0 -> 306 bytes .../pfsense_ng/images/icons/icon_advanced_s.gif | Bin 0 -> 314 bytes .../themes/pfsense_ng/images/icons/icon_alert.gif | Bin 0 -> 1015 bytes .../pfsense_ng/images/icons/icon_alias_host.gif | Bin 0 -> 348 bytes .../pfsense_ng/images/icons/icon_alias_net.gif | Bin 0 -> 331 bytes .../pfsense_ng/images/icons/icon_alias_port.gif | Bin 0 -> 346 bytes .../pfsense_ng/images/icons/icon_alias_url.gif | Bin 0 -> 314 bytes .../images/icons/icon_alias_url_reload.gif | Bin 0 -> 1111 bytes .../themes/pfsense_ng/images/icons/icon_block.gif | Bin 0 -> 193 bytes .../pfsense_ng/images/icons/icon_block_add.gif | Bin 0 -> 192 bytes .../pfsense_ng/images/icons/icon_block_d.gif | Bin 0 -> 193 bytes .../pfsense_ng/images/icons/icon_cablenic.gif | Bin 0 -> 91 bytes .../themes/pfsense_ng/images/icons/icon_cal.gif | Bin 0 -> 646 bytes .../themes/pfsense_ng/images/icons/icon_cal_mo.gif | Bin 0 -> 1060 bytes .../themes/pfsense_ng/images/icons/icon_carp.gif | Bin 0 -> 352 bytes .../themes/pfsense_ng/images/icons/icon_carp_d.gif | Bin 0 -> 357 bytes .../themes/pfsense_ng/images/icons/icon_chain.png | Bin 0 -> 161 bytes .../themes/pfsense_ng/images/icons/icon_check.gif | Bin 0 -> 1291 bytes .../pfsense_ng/images/icons/icon_clock_green.gif | Bin 0 -> 308 bytes .../pfsense_ng/images/icons/icon_clock_grey.gif | Bin 0 -> 308 bytes .../pfsense_ng/images/icons/icon_clock_red.gif | Bin 0 -> 308 bytes .../themes/pfsense_ng/images/icons/icon_close.gif | Bin 0 -> 64 bytes .../pfsense_ng/images/icons/icon_configure.gif | Bin 0 -> 64 bytes .../themes/pfsense_ng/images/icons/icon_down.gif | Bin 0 -> 1114 bytes .../themes/pfsense_ng/images/icons/icon_down_d.gif | Bin 0 -> 689 bytes .../pfsense_ng/images/icons/icon_down_mo.gif | Bin 0 -> 1117 bytes .../www/themes/pfsense_ng/images/icons/icon_e.gif | Bin 0 -> 1106 bytes .../themes/pfsense_ng/images/icons/icon_e_mo.gif | Bin 0 -> 1120 bytes .../themes/pfsense_ng/images/icons/icon_error.gif | Bin 0 -> 1312 bytes .../themes/pfsense_ng/images/icons/icon_exclam.gif | Bin 0 -> 1274 bytes .../pfsense_ng/images/icons/icon_flag_de.png | Bin 0 -> 114 bytes .../pfsense_ng/images/icons/icon_flag_en.png | Bin 0 -> 618 bytes .../pfsense_ng/images/icons/icon_flag_es.png | Bin 0 -> 281 bytes .../pfsense_ng/images/icons/icon_flag_pt_BR.png | Bin 0 -> 502 bytes .../pfsense_ng/images/icons/icon_frmfld_cert.png | Bin 0 -> 1528 bytes .../pfsense_ng/images/icons/icon_frmfld_file.png | Bin 0 -> 687 bytes .../pfsense_ng/images/icons/icon_frmfld_group.png | Bin 0 -> 748 bytes .../pfsense_ng/images/icons/icon_frmfld_host.png | Bin 0 -> 513 bytes .../pfsense_ng/images/icons/icon_frmfld_imp.png | Bin 0 -> 644 bytes .../pfsense_ng/images/icons/icon_frmfld_mail.png | Bin 0 -> 371 bytes .../pfsense_ng/images/icons/icon_frmfld_pwd.png | Bin 0 -> 620 bytes .../pfsense_ng/images/icons/icon_frmfld_search.png | Bin 0 -> 593 bytes .../pfsense_ng/images/icons/icon_frmfld_time.png | Bin 0 -> 646 bytes .../images/icons/icon_frmfld_unknown.png | Bin 0 -> 487 bytes .../pfsense_ng/images/icons/icon_frmfld_url.png | Bin 0 -> 704 bytes .../pfsense_ng/images/icons/icon_frmfld_user.png | Bin 0 -> 654 bytes .../pfsense_ng/images/icons/icon_fw-update.gif | Bin 0 -> 43785 bytes .../themes/pfsense_ng/images/icons/icon_help.gif | Bin 0 -> 1669 bytes .../pfsense_ng/images/icons/icon_ifalias.gif | Bin 0 -> 315 bytes .../pfsense_ng/images/icons/icon_ifalias_d.gif | Bin 0 -> 315 bytes .../pfsense_ng/images/icons/icon_import_alias.gif | Bin 0 -> 1109 bytes .../www/themes/pfsense_ng/images/icons/icon_in.gif | Bin 0 -> 177 bytes .../themes/pfsense_ng/images/icons/icon_in_d.gif | Bin 0 -> 190 bytes .../pfsense_ng/images/icons/icon_info_pkg.gif | Bin 0 -> 1131 bytes .../images/icons/icon_interface_down.gif | Bin 0 -> 88 bytes .../pfsense_ng/images/icons/icon_interface_up.gif | Bin 0 -> 87 bytes .../themes/pfsense_ng/images/icons/icon_left.gif | Bin 0 -> 1120 bytes .../themes/pfsense_ng/images/icons/icon_left_d.gif | Bin 0 -> 691 bytes .../pfsense_ng/images/icons/icon_left_mo.gif | Bin 0 -> 1129 bytes .../themes/pfsense_ng/images/icons/icon_log.gif | Bin 0 -> 297 bytes .../themes/pfsense_ng/images/icons/icon_log_d.gif | Bin 0 -> 297 bytes .../themes/pfsense_ng/images/icons/icon_log_s.gif | Bin 0 -> 305 bytes .../pfsense_ng/images/icons/icon_log_s_d.gif | Bin 0 -> 305 bytes .../themes/pfsense_ng/images/icons/icon_logs.gif | Bin 0 -> 2092 bytes .../themes/pfsense_ng/images/icons/icon_match.gif | Bin 0 -> 847 bytes .../pfsense_ng/images/icons/icon_match_d.gif | Bin 0 -> 843 bytes .../themes/pfsense_ng/images/icons/icon_minus.gif | Bin 0 -> 61 bytes .../themes/pfsense_ng/images/icons/icon_open.gif | Bin 0 -> 62 bytes .../themes/pfsense_ng/images/icons/icon_other.gif | Bin 0 -> 125 bytes .../pfsense_ng/images/icons/icon_other_d.gif | Bin 0 -> 125 bytes .../themes/pfsense_ng/images/icons/icon_out.gif | Bin 0 -> 179 bytes .../themes/pfsense_ng/images/icons/icon_out_d.gif | Bin 0 -> 189 bytes .../themes/pfsense_ng/images/icons/icon_parp.gif | Bin 0 -> 303 bytes .../themes/pfsense_ng/images/icons/icon_parp_d.gif | Bin 0 -> 303 bytes .../themes/pfsense_ng/images/icons/icon_pass.gif | Bin 0 -> 182 bytes .../pfsense_ng/images/icons/icon_pass_add.gif | Bin 0 -> 183 bytes .../themes/pfsense_ng/images/icons/icon_pass_d.gif | Bin 0 -> 182 bytes .../themes/pfsense_ng/images/icons/icon_plus.gif | Bin 0 -> 1100 bytes .../pfsense_ng/images/icons/icon_plus_bl.gif | Bin 0 -> 1096 bytes .../pfsense_ng/images/icons/icon_plus_bl_p.gif | Bin 0 -> 1079 bytes .../themes/pfsense_ng/images/icons/icon_plus_d.gif | Bin 0 -> 682 bytes .../pfsense_ng/images/icons/icon_plus_mo.gif | Bin 0 -> 1120 bytes .../themes/pfsense_ng/images/icons/icon_plus_p.gif | Bin 0 -> 1087 bytes .../pfsense_ng/images/icons/icon_reinstall.gif | Bin 0 -> 1119 bytes .../pfsense_ng/images/icons/icon_reinstall_d.gif | Bin 0 -> 701 bytes .../pfsense_ng/images/icons/icon_reinstall_mo.gif | Bin 0 -> 1130 bytes .../pfsense_ng/images/icons/icon_reinstall_pkg.gif | Bin 0 -> 1109 bytes .../images/icons/icon_reinstall_pkg_d.gif | Bin 0 -> 694 bytes .../images/icons/icon_reinstall_pkg_mo.gif | Bin 0 -> 1135 bytes .../pfsense_ng/images/icons/icon_reinstall_xml.gif | Bin 0 -> 1105 bytes .../images/icons/icon_reinstall_xml_d.gif | Bin 0 -> 686 bytes .../images/icons/icon_reinstall_xml_mo.gif | Bin 0 -> 1131 bytes .../themes/pfsense_ng/images/icons/icon_reject.gif | Bin 0 -> 193 bytes .../pfsense_ng/images/icons/icon_reject_d.gif | Bin 0 -> 193 bytes .../themes/pfsense_ng/images/icons/icon_right.gif | Bin 0 -> 1117 bytes .../images/icons/icon_service_restart.gif | Bin 0 -> 1120 bytes .../images/icons/icon_service_restart_d.gif | Bin 0 -> 1115 bytes .../images/icons/icon_service_running.gif | Bin 0 -> 1390 bytes .../pfsense_ng/images/icons/icon_service_start.gif | Bin 0 -> 1119 bytes .../images/icons/icon_service_start_d.gif | Bin 0 -> 1115 bytes .../images/icons/icon_service_status.gif | Bin 0 -> 2150 bytes .../pfsense_ng/images/icons/icon_service_stop.gif | Bin 0 -> 1106 bytes .../images/icons/icon_service_stop_d.gif | Bin 0 -> 1100 bytes .../images/icons/icon_service_stopped.gif | Bin 0 -> 1695 bytes .../images/icons/icon_services_restart_mo.gif | Bin 0 -> 1129 bytes .../images/icons/icon_services_start_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_services_stop_mo.gif | Bin 0 -> 1126 bytes .../images/icons/icon_system-group-grey.png | Bin 0 -> 1566 bytes .../pfsense_ng/images/icons/icon_system-group.png | Bin 0 -> 3128 bytes .../images/icons/icon_system-user-grey.png | Bin 0 -> 1107 bytes .../pfsense_ng/images/icons/icon_system-user.png | Bin 0 -> 2084 bytes .../images/icons/icon_system_lock_screen.png | Bin 0 -> 1841 bytes .../pfsense_ng/images/icons/icon_system_logout.png | Bin 0 -> 2087 bytes .../pfsense_ng/images/icons/icon_trapped.gif | Bin 0 -> 1101 bytes .../pfsense_ng/images/icons/icon_trapped_p.gif | Bin 0 -> 1079 bytes .../pfsense_ng/images/icons/icon_ts_rule.gif | Bin 0 -> 194 bytes .../pfsense_ng/images/icons/icon_ts_rule_d.gif | Bin 0 -> 193 bytes .../www/themes/pfsense_ng/images/icons/icon_up.gif | Bin 0 -> 1116 bytes .../themes/pfsense_ng/images/icons/icon_up_d.gif | Bin 0 -> 691 bytes .../themes/pfsense_ng/images/icons/icon_up_mo.gif | Bin 0 -> 1129 bytes .../themes/pfsense_ng/images/icons/icon_wlan.gif | Bin 0 -> 66 bytes .../themes/pfsense_ng/images/icons/icon_wlan_d.gif | Bin 0 -> 100 bytes .../pfsense_ng/images/icons/icon_wol_all.gif | Bin 0 -> 1126 bytes .../pfsense_ng/images/icons/icon_wzd_nsaved.png | Bin 0 -> 512 bytes .../pfsense_ng/images/icons/icon_wzd_saved.png | Bin 0 -> 399 bytes .../www/themes/pfsense_ng/images/icons/icon_x.gif | Bin 0 -> 1111 bytes .../themes/pfsense_ng/images/icons/icon_x_d.gif | Bin 0 -> 680 bytes .../themes/pfsense_ng/images/icons/icon_x_mo.gif | Bin 0 -> 1126 bytes .../themes/pfsense_ng/images/icons/icon_x_p.gif | Bin 0 -> 1090 bytes .../www/themes/pfsense_ng/images/icons/in.gif | Bin 0 -> 177 bytes .../www/themes/pfsense_ng/images/icons/in_d.gif | Bin 0 -> 190 bytes .../www/themes/pfsense_ng/images/icons/out.gif | Bin 0 -> 179 bytes .../www/themes/pfsense_ng/images/icons/out_d.gif | Bin 0 -> 189 bytes src/usr/local/www/themes/pfsense_ng/images/log.png | Bin 0 -> 270 bytes .../local/www/themes/pfsense_ng/images/logo.gif | Bin 0 -> 2471 bytes .../local/www/themes/pfsense_ng/images/logobig.jpg | Bin 0 -> 7540 bytes .../www/themes/pfsense_ng/images/mainmenu-down.gif | Bin 0 -> 55 bytes .../themes/pfsense_ng/images/mainmenu-right.gif | Bin 0 -> 56 bytes .../www/themes/pfsense_ng/images/mainmenuitem.gif | Bin 0 -> 54 bytes .../www/themes/pfsense_ng/images/menu-dot.gif | Bin 0 -> 54 bytes .../www/themes/pfsense_ng/images/menu_footer.gif | Bin 0 -> 234 bytes .../www/themes/pfsense_ng/images/menu_right.gif | Bin 0 -> 61 bytes .../local/www/themes/pfsense_ng/images/menubgr.png | Bin 0 -> 132 bytes .../themes/pfsense_ng/images/menubgr_footer.png | Bin 0 -> 496 bytes .../themes/pfsense_ng/images/menubgr_highlight.png | Bin 0 -> 252 bytes .../www/themes/pfsense_ng/images/misc/bar_blue.gif | Bin 0 -> 94 bytes .../www/themes/pfsense_ng/images/misc/bar_gray.gif | Bin 0 -> 94 bytes .../www/themes/pfsense_ng/images/misc/bar_left.gif | Bin 0 -> 289 bytes .../themes/pfsense_ng/images/misc/bar_right.gif | Bin 0 -> 288 bytes .../pfsense_ng/images/misc/bullet_toggle_minus.png | Bin 0 -> 154 bytes .../pfsense_ng/images/misc/bullet_toggle_plus.png | Bin 0 -> 156 bytes .../www/themes/pfsense_ng/images/misc/button.gif | Bin 0 -> 805 bytes .../www/themes/pfsense_ng/images/misc/graph.png | Bin 0 -> 2256 bytes .../www/themes/pfsense_ng/images/misc/key_128.gif | Bin 0 -> 2766 bytes .../www/themes/pfsense_ng/images/misc/key_152.gif | Bin 0 -> 2772 bytes .../www/themes/pfsense_ng/images/misc/key_256.gif | Bin 0 -> 2808 bytes .../www/themes/pfsense_ng/images/misc/key_64.gif | Bin 0 -> 2723 bytes .../pfsense_ng/images/misc/left_background.gif | Bin 0 -> 38943 bytes .../www/themes/pfsense_ng/images/misc/loader.gif | Bin 0 -> 5971 bytes .../themes/pfsense_ng/images/misc/loader_all.gif | Bin 0 -> 1398 bytes .../pfsense_ng/images/misc/loader_filter.gif | Bin 0 -> 1436 bytes .../themes/pfsense_ng/images/misc/loader_tab.gif | Bin 0 -> 5852 bytes .../www/themes/pfsense_ng/images/misc/logon.png | Bin 0 -> 50494 bytes .../themes/pfsense_ng/images/misc/progress_bar.gif | Bin 0 -> 44791 bytes .../themes/pfsense_ng/images/misc/rrd_error.png | Bin 0 -> 38898 bytes .../pfsense_ng/images/misc/status_alerter.gif | Bin 0 -> 2203 bytes .../pfsense_ng/images/misc/status_carpmaster.gif | Bin 0 -> 1558 bytes .../themes/pfsense_ng/images/misc/status_left.gif | Bin 0 -> 600 bytes .../pfsense_ng/images/misc/status_page_loading.gif | Bin 0 -> 1621 bytes .../pfsense_ng/images/misc/status_reload_all.gif | Bin 0 -> 1611 bytes .../images/misc/status_reload_filter.gif | Bin 0 -> 1612 bytes .../themes/pfsense_ng/images/misc/status_right.gif | Bin 0 -> 599 bytes .../www/themes/pfsense_ng/images/misc/tri_c.gif | Bin 0 -> 61 bytes .../themes/pfsense_ng/images/misc/tri_c_black.gif | Bin 0 -> 69 bytes .../www/themes/pfsense_ng/images/misc/tri_o.gif | Bin 0 -> 58 bytes .../themes/pfsense_ng/images/misc/tri_o_black.gif | Bin 0 -> 67 bytes .../pfsense_ng/images/misc/widget_loader.gif | Bin 0 -> 2545 bytes .../www/themes/pfsense_ng/images/new_tab_menu.png | Bin 0 -> 444 bytes .../local/www/themes/pfsense_ng/images/status.png | Bin 0 -> 348 bytes .../www/themes/pfsense_ng/images/transparent.gif | Bin 0 -> 146 bytes .../themes/pfsense_ng/images/transparent_pixel.gif | Bin 0 -> 43 bytes .../www/themes/pfsense_ng/javascript/ie7/blank.gif | Bin 0 -> 48 bytes .../pfsense_ng/javascript/ie7/ie7-box-model.js | 2 + .../themes/pfsense_ng/javascript/ie7/ie7-core.js | 2 + .../pfsense_ng/javascript/ie7/ie7-css-strict.js | 2 + .../themes/pfsense_ng/javascript/ie7/ie7-css2.js | 2 + .../themes/pfsense_ng/javascript/ie7/ie7-css3.js | 2 + .../themes/pfsense_ng/javascript/ie7/ie7-fixed.js | 2 + .../themes/pfsense_ng/javascript/ie7/ie7-html4.js | 2 + .../themes/pfsense_ng/javascript/ie7/ie7-ie5.js | 2 + .../themes/pfsense_ng/javascript/ie7/ie7-lite-p.js | 3 + .../themes/pfsense_ng/javascript/ie7/ie7-lite.js | 2 + .../themes/pfsense_ng/javascript/ie7/ie7-png.js | 2 + .../pfsense_ng/javascript/ie7/ie7-server.css | 43 + .../pfsense_ng/javascript/ie7/ie7-standard-p.js | 3 + .../pfsense_ng/javascript/ie7/ie7-standard.js | 2 + .../pfsense_ng/javascript/ie7/test-trans.png | Bin 0 -> 106 bytes .../themes/pfsense_ng/javascript/img/grey-40.png | Bin 0 -> 223 bytes .../pfsense_ng/javascript/img/submenu-off.gif | Bin 0 -> 65 bytes .../pfsense_ng/javascript/img/submenu-on.gif | Bin 0 -> 65 bytes .../themes/pfsense_ng/javascript/img/white-90.png | Bin 0 -> 223 bytes .../www/themes/pfsense_ng/javascript/img/x.gif | Bin 0 -> 43 bytes .../themes/pfsense_ng/javascript/niftyjsCode.js | 174 + .../pfsense_ng/javascript/transmenu-body.php | 51 + .../pfsense_ng/javascript/transmenu-head.php | 85 + .../www/themes/pfsense_ng/javascript/transmenu.org | 785 +++ .../www/themes/pfsense_ng/javascript/transmenuC.js | 86 + .../local/www/themes/pfsense_ng/jsevents/body.def | 7 + src/usr/local/www/themes/pfsense_ng/loader.js | 36 + src/usr/local/www/themes/pfsense_ng/login.css | 1127 ++++ src/usr/local/www/themes/pfsense_ng/menu.inc | 177 + .../local/www/themes/pfsense_ng/new_tab_menu.css | 101 + src/usr/local/www/themes/pfsense_ng/no_big_logo | 1 + .../local/www/themes/pfsense_ng/rrdcolors.inc.php | 89 + .../themes/pfsense_ng/styles/jquery-ui-1.11.1.css | 1226 ++++ .../www/themes/pfsense_ng/styles/menustyles.css | 44 + .../www/themes/pfsense_ng/styles/transmenu.css | 75 + src/usr/local/www/themes/pfsense_ng/wizard.css | 1117 ++++ src/usr/local/www/themes/pfsense_ng_fs/all.css | 1375 +++++ .../www/themes/pfsense_ng_fs/apple-touch-icon.png | Bin 0 -> 4068 bytes .../www/themes/pfsense_ng_fs/bottom-loader.js | 10 + src/usr/local/www/themes/pfsense_ng_fs/favicon.ico | Bin 0 -> 1406 bytes .../local/www/themes/pfsense_ng_fs/graphlink.css | 43 + .../www/themes/pfsense_ng_fs/images/alert_bgr.png | Bin 0 -> 2483 bytes .../www/themes/pfsense_ng_fs/images/alerter.png | Bin 0 -> 3748 bytes .../www/themes/pfsense_ng_fs/images/background.jpg | Bin 0 -> 49431 bytes .../www/themes/pfsense_ng_fs/images/footer.png | Bin 0 -> 2956 bytes .../www/themes/pfsense_ng_fs/images/header.png | Bin 0 -> 4994 bytes .../local/www/themes/pfsense_ng_fs/images/help.png | Bin 0 -> 324 bytes .../www/themes/pfsense_ng_fs/images/horizontal.png | Bin 0 -> 191 bytes .../www/themes/pfsense_ng_fs/images/hostname.png | Bin 0 -> 1899 bytes .../themes/pfsense_ng_fs/images/icons/favicon.ico | Bin 0 -> 1406 bytes .../themes/pfsense_ng_fs/images/icons/icon_3g.gif | Bin 0 -> 200 bytes .../images/icons/icon_3g_inactive.gif | Bin 0 -> 200 bytes .../pfsense_ng_fs/images/icons/icon_advanced.gif | Bin 0 -> 306 bytes .../pfsense_ng_fs/images/icons/icon_advanced_s.gif | Bin 0 -> 314 bytes .../pfsense_ng_fs/images/icons/icon_alert.gif | Bin 0 -> 1015 bytes .../pfsense_ng_fs/images/icons/icon_alias_host.gif | Bin 0 -> 348 bytes .../pfsense_ng_fs/images/icons/icon_alias_net.gif | Bin 0 -> 331 bytes .../pfsense_ng_fs/images/icons/icon_alias_port.gif | Bin 0 -> 346 bytes .../pfsense_ng_fs/images/icons/icon_alias_url.gif | Bin 0 -> 314 bytes .../images/icons/icon_alias_url_reload.gif | Bin 0 -> 1111 bytes .../pfsense_ng_fs/images/icons/icon_block.gif | Bin 0 -> 193 bytes .../pfsense_ng_fs/images/icons/icon_block_add.gif | Bin 0 -> 192 bytes .../pfsense_ng_fs/images/icons/icon_block_d.gif | Bin 0 -> 193 bytes .../pfsense_ng_fs/images/icons/icon_cablenic.gif | Bin 0 -> 91 bytes .../themes/pfsense_ng_fs/images/icons/icon_cal.gif | Bin 0 -> 646 bytes .../pfsense_ng_fs/images/icons/icon_cal_mo.gif | Bin 0 -> 1060 bytes .../pfsense_ng_fs/images/icons/icon_carp.gif | Bin 0 -> 352 bytes .../pfsense_ng_fs/images/icons/icon_carp_d.gif | Bin 0 -> 357 bytes .../pfsense_ng_fs/images/icons/icon_chain.png | Bin 0 -> 161 bytes .../pfsense_ng_fs/images/icons/icon_check.gif | Bin 0 -> 1291 bytes .../images/icons/icon_clock_green.gif | Bin 0 -> 308 bytes .../pfsense_ng_fs/images/icons/icon_clock_grey.gif | Bin 0 -> 308 bytes .../pfsense_ng_fs/images/icons/icon_clock_red.gif | Bin 0 -> 308 bytes .../pfsense_ng_fs/images/icons/icon_close.gif | Bin 0 -> 64 bytes .../pfsense_ng_fs/images/icons/icon_configure.gif | Bin 0 -> 64 bytes .../pfsense_ng_fs/images/icons/icon_down.gif | Bin 0 -> 1114 bytes .../pfsense_ng_fs/images/icons/icon_down_d.gif | Bin 0 -> 689 bytes .../pfsense_ng_fs/images/icons/icon_down_mo.gif | Bin 0 -> 1117 bytes .../themes/pfsense_ng_fs/images/icons/icon_e.gif | Bin 0 -> 1106 bytes .../pfsense_ng_fs/images/icons/icon_e_mo.gif | Bin 0 -> 1120 bytes .../pfsense_ng_fs/images/icons/icon_error.gif | Bin 0 -> 1312 bytes .../pfsense_ng_fs/images/icons/icon_exclam.gif | Bin 0 -> 1274 bytes .../pfsense_ng_fs/images/icons/icon_flag_de.png | Bin 0 -> 114 bytes .../pfsense_ng_fs/images/icons/icon_flag_en.png | Bin 0 -> 618 bytes .../pfsense_ng_fs/images/icons/icon_flag_es.png | Bin 0 -> 281 bytes .../pfsense_ng_fs/images/icons/icon_flag_pt_BR.png | Bin 0 -> 502 bytes .../images/icons/icon_frmfld_cert.png | Bin 0 -> 1528 bytes .../images/icons/icon_frmfld_file.png | Bin 0 -> 687 bytes .../images/icons/icon_frmfld_group.png | Bin 0 -> 748 bytes .../images/icons/icon_frmfld_host.png | Bin 0 -> 513 bytes .../pfsense_ng_fs/images/icons/icon_frmfld_imp.png | Bin 0 -> 644 bytes .../images/icons/icon_frmfld_mail.png | Bin 0 -> 371 bytes .../pfsense_ng_fs/images/icons/icon_frmfld_pwd.png | Bin 0 -> 620 bytes .../images/icons/icon_frmfld_search.png | Bin 0 -> 593 bytes .../images/icons/icon_frmfld_time.png | Bin 0 -> 646 bytes .../images/icons/icon_frmfld_unknown.png | Bin 0 -> 487 bytes .../pfsense_ng_fs/images/icons/icon_frmfld_url.png | Bin 0 -> 704 bytes .../images/icons/icon_frmfld_user.png | Bin 0 -> 654 bytes .../pfsense_ng_fs/images/icons/icon_fw-update.gif | Bin 0 -> 43785 bytes .../pfsense_ng_fs/images/icons/icon_help.gif | Bin 0 -> 1669 bytes .../pfsense_ng_fs/images/icons/icon_ifalias.gif | Bin 0 -> 315 bytes .../pfsense_ng_fs/images/icons/icon_ifalias_d.gif | Bin 0 -> 315 bytes .../images/icons/icon_import_alias.gif | Bin 0 -> 1109 bytes .../themes/pfsense_ng_fs/images/icons/icon_in.gif | Bin 0 -> 177 bytes .../pfsense_ng_fs/images/icons/icon_in_d.gif | Bin 0 -> 190 bytes .../pfsense_ng_fs/images/icons/icon_info_pkg.gif | Bin 0 -> 1131 bytes .../images/icons/icon_interface_down.gif | Bin 0 -> 88 bytes .../images/icons/icon_interface_up.gif | Bin 0 -> 87 bytes .../pfsense_ng_fs/images/icons/icon_left.gif | Bin 0 -> 1120 bytes .../pfsense_ng_fs/images/icons/icon_left_d.gif | Bin 0 -> 691 bytes .../pfsense_ng_fs/images/icons/icon_left_mo.gif | Bin 0 -> 1129 bytes .../themes/pfsense_ng_fs/images/icons/icon_log.gif | Bin 0 -> 297 bytes .../pfsense_ng_fs/images/icons/icon_log_d.gif | Bin 0 -> 297 bytes .../pfsense_ng_fs/images/icons/icon_log_s.gif | Bin 0 -> 305 bytes .../pfsense_ng_fs/images/icons/icon_log_s_d.gif | Bin 0 -> 305 bytes .../pfsense_ng_fs/images/icons/icon_logs.gif | Bin 0 -> 2092 bytes .../pfsense_ng_fs/images/icons/icon_match.gif | Bin 0 -> 847 bytes .../pfsense_ng_fs/images/icons/icon_match_d.gif | Bin 0 -> 843 bytes .../pfsense_ng_fs/images/icons/icon_minus.gif | Bin 0 -> 61 bytes .../pfsense_ng_fs/images/icons/icon_open.gif | Bin 0 -> 62 bytes .../pfsense_ng_fs/images/icons/icon_other.gif | Bin 0 -> 125 bytes .../pfsense_ng_fs/images/icons/icon_other_d.gif | Bin 0 -> 125 bytes .../themes/pfsense_ng_fs/images/icons/icon_out.gif | Bin 0 -> 179 bytes .../pfsense_ng_fs/images/icons/icon_out_d.gif | Bin 0 -> 189 bytes .../pfsense_ng_fs/images/icons/icon_parp.gif | Bin 0 -> 303 bytes .../pfsense_ng_fs/images/icons/icon_parp_d.gif | Bin 0 -> 303 bytes .../pfsense_ng_fs/images/icons/icon_pass.gif | Bin 0 -> 182 bytes .../pfsense_ng_fs/images/icons/icon_pass_add.gif | Bin 0 -> 183 bytes .../pfsense_ng_fs/images/icons/icon_pass_d.gif | Bin 0 -> 182 bytes .../pfsense_ng_fs/images/icons/icon_plus.gif | Bin 0 -> 1100 bytes .../pfsense_ng_fs/images/icons/icon_plus_bl.gif | Bin 0 -> 1096 bytes .../pfsense_ng_fs/images/icons/icon_plus_bl_p.gif | Bin 0 -> 1079 bytes .../pfsense_ng_fs/images/icons/icon_plus_d.gif | Bin 0 -> 682 bytes .../pfsense_ng_fs/images/icons/icon_plus_mo.gif | Bin 0 -> 1120 bytes .../pfsense_ng_fs/images/icons/icon_plus_p.gif | Bin 0 -> 1087 bytes .../pfsense_ng_fs/images/icons/icon_reinstall.gif | Bin 0 -> 1119 bytes .../images/icons/icon_reinstall_d.gif | Bin 0 -> 701 bytes .../images/icons/icon_reinstall_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_reinstall_pkg.gif | Bin 0 -> 1109 bytes .../images/icons/icon_reinstall_pkg_d.gif | Bin 0 -> 694 bytes .../images/icons/icon_reinstall_pkg_mo.gif | Bin 0 -> 1135 bytes .../images/icons/icon_reinstall_xml.gif | Bin 0 -> 1105 bytes .../images/icons/icon_reinstall_xml_d.gif | Bin 0 -> 686 bytes .../images/icons/icon_reinstall_xml_mo.gif | Bin 0 -> 1131 bytes .../pfsense_ng_fs/images/icons/icon_reject.gif | Bin 0 -> 193 bytes .../pfsense_ng_fs/images/icons/icon_reject_d.gif | Bin 0 -> 193 bytes .../pfsense_ng_fs/images/icons/icon_right.gif | Bin 0 -> 1117 bytes .../images/icons/icon_service_restart.gif | Bin 0 -> 1120 bytes .../images/icons/icon_service_restart_d.gif | Bin 0 -> 1115 bytes .../images/icons/icon_service_running.gif | Bin 0 -> 1390 bytes .../images/icons/icon_service_start.gif | Bin 0 -> 1119 bytes .../images/icons/icon_service_start_d.gif | Bin 0 -> 1115 bytes .../images/icons/icon_service_status.gif | Bin 0 -> 2150 bytes .../images/icons/icon_service_stop.gif | Bin 0 -> 1106 bytes .../images/icons/icon_service_stop_d.gif | Bin 0 -> 1100 bytes .../images/icons/icon_service_stopped.gif | Bin 0 -> 1695 bytes .../images/icons/icon_services_restart_mo.gif | Bin 0 -> 1129 bytes .../images/icons/icon_services_start_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_services_stop_mo.gif | Bin 0 -> 1126 bytes .../images/icons/icon_system-group-grey.png | Bin 0 -> 1566 bytes .../images/icons/icon_system-group.png | Bin 0 -> 3128 bytes .../images/icons/icon_system-user-grey.png | Bin 0 -> 1107 bytes .../images/icons/icon_system-user.png | Bin 0 -> 2084 bytes .../images/icons/icon_system_lock_screen.png | Bin 0 -> 1841 bytes .../images/icons/icon_system_logout.png | Bin 0 -> 2087 bytes .../pfsense_ng_fs/images/icons/icon_trapped.gif | Bin 0 -> 1101 bytes .../pfsense_ng_fs/images/icons/icon_trapped_p.gif | Bin 0 -> 1079 bytes .../pfsense_ng_fs/images/icons/icon_ts_rule.gif | Bin 0 -> 194 bytes .../pfsense_ng_fs/images/icons/icon_ts_rule_d.gif | Bin 0 -> 193 bytes .../themes/pfsense_ng_fs/images/icons/icon_up.gif | Bin 0 -> 1116 bytes .../pfsense_ng_fs/images/icons/icon_up_d.gif | Bin 0 -> 691 bytes .../pfsense_ng_fs/images/icons/icon_up_mo.gif | Bin 0 -> 1129 bytes .../pfsense_ng_fs/images/icons/icon_wlan.gif | Bin 0 -> 66 bytes .../pfsense_ng_fs/images/icons/icon_wlan_d.gif | Bin 0 -> 100 bytes .../pfsense_ng_fs/images/icons/icon_wol_all.gif | Bin 0 -> 1126 bytes .../pfsense_ng_fs/images/icons/icon_wzd_nsaved.png | Bin 0 -> 512 bytes .../pfsense_ng_fs/images/icons/icon_wzd_saved.png | Bin 0 -> 399 bytes .../themes/pfsense_ng_fs/images/icons/icon_x.gif | Bin 0 -> 1111 bytes .../themes/pfsense_ng_fs/images/icons/icon_x_d.gif | Bin 0 -> 680 bytes .../pfsense_ng_fs/images/icons/icon_x_mo.gif | Bin 0 -> 1126 bytes .../themes/pfsense_ng_fs/images/icons/icon_x_p.gif | Bin 0 -> 1090 bytes .../www/themes/pfsense_ng_fs/images/icons/in.gif | Bin 0 -> 177 bytes .../www/themes/pfsense_ng_fs/images/icons/in_d.gif | Bin 0 -> 190 bytes .../www/themes/pfsense_ng_fs/images/icons/out.gif | Bin 0 -> 179 bytes .../themes/pfsense_ng_fs/images/icons/out_d.gif | Bin 0 -> 189 bytes .../local/www/themes/pfsense_ng_fs/images/log.png | Bin 0 -> 270 bytes .../local/www/themes/pfsense_ng_fs/images/logo.gif | Bin 0 -> 2471 bytes .../www/themes/pfsense_ng_fs/images/logobig.jpg | Bin 0 -> 7540 bytes .../themes/pfsense_ng_fs/images/mainmenu-down.gif | Bin 0 -> 55 bytes .../themes/pfsense_ng_fs/images/mainmenu-right.gif | Bin 0 -> 56 bytes .../themes/pfsense_ng_fs/images/mainmenuitem.gif | Bin 0 -> 54 bytes .../www/themes/pfsense_ng_fs/images/menu-dot.gif | Bin 0 -> 54 bytes .../themes/pfsense_ng_fs/images/menu_footer.gif | Bin 0 -> 234 bytes .../www/themes/pfsense_ng_fs/images/menu_right.gif | Bin 0 -> 61 bytes .../www/themes/pfsense_ng_fs/images/menubgr.png | Bin 0 -> 132 bytes .../themes/pfsense_ng_fs/images/menubgr_footer.png | Bin 0 -> 496 bytes .../pfsense_ng_fs/images/menubgr_highlight.png | Bin 0 -> 252 bytes .../themes/pfsense_ng_fs/images/misc/bar_blue.gif | Bin 0 -> 94 bytes .../themes/pfsense_ng_fs/images/misc/bar_gray.gif | Bin 0 -> 94 bytes .../themes/pfsense_ng_fs/images/misc/bar_left.gif | Bin 0 -> 289 bytes .../themes/pfsense_ng_fs/images/misc/bar_right.gif | Bin 0 -> 288 bytes .../images/misc/bullet_toggle_minus.png | Bin 0 -> 154 bytes .../images/misc/bullet_toggle_plus.png | Bin 0 -> 156 bytes .../themes/pfsense_ng_fs/images/misc/button.gif | Bin 0 -> 805 bytes .../www/themes/pfsense_ng_fs/images/misc/graph.png | Bin 0 -> 2256 bytes .../themes/pfsense_ng_fs/images/misc/key_128.gif | Bin 0 -> 2766 bytes .../themes/pfsense_ng_fs/images/misc/key_152.gif | Bin 0 -> 2772 bytes .../themes/pfsense_ng_fs/images/misc/key_256.gif | Bin 0 -> 2808 bytes .../themes/pfsense_ng_fs/images/misc/key_64.gif | Bin 0 -> 2723 bytes .../pfsense_ng_fs/images/misc/left_background.gif | Bin 0 -> 38943 bytes .../themes/pfsense_ng_fs/images/misc/loader.gif | Bin 0 -> 5971 bytes .../pfsense_ng_fs/images/misc/loader_all.gif | Bin 0 -> 1398 bytes .../pfsense_ng_fs/images/misc/loader_filter.gif | Bin 0 -> 1436 bytes .../pfsense_ng_fs/images/misc/loader_tab.gif | Bin 0 -> 5852 bytes .../www/themes/pfsense_ng_fs/images/misc/logon.png | Bin 0 -> 50494 bytes .../pfsense_ng_fs/images/misc/progress_bar.gif | Bin 0 -> 44791 bytes .../themes/pfsense_ng_fs/images/misc/rrd_error.png | Bin 0 -> 38898 bytes .../pfsense_ng_fs/images/misc/status_alerter.gif | Bin 0 -> 2203 bytes .../images/misc/status_carpmaster.gif | Bin 0 -> 1558 bytes .../pfsense_ng_fs/images/misc/status_left.gif | Bin 0 -> 600 bytes .../images/misc/status_page_loading.gif | Bin 0 -> 1621 bytes .../images/misc/status_reload_all.gif | Bin 0 -> 1611 bytes .../images/misc/status_reload_filter.gif | Bin 0 -> 1612 bytes .../pfsense_ng_fs/images/misc/status_right.gif | Bin 0 -> 599 bytes .../www/themes/pfsense_ng_fs/images/misc/tri_c.gif | Bin 0 -> 61 bytes .../pfsense_ng_fs/images/misc/tri_c_black.gif | Bin 0 -> 69 bytes .../www/themes/pfsense_ng_fs/images/misc/tri_o.gif | Bin 0 -> 58 bytes .../pfsense_ng_fs/images/misc/tri_o_black.gif | Bin 0 -> 67 bytes .../pfsense_ng_fs/images/misc/widget_loader.gif | Bin 0 -> 2545 bytes .../themes/pfsense_ng_fs/images/new_tab_menu.png | Bin 0 -> 444 bytes .../www/themes/pfsense_ng_fs/images/status.png | Bin 0 -> 348 bytes .../themes/pfsense_ng_fs/images/transparent.gif | Bin 0 -> 146 bytes .../pfsense_ng_fs/images/transparent_pixel.gif | Bin 0 -> 43 bytes .../themes/pfsense_ng_fs/javascript/ie7/blank.gif | Bin 0 -> 48 bytes .../pfsense_ng_fs/javascript/ie7/ie7-box-model.js | 2 + .../pfsense_ng_fs/javascript/ie7/ie7-core.js | 2 + .../pfsense_ng_fs/javascript/ie7/ie7-css-strict.js | 2 + .../pfsense_ng_fs/javascript/ie7/ie7-css2.js | 2 + .../pfsense_ng_fs/javascript/ie7/ie7-css3.js | 2 + .../pfsense_ng_fs/javascript/ie7/ie7-fixed.js | 2 + .../pfsense_ng_fs/javascript/ie7/ie7-html4.js | 2 + .../themes/pfsense_ng_fs/javascript/ie7/ie7-ie5.js | 2 + .../pfsense_ng_fs/javascript/ie7/ie7-lite-p.js | 3 + .../pfsense_ng_fs/javascript/ie7/ie7-lite.js | 2 + .../themes/pfsense_ng_fs/javascript/ie7/ie7-png.js | 2 + .../pfsense_ng_fs/javascript/ie7/ie7-server.css | 43 + .../pfsense_ng_fs/javascript/ie7/ie7-standard-p.js | 3 + .../pfsense_ng_fs/javascript/ie7/ie7-standard.js | 2 + .../pfsense_ng_fs/javascript/ie7/test-trans.png | Bin 0 -> 106 bytes .../pfsense_ng_fs/javascript/img/grey-40.png | Bin 0 -> 223 bytes .../pfsense_ng_fs/javascript/img/submenu-off.gif | Bin 0 -> 65 bytes .../pfsense_ng_fs/javascript/img/submenu-on.gif | Bin 0 -> 65 bytes .../pfsense_ng_fs/javascript/img/white-90.png | Bin 0 -> 223 bytes .../www/themes/pfsense_ng_fs/javascript/img/x.gif | Bin 0 -> 43 bytes .../themes/pfsense_ng_fs/javascript/niftyjsCode.js | 174 + .../pfsense_ng_fs/javascript/transmenu-body.php | 51 + .../pfsense_ng_fs/javascript/transmenu-head.php | 85 + .../themes/pfsense_ng_fs/javascript/transmenu.org | 785 +++ .../themes/pfsense_ng_fs/javascript/transmenuC.js | 86 + .../www/themes/pfsense_ng_fs/jsevents/body.def | 7 + src/usr/local/www/themes/pfsense_ng_fs/loader.js | 294 + src/usr/local/www/themes/pfsense_ng_fs/login.css | 1127 ++++ src/usr/local/www/themes/pfsense_ng_fs/menu.inc | 177 + .../www/themes/pfsense_ng_fs/new_tab_menu.css | 101 + src/usr/local/www/themes/pfsense_ng_fs/no_big_logo | 1 + .../www/themes/pfsense_ng_fs/rrdcolors.inc.php | 89 + .../pfsense_ng_fs/styles/jquery-ui-1.11.1.css | 1226 ++++ .../www/themes/pfsense_ng_fs/styles/menustyles.css | 44 + .../www/themes/pfsense_ng_fs/styles/transmenu.css | 75 + src/usr/local/www/themes/pfsense_ng_fs/wizard.css | 1117 ++++ src/usr/local/www/themes/the_wall/all.css | 1308 +++++ .../local/www/themes/the_wall/apple-touch-icon.png | Bin 0 -> 4068 bytes src/usr/local/www/themes/the_wall/bottom-loader.js | 10 + src/usr/local/www/themes/the_wall/favicon.ico | Bin 0 -> 1406 bytes src/usr/local/www/themes/the_wall/graphlink.css | 43 + .../local/www/themes/the_wall/images/alert_bgr.png | Bin 0 -> 12705 bytes .../www/themes/the_wall/images/background.jpg | Bin 0 -> 50449 bytes .../local/www/themes/the_wall/images/footer.png | Bin 0 -> 7774 bytes .../local/www/themes/the_wall/images/header.png | Bin 0 -> 44524 bytes src/usr/local/www/themes/the_wall/images/help.png | Bin 0 -> 324 bytes .../www/themes/the_wall/images/horizontal.gif | Bin 0 -> 461 bytes .../www/themes/the_wall/images/horizontal.png | Bin 0 -> 190 bytes .../www/themes/the_wall/images/icons/favicon.ico | Bin 0 -> 1406 bytes .../www/themes/the_wall/images/icons/icon_3g.gif | Bin 0 -> 200 bytes .../the_wall/images/icons/icon_3g_inactive.gif | Bin 0 -> 200 bytes .../themes/the_wall/images/icons/icon_advanced.gif | Bin 0 -> 306 bytes .../the_wall/images/icons/icon_advanced_s.gif | Bin 0 -> 314 bytes .../themes/the_wall/images/icons/icon_alert.gif | Bin 0 -> 1015 bytes .../the_wall/images/icons/icon_alias_host.gif | Bin 0 -> 348 bytes .../the_wall/images/icons/icon_alias_net.gif | Bin 0 -> 331 bytes .../the_wall/images/icons/icon_alias_port.gif | Bin 0 -> 346 bytes .../the_wall/images/icons/icon_alias_url.gif | Bin 0 -> 314 bytes .../images/icons/icon_alias_url_reload.gif | Bin 0 -> 1111 bytes .../themes/the_wall/images/icons/icon_block.gif | Bin 0 -> 193 bytes .../the_wall/images/icons/icon_block_add.gif | Bin 0 -> 192 bytes .../themes/the_wall/images/icons/icon_block_d.gif | Bin 0 -> 193 bytes .../themes/the_wall/images/icons/icon_cablenic.gif | Bin 0 -> 91 bytes .../www/themes/the_wall/images/icons/icon_cal.gif | Bin 0 -> 646 bytes .../themes/the_wall/images/icons/icon_cal_mo.gif | Bin 0 -> 1060 bytes .../www/themes/the_wall/images/icons/icon_carp.gif | Bin 0 -> 352 bytes .../themes/the_wall/images/icons/icon_carp_d.gif | Bin 0 -> 357 bytes .../themes/the_wall/images/icons/icon_chain.png | Bin 0 -> 161 bytes .../themes/the_wall/images/icons/icon_check.gif | Bin 0 -> 1291 bytes .../the_wall/images/icons/icon_clock_green.gif | Bin 0 -> 308 bytes .../the_wall/images/icons/icon_clock_grey.gif | Bin 0 -> 308 bytes .../the_wall/images/icons/icon_clock_red.gif | Bin 0 -> 308 bytes .../themes/the_wall/images/icons/icon_close.gif | Bin 0 -> 64 bytes .../the_wall/images/icons/icon_configure.gif | Bin 0 -> 64 bytes .../www/themes/the_wall/images/icons/icon_down.gif | Bin 0 -> 1114 bytes .../themes/the_wall/images/icons/icon_down_d.gif | Bin 0 -> 689 bytes .../themes/the_wall/images/icons/icon_down_mo.gif | Bin 0 -> 1117 bytes .../www/themes/the_wall/images/icons/icon_e.gif | Bin 0 -> 1106 bytes .../www/themes/the_wall/images/icons/icon_e_mo.gif | Bin 0 -> 1120 bytes .../themes/the_wall/images/icons/icon_error.gif | Bin 0 -> 1312 bytes .../themes/the_wall/images/icons/icon_exclam.gif | Bin 0 -> 1274 bytes .../themes/the_wall/images/icons/icon_flag_de.png | Bin 0 -> 114 bytes .../themes/the_wall/images/icons/icon_flag_en.png | Bin 0 -> 618 bytes .../themes/the_wall/images/icons/icon_flag_es.png | Bin 0 -> 281 bytes .../the_wall/images/icons/icon_flag_pt_BR.png | Bin 0 -> 502 bytes .../the_wall/images/icons/icon_frmfld_cert.png | Bin 0 -> 1528 bytes .../the_wall/images/icons/icon_frmfld_file.png | Bin 0 -> 687 bytes .../the_wall/images/icons/icon_frmfld_group.png | Bin 0 -> 748 bytes .../the_wall/images/icons/icon_frmfld_host.png | Bin 0 -> 513 bytes .../the_wall/images/icons/icon_frmfld_imp.png | Bin 0 -> 644 bytes .../the_wall/images/icons/icon_frmfld_mail.png | Bin 0 -> 371 bytes .../the_wall/images/icons/icon_frmfld_pwd.png | Bin 0 -> 620 bytes .../the_wall/images/icons/icon_frmfld_search.png | Bin 0 -> 593 bytes .../the_wall/images/icons/icon_frmfld_time.png | Bin 0 -> 646 bytes .../the_wall/images/icons/icon_frmfld_unknown.png | Bin 0 -> 487 bytes .../the_wall/images/icons/icon_frmfld_url.png | Bin 0 -> 704 bytes .../the_wall/images/icons/icon_frmfld_user.png | Bin 0 -> 654 bytes .../the_wall/images/icons/icon_fw-update.gif | Bin 0 -> 43785 bytes .../www/themes/the_wall/images/icons/icon_help.gif | Bin 0 -> 1669 bytes .../themes/the_wall/images/icons/icon_ifalias.gif | Bin 0 -> 315 bytes .../the_wall/images/icons/icon_ifalias_d.gif | Bin 0 -> 315 bytes .../the_wall/images/icons/icon_import_alias.gif | Bin 0 -> 1109 bytes .../www/themes/the_wall/images/icons/icon_in.gif | Bin 0 -> 177 bytes .../www/themes/the_wall/images/icons/icon_in_d.gif | Bin 0 -> 190 bytes .../themes/the_wall/images/icons/icon_info_pkg.gif | Bin 0 -> 1131 bytes .../the_wall/images/icons/icon_interface_down.gif | Bin 0 -> 88 bytes .../the_wall/images/icons/icon_interface_up.gif | Bin 0 -> 87 bytes .../www/themes/the_wall/images/icons/icon_left.gif | Bin 0 -> 1120 bytes .../themes/the_wall/images/icons/icon_left_d.gif | Bin 0 -> 691 bytes .../themes/the_wall/images/icons/icon_left_mo.gif | Bin 0 -> 1129 bytes .../www/themes/the_wall/images/icons/icon_log.gif | Bin 0 -> 297 bytes .../themes/the_wall/images/icons/icon_log_d.gif | Bin 0 -> 297 bytes .../themes/the_wall/images/icons/icon_log_s.gif | Bin 0 -> 305 bytes .../themes/the_wall/images/icons/icon_log_s_d.gif | Bin 0 -> 305 bytes .../www/themes/the_wall/images/icons/icon_logs.gif | Bin 0 -> 2092 bytes .../themes/the_wall/images/icons/icon_match.gif | Bin 0 -> 847 bytes .../themes/the_wall/images/icons/icon_match_d.gif | Bin 0 -> 843 bytes .../themes/the_wall/images/icons/icon_minus.gif | Bin 0 -> 61 bytes .../www/themes/the_wall/images/icons/icon_open.gif | Bin 0 -> 62 bytes .../themes/the_wall/images/icons/icon_other.gif | Bin 0 -> 125 bytes .../themes/the_wall/images/icons/icon_other_d.gif | Bin 0 -> 125 bytes .../www/themes/the_wall/images/icons/icon_out.gif | Bin 0 -> 179 bytes .../themes/the_wall/images/icons/icon_out_d.gif | Bin 0 -> 189 bytes .../www/themes/the_wall/images/icons/icon_parp.gif | Bin 0 -> 303 bytes .../themes/the_wall/images/icons/icon_parp_d.gif | Bin 0 -> 303 bytes .../www/themes/the_wall/images/icons/icon_pass.gif | Bin 0 -> 182 bytes .../themes/the_wall/images/icons/icon_pass_add.gif | Bin 0 -> 183 bytes .../themes/the_wall/images/icons/icon_pass_d.gif | Bin 0 -> 182 bytes .../www/themes/the_wall/images/icons/icon_plus.gif | Bin 0 -> 1100 bytes .../themes/the_wall/images/icons/icon_plus_bl.gif | Bin 0 -> 1096 bytes .../the_wall/images/icons/icon_plus_bl_p.gif | Bin 0 -> 1079 bytes .../themes/the_wall/images/icons/icon_plus_d.gif | Bin 0 -> 682 bytes .../themes/the_wall/images/icons/icon_plus_mo.gif | Bin 0 -> 1120 bytes .../themes/the_wall/images/icons/icon_plus_p.gif | Bin 0 -> 1087 bytes .../the_wall/images/icons/icon_reinstall.gif | Bin 0 -> 1119 bytes .../the_wall/images/icons/icon_reinstall_d.gif | Bin 0 -> 701 bytes .../the_wall/images/icons/icon_reinstall_mo.gif | Bin 0 -> 1130 bytes .../the_wall/images/icons/icon_reinstall_pkg.gif | Bin 0 -> 1109 bytes .../the_wall/images/icons/icon_reinstall_pkg_d.gif | Bin 0 -> 694 bytes .../images/icons/icon_reinstall_pkg_mo.gif | Bin 0 -> 1135 bytes .../the_wall/images/icons/icon_reinstall_xml.gif | Bin 0 -> 1105 bytes .../the_wall/images/icons/icon_reinstall_xml_d.gif | Bin 0 -> 686 bytes .../images/icons/icon_reinstall_xml_mo.gif | Bin 0 -> 1131 bytes .../themes/the_wall/images/icons/icon_reject.gif | Bin 0 -> 193 bytes .../themes/the_wall/images/icons/icon_reject_d.gif | Bin 0 -> 193 bytes .../themes/the_wall/images/icons/icon_right.gif | Bin 0 -> 1117 bytes .../the_wall/images/icons/icon_service_restart.gif | Bin 0 -> 1120 bytes .../images/icons/icon_service_restart_d.gif | Bin 0 -> 1115 bytes .../the_wall/images/icons/icon_service_running.gif | Bin 0 -> 1390 bytes .../the_wall/images/icons/icon_service_start.gif | Bin 0 -> 1119 bytes .../the_wall/images/icons/icon_service_start_d.gif | Bin 0 -> 1115 bytes .../the_wall/images/icons/icon_service_status.gif | Bin 0 -> 2150 bytes .../the_wall/images/icons/icon_service_stop.gif | Bin 0 -> 1106 bytes .../the_wall/images/icons/icon_service_stop_d.gif | Bin 0 -> 1100 bytes .../the_wall/images/icons/icon_service_stopped.gif | Bin 0 -> 1695 bytes .../images/icons/icon_services_restart_mo.gif | Bin 0 -> 1129 bytes .../images/icons/icon_services_start_mo.gif | Bin 0 -> 1130 bytes .../images/icons/icon_services_stop_mo.gif | Bin 0 -> 1126 bytes .../images/icons/icon_system-group-grey.png | Bin 0 -> 1566 bytes .../the_wall/images/icons/icon_system-group.png | Bin 0 -> 3128 bytes .../images/icons/icon_system-user-grey.png | Bin 0 -> 1107 bytes .../the_wall/images/icons/icon_system-user.png | Bin 0 -> 2084 bytes .../images/icons/icon_system_lock_screen.png | Bin 0 -> 1841 bytes .../the_wall/images/icons/icon_system_logout.png | Bin 0 -> 2087 bytes .../themes/the_wall/images/icons/icon_trapped.gif | Bin 0 -> 1101 bytes .../the_wall/images/icons/icon_trapped_p.gif | Bin 0 -> 1079 bytes .../themes/the_wall/images/icons/icon_ts_rule.gif | Bin 0 -> 194 bytes .../the_wall/images/icons/icon_ts_rule_d.gif | Bin 0 -> 193 bytes .../www/themes/the_wall/images/icons/icon_up.gif | Bin 0 -> 1116 bytes .../www/themes/the_wall/images/icons/icon_up_d.gif | Bin 0 -> 691 bytes .../themes/the_wall/images/icons/icon_up_mo.gif | Bin 0 -> 1129 bytes .../www/themes/the_wall/images/icons/icon_wlan.gif | Bin 0 -> 66 bytes .../themes/the_wall/images/icons/icon_wlan_d.gif | Bin 0 -> 100 bytes .../themes/the_wall/images/icons/icon_wol_all.gif | Bin 0 -> 1126 bytes .../the_wall/images/icons/icon_wzd_nsaved.png | Bin 0 -> 512 bytes .../the_wall/images/icons/icon_wzd_saved.png | Bin 0 -> 399 bytes .../www/themes/the_wall/images/icons/icon_x.gif | Bin 0 -> 1111 bytes .../www/themes/the_wall/images/icons/icon_x_d.gif | Bin 0 -> 680 bytes .../www/themes/the_wall/images/icons/icon_x_mo.gif | Bin 0 -> 1126 bytes .../www/themes/the_wall/images/icons/icon_x_p.gif | Bin 0 -> 1090 bytes .../local/www/themes/the_wall/images/icons/in.gif | Bin 0 -> 177 bytes .../www/themes/the_wall/images/icons/in_d.gif | Bin 0 -> 190 bytes .../local/www/themes/the_wall/images/icons/out.gif | Bin 0 -> 179 bytes .../www/themes/the_wall/images/icons/out_d.gif | Bin 0 -> 189 bytes src/usr/local/www/themes/the_wall/images/log.png | Bin 0 -> 270 bytes src/usr/local/www/themes/the_wall/images/logo.gif | Bin 0 -> 7599 bytes .../local/www/themes/the_wall/images/logobig.jpg | Bin 0 -> 7540 bytes .../local/www/themes/the_wall/images/menu_down.gif | Bin 0 -> 61 bytes .../www/themes/the_wall/images/menu_right.gif | Bin 0 -> 61 bytes .../www/themes/the_wall/images/misc/bar_blue.gif | Bin 0 -> 94 bytes .../www/themes/the_wall/images/misc/bar_gray.gif | Bin 0 -> 94 bytes .../www/themes/the_wall/images/misc/bar_left.gif | Bin 0 -> 289 bytes .../www/themes/the_wall/images/misc/bar_right.gif | Bin 0 -> 288 bytes .../the_wall/images/misc/bullet_toggle_minus.png | Bin 0 -> 154 bytes .../the_wall/images/misc/bullet_toggle_plus.png | Bin 0 -> 156 bytes .../www/themes/the_wall/images/misc/button.gif | Bin 0 -> 805 bytes .../www/themes/the_wall/images/misc/graph.png | Bin 0 -> 2256 bytes .../www/themes/the_wall/images/misc/key_128.gif | Bin 0 -> 2766 bytes .../www/themes/the_wall/images/misc/key_152.gif | Bin 0 -> 2772 bytes .../www/themes/the_wall/images/misc/key_256.gif | Bin 0 -> 2808 bytes .../www/themes/the_wall/images/misc/key_64.gif | Bin 0 -> 2723 bytes .../www/themes/the_wall/images/misc/loader.gif | Bin 0 -> 2248 bytes .../www/themes/the_wall/images/misc/loader_all.gif | Bin 0 -> 1398 bytes .../themes/the_wall/images/misc/loader_filter.gif | Bin 0 -> 1436 bytes .../www/themes/the_wall/images/misc/loader_tab.gif | Bin 0 -> 2248 bytes .../www/themes/the_wall/images/misc/logon.png | Bin 0 -> 22000 bytes .../themes/the_wall/images/misc/progress_bar.gif | Bin 0 -> 44791 bytes .../www/themes/the_wall/images/misc/rrd_error.png | Bin 0 -> 38898 bytes .../themes/the_wall/images/misc/status_alerter.gif | Bin 0 -> 2203 bytes .../the_wall/images/misc/status_carpmaster.gif | Bin 0 -> 1558 bytes .../themes/the_wall/images/misc/status_left.gif | Bin 0 -> 600 bytes .../the_wall/images/misc/status_page_loading.gif | Bin 0 -> 1621 bytes .../the_wall/images/misc/status_reload_all.gif | Bin 0 -> 1611 bytes .../the_wall/images/misc/status_reload_filter.gif | Bin 0 -> 1612 bytes .../themes/the_wall/images/misc/status_right.gif | Bin 0 -> 599 bytes .../www/themes/the_wall/images/misc/tri_c.gif | Bin 0 -> 61 bytes .../themes/the_wall/images/misc/tri_c_black.gif | Bin 0 -> 69 bytes .../www/themes/the_wall/images/misc/tri_o.gif | Bin 0 -> 58 bytes .../themes/the_wall/images/misc/tri_o_black.gif | Bin 0 -> 67 bytes .../themes/the_wall/images/misc/widget_loader.gif | Bin 0 -> 2545 bytes .../the_wall/images/misc/widget_loader_old.gif | Bin 0 -> 1064 bytes .../www/themes/the_wall/images/new_tab_menu.png | Bin 0 -> 444 bytes .../local/www/themes/the_wall/images/status.png | Bin 0 -> 348 bytes .../www/themes/the_wall/images/transparent.gif | Bin 0 -> 146 bytes .../themes/the_wall/images/transparent_pixel.gif | Bin 0 -> 43 bytes .../www/themes/the_wall/javascript/ie7/blank.gif | Bin 0 -> 48 bytes .../the_wall/javascript/ie7/ie7-box-model.js | 2 + .../www/themes/the_wall/javascript/ie7/ie7-core.js | 2 + .../the_wall/javascript/ie7/ie7-css-strict.js | 2 + .../www/themes/the_wall/javascript/ie7/ie7-css2.js | 2 + .../www/themes/the_wall/javascript/ie7/ie7-css3.js | 2 + .../themes/the_wall/javascript/ie7/ie7-fixed.js | 2 + .../themes/the_wall/javascript/ie7/ie7-html4.js | 2 + .../www/themes/the_wall/javascript/ie7/ie7-ie5.js | 2 + .../themes/the_wall/javascript/ie7/ie7-lite-p.js | 3 + .../www/themes/the_wall/javascript/ie7/ie7-lite.js | 2 + .../www/themes/the_wall/javascript/ie7/ie7-png.js | 2 + .../themes/the_wall/javascript/ie7/ie7-server.css | 43 + .../the_wall/javascript/ie7/ie7-standard-p.js | 3 + .../themes/the_wall/javascript/ie7/ie7-standard.js | 2 + .../themes/the_wall/javascript/ie7/test-trans.png | Bin 0 -> 106 bytes .../www/themes/the_wall/javascript/img/grey-40.png | Bin 0 -> 223 bytes .../themes/the_wall/javascript/img/submenu-off.gif | Bin 0 -> 65 bytes .../themes/the_wall/javascript/img/submenu-on.gif | Bin 0 -> 65 bytes .../themes/the_wall/javascript/img/white-90.png | Bin 0 -> 223 bytes .../local/www/themes/the_wall/javascript/img/x.gif | Bin 0 -> 43 bytes .../www/themes/the_wall/javascript/niftyjsCode.js | 174 + .../themes/the_wall/javascript/transmenu-body.php | 51 + .../themes/the_wall/javascript/transmenu-head.php | 85 + .../www/themes/the_wall/javascript/transmenu.org | 785 +++ .../www/themes/the_wall/javascript/transmenuC.js | 86 + .../local/www/themes/the_wall/jsevents/body.def | 7 + src/usr/local/www/themes/the_wall/loader.js | 30 + src/usr/local/www/themes/the_wall/login.css | 1159 ++++ src/usr/local/www/themes/the_wall/menu.inc | 177 + src/usr/local/www/themes/the_wall/new_tab_menu.css | 101 + src/usr/local/www/themes/the_wall/no_big_logo | 1 + .../local/www/themes/the_wall/rrdcolors.inc.php | 89 + .../themes/the_wall/styles/jquery-ui-1.11.1.css | 1226 ++++ .../www/themes/the_wall/styles/menustyles.css | 44 + .../local/www/themes/the_wall/styles/transmenu.css | 75 + src/usr/local/www/themes/the_wall/wizard.css | 1060 ++++ src/usr/local/www/tree-images/empty.gif | Bin 0 -> 837 bytes src/usr/local/www/tree-images/join.gif | Bin 0 -> 857 bytes src/usr/local/www/tree-images/joinbottom.gif | Bin 0 -> 850 bytes src/usr/local/www/tree-images/line.gif | Bin 0 -> 853 bytes src/usr/local/www/tree-images/minus_.gif | Bin 0 -> 913 bytes src/usr/local/www/tree-images/minus_up.gif | Bin 0 -> 911 bytes src/usr/local/www/tree-images/page.gif | Bin 0 -> 980 bytes src/usr/local/www/tree-images/plus_.gif | Bin 0 -> 910 bytes src/usr/local/www/tree-images/plus_up.gif | Bin 0 -> 913 bytes src/usr/local/www/tree-images/plus_updown.gif | Bin 0 -> 915 bytes src/usr/local/www/tree-images/zone.gif | Bin 0 -> 318 bytes src/usr/local/www/tree/i-bottom.gif | Bin 0 -> 125 bytes src/usr/local/www/tree/i-repeater.gif | Bin 0 -> 91 bytes src/usr/local/www/tree/index.html | 228 + src/usr/local/www/tree/l.gif | Bin 0 -> 131 bytes src/usr/local/www/tree/minus.gif | Bin 0 -> 146 bytes src/usr/local/www/tree/page-file.png | Bin 0 -> 211 bytes src/usr/local/www/tree/page-file_play.gif | Bin 0 -> 1021 bytes src/usr/local/www/tree/page-file_x.gif | Bin 0 -> 630 bytes src/usr/local/www/tree/page-foldericon.png | Bin 0 -> 210 bytes src/usr/local/www/tree/page-openfoldericon.png | Bin 0 -> 219 bytes src/usr/local/www/tree/plus.gif | Bin 0 -> 149 bytes src/usr/local/www/tree/t.gif | Bin 0 -> 141 bytes src/usr/local/www/tree/tree.css | 136 + src/usr/local/www/tree/tree.js | 195 + src/usr/local/www/treeview.css | 48 + src/usr/local/www/uploadconfig.php | 65 + src/usr/local/www/vpn_ipsec.php | 704 +++ src/usr/local/www/vpn_ipsec_keys.php | 230 + src/usr/local/www/vpn_ipsec_keys_edit.php | 199 + src/usr/local/www/vpn_ipsec_mobile.php | 740 +++ src/usr/local/www/vpn_ipsec_phase1.php | 1092 ++++ src/usr/local/www/vpn_ipsec_phase2.php | 983 ++++ src/usr/local/www/vpn_ipsec_settings.php | 445 ++ src/usr/local/www/vpn_l2tp.php | 493 ++ src/usr/local/www/vpn_l2tp_users.php | 146 + src/usr/local/www/vpn_l2tp_users_edit.php | 212 + src/usr/local/www/vpn_openvpn_client.php | 1271 ++++ src/usr/local/www/vpn_openvpn_csc.php | 868 +++ src/usr/local/www/vpn_openvpn_server.php | 2042 +++++++ src/usr/local/www/vpn_pppoe.php | 167 + src/usr/local/www/vpn_pppoe_edit.php | 671 +++ src/usr/local/www/vpn_pptp.php | 504 ++ src/usr/local/www/vpn_pptp_users.php | 142 + src/usr/local/www/vpn_pptp_users_edit.php | 184 + .../local/www/widgets/include/captiveportal.inc | 4 + src/usr/local/www/widgets/include/carp_status.inc | 7 + .../local/www/widgets/include/dyn_dns_status.inc | 7 + src/usr/local/www/widgets/include/gateways.inc | 5 + .../local/www/widgets/include/gmirror_status.inc | 4 + .../www/widgets/include/installed_packages.inc | 7 + .../www/widgets/include/interface_statistics.inc | 5 + src/usr/local/www/widgets/include/interfaces.inc | 6 + src/usr/local/www/widgets/include/ipsec.inc | 4 + .../local/www/widgets/include/load_balancer.inc | 4 + src/usr/local/www/widgets/include/log.inc | 6 + src/usr/local/www/widgets/include/ntp_status.inc | 5 + src/usr/local/www/widgets/include/openvpn.inc | 4 + .../local/www/widgets/include/services_status.inc | 7 + src/usr/local/www/widgets/include/smart_status.inc | 5 + .../local/www/widgets/include/thermal_sensors.inc | 27 + .../local/www/widgets/include/traffic_graph.inc | 4 + src/usr/local/www/widgets/include/wake_on_lan.inc | 7 + src/usr/local/www/widgets/javascript/cpu_graphs.js | 245 + src/usr/local/www/widgets/javascript/ipsec.js | 9 + .../www/widgets/javascript/thermal_sensors.js | 296 + .../local/www/widgets/javascript/traffic_graph.js | 41 + .../widgets/captive_portal_status.widget.php | 146 + .../www/widgets/widgets/carp_status.widget.php | 85 + .../widgets/deactivated/cpu_graphs.widget.php | 76 + .../www/widgets/widgets/dyn_dns_status.widget.php | 174 + .../local/www/widgets/widgets/gateways.widget.php | 227 + .../www/widgets/widgets/gmirror_status.widget.php | 52 + .../widgets/widgets/installed_packages.widget.php | 126 + .../widgets/interface_statistics.widget.php | 216 + .../www/widgets/widgets/interfaces.widget.php | 126 + src/usr/local/www/widgets/widgets/ipsec.widget.php | 265 + .../widgets/load_balancer_status.widget.php | 155 + src/usr/local/www/widgets/widgets/log.widget.php | 281 + .../www/widgets/widgets/ntp_status.widget.php | 515 ++ .../local/www/widgets/widgets/openvpn.widget.php | 290 + .../local/www/widgets/widgets/picture.widget.php | 96 + src/usr/local/www/widgets/widgets/rss.widget.php | 198 + .../www/widgets/widgets/services_status.widget.php | 105 + .../www/widgets/widgets/smart_status.widget.php | 76 + .../widgets/widgets/system_information.widget.php | 322 ++ .../www/widgets/widgets/thermal_sensors.widget.php | 279 + .../www/widgets/widgets/traffic_graphs.widget.php | 193 + .../www/widgets/widgets/wake_on_lan.widget.php | 80 + src/usr/local/www/wizard.php | 1061 ++++ src/usr/local/www/wizards/openvpn_wizard.inc | 676 +++ src/usr/local/www/wizards/openvpn_wizard.xml | 987 ++++ src/usr/local/www/wizards/setup_wizard.xml | 703 +++ .../wizards/traffic_shaper_wizard_dedicated.inc | 1664 ++++++ .../wizards/traffic_shaper_wizard_dedicated.xml | 1649 ++++++ .../wizards/traffic_shaper_wizard_multi_all.inc | 1741 ++++++ .../wizards/traffic_shaper_wizard_multi_all.xml | 1657 ++++++ src/usr/local/www/xmlrpc.php | 592 ++ 2435 files changed, 190814 insertions(+) create mode 100755 src/usr/local/www/apple-touch-icon.png create mode 100755 src/usr/local/www/bandwidth_by_ip.php create mode 100644 src/usr/local/www/carp_status.php create mode 100644 src/usr/local/www/classes/maintable.inc create mode 100644 src/usr/local/www/code-syntax-highlighter/SyntaxHighlighter.css create mode 100644 src/usr/local/www/code-syntax-highlighter/gpl.txt create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushCSharp.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushCpp.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushCss.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushDelphi.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushJScript.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushJava.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushPhp.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushPython.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushRuby.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushSql.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushVb.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shBrushXml.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shCore.js create mode 100644 src/usr/local/www/code-syntax-highlighter/shCore.uncompressed.js create mode 100644 src/usr/local/www/crash_reporter.php create mode 100644 src/usr/local/www/csrf/csrf-magic.js create mode 100644 src/usr/local/www/csrf/csrf-magic.php create mode 100644 src/usr/local/www/css/table.css create mode 100644 src/usr/local/www/diag_arp.php create mode 100644 src/usr/local/www/diag_authentication.php create mode 100644 src/usr/local/www/diag_backup.php create mode 100644 src/usr/local/www/diag_confbak.php create mode 100755 src/usr/local/www/diag_defaults.php create mode 100644 src/usr/local/www/diag_dns.php create mode 100755 src/usr/local/www/diag_dump_states.php create mode 100644 src/usr/local/www/diag_dump_states_sources.php create mode 100644 src/usr/local/www/diag_gmirror.php create mode 100644 src/usr/local/www/diag_ipsec.php create mode 100644 src/usr/local/www/diag_ipsec_leases.php create mode 100644 src/usr/local/www/diag_ipsec_sad.php create mode 100644 src/usr/local/www/diag_ipsec_spd.php create mode 100644 src/usr/local/www/diag_ipsec_xml.php create mode 100644 src/usr/local/www/diag_limiter_info.php create mode 100755 src/usr/local/www/diag_logs.php create mode 100644 src/usr/local/www/diag_logs_auth.php create mode 100644 src/usr/local/www/diag_logs_dhcp.php create mode 100644 src/usr/local/www/diag_logs_filter.php create mode 100755 src/usr/local/www/diag_logs_filter_dynamic.php create mode 100644 src/usr/local/www/diag_logs_filter_summary.php create mode 100755 src/usr/local/www/diag_logs_gateways.php create mode 100644 src/usr/local/www/diag_logs_ipsec.php create mode 100644 src/usr/local/www/diag_logs_ntpd.php create mode 100644 src/usr/local/www/diag_logs_openvpn.php create mode 100644 src/usr/local/www/diag_logs_ppp.php create mode 100644 src/usr/local/www/diag_logs_relayd.php create mode 100755 src/usr/local/www/diag_logs_resolver.php create mode 100644 src/usr/local/www/diag_logs_routing.php create mode 100644 src/usr/local/www/diag_logs_settings.php create mode 100755 src/usr/local/www/diag_logs_vpn.php create mode 100644 src/usr/local/www/diag_logs_wireless.php create mode 100644 src/usr/local/www/diag_nanobsd.php create mode 100644 src/usr/local/www/diag_ndp.php create mode 100644 src/usr/local/www/diag_packet_capture.php create mode 100644 src/usr/local/www/diag_patterns.php create mode 100644 src/usr/local/www/diag_pf_info.php create mode 100644 src/usr/local/www/diag_ping.php create mode 100755 src/usr/local/www/diag_pkglogs.php create mode 100644 src/usr/local/www/diag_resetstate.php create mode 100644 src/usr/local/www/diag_routes.php create mode 100644 src/usr/local/www/diag_smart.php create mode 100644 src/usr/local/www/diag_sockets.php create mode 100644 src/usr/local/www/diag_states_summary.php create mode 100644 src/usr/local/www/diag_system_activity.php create mode 100644 src/usr/local/www/diag_system_pftop.php create mode 100644 src/usr/local/www/diag_tables.php create mode 100644 src/usr/local/www/diag_testport.php create mode 100644 src/usr/local/www/diag_traceroute.php create mode 100644 src/usr/local/www/easyrule.php create mode 100644 src/usr/local/www/edit.php create mode 100644 src/usr/local/www/exec.php create mode 100755 src/usr/local/www/favicon.ico create mode 100755 src/usr/local/www/fbegin.inc create mode 100755 src/usr/local/www/fend.inc create mode 100644 src/usr/local/www/filebrowser/browser.js create mode 100644 src/usr/local/www/filebrowser/browser.php create mode 100755 src/usr/local/www/filebrowser/images/file_code.gif create mode 100755 src/usr/local/www/filebrowser/images/file_database.gif create mode 100755 src/usr/local/www/filebrowser/images/file_doc.gif create mode 100755 src/usr/local/www/filebrowser/images/file_flash.gif create mode 100755 src/usr/local/www/filebrowser/images/file_generic.gif create mode 100755 src/usr/local/www/filebrowser/images/file_image.gif create mode 100755 src/usr/local/www/filebrowser/images/file_js.gif create mode 100755 src/usr/local/www/filebrowser/images/file_pdf.gif create mode 100755 src/usr/local/www/filebrowser/images/file_php.gif create mode 100755 src/usr/local/www/filebrowser/images/file_ppt.gif create mode 100755 src/usr/local/www/filebrowser/images/file_system.gif create mode 100755 src/usr/local/www/filebrowser/images/file_xls.gif create mode 100755 src/usr/local/www/filebrowser/images/file_zip.gif create mode 100755 src/usr/local/www/filebrowser/images/folder_generic.gif create mode 100755 src/usr/local/www/filebrowser/images/icon_cancel.gif create mode 100755 src/usr/local/www/filebrowser/images/icon_contract.gif create mode 100755 src/usr/local/www/filebrowser/images/icon_expand.gif create mode 100755 src/usr/local/www/filebrowser/images/icon_home.gif create mode 100755 src/usr/local/www/filebrowser/images/icon_left.gif create mode 100755 src/usr/local/www/filebrowser/images/icon_magnifier.gif create mode 100644 src/usr/local/www/firewall_aliases.php create mode 100755 src/usr/local/www/firewall_aliases_edit.php create mode 100755 src/usr/local/www/firewall_aliases_import.php create mode 100644 src/usr/local/www/firewall_nat.php create mode 100644 src/usr/local/www/firewall_nat_1to1.php create mode 100644 src/usr/local/www/firewall_nat_1to1_edit.php create mode 100644 src/usr/local/www/firewall_nat_edit.php create mode 100644 src/usr/local/www/firewall_nat_npt.php create mode 100644 src/usr/local/www/firewall_nat_npt_edit.php create mode 100644 src/usr/local/www/firewall_nat_out.php create mode 100644 src/usr/local/www/firewall_nat_out_edit.php create mode 100644 src/usr/local/www/firewall_rules.php create mode 100644 src/usr/local/www/firewall_rules_edit.php create mode 100644 src/usr/local/www/firewall_schedule.php create mode 100644 src/usr/local/www/firewall_schedule_edit.php create mode 100644 src/usr/local/www/firewall_shaper.php create mode 100644 src/usr/local/www/firewall_shaper_layer7.php create mode 100644 src/usr/local/www/firewall_shaper_queues.php create mode 100644 src/usr/local/www/firewall_shaper_vinterface.php create mode 100644 src/usr/local/www/firewall_shaper_wizards.php create mode 100644 src/usr/local/www/firewall_virtual_ip.php create mode 100644 src/usr/local/www/firewall_virtual_ip_edit.php create mode 100644 src/usr/local/www/getserviceproviders.php create mode 100644 src/usr/local/www/getstats.php create mode 100755 src/usr/local/www/graph.php create mode 100644 src/usr/local/www/graph_cpu.php create mode 100755 src/usr/local/www/green_dot.jpg create mode 100755 src/usr/local/www/gui.css create mode 100644 src/usr/local/www/guiconfig.inc create mode 100755 src/usr/local/www/halt.php create mode 100755 src/usr/local/www/head.inc create mode 100644 src/usr/local/www/headjs.php create mode 100644 src/usr/local/www/help.php create mode 100644 src/usr/local/www/ifstats.php create mode 100644 src/usr/local/www/includes/functions.inc.php create mode 100644 src/usr/local/www/index.php create mode 100644 src/usr/local/www/interfaces.php create mode 100644 src/usr/local/www/interfaces_assign.php create mode 100644 src/usr/local/www/interfaces_bridge.php create mode 100644 src/usr/local/www/interfaces_bridge_edit.php create mode 100644 src/usr/local/www/interfaces_gif.php create mode 100644 src/usr/local/www/interfaces_gif_edit.php create mode 100644 src/usr/local/www/interfaces_gre.php create mode 100644 src/usr/local/www/interfaces_gre_edit.php create mode 100644 src/usr/local/www/interfaces_groups.php create mode 100644 src/usr/local/www/interfaces_groups_edit.php create mode 100644 src/usr/local/www/interfaces_lagg.php create mode 100644 src/usr/local/www/interfaces_lagg_edit.php create mode 100644 src/usr/local/www/interfaces_ppps.php create mode 100644 src/usr/local/www/interfaces_ppps_edit.php create mode 100644 src/usr/local/www/interfaces_qinq.php create mode 100644 src/usr/local/www/interfaces_qinq_edit.php create mode 100644 src/usr/local/www/interfaces_vlan.php create mode 100644 src/usr/local/www/interfaces_vlan_edit.php create mode 100644 src/usr/local/www/interfaces_wireless.php create mode 100644 src/usr/local/www/interfaces_wireless_edit.php create mode 100644 src/usr/local/www/javascript/autosuggest.js create mode 100644 src/usr/local/www/javascript/base64.js create mode 100644 src/usr/local/www/javascript/carp_status/carp_status.js create mode 100644 src/usr/local/www/javascript/chosen/chosen-sprite.png create mode 100644 src/usr/local/www/javascript/chosen/chosen.css create mode 100644 src/usr/local/www/javascript/chosen/chosen.jquery.js create mode 100644 src/usr/local/www/javascript/chosen/chosen.jquery.min.js create mode 100644 src/usr/local/www/javascript/chosen/chosen.proto.js create mode 100644 src/usr/local/www/javascript/chosen/chosen.proto.min.js create mode 100644 src/usr/local/www/javascript/chosen/coffee/chosen.jquery.coffee create mode 100644 src/usr/local/www/javascript/chosen/coffee/chosen.proto.coffee create mode 100644 src/usr/local/www/javascript/datepicker/css/datepicker.css create mode 100644 src/usr/local/www/javascript/datepicker/js/blank.html create mode 100644 src/usr/local/www/javascript/datepicker/js/datepicker.js create mode 100755 src/usr/local/www/javascript/datepicker/media/bg_header.jpg create mode 100755 src/usr/local/www/javascript/datepicker/media/bullet1.gif create mode 100755 src/usr/local/www/javascript/datepicker/media/bullet2.gif create mode 100755 src/usr/local/www/javascript/datepicker/media/cal.gif create mode 100755 src/usr/local/www/javascript/datepicker/media/gradient-e5e5e5-ffffff.gif create mode 100644 src/usr/local/www/javascript/domTT/LICENSE create mode 100644 src/usr/local/www/javascript/domTT/behaviour.js create mode 100644 src/usr/local/www/javascript/domTT/domLib.js create mode 100644 src/usr/local/www/javascript/domTT/domTT.js create mode 100644 src/usr/local/www/javascript/domTT/fadomatic.js create mode 100644 src/usr/local/www/javascript/filter_log.js create mode 100644 src/usr/local/www/javascript/firebug-lite.js create mode 100644 src/usr/local/www/javascript/firewall_nat_edit/autosuggest.js create mode 100644 src/usr/local/www/javascript/firewall_nat_edit/disablekeys.js create mode 100644 src/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js create mode 100644 src/usr/local/www/javascript/firewall_nat_edit/suggestions.js create mode 100644 src/usr/local/www/javascript/firewall_rules_edit/autosuggest.js create mode 100644 src/usr/local/www/javascript/firewall_rules_edit/disablekeys.js create mode 100644 src/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js create mode 100644 src/usr/local/www/javascript/firewall_rules_edit/suggestions.js create mode 100644 src/usr/local/www/javascript/firewall_shaper_edit/autosuggest.js create mode 100644 src/usr/local/www/javascript/firewall_shaper_edit/disablekeys.js create mode 100644 src/usr/local/www/javascript/firewall_shaper_edit/firewall_shaper_edit.js create mode 100644 src/usr/local/www/javascript/firewall_shaper_edit/suggestions.js create mode 100644 src/usr/local/www/javascript/global.js create mode 100644 src/usr/local/www/javascript/index/ajax.js create mode 100644 src/usr/local/www/javascript/interfaces_ppps_edit/ppps_edit.js create mode 100644 src/usr/local/www/javascript/jquery-1.11.1.min.js create mode 100644 src/usr/local/www/javascript/jquery-migrate-1.2.1.min.js create mode 100644 src/usr/local/www/javascript/jquery-ui-timepicker-addon/css/jquery-ui-timepicker-addon.css create mode 100644 src/usr/local/www/javascript/jquery-ui-timepicker-addon/js/jquery-ui-timepicker-addon.js create mode 100755 src/usr/local/www/javascript/jquery.ipv4v6ify.js create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_diagonals-thick_18_b81900_40x40.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_diagonals-thick_20_666666_40x40.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_flat_0_eeeeee_40x100.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_flat_10_000000_40x100.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_flat_55_c0402a_40x100.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_flat_55_eeeeee_40x100.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_glass_100_f6f6f6_1x400.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_glass_100_f8f8f8_1x400.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_glass_100_fdf5ce_1x400.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_glass_35_dddddd_1x400.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_glass_60_eeeeee_1x400.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_glass_65_ffffff_1x400.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_gloss-wave_35_f6a828_500x100.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_highlight-soft_100_eeeeee_1x100.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_highlight-soft_75_ffe45c_1x100.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_inset-hard_75_999999_1x100.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-bg_inset-soft_50_c9c9c9_1x100.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-icons_222222_256x240.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-icons_228ef1_256x240.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-icons_3383bb_256x240.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-icons_454545_256x240.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-icons_70b2e1_256x240.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-icons_999999_256x240.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-icons_ef8c08_256x240.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-icons_fbc856_256x240.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-icons_ffd27a_256x240.png create mode 100755 src/usr/local/www/javascript/jquery/images/ui-icons_ffffff_256x240.png create mode 100644 src/usr/local/www/javascript/jquery/jquery-ui-1.11.1.min.js create mode 100644 src/usr/local/www/javascript/load_balancer_pool_edit/pool.js create mode 100644 src/usr/local/www/javascript/load_balancer_relay_protocol_edit/load_balancer_relay_protocol_edit.js create mode 100644 src/usr/local/www/javascript/niftyjsCode.js create mode 100644 src/usr/local/www/javascript/numericupdown/css/numericupdown.css create mode 100755 src/usr/local/www/javascript/numericupdown/images/down.gif create mode 100755 src/usr/local/www/javascript/numericupdown/images/up.gif create mode 100644 src/usr/local/www/javascript/numericupdown/js/numericupdown.js create mode 100644 src/usr/local/www/javascript/pi.js create mode 100644 src/usr/local/www/javascript/row_helper.js create mode 100644 src/usr/local/www/javascript/row_helper_dynamic.js create mode 100644 src/usr/local/www/javascript/row_toggle.js create mode 100644 src/usr/local/www/javascript/scriptaculous/builder.js create mode 100644 src/usr/local/www/javascript/scriptaculous/controls.js create mode 100644 src/usr/local/www/javascript/scriptaculous/dragdrop.js create mode 100644 src/usr/local/www/javascript/scriptaculous/effects.js create mode 100644 src/usr/local/www/javascript/scriptaculous/prototype.js create mode 100644 src/usr/local/www/javascript/scriptaculous/scriptaculous.js create mode 100644 src/usr/local/www/javascript/scriptaculous/slider.js create mode 100644 src/usr/local/www/javascript/scriptaculous/sound.js create mode 100644 src/usr/local/www/javascript/scriptaculous/unittest.js create mode 100644 src/usr/local/www/javascript/sorttable.js create mode 100644 src/usr/local/www/javascript/suggestions.js create mode 100644 src/usr/local/www/javascript/ticker.js create mode 100644 src/usr/local/www/javascript/wizard/autosuggest.js create mode 100644 src/usr/local/www/javascript/wizard/disablekeys.js create mode 100644 src/usr/local/www/javascript/wizard/suggestions.js create mode 100644 src/usr/local/www/license.php create mode 100644 src/usr/local/www/load_balancer_monitor.php create mode 100644 src/usr/local/www/load_balancer_monitor_edit.php create mode 100644 src/usr/local/www/load_balancer_pool.php create mode 100644 src/usr/local/www/load_balancer_pool_edit.php create mode 100644 src/usr/local/www/load_balancer_setting.php create mode 100644 src/usr/local/www/load_balancer_virtual_server.php create mode 100644 src/usr/local/www/load_balancer_virtual_server_edit.php create mode 100755 src/usr/local/www/logobig.jpg create mode 100755 src/usr/local/www/niftycssCode.css create mode 100755 src/usr/local/www/niftycssprintCode.css create mode 100755 src/usr/local/www/pkg.php create mode 100644 src/usr/local/www/pkg_edit.php create mode 100644 src/usr/local/www/pkg_mgr.php create mode 100644 src/usr/local/www/pkg_mgr_install.php create mode 100644 src/usr/local/www/pkg_mgr_installed.php create mode 100644 src/usr/local/www/pkg_mgr_settings.php create mode 100644 src/usr/local/www/protochart/ProtoChart.js create mode 100644 src/usr/local/www/protochart/excanvas-compressed.js create mode 100644 src/usr/local/www/protochart/excanvas.js create mode 100755 src/usr/local/www/reboot.php create mode 100644 src/usr/local/www/restart_httpd.php create mode 100644 src/usr/local/www/services_captiveportal.php create mode 100644 src/usr/local/www/services_captiveportal_filemanager.php create mode 100644 src/usr/local/www/services_captiveportal_hostname.php create mode 100644 src/usr/local/www/services_captiveportal_hostname_edit.php create mode 100644 src/usr/local/www/services_captiveportal_ip.php create mode 100644 src/usr/local/www/services_captiveportal_ip_edit.php create mode 100644 src/usr/local/www/services_captiveportal_mac.php create mode 100644 src/usr/local/www/services_captiveportal_mac_edit.php create mode 100644 src/usr/local/www/services_captiveportal_vouchers.php create mode 100644 src/usr/local/www/services_captiveportal_vouchers_edit.php create mode 100644 src/usr/local/www/services_captiveportal_zones.php create mode 100644 src/usr/local/www/services_captiveportal_zones_edit.php create mode 100644 src/usr/local/www/services_dhcp.php create mode 100644 src/usr/local/www/services_dhcp_edit.php create mode 100644 src/usr/local/www/services_dhcp_relay.php create mode 100644 src/usr/local/www/services_dhcpv6.php create mode 100644 src/usr/local/www/services_dhcpv6_edit.php create mode 100644 src/usr/local/www/services_dhcpv6_relay.php create mode 100644 src/usr/local/www/services_dnsmasq.php create mode 100644 src/usr/local/www/services_dnsmasq_domainoverride_edit.php create mode 100644 src/usr/local/www/services_dnsmasq_edit.php create mode 100644 src/usr/local/www/services_dyndns.php create mode 100644 src/usr/local/www/services_dyndns_edit.php create mode 100644 src/usr/local/www/services_igmpproxy.php create mode 100644 src/usr/local/www/services_igmpproxy_edit.php create mode 100644 src/usr/local/www/services_ntpd.php create mode 100644 src/usr/local/www/services_ntpd_gps.php create mode 100644 src/usr/local/www/services_ntpd_pps.php create mode 100644 src/usr/local/www/services_rfc2136.php create mode 100644 src/usr/local/www/services_rfc2136_edit.php create mode 100644 src/usr/local/www/services_router_advertisements.php create mode 100644 src/usr/local/www/services_snmp.php create mode 100644 src/usr/local/www/services_unbound.php create mode 100644 src/usr/local/www/services_unbound_acls.php create mode 100644 src/usr/local/www/services_unbound_advanced.php create mode 100644 src/usr/local/www/services_unbound_domainoverride_edit.php create mode 100644 src/usr/local/www/services_unbound_host_edit.php create mode 100644 src/usr/local/www/services_wol.php create mode 100644 src/usr/local/www/services_wol_edit.php create mode 100644 src/usr/local/www/shortcuts.inc create mode 100644 src/usr/local/www/shortcuts/pkg_upnp.inc create mode 100644 src/usr/local/www/stats.php create mode 100755 src/usr/local/www/status.php create mode 100644 src/usr/local/www/status_captiveportal.php create mode 100644 src/usr/local/www/status_captiveportal_expire.php create mode 100644 src/usr/local/www/status_captiveportal_test.php create mode 100644 src/usr/local/www/status_captiveportal_voucher_rolls.php create mode 100644 src/usr/local/www/status_captiveportal_vouchers.php create mode 100644 src/usr/local/www/status_dhcp_leases.php create mode 100644 src/usr/local/www/status_dhcpv6_leases.php create mode 100644 src/usr/local/www/status_filter_reload.php create mode 100755 src/usr/local/www/status_gateway_groups.php create mode 100644 src/usr/local/www/status_gateways.php create mode 100644 src/usr/local/www/status_graph.php create mode 100644 src/usr/local/www/status_graph_cpu.php create mode 100644 src/usr/local/www/status_interfaces.php create mode 100644 src/usr/local/www/status_lb_pool.php create mode 100644 src/usr/local/www/status_lb_vs.php create mode 100644 src/usr/local/www/status_ntpd.php create mode 100644 src/usr/local/www/status_openvpn.php create mode 100644 src/usr/local/www/status_queues.php create mode 100644 src/usr/local/www/status_rrd_graph.php create mode 100644 src/usr/local/www/status_rrd_graph_img.php create mode 100644 src/usr/local/www/status_rrd_graph_settings.php create mode 100755 src/usr/local/www/status_services.php create mode 100644 src/usr/local/www/status_upnp.php create mode 100644 src/usr/local/www/status_wireless.php create mode 100644 src/usr/local/www/system.php create mode 100644 src/usr/local/www/system_advanced_admin.php create mode 100644 src/usr/local/www/system_advanced_firewall.php create mode 100644 src/usr/local/www/system_advanced_misc.php create mode 100644 src/usr/local/www/system_advanced_network.php create mode 100644 src/usr/local/www/system_advanced_notifications.php create mode 100644 src/usr/local/www/system_advanced_sysctl.php create mode 100644 src/usr/local/www/system_authservers.php create mode 100644 src/usr/local/www/system_camanager.php create mode 100644 src/usr/local/www/system_certmanager.php create mode 100644 src/usr/local/www/system_crlmanager.php create mode 100644 src/usr/local/www/system_firmware.php create mode 100755 src/usr/local/www/system_firmware_auto.php create mode 100644 src/usr/local/www/system_firmware_check.php create mode 100644 src/usr/local/www/system_firmware_restorefullbackup.php create mode 100644 src/usr/local/www/system_firmware_settings.php create mode 100644 src/usr/local/www/system_gateway_groups.php create mode 100644 src/usr/local/www/system_gateway_groups_edit.php create mode 100644 src/usr/local/www/system_gateways.php create mode 100644 src/usr/local/www/system_gateways_edit.php create mode 100644 src/usr/local/www/system_groupmanager.php create mode 100644 src/usr/local/www/system_groupmanager_addprivs.php create mode 100755 src/usr/local/www/system_hasync.php create mode 100644 src/usr/local/www/system_routes.php create mode 100644 src/usr/local/www/system_routes_edit.php create mode 100644 src/usr/local/www/system_usermanager.php create mode 100644 src/usr/local/www/system_usermanager_addprivs.php create mode 100644 src/usr/local/www/system_usermanager_passwordmg.php create mode 100644 src/usr/local/www/system_usermanager_settings.php create mode 100644 src/usr/local/www/system_usermanager_settings_ldapacpicker.php create mode 100755 src/usr/local/www/system_usermanager_settings_test.php create mode 100644 src/usr/local/www/themes/_corporate/all.css create mode 100644 src/usr/local/www/themes/_corporate/bottom-loader.js create mode 100644 src/usr/local/www/themes/_corporate/graphlink.css create mode 100755 src/usr/local/www/themes/_corporate/images/alert_bgr.gif create mode 100755 src/usr/local/www/themes/_corporate/images/footer.gif create mode 100755 src/usr/local/www/themes/_corporate/images/header.gif create mode 100755 src/usr/local/www/themes/_corporate/images/help.png create mode 100755 src/usr/local/www/themes/_corporate/images/horizontal.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/favicon.ico create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_3g.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_3g_inactive.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_advanced.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_advanced_s.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_alert.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_alias_host.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_alias_net.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_alias_port.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_alias_url.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_alias_url_reload.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_block.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_block_add.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_block_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_cablenic.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_cal.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_cal_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_carp.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_carp_d.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_chain.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_check.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_clock_green.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_clock_grey.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_clock_red.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_close.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_configure.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_down.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_down_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_down_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_e.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_e_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_error.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_exclam.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_flag_de.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_flag_en.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_flag_es.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_flag_pt_BR.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_cert.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_file.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_group.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_host.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_imp.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_mail.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_pwd.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_search.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_time.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_unknown.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_url.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_user.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_fw-update.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_help.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_ifalias.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_ifalias_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_import_alias.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_in.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_in_d.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_info_pkg.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_interface_down.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_interface_up.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_left.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_left_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_left_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_log.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_log_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_log_s.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_log_s_d.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_logs.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_match.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_match_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_minus.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_open.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_other.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_other_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_out.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_out_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_parp.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_parp_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_pass.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_pass_add.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_pass_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_plus.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_plus_bl.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_plus_bl_p.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_plus_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_plus_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_plus_p.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reinstall.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reject.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_reject_d.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_right.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_service_restart.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_service_restart_d.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_service_running.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_service_start.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_service_start_d.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_service_status.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_service_stop.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_service_stop_d.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_service_stopped.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_services_restart_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_services_start_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_services_stop_mo.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_system-group-grey.png create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_system-group.png create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_system-user-grey.png create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_system-user.png create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_system_lock_screen.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_system_logout.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_trapped.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_trapped_p.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_ts_rule.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_ts_rule_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_up.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_up_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_up_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_wlan.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_wlan_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_wol_all.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_wzd_nsaved.png create mode 100644 src/usr/local/www/themes/_corporate/images/icons/icon_wzd_saved.png create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_x.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_x_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_x_mo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/icons/icon_x_p.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/in.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/in_d.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/out.gif create mode 100644 src/usr/local/www/themes/_corporate/images/icons/out_d.gif create mode 100755 src/usr/local/www/themes/_corporate/images/log.png create mode 100755 src/usr/local/www/themes/_corporate/images/logo.gif create mode 100755 src/usr/local/www/themes/_corporate/images/menu_down.gif create mode 100755 src/usr/local/www/themes/_corporate/images/menu_footer.gif create mode 100755 src/usr/local/www/themes/_corporate/images/menu_right.gif create mode 100755 src/usr/local/www/themes/_corporate/images/metal_bgr.gif create mode 100755 src/usr/local/www/themes/_corporate/images/metal_bgr_red.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/bar_blue.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/bar_gray.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/bar_left.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/bar_right.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/bullet_toggle_minus.png create mode 100755 src/usr/local/www/themes/_corporate/images/misc/bullet_toggle_plus.png create mode 100755 src/usr/local/www/themes/_corporate/images/misc/button.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/key_128.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/key_152.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/key_256.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/key_64.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/left_background.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/loader.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/loader_tab.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/logon.png create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_0.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_1.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_10.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_2.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_3.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_4.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_5.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_6.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_7.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_8.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/plogo_9.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/progress_bar.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/tri_c.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/tri_c_black.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/tri_o.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/tri_o_black.gif create mode 100755 src/usr/local/www/themes/_corporate/images/misc/widget_loader.gif create mode 100755 src/usr/local/www/themes/_corporate/images/new_tab_menu.png create mode 100755 src/usr/local/www/themes/_corporate/images/status.png create mode 100755 src/usr/local/www/themes/_corporate/images/transparent.gif create mode 100755 src/usr/local/www/themes/_corporate/images/transparent_pixel.gif create mode 100755 src/usr/local/www/themes/_corporate/javascript/ie7/blank.gif create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-box-model.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-core.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-css-strict.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-css2.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-css3.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-fixed.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-html4.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-ie5.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-lite-p.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-lite.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-png.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-server.css create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-standard-p.js create mode 100644 src/usr/local/www/themes/_corporate/javascript/ie7/ie7-standard.js create mode 100755 src/usr/local/www/themes/_corporate/javascript/ie7/test-trans.png create mode 100644 src/usr/local/www/themes/_corporate/javascript/niftyjsCode.js create mode 100644 src/usr/local/www/themes/_corporate/loader.js create mode 100644 src/usr/local/www/themes/_corporate/new_tab_menu.css create mode 100755 src/usr/local/www/themes/_corporate/new_tab_menu.png create mode 100644 src/usr/local/www/themes/_corporate/rrdcolors.inc.php create mode 100644 src/usr/local/www/themes/_corporate/styles/jquery-ui-1.11.1.css create mode 100644 src/usr/local/www/themes/code-red/all.css create mode 100755 src/usr/local/www/themes/code-red/bottom-loader.js create mode 100755 src/usr/local/www/themes/code-red/favicon.ico create mode 100755 src/usr/local/www/themes/code-red/graphlink.css create mode 100755 src/usr/local/www/themes/code-red/images/alert_bgr.png create mode 100755 src/usr/local/www/themes/code-red/images/background.gif create mode 100755 src/usr/local/www/themes/code-red/images/background.png create mode 100755 src/usr/local/www/themes/code-red/images/button_left.gif create mode 100755 src/usr/local/www/themes/code-red/images/button_mid.gif create mode 100755 src/usr/local/www/themes/code-red/images/button_right.gif create mode 100755 src/usr/local/www/themes/code-red/images/footer.png create mode 100755 src/usr/local/www/themes/code-red/images/header.png create mode 100755 src/usr/local/www/themes/code-red/images/help.png create mode 100755 src/usr/local/www/themes/code-red/images/horizontal.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/favicon.ico create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_3g.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_3g_inactive.gif create mode 100644 src/usr/local/www/themes/code-red/images/icons/icon_advanced.gif create mode 100644 src/usr/local/www/themes/code-red/images/icons/icon_advanced_s.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_alert.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_alias_host.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_alias_net.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_alias_port.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_alias_url.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_alias_url_reload.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_block.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_block_add.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_block_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_cablenic.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_cal.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_cal_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_carp.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_carp_d.gif create mode 100644 src/usr/local/www/themes/code-red/images/icons/icon_chain.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_check.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_clock_green.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_clock_grey.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_clock_red.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_close.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_configure.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_down.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_down_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_down_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_e.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_e_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_error.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_exclam.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_flag_de.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_flag_en.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_flag_es.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_flag_pt_BR.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_cert.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_file.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_group.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_host.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_imp.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_mail.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_pwd.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_search.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_time.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_unknown.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_url.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_frmfld_user.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_fw-update.gif create mode 100644 src/usr/local/www/themes/code-red/images/icons/icon_help.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_ifalias.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_ifalias_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_import_alias.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_in.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_in_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_info_pkg.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_interface_down.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_interface_up.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_left.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_left_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_left_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_log.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_log_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_log_s.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_log_s_d.gif create mode 100644 src/usr/local/www/themes/code-red/images/icons/icon_logs.gif create mode 100644 src/usr/local/www/themes/code-red/images/icons/icon_match.gif create mode 100644 src/usr/local/www/themes/code-red/images/icons/icon_match_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_minus.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_open.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_other.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_other_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_out.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_out_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_parp.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_parp_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_pass.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_pass_add.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_pass_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_plus.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_plus_bl.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_plus_bl_p.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_plus_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_plus_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_plus_p.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reinstall.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reinstall_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reinstall_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reject.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_reject_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_right.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_service_restart.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_service_restart_d.gif create mode 100644 src/usr/local/www/themes/code-red/images/icons/icon_service_running.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_service_start.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_service_start_d.gif create mode 100644 src/usr/local/www/themes/code-red/images/icons/icon_service_status.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_service_stop.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_service_stop_d.gif create mode 100644 src/usr/local/www/themes/code-red/images/icons/icon_service_stopped.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_services_restart_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_services_start_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_services_stop_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_system-group-grey.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_system-group.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_system-user-grey.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_system-user.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_system_lock_screen.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_system_logout.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_trapped.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_trapped_p.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_ts_rule.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_ts_rule_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_up.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_up_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_up_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_wlan.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_wlan_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_wol_all.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_wzd_nsaved.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_wzd_saved.png create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_x.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_x_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_x_mo.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/icon_x_p.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/in.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/in_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/out.gif create mode 100755 src/usr/local/www/themes/code-red/images/icons/out_d.gif create mode 100755 src/usr/local/www/themes/code-red/images/log.png create mode 100755 src/usr/local/www/themes/code-red/images/logo.gif create mode 100755 src/usr/local/www/themes/code-red/images/logobig.jpg create mode 100755 src/usr/local/www/themes/code-red/images/logon-background.gif create mode 100755 src/usr/local/www/themes/code-red/images/menu_down.gif create mode 100755 src/usr/local/www/themes/code-red/images/menu_footer.gif create mode 100755 src/usr/local/www/themes/code-red/images/menu_right.gif create mode 100755 src/usr/local/www/themes/code-red/images/menubgr.png create mode 100755 src/usr/local/www/themes/code-red/images/menubgr_footer.png create mode 100755 src/usr/local/www/themes/code-red/images/menubgr_highlight.png create mode 100755 src/usr/local/www/themes/code-red/images/metal_bgr.gif create mode 100755 src/usr/local/www/themes/code-red/images/metal_bgr_red.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/background.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/bar_blue.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/bar_gray.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/bar_left.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/bar_right.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/bullet_toggle_minus.png create mode 100755 src/usr/local/www/themes/code-red/images/misc/bullet_toggle_plus.png create mode 100755 src/usr/local/www/themes/code-red/images/misc/button.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/graph.png create mode 100755 src/usr/local/www/themes/code-red/images/misc/key_128.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/key_152.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/key_256.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/key_64.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/left_background.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/loader.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/loader_all.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/loader_filter.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/loader_tab.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/logon.png create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_0.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_1.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_10.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_2.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_3.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_4.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_5.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_6.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_7.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_8.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/plogo_9.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/progress_bar.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/rrd_error.png create mode 100755 src/usr/local/www/themes/code-red/images/misc/status_alerter.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/status_carpmaster.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/status_left.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/status_page_loading.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/status_reload_all.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/status_reload_filter.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/status_right.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/tri_c.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/tri_c_black.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/tri_o.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/tri_o_black.gif create mode 100755 src/usr/local/www/themes/code-red/images/misc/widget_loader.gif create mode 100755 src/usr/local/www/themes/code-red/images/new_tab_menu.png create mode 100755 src/usr/local/www/themes/code-red/images/status.png create mode 100755 src/usr/local/www/themes/code-red/images/transparent.gif create mode 100755 src/usr/local/www/themes/code-red/images/transparent_pixel.gif create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/blank.gif create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-box-model.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-core.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-css-strict.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-css2.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-css3.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-fixed.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-html4.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-ie5.js create mode 100644 src/usr/local/www/themes/code-red/javascript/ie7/ie7-lite-p.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-lite.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-png.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-server.css create mode 100644 src/usr/local/www/themes/code-red/javascript/ie7/ie7-standard-p.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/ie7-standard.js create mode 100755 src/usr/local/www/themes/code-red/javascript/ie7/test-trans.png create mode 100755 src/usr/local/www/themes/code-red/javascript/img/grey-40.png create mode 100755 src/usr/local/www/themes/code-red/javascript/img/submenu-off.gif create mode 100755 src/usr/local/www/themes/code-red/javascript/img/submenu-on.gif create mode 100755 src/usr/local/www/themes/code-red/javascript/img/white-90.png create mode 100755 src/usr/local/www/themes/code-red/javascript/img/x.gif create mode 100644 src/usr/local/www/themes/code-red/javascript/niftyjsCode.js create mode 100755 src/usr/local/www/themes/code-red/javascript/transmenu-body.php create mode 100755 src/usr/local/www/themes/code-red/javascript/transmenu-head.php create mode 100755 src/usr/local/www/themes/code-red/javascript/transmenu.org create mode 100755 src/usr/local/www/themes/code-red/javascript/transmenuC.js create mode 100755 src/usr/local/www/themes/code-red/jsevents/body.def create mode 100644 src/usr/local/www/themes/code-red/loader.js create mode 100755 src/usr/local/www/themes/code-red/login.css create mode 100755 src/usr/local/www/themes/code-red/menu.inc create mode 100644 src/usr/local/www/themes/code-red/new_tab_menu.css create mode 100755 src/usr/local/www/themes/code-red/no_big_logo create mode 100755 src/usr/local/www/themes/code-red/rrdcolors.inc.php create mode 100644 src/usr/local/www/themes/code-red/styles/jquery-ui-1.11.1.css create mode 100755 src/usr/local/www/themes/code-red/styles/menustyles.css create mode 100755 src/usr/local/www/themes/code-red/styles/transmenu.css create mode 100755 src/usr/local/www/themes/code-red/wizard.css create mode 100644 src/usr/local/www/themes/metallic/all.css create mode 100755 src/usr/local/www/themes/metallic/apple-touch-icon.png create mode 100644 src/usr/local/www/themes/metallic/bottom-loader.js create mode 100755 src/usr/local/www/themes/metallic/images/alert_bgr.gif create mode 100755 src/usr/local/www/themes/metallic/images/footer.gif create mode 100755 src/usr/local/www/themes/metallic/images/header.gif create mode 100755 src/usr/local/www/themes/metallic/images/help.png create mode 100755 src/usr/local/www/themes/metallic/images/horizontal.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/favicon.ico create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_3g.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_3g_inactive.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_advanced.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_advanced_s.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_alert.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_alias_host.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_alias_net.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_alias_port.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_alias_url.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_alias_url_reload.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_block.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_block_add.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_block_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_cablenic.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_cal.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_cal_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_carp.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_carp_d.gif create mode 100644 src/usr/local/www/themes/metallic/images/icons/icon_chain.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_check.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_clock_green.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_clock_grey.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_clock_red.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_close.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_configure.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_down.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_down_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_down_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_e.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_e_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_error.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_exclam.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_flag_de.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_flag_en.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_flag_es.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_flag_pt_BR.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_cert.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_file.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_group.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_host.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_imp.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_mail.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_pwd.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_search.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_time.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_unknown.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_url.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_frmfld_user.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_fw-update.gif create mode 100644 src/usr/local/www/themes/metallic/images/icons/icon_help.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_ifalias.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_ifalias_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_import_alias.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_in.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_in_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_info_pkg.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_interface_down.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_interface_up.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_left.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_left_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_left_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_log.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_log_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_log_s.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_log_s_d.gif create mode 100644 src/usr/local/www/themes/metallic/images/icons/icon_logs.gif create mode 100644 src/usr/local/www/themes/metallic/images/icons/icon_match.gif create mode 100644 src/usr/local/www/themes/metallic/images/icons/icon_match_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_minus.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_open.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_other.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_other_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_out.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_out_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_parp.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_parp_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_pass.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_pass_add.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_pass_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_plus.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_plus_bl.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_plus_bl_p.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_plus_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_plus_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_plus_p.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reinstall.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reinstall_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reinstall_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reject.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_reject_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_right.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_service_restart.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_service_restart_d.gif create mode 100644 src/usr/local/www/themes/metallic/images/icons/icon_service_running.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_service_start.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_service_start_d.gif create mode 100644 src/usr/local/www/themes/metallic/images/icons/icon_service_status.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_service_stop.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_service_stop_d.gif create mode 100644 src/usr/local/www/themes/metallic/images/icons/icon_service_stopped.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_services_restart_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_services_start_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_services_stop_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_system-group-grey.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_system-group.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_system-user-grey.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_system-user.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_system_lock_screen.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_system_logout.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_trapped.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_trapped_p.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_ts_rule.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_ts_rule_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_up.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_up_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_up_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_wlan.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_wlan_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_wol_all.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_wzd_nsaved.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_wzd_saved.png create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_x.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_x_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_x_mo.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/icon_x_p.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/in.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/in_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/out.gif create mode 100755 src/usr/local/www/themes/metallic/images/icons/out_d.gif create mode 100755 src/usr/local/www/themes/metallic/images/log.png create mode 100755 src/usr/local/www/themes/metallic/images/logo.gif create mode 100755 src/usr/local/www/themes/metallic/images/logobig.jpg create mode 100755 src/usr/local/www/themes/metallic/images/menu_down.gif create mode 100755 src/usr/local/www/themes/metallic/images/menu_footer.gif create mode 100755 src/usr/local/www/themes/metallic/images/menu_right.gif create mode 100755 src/usr/local/www/themes/metallic/images/metal_bgr.gif create mode 100755 src/usr/local/www/themes/metallic/images/metal_bgr_red.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/bar_blue.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/bar_gray.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/bar_left.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/bar_right.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/bullet_toggle_minus.png create mode 100755 src/usr/local/www/themes/metallic/images/misc/bullet_toggle_plus.png create mode 100755 src/usr/local/www/themes/metallic/images/misc/button.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/graph.png create mode 100755 src/usr/local/www/themes/metallic/images/misc/key_128.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/key_152.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/key_256.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/key_64.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/left_background.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/loader.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/loader_all.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/loader_filter.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/loader_tab.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/logon.png create mode 100755 src/usr/local/www/themes/metallic/images/misc/progress_bar.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/rrd_error.png create mode 100755 src/usr/local/www/themes/metallic/images/misc/status_alerter.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/status_carpmaster.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/status_left.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/status_page_loading.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/status_reload_all.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/status_reload_filter.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/status_right.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/tri_c.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/tri_c_black.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/tri_o.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/tri_o_black.gif create mode 100755 src/usr/local/www/themes/metallic/images/misc/widget_loader.gif create mode 100755 src/usr/local/www/themes/metallic/images/new_tab_menu.png create mode 100755 src/usr/local/www/themes/metallic/images/status.png create mode 100755 src/usr/local/www/themes/metallic/images/transparent.gif create mode 100755 src/usr/local/www/themes/metallic/images/transparent_pixel.gif create mode 100755 src/usr/local/www/themes/metallic/javascript/ie7/blank.gif create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-box-model.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-core.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-css-strict.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-css2.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-css3.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-fixed.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-html4.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-ie5.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-lite-p.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-lite.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-png.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-server.css create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-standard-p.js create mode 100644 src/usr/local/www/themes/metallic/javascript/ie7/ie7-standard.js create mode 100755 src/usr/local/www/themes/metallic/javascript/ie7/test-trans.png create mode 100644 src/usr/local/www/themes/metallic/javascript/niftyjsCode.js create mode 100644 src/usr/local/www/themes/metallic/loader.js create mode 100644 src/usr/local/www/themes/metallic/login.css create mode 100644 src/usr/local/www/themes/metallic/new_tab_menu.css create mode 100644 src/usr/local/www/themes/metallic/no_big_logo create mode 100644 src/usr/local/www/themes/metallic/rrdcolors.inc.php create mode 100644 src/usr/local/www/themes/metallic/styles/jquery-ui-1.11.1.css create mode 100644 src/usr/local/www/themes/nervecenter/all.css create mode 100755 src/usr/local/www/themes/nervecenter/apple-touch-icon.png create mode 100644 src/usr/local/www/themes/nervecenter/bottom-loader.js create mode 100644 src/usr/local/www/themes/nervecenter/favicon.ico create mode 100644 src/usr/local/www/themes/nervecenter/graphlink.css create mode 100755 src/usr/local/www/themes/nervecenter/images/alert_bgr.png create mode 100755 src/usr/local/www/themes/nervecenter/images/background.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/background.png create mode 100755 src/usr/local/www/themes/nervecenter/images/footer.png create mode 100755 src/usr/local/www/themes/nervecenter/images/header.png create mode 100755 src/usr/local/www/themes/nervecenter/images/help.png create mode 100755 src/usr/local/www/themes/nervecenter/images/horizontal.gif create mode 100644 src/usr/local/www/themes/nervecenter/images/icons/favicon.ico create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_3g.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_3g_inactive.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_advanced.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_advanced_s.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_alert.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_alias_host.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_alias_net.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_alias_port.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_alias_url.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_alias_url_reload.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_block.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_block_add.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_block_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_cablenic.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_cal.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_cal_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_carp.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_carp_d.gif create mode 100644 src/usr/local/www/themes/nervecenter/images/icons/icon_chain.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_check.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_clock_green.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_clock_grey.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_clock_red.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_close.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_configure.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_down.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_down_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_down_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_e.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_e_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_error.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_exclam.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_flag_de.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_flag_en.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_flag_es.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_flag_pt_BR.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_cert.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_file.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_group.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_host.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_imp.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_mail.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_pwd.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_search.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_time.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_unknown.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_url.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_user.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_fw-update.gif create mode 100644 src/usr/local/www/themes/nervecenter/images/icons/icon_help.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_ifalias.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_ifalias_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_import_alias.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_in.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_in_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_info_pkg.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_interface_down.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_interface_up.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_left.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_left_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_left_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_log.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_log_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_log_s.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_log_s_d.gif create mode 100644 src/usr/local/www/themes/nervecenter/images/icons/icon_logs.gif create mode 100644 src/usr/local/www/themes/nervecenter/images/icons/icon_match.gif create mode 100644 src/usr/local/www/themes/nervecenter/images/icons/icon_match_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_minus.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_open.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_other.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_other_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_out.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_out_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_parp.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_parp_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_pass.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_pass_add.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_pass_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_plus.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_plus_bl.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_plus_bl_p.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_plus_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_plus_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_plus_p.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reject.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_reject_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_right.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_service_restart.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_service_restart_d.gif create mode 100644 src/usr/local/www/themes/nervecenter/images/icons/icon_service_running.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_service_start.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_service_start_d.gif create mode 100644 src/usr/local/www/themes/nervecenter/images/icons/icon_service_status.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_service_stop.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_service_stop_d.gif create mode 100644 src/usr/local/www/themes/nervecenter/images/icons/icon_service_stopped.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_services_restart_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_services_start_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_services_stop_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_system-group-grey.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_system-group.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_system-user-grey.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_system-user.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_system_lock_screen.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_system_logout.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_trapped.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_trapped_p.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_ts_rule.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_ts_rule_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_up.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_up_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_up_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_wlan.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_wlan_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_wol_all.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_wzd_nsaved.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_wzd_saved.png create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_x.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_x_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_x_mo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/icon_x_p.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/in.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/in_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/out.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/icons/out_d.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/log.png create mode 100755 src/usr/local/www/themes/nervecenter/images/logo.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/logobig.jpg create mode 100755 src/usr/local/www/themes/nervecenter/images/menu_down.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/menu_footer.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/menu_right.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/metal_bgr.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/metal_bgr_red.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/bar_blue.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/bar_gray.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/bar_left.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/bar_right.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/bullet_toggle_minus.png create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/bullet_toggle_plus.png create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/button.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/graph.png create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/key_128.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/key_152.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/key_256.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/key_64.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/left_background.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/loader.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/loader_all.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/loader_filter.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/loader_tab.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/logon.png create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/progress_bar.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/rrd_error.png create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/status_alerter.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/status_carpmaster.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/status_left.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/status_page_loading.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/status_reload_all.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/status_reload_filter.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/status_right.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/tri_c.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/tri_c_black.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/tri_o.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/tri_o_black.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/misc/widget_loader.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/new_tab_menu.png create mode 100755 src/usr/local/www/themes/nervecenter/images/status.png create mode 100755 src/usr/local/www/themes/nervecenter/images/transparent.gif create mode 100755 src/usr/local/www/themes/nervecenter/images/transparent_pixel.gif create mode 100755 src/usr/local/www/themes/nervecenter/javascript/ie7/blank.gif create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-box-model.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-core.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-css-strict.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-css2.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-css3.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-fixed.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-html4.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-ie5.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-lite-p.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-lite.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-png.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-server.css create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-standard-p.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-standard.js create mode 100755 src/usr/local/www/themes/nervecenter/javascript/ie7/test-trans.png create mode 100755 src/usr/local/www/themes/nervecenter/javascript/img/grey-40.png create mode 100755 src/usr/local/www/themes/nervecenter/javascript/img/submenu-off.gif create mode 100755 src/usr/local/www/themes/nervecenter/javascript/img/submenu-on.gif create mode 100755 src/usr/local/www/themes/nervecenter/javascript/img/white-90.png create mode 100755 src/usr/local/www/themes/nervecenter/javascript/img/x.gif create mode 100644 src/usr/local/www/themes/nervecenter/javascript/niftyjsCode.js create mode 100644 src/usr/local/www/themes/nervecenter/javascript/transmenu-body.php create mode 100644 src/usr/local/www/themes/nervecenter/javascript/transmenu-head.php create mode 100644 src/usr/local/www/themes/nervecenter/javascript/transmenu.org create mode 100644 src/usr/local/www/themes/nervecenter/javascript/transmenuC.js create mode 100644 src/usr/local/www/themes/nervecenter/jsevents/body.def create mode 100644 src/usr/local/www/themes/nervecenter/loader.js create mode 100644 src/usr/local/www/themes/nervecenter/login.css create mode 100644 src/usr/local/www/themes/nervecenter/menu.inc create mode 100644 src/usr/local/www/themes/nervecenter/new_tab_menu.css create mode 100644 src/usr/local/www/themes/nervecenter/no_big_logo create mode 100644 src/usr/local/www/themes/nervecenter/rrdcolors.inc.php create mode 100644 src/usr/local/www/themes/nervecenter/styles/jquery-ui-1.11.1.css create mode 100644 src/usr/local/www/themes/nervecenter/styles/menustyles.css create mode 100644 src/usr/local/www/themes/nervecenter/styles/transmenu.css create mode 100644 src/usr/local/www/themes/nervecenter/wizard.css create mode 100644 src/usr/local/www/themes/pfsense-dropdown/all.css create mode 100755 src/usr/local/www/themes/pfsense-dropdown/apple-touch-icon.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/bottom-loader.js create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/alert_bgr.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/header-alert.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/header.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/help.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/favicon.ico create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_3g.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_3g_inactive.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_advanced.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_advanced_s.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alert.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_host.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_net.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_port.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_url.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_url_reload.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block_add.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cablenic.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cal.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cal_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_carp.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_carp_d.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_chain.png create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_check.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_green.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_grey.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_red.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_close.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_configure.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_e.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_e_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_error.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_exclam.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_de.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_en.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_es.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_pt_BR.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_cert.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_file.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_group.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_host.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_imp.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_mail.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_pwd.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_search.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_time.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_unknown.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_url.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_user.png create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_fw-update.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_help.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ifalias.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ifalias_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_import_alias.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_in.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_in_d.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_info_pkg.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_interface_down.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_interface_up.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_s.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_s_d.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_logs.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_match.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_match_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_minus.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_open.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_other.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_other_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_out.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_out_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_parp.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_parp_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass_add.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_bl.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_bl_p.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_mo.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_p.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reject.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reject_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_right.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_restart.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_restart_d.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_running.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_start.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_start_d.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_status.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stop.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stop_d.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stopped.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_restart_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_start_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_stop_mo.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-group-grey.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-group.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-user-grey.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-user.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system_lock_screen.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system_logout.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_trapped.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_trapped_p.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ts_rule.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ts_rule_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wlan.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wlan_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wol_all.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wzd_nsaved.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wzd_saved.png create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_mo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_p.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/in.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/in_d.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/out.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/images/icons/out_d.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/log.png create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/logo.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/logobig.jpg create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/menu.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_blue.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_gray.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_left.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_right.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/button.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/key_128.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/key_152.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/key_256.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/key_64.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/left_background.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/loader.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/loader_tab.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/logon.png create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/progress_bar.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/rrd_error.png create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_c.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_c_black.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_o.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_o_black.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/misc/widget_loader.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/new_tab_menu.png create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/status.png create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/transparent.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/images/transparent_pixel.gif create mode 100755 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/blank.gif create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-box-model.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-core.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-css-strict.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-css2.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-css3.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-fixed.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-html4.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-ie5.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-lite-p.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-lite.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-png.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-server.css create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-standard-p.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-standard.js create mode 100755 src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/test-trans.png create mode 100644 src/usr/local/www/themes/pfsense-dropdown/javascript/niftyjsCode.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/loader.js create mode 100644 src/usr/local/www/themes/pfsense-dropdown/login.css create mode 100644 src/usr/local/www/themes/pfsense-dropdown/new_tab_menu.css create mode 100644 src/usr/local/www/themes/pfsense-dropdown/rrdcolors.inc.php create mode 100644 src/usr/local/www/themes/pfsense-dropdown/styles/jquery-ui-1.11.1.css create mode 100644 src/usr/local/www/themes/pfsense/all.css create mode 100755 src/usr/local/www/themes/pfsense/apple-touch-icon.png create mode 100644 src/usr/local/www/themes/pfsense/bottom-loader.js create mode 100755 src/usr/local/www/themes/pfsense/images/alert_bgr.gif create mode 100755 src/usr/local/www/themes/pfsense/images/header-alert.gif create mode 100755 src/usr/local/www/themes/pfsense/images/header.gif create mode 100755 src/usr/local/www/themes/pfsense/images/help.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/favicon.ico create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_3g.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_3g_inactive.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_advanced.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_advanced_s.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_alert.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_alias_host.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_alias_net.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_alias_port.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_alias_url.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_alias_url_reload.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_block.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_block_add.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_block_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_cablenic.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_cal.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_cal_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_carp.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_carp_d.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_chain.png create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_check.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_clock_green.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_clock_grey.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_clock_red.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_close.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_configure.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_down.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_down_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_down_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_e.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_e_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_error.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_exclam.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_flag_de.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_flag_en.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_flag_es.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_flag_pt_BR.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_cert.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_file.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_group.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_host.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_imp.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_mail.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_pwd.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_search.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_time.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_unknown.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_url.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_user.png create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_fw-update.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_help.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_ifalias.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_ifalias_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_import_alias.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_in.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_in_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_info_pkg.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_interface_down.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_interface_up.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_left.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_left_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_left_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_log.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_log_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_log_s.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_log_s_d.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_logs.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_match.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_match_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_minus.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_open.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_other.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_other_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_out.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_out_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_parp.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_parp_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_pass.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_pass_add.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_pass_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_plus.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_plus_bl.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_plus_bl_p.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_plus_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_plus_mo.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_plus_p.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reinstall.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reject.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_reject_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_right.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_service_restart.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_service_restart_d.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_service_running.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_service_start.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_service_start_d.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_service_status.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_service_stop.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_service_stop_d.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_service_stopped.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_services_restart_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_services_start_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_services_stop_mo.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_system-group-grey.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_system-group.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_system-user-grey.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_system-user.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_system_lock_screen.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_system_logout.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_trapped.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_trapped_p.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_ts_rule.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_ts_rule_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_up.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_up_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_up_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_wlan.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_wlan_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_wol_all.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_wzd_nsaved.png create mode 100644 src/usr/local/www/themes/pfsense/images/icons/icon_wzd_saved.png create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_x.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_x_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_x_mo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/icons/icon_x_p.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/in.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/in_d.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/out.gif create mode 100644 src/usr/local/www/themes/pfsense/images/icons/out_d.gif create mode 100755 src/usr/local/www/themes/pfsense/images/log.png create mode 100755 src/usr/local/www/themes/pfsense/images/logo.gif create mode 100755 src/usr/local/www/themes/pfsense/images/logobig.jpg create mode 100755 src/usr/local/www/themes/pfsense/images/misc/bar_blue.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/bar_gray.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/bar_left.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/bar_right.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/button.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/key_128.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/key_152.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/key_256.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/key_64.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/left_background.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/loader.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/loader_tab.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/logon.png create mode 100755 src/usr/local/www/themes/pfsense/images/misc/progress_bar.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/rrd_error.png create mode 100755 src/usr/local/www/themes/pfsense/images/misc/tri_c.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/tri_c_black.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/tri_o.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/tri_o_black.gif create mode 100755 src/usr/local/www/themes/pfsense/images/misc/widget_loader.gif create mode 100755 src/usr/local/www/themes/pfsense/images/new_tab_menu.png create mode 100755 src/usr/local/www/themes/pfsense/images/status.png create mode 100755 src/usr/local/www/themes/pfsense/images/transparent.gif create mode 100755 src/usr/local/www/themes/pfsense/images/transparent_pixel.gif create mode 100644 src/usr/local/www/themes/pfsense/javascript/niftyjsCode.js create mode 100644 src/usr/local/www/themes/pfsense/loader.js create mode 100644 src/usr/local/www/themes/pfsense/login.css create mode 100644 src/usr/local/www/themes/pfsense/new_tab_menu.css create mode 100644 src/usr/local/www/themes/pfsense/rrdcolors.inc.php create mode 100644 src/usr/local/www/themes/pfsense/styles/jquery-ui-1.11.1.css create mode 100644 src/usr/local/www/themes/pfsense_ng/all.css create mode 100755 src/usr/local/www/themes/pfsense_ng/apple-touch-icon.png create mode 100644 src/usr/local/www/themes/pfsense_ng/bottom-loader.js create mode 100644 src/usr/local/www/themes/pfsense_ng/favicon.ico create mode 100644 src/usr/local/www/themes/pfsense_ng/graphlink.css create mode 100755 src/usr/local/www/themes/pfsense_ng/images/alert_bgr.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/alerter.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/background.jpg create mode 100755 src/usr/local/www/themes/pfsense_ng/images/footer.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/header.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/help.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/horizontal.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/hostname.png create mode 100644 src/usr/local/www/themes/pfsense_ng/images/icons/favicon.ico create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_3g.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_3g_inactive.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_advanced.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_advanced_s.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_alert.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_host.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_net.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_port.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_url.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_url_reload.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_block.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_block_add.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_block_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_cablenic.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_cal.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_cal_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_carp.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_carp_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_chain.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_check.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_green.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_grey.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_red.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_close.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_configure.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_down.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_down_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_down_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_e.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_e_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_error.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_exclam.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_de.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_en.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_es.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_pt_BR.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_cert.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_file.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_group.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_host.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_imp.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_mail.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_pwd.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_search.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_time.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_unknown.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_url.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_user.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_fw-update.gif create mode 100644 src/usr/local/www/themes/pfsense_ng/images/icons/icon_help.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_ifalias.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_ifalias_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_import_alias.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_in.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_in_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_info_pkg.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_interface_down.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_interface_up.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_left.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_left_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_left_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_log.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_s.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_s_d.gif create mode 100644 src/usr/local/www/themes/pfsense_ng/images/icons/icon_logs.gif create mode 100644 src/usr/local/www/themes/pfsense_ng/images/icons/icon_match.gif create mode 100644 src/usr/local/www/themes/pfsense_ng/images/icons/icon_match_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_minus.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_open.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_other.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_other_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_out.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_out_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_parp.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_parp_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass_add.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_bl.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_bl_p.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_p.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reject.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_reject_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_right.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_restart.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_restart_d.gif create mode 100644 src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_running.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_start.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_start_d.gif create mode 100644 src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_status.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stop.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stop_d.gif create mode 100644 src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stopped.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_restart_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_start_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_stop_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-group-grey.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-group.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-user-grey.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-user.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_system_lock_screen.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_system_logout.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_trapped.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_trapped_p.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_ts_rule.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_ts_rule_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_up.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_up_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_up_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_wlan.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_wlan_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_wol_all.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_wzd_nsaved.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_wzd_saved.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_x.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_p.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/in.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/in_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/out.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/icons/out_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/log.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/logo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/logobig.jpg create mode 100755 src/usr/local/www/themes/pfsense_ng/images/mainmenu-down.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/mainmenu-right.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/mainmenuitem.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/menu-dot.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/menu_footer.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/menu_right.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/menubgr.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/menubgr_footer.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/menubgr_highlight.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/bar_blue.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/bar_gray.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/bar_left.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/bar_right.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/bullet_toggle_minus.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/bullet_toggle_plus.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/button.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/graph.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/key_128.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/key_152.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/key_256.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/key_64.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/left_background.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/loader.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/loader_all.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/loader_filter.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/loader_tab.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/logon.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/progress_bar.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/rrd_error.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/status_alerter.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/status_carpmaster.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/status_left.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/status_page_loading.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/status_reload_all.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/status_reload_filter.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/status_right.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/tri_c.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/tri_c_black.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/tri_o.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/tri_o_black.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/misc/widget_loader.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/new_tab_menu.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/status.png create mode 100755 src/usr/local/www/themes/pfsense_ng/images/transparent.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/images/transparent_pixel.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/javascript/ie7/blank.gif create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-box-model.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-core.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-css-strict.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-css2.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-css3.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-fixed.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-html4.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-ie5.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-lite-p.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-lite.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-png.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-server.css create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-standard-p.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-standard.js create mode 100755 src/usr/local/www/themes/pfsense_ng/javascript/ie7/test-trans.png create mode 100755 src/usr/local/www/themes/pfsense_ng/javascript/img/grey-40.png create mode 100755 src/usr/local/www/themes/pfsense_ng/javascript/img/submenu-off.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/javascript/img/submenu-on.gif create mode 100755 src/usr/local/www/themes/pfsense_ng/javascript/img/white-90.png create mode 100755 src/usr/local/www/themes/pfsense_ng/javascript/img/x.gif create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/niftyjsCode.js create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/transmenu-body.php create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/transmenu-head.php create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/transmenu.org create mode 100644 src/usr/local/www/themes/pfsense_ng/javascript/transmenuC.js create mode 100644 src/usr/local/www/themes/pfsense_ng/jsevents/body.def create mode 100644 src/usr/local/www/themes/pfsense_ng/loader.js create mode 100644 src/usr/local/www/themes/pfsense_ng/login.css create mode 100644 src/usr/local/www/themes/pfsense_ng/menu.inc create mode 100644 src/usr/local/www/themes/pfsense_ng/new_tab_menu.css create mode 100644 src/usr/local/www/themes/pfsense_ng/no_big_logo create mode 100644 src/usr/local/www/themes/pfsense_ng/rrdcolors.inc.php create mode 100644 src/usr/local/www/themes/pfsense_ng/styles/jquery-ui-1.11.1.css create mode 100644 src/usr/local/www/themes/pfsense_ng/styles/menustyles.css create mode 100644 src/usr/local/www/themes/pfsense_ng/styles/transmenu.css create mode 100644 src/usr/local/www/themes/pfsense_ng/wizard.css create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/all.css create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/apple-touch-icon.png create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/bottom-loader.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/favicon.ico create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/graphlink.css create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/alert_bgr.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/alerter.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/background.jpg create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/footer.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/header.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/help.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/horizontal.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/hostname.png create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/images/icons/favicon.ico create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_3g.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_3g_inactive.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_advanced.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_advanced_s.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alert.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_host.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_net.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_port.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_url.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_url_reload.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block_add.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cablenic.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cal.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cal_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_carp.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_carp_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_chain.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_check.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_green.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_grey.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_red.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_close.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_configure.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_e.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_e_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_error.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_exclam.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_de.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_en.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_es.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_pt_BR.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_cert.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_file.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_group.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_host.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_imp.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_mail.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_pwd.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_search.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_time.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_unknown.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_url.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_user.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_fw-update.gif create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_help.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ifalias.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ifalias_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_import_alias.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_in.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_in_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_info_pkg.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_interface_down.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_interface_up.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_s.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_s_d.gif create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_logs.gif create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_match.gif create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_match_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_minus.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_open.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_other.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_other_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_out.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_out_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_parp.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_parp_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass_add.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_bl.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_bl_p.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_p.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reject.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reject_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_right.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_restart.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_restart_d.gif create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_running.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_start.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_start_d.gif create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_status.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stop.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stop_d.gif create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stopped.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_restart_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_start_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_stop_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-group-grey.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-group.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-user-grey.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-user.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system_lock_screen.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system_logout.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_trapped.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_trapped_p.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ts_rule.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ts_rule_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wlan.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wlan_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wol_all.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wzd_nsaved.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wzd_saved.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_mo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_p.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/in.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/in_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/out.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/icons/out_d.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/log.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/logo.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/logobig.jpg create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/mainmenu-down.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/mainmenu-right.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/mainmenuitem.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/menu-dot.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/menu_footer.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/menu_right.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/menubgr.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/menubgr_footer.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/menubgr_highlight.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_blue.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_gray.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_left.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_right.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/bullet_toggle_minus.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/bullet_toggle_plus.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/button.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/graph.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_128.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_152.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_256.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_64.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/left_background.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_all.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_filter.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_tab.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/logon.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/progress_bar.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/rrd_error.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_alerter.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_carpmaster.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_left.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_page_loading.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_reload_all.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_reload_filter.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_right.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_c.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_c_black.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_o.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_o_black.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/misc/widget_loader.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/new_tab_menu.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/status.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/transparent.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/images/transparent_pixel.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/blank.gif create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-box-model.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-core.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-css-strict.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-css2.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-css3.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-fixed.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-html4.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-ie5.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-lite-p.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-lite.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-png.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-server.css create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-standard-p.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-standard.js create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/test-trans.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/javascript/img/grey-40.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/javascript/img/submenu-off.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/javascript/img/submenu-on.gif create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/javascript/img/white-90.png create mode 100755 src/usr/local/www/themes/pfsense_ng_fs/javascript/img/x.gif create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/niftyjsCode.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu-body.php create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu-head.php create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu.org create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenuC.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/jsevents/body.def create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/loader.js create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/login.css create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/menu.inc create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/new_tab_menu.css create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/no_big_logo create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/rrdcolors.inc.php create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/styles/jquery-ui-1.11.1.css create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/styles/menustyles.css create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/styles/transmenu.css create mode 100644 src/usr/local/www/themes/pfsense_ng_fs/wizard.css create mode 100644 src/usr/local/www/themes/the_wall/all.css create mode 100755 src/usr/local/www/themes/the_wall/apple-touch-icon.png create mode 100644 src/usr/local/www/themes/the_wall/bottom-loader.js create mode 100644 src/usr/local/www/themes/the_wall/favicon.ico create mode 100644 src/usr/local/www/themes/the_wall/graphlink.css create mode 100755 src/usr/local/www/themes/the_wall/images/alert_bgr.png create mode 100755 src/usr/local/www/themes/the_wall/images/background.jpg create mode 100755 src/usr/local/www/themes/the_wall/images/footer.png create mode 100755 src/usr/local/www/themes/the_wall/images/header.png create mode 100755 src/usr/local/www/themes/the_wall/images/help.png create mode 100755 src/usr/local/www/themes/the_wall/images/horizontal.gif create mode 100755 src/usr/local/www/themes/the_wall/images/horizontal.png create mode 100644 src/usr/local/www/themes/the_wall/images/icons/favicon.ico create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_3g.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_3g_inactive.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_advanced.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_advanced_s.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_alert.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_alias_host.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_alias_net.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_alias_port.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_alias_url.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_alias_url_reload.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_block.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_block_add.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_block_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_cablenic.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_cal.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_cal_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_carp.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_carp_d.gif create mode 100644 src/usr/local/www/themes/the_wall/images/icons/icon_chain.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_check.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_clock_green.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_clock_grey.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_clock_red.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_close.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_configure.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_down.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_down_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_down_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_e.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_e_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_error.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_exclam.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_flag_de.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_flag_en.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_flag_es.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_flag_pt_BR.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_cert.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_file.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_group.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_host.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_imp.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_mail.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_pwd.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_search.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_time.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_unknown.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_url.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_user.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_fw-update.gif create mode 100644 src/usr/local/www/themes/the_wall/images/icons/icon_help.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_ifalias.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_ifalias_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_import_alias.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_in.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_in_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_info_pkg.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_interface_down.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_interface_up.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_left.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_left_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_left_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_log.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_log_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_log_s.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_log_s_d.gif create mode 100644 src/usr/local/www/themes/the_wall/images/icons/icon_logs.gif create mode 100644 src/usr/local/www/themes/the_wall/images/icons/icon_match.gif create mode 100644 src/usr/local/www/themes/the_wall/images/icons/icon_match_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_minus.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_open.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_other.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_other_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_out.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_out_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_parp.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_parp_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_pass.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_pass_add.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_pass_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_plus.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_plus_bl.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_plus_bl_p.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_plus_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_plus_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_plus_p.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reinstall.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reject.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_reject_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_right.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_service_restart.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_service_restart_d.gif create mode 100644 src/usr/local/www/themes/the_wall/images/icons/icon_service_running.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_service_start.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_service_start_d.gif create mode 100644 src/usr/local/www/themes/the_wall/images/icons/icon_service_status.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_service_stop.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_service_stop_d.gif create mode 100644 src/usr/local/www/themes/the_wall/images/icons/icon_service_stopped.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_services_restart_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_services_start_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_services_stop_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_system-group-grey.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_system-group.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_system-user-grey.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_system-user.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_system_lock_screen.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_system_logout.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_trapped.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_trapped_p.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_ts_rule.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_ts_rule_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_up.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_up_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_up_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_wlan.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_wlan_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_wol_all.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_wzd_nsaved.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_wzd_saved.png create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_x.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_x_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_x_mo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/icon_x_p.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/in.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/in_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/out.gif create mode 100755 src/usr/local/www/themes/the_wall/images/icons/out_d.gif create mode 100755 src/usr/local/www/themes/the_wall/images/log.png create mode 100755 src/usr/local/www/themes/the_wall/images/logo.gif create mode 100755 src/usr/local/www/themes/the_wall/images/logobig.jpg create mode 100755 src/usr/local/www/themes/the_wall/images/menu_down.gif create mode 100755 src/usr/local/www/themes/the_wall/images/menu_right.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/bar_blue.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/bar_gray.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/bar_left.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/bar_right.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/bullet_toggle_minus.png create mode 100755 src/usr/local/www/themes/the_wall/images/misc/bullet_toggle_plus.png create mode 100755 src/usr/local/www/themes/the_wall/images/misc/button.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/graph.png create mode 100755 src/usr/local/www/themes/the_wall/images/misc/key_128.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/key_152.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/key_256.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/key_64.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/loader.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/loader_all.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/loader_filter.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/loader_tab.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/logon.png create mode 100755 src/usr/local/www/themes/the_wall/images/misc/progress_bar.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/rrd_error.png create mode 100755 src/usr/local/www/themes/the_wall/images/misc/status_alerter.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/status_carpmaster.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/status_left.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/status_page_loading.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/status_reload_all.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/status_reload_filter.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/status_right.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/tri_c.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/tri_c_black.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/tri_o.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/tri_o_black.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/widget_loader.gif create mode 100755 src/usr/local/www/themes/the_wall/images/misc/widget_loader_old.gif create mode 100755 src/usr/local/www/themes/the_wall/images/new_tab_menu.png create mode 100755 src/usr/local/www/themes/the_wall/images/status.png create mode 100755 src/usr/local/www/themes/the_wall/images/transparent.gif create mode 100755 src/usr/local/www/themes/the_wall/images/transparent_pixel.gif create mode 100755 src/usr/local/www/themes/the_wall/javascript/ie7/blank.gif create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-box-model.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-core.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-css-strict.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-css2.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-css3.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-fixed.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-html4.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-ie5.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-lite-p.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-lite.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-png.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-server.css create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-standard-p.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/ie7/ie7-standard.js create mode 100755 src/usr/local/www/themes/the_wall/javascript/ie7/test-trans.png create mode 100755 src/usr/local/www/themes/the_wall/javascript/img/grey-40.png create mode 100755 src/usr/local/www/themes/the_wall/javascript/img/submenu-off.gif create mode 100755 src/usr/local/www/themes/the_wall/javascript/img/submenu-on.gif create mode 100755 src/usr/local/www/themes/the_wall/javascript/img/white-90.png create mode 100755 src/usr/local/www/themes/the_wall/javascript/img/x.gif create mode 100644 src/usr/local/www/themes/the_wall/javascript/niftyjsCode.js create mode 100644 src/usr/local/www/themes/the_wall/javascript/transmenu-body.php create mode 100644 src/usr/local/www/themes/the_wall/javascript/transmenu-head.php create mode 100644 src/usr/local/www/themes/the_wall/javascript/transmenu.org create mode 100644 src/usr/local/www/themes/the_wall/javascript/transmenuC.js create mode 100644 src/usr/local/www/themes/the_wall/jsevents/body.def create mode 100644 src/usr/local/www/themes/the_wall/loader.js create mode 100644 src/usr/local/www/themes/the_wall/login.css create mode 100644 src/usr/local/www/themes/the_wall/menu.inc create mode 100644 src/usr/local/www/themes/the_wall/new_tab_menu.css create mode 100644 src/usr/local/www/themes/the_wall/no_big_logo create mode 100644 src/usr/local/www/themes/the_wall/rrdcolors.inc.php create mode 100644 src/usr/local/www/themes/the_wall/styles/jquery-ui-1.11.1.css create mode 100644 src/usr/local/www/themes/the_wall/styles/menustyles.css create mode 100644 src/usr/local/www/themes/the_wall/styles/transmenu.css create mode 100644 src/usr/local/www/themes/the_wall/wizard.css create mode 100755 src/usr/local/www/tree-images/empty.gif create mode 100755 src/usr/local/www/tree-images/join.gif create mode 100755 src/usr/local/www/tree-images/joinbottom.gif create mode 100755 src/usr/local/www/tree-images/line.gif create mode 100755 src/usr/local/www/tree-images/minus_.gif create mode 100755 src/usr/local/www/tree-images/minus_up.gif create mode 100755 src/usr/local/www/tree-images/page.gif create mode 100755 src/usr/local/www/tree-images/plus_.gif create mode 100755 src/usr/local/www/tree-images/plus_up.gif create mode 100755 src/usr/local/www/tree-images/plus_updown.gif create mode 100755 src/usr/local/www/tree-images/zone.gif create mode 100755 src/usr/local/www/tree/i-bottom.gif create mode 100755 src/usr/local/www/tree/i-repeater.gif create mode 100644 src/usr/local/www/tree/index.html create mode 100755 src/usr/local/www/tree/l.gif create mode 100755 src/usr/local/www/tree/minus.gif create mode 100755 src/usr/local/www/tree/page-file.png create mode 100755 src/usr/local/www/tree/page-file_play.gif create mode 100755 src/usr/local/www/tree/page-file_x.gif create mode 100755 src/usr/local/www/tree/page-foldericon.png create mode 100755 src/usr/local/www/tree/page-openfoldericon.png create mode 100755 src/usr/local/www/tree/plus.gif create mode 100755 src/usr/local/www/tree/t.gif create mode 100644 src/usr/local/www/tree/tree.css create mode 100644 src/usr/local/www/tree/tree.js create mode 100644 src/usr/local/www/treeview.css create mode 100644 src/usr/local/www/uploadconfig.php create mode 100644 src/usr/local/www/vpn_ipsec.php create mode 100644 src/usr/local/www/vpn_ipsec_keys.php create mode 100644 src/usr/local/www/vpn_ipsec_keys_edit.php create mode 100644 src/usr/local/www/vpn_ipsec_mobile.php create mode 100644 src/usr/local/www/vpn_ipsec_phase1.php create mode 100644 src/usr/local/www/vpn_ipsec_phase2.php create mode 100644 src/usr/local/www/vpn_ipsec_settings.php create mode 100644 src/usr/local/www/vpn_l2tp.php create mode 100644 src/usr/local/www/vpn_l2tp_users.php create mode 100644 src/usr/local/www/vpn_l2tp_users_edit.php create mode 100644 src/usr/local/www/vpn_openvpn_client.php create mode 100644 src/usr/local/www/vpn_openvpn_csc.php create mode 100644 src/usr/local/www/vpn_openvpn_server.php create mode 100644 src/usr/local/www/vpn_pppoe.php create mode 100644 src/usr/local/www/vpn_pppoe_edit.php create mode 100644 src/usr/local/www/vpn_pptp.php create mode 100644 src/usr/local/www/vpn_pptp_users.php create mode 100644 src/usr/local/www/vpn_pptp_users_edit.php create mode 100644 src/usr/local/www/widgets/include/captiveportal.inc create mode 100644 src/usr/local/www/widgets/include/carp_status.inc create mode 100644 src/usr/local/www/widgets/include/dyn_dns_status.inc create mode 100644 src/usr/local/www/widgets/include/gateways.inc create mode 100644 src/usr/local/www/widgets/include/gmirror_status.inc create mode 100644 src/usr/local/www/widgets/include/installed_packages.inc create mode 100644 src/usr/local/www/widgets/include/interface_statistics.inc create mode 100644 src/usr/local/www/widgets/include/interfaces.inc create mode 100644 src/usr/local/www/widgets/include/ipsec.inc create mode 100644 src/usr/local/www/widgets/include/load_balancer.inc create mode 100644 src/usr/local/www/widgets/include/log.inc create mode 100644 src/usr/local/www/widgets/include/ntp_status.inc create mode 100644 src/usr/local/www/widgets/include/openvpn.inc create mode 100644 src/usr/local/www/widgets/include/services_status.inc create mode 100644 src/usr/local/www/widgets/include/smart_status.inc create mode 100644 src/usr/local/www/widgets/include/thermal_sensors.inc create mode 100644 src/usr/local/www/widgets/include/traffic_graph.inc create mode 100644 src/usr/local/www/widgets/include/wake_on_lan.inc create mode 100644 src/usr/local/www/widgets/javascript/cpu_graphs.js create mode 100644 src/usr/local/www/widgets/javascript/ipsec.js create mode 100644 src/usr/local/www/widgets/javascript/thermal_sensors.js create mode 100644 src/usr/local/www/widgets/javascript/traffic_graph.js create mode 100644 src/usr/local/www/widgets/widgets/captive_portal_status.widget.php create mode 100644 src/usr/local/www/widgets/widgets/carp_status.widget.php create mode 100644 src/usr/local/www/widgets/widgets/deactivated/cpu_graphs.widget.php create mode 100644 src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php create mode 100644 src/usr/local/www/widgets/widgets/gateways.widget.php create mode 100644 src/usr/local/www/widgets/widgets/gmirror_status.widget.php create mode 100644 src/usr/local/www/widgets/widgets/installed_packages.widget.php create mode 100644 src/usr/local/www/widgets/widgets/interface_statistics.widget.php create mode 100644 src/usr/local/www/widgets/widgets/interfaces.widget.php create mode 100644 src/usr/local/www/widgets/widgets/ipsec.widget.php create mode 100644 src/usr/local/www/widgets/widgets/load_balancer_status.widget.php create mode 100644 src/usr/local/www/widgets/widgets/log.widget.php create mode 100644 src/usr/local/www/widgets/widgets/ntp_status.widget.php create mode 100644 src/usr/local/www/widgets/widgets/openvpn.widget.php create mode 100644 src/usr/local/www/widgets/widgets/picture.widget.php create mode 100644 src/usr/local/www/widgets/widgets/rss.widget.php create mode 100644 src/usr/local/www/widgets/widgets/services_status.widget.php create mode 100644 src/usr/local/www/widgets/widgets/smart_status.widget.php create mode 100644 src/usr/local/www/widgets/widgets/system_information.widget.php create mode 100644 src/usr/local/www/widgets/widgets/thermal_sensors.widget.php create mode 100644 src/usr/local/www/widgets/widgets/traffic_graphs.widget.php create mode 100644 src/usr/local/www/widgets/widgets/wake_on_lan.widget.php create mode 100644 src/usr/local/www/wizard.php create mode 100644 src/usr/local/www/wizards/openvpn_wizard.inc create mode 100644 src/usr/local/www/wizards/openvpn_wizard.xml create mode 100644 src/usr/local/www/wizards/setup_wizard.xml create mode 100644 src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc create mode 100755 src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml create mode 100644 src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc create mode 100755 src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml create mode 100755 src/usr/local/www/xmlrpc.php (limited to 'src/usr/local/www') diff --git a/src/usr/local/www/apple-touch-icon.png b/src/usr/local/www/apple-touch-icon.png new file mode 100755 index 0000000..7a4b975 Binary files /dev/null and b/src/usr/local/www/apple-touch-icon.png differ diff --git a/src/usr/local/www/bandwidth_by_ip.php b/src/usr/local/www/bandwidth_by_ip.php new file mode 100755 index 0000000..39f9a01 --- /dev/null +++ b/src/usr/local/www/bandwidth_by_ip.php @@ -0,0 +1,150 @@ + diff --git a/src/usr/local/www/carp_status.php b/src/usr/local/www/carp_status.php new file mode 100644 index 0000000..5f863e2 --- /dev/null +++ b/src/usr/local/www/carp_status.php @@ -0,0 +1,252 @@ + "") { + interfaces_carp_set_maintenancemode(!isset($config["virtualip_carp_maintenancemode"])); +} +if ($_POST['disablecarp'] <> "") { + if ($status > 0) { + set_single_sysctl('net.inet.carp.allow', '0'); + if (is_array($config['virtualip']['vip'])) { + $viparr = &$config['virtualip']['vip']; + $found_dhcpdv6 = false; + foreach ($viparr as $vip) { + $carp_iface = "{$vip['interface']}_vip{$vip['vhid']}"; + switch ($vip['mode']) { + case "carp": + interface_vip_bring_down($vip); + interface_ipalias_cleanup($carp_iface); + + /* + * Reconfigure radvd when necessary + * XXX: Is it the best way to do it? + */ + if (isset($config['dhcpdv6']) && is_array($config['dhcpdv6'])) { + foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) { + if ($dhcpv6ifconf['rainterface'] != $carp_iface) { + continue; + } + + services_radvd_configure(); + break; + } + } + + sleep(1); + break; + } + } + } + $savemsg = sprintf(gettext("%s IPs have been disabled. Please note that disabling does not survive a reboot and some configuration changes will re-enable."), $carp_counter); + $status = 0; + } else { + $savemsg = gettext("CARP has been enabled."); + if (is_array($config['virtualip']['vip'])) { + $viparr = &$config['virtualip']['vip']; + foreach ($viparr as $vip) { + switch ($vip['mode']) { + case "carp": + interface_carp_configure($vip); + sleep(1); + break; + case 'ipalias': + if (strpos($vip['interface'], '_vip')) { + interface_ipalias_configure($vip); + } + break; + } + } + } + interfaces_sync_setup(); + set_single_sysctl('net.inet.carp.allow', '1'); + $status = 1; + } +} + +$carp_detected_problems = get_single_sysctl("net.inet.carp.demotion"); + +if (!empty($_POST['resetdemotion'])) { + set_single_sysctl("net.inet.carp.demotion", "-{$carp_detected_problems}"); + sleep(1); + $carp_detected_problems = get_single_sysctl("net.inet.carp.demotion"); +} + +$pgtitle = array(gettext("Status"), gettext("CARP")); +$shortcut_section = "carp"; +include("head.inc"); + +?> + + + +
+ + + 0) { + print_info_box( + gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . "
" . + gettext("Check the link status on all interfaces with configured CARP VIPs.") . "
" . + gettext("Search the") . + " " . + gettext("system log") . + " " . + gettext("for CARP demotion-related events.") . "
" . + "" + ); + +} ?> + +
+ + + "; + $align = "style=\"vertical-align:middle\""; + if ($carp_enabled == false) { + $icon = "\"disabled\""; + $status = "DISABLED"; + } else { + if ($status == "MASTER") { + $icon = "\"master\""; + } else if ($status == "BACKUP") { + $icon = "\"backup\""; + } else if ($status == "INIT") { + $icon = "\"init\""; + } else { + $icon = ""; + } + } + echo ""; + echo ""; + echo ""; + echo ""; + } + } +?> +
+ 0) { + if ($status > 0) { + $carp_enabled = true; + echo ""; + } else { + $carp_enabled = false; + echo ""; + } + if (isset($config["virtualip_carp_maintenancemode"])) { + echo ""; + } else { + echo ""; + } + } +?> + +

+ + + + + + +

" . gettext("Could not locate any defined CARP interfaces."); + echo "
"; + + include("fend.inc"); + echo ""; + return; + } + if (is_array($config['virtualip']['vip'])) { + foreach ($config['virtualip']['vip'] as $carp) { + if ($carp['mode'] != "carp") { + continue; + } + $ipaddress = $carp['subnet']; + $vhid = $carp['vhid']; + $status = get_carp_interface_status("_vip{$carp['uniqid']}"); + echo "
" . convert_friendly_interface_to_friendly_descr($carp['interface']) . "@{$vhid}  " . $ipaddress . " {$icon}  " . $status . " 
+ + + +
+ + +

+: +
+ . +

+ +" . gettext("pfSync nodes") . ":
"; + echo "
";
+	system("/sbin/pfctl -vvss | /usr/bin/grep creator | /usr/bin/cut -d\" \" -f7 | /usr/bin/sort -u");
+	echo "
"; +?> + + + + + diff --git a/src/usr/local/www/classes/maintable.inc b/src/usr/local/www/classes/maintable.inc new file mode 100644 index 0000000..1478de8 --- /dev/null +++ b/src/usr/local/www/classes/maintable.inc @@ -0,0 +1,206 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: guiutils +*/ + + +class MainTable { + private $headers = array(); +// private $columns = array(); + private $columns = 0; + private $rows = 0; + private $content = array(); + private $edit_uri = ''; + private $my_uri = ''; + private $buttons = array('move' => false, 'edit' => false, 'del' => false, 'dup' => false); + + function add_column($header, $cname, $width) { +// $this->column[] = array('header' => $header, 'cname' => $cname, 'width' => $width) + $this->headers[] = $header; + $this->cname[] = $cname; + $this->width[] = $width; + $this->columns++; + } + + function add_content_array($rows) { + foreach ($rows as $row) { + $this->content[] = $row; + $this->rows++; + } + } + function add_button($name) { + if (isset($this->buttons[$name])) { + $this->buttons[$name] = true; + } + } + function edit_uri($uri) { + $this->edit_uri = $uri; + } + + function my_uri($uri) { + $this->my_uri = $uri; + } + + function display() { + echo "\n"; + echo "\n"; + echo " \n"; + echo $this->display_header(); + echo " \n"; + echo " \n"; + echo $this->display_rows(); + echo " \n"; + echo " \n"; + echo $this->display_footer(); + echo " \n"; + echo "
\n"; + echo "\n"; + } + + private function display_header() { + global $g; + echo "\n"; + for ($col = 0; $col < $this->columns - 1; $col++) { + echo " width[$col]}%\" class=\"listhdrr\">{$this->headers[$col]}\n"; + } + echo " width[$this->columns - 1]}%\" class=\"listhdr\">{$this->headers[$this->columns - 1]}\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
edit_uri}\">\"plus\"
\n"; + echo " \n"; + echo "\n"; + + } + private function display_rows() { + global $g; + $cur_row = 0; + $encode_cols = array("name", "descr"); + foreach ($this->content as $row) { + echo "\n"; + for ($col = 0; $col < $this->columns - 1; $col++) { + if ($col == 0) { + $cl = 'listlr'; + } else { + $cl = 'listr'; + } + echo " edit_uri}?id={$cur_row}'\">\n"; + if (is_array($row[$this->cname[$col]])) { + foreach ($row[$this->cname[$col]] as $data) { + if (in_array($this->cname[$col], $encode_cols)) { + $data = htmlspecialchars($data); + } + echo " {$data}
\n"; + } + } else { + if (in_array($this->cname[$col], $encode_cols)) { + $row[$this->cname[$col]] = htmlspecialchars($row[$this->cname[$col]]); + } + echo " " . $row[$this->cname[$col]] . "\n"; + } + echo " \n"; + } + echo " edit_uri}?id={$cur_row}'\">\n"; + echo " " . htmlspecialchars($row[$this->cname[$this->columns - 1]]) . "\n"; + echo " \n"; + echo " \n"; + $this->display_buttons($cur_row); + echo " \n"; + echo "\n"; + + $cur_row++; + } + } + private function display_footer() { + global $g; + echo "\n"; + echo " columns}\">\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
edit_uri}\">\"plus\"
\n"; + echo " \n"; + echo "\n"; + } + private function display_buttons($row) { + echo " \n"; + echo " \n"; + if ($this->buttons['move']) { + echo $this->display_button('move', $row); + } + if ($this->buttons['edit']) { + echo $this->display_button('edit', $row); + } + echo " \n"; + echo " \n"; + if ($this->buttons['del']) { + echo $this->display_button('del', $row); + } + if ($this->buttons['dup']) { + echo $this->display_button('dup', $row); + } + echo " \n"; + echo "
\n"; + } + private function display_button($button, $row) { + global $g; + echo ""; + switch ($button) { + case "move": { + echo ""; + break; + } + case "edit": { + echo "edit_uri}?id={$row}\">\"edit\""; + break; + } + case "del": { + echo "my_uri}?act=del&id={$row}\" onclick=\"return confirm('Do you really want to delete this entry?')\">\"delete\""; + break; + } + case "dup": { + echo "edit_uri}?act=dup&id={$row}\">\"duplicate\""; + break; + } + } + echo ""; + } + +} + +?> \ No newline at end of file diff --git a/src/usr/local/www/code-syntax-highlighter/SyntaxHighlighter.css b/src/usr/local/www/code-syntax-highlighter/SyntaxHighlighter.css new file mode 100644 index 0000000..413a034 --- /dev/null +++ b/src/usr/local/www/code-syntax-highlighter/SyntaxHighlighter.css @@ -0,0 +1,166 @@ + +/* Main style for the table */ + +.dp-highlighter { + width: 100%; + overflow: auto; + line-height: 100% !important; + margin: 18px 0px 18px 0px; +} + +.dp-highlighter table { + width: 100%; + margin: 2px 0px 2px 0px; + border-collapse: collapse; + border-bottom: 2px solid #eee; + background-color: #fff; +} + +.dp-highlighter td +{ + font-family: Courier New; + font-size: 11px; +} + +/* Styles for the tools */ + +.dp-highlighter .tools-corner { + background-color: #eee; + font-size: 9px; +} + +.dp-highlighter .tools { + background-color: #eee; + padding: 3px 8px 3px 0px; + border-bottom: 1px solid gray; + font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif; + color: silver; +} + +.dp-highlighter .tools a { + font-size: 9px; + color: gray; + text-decoration: none; +} + +.dp-highlighter .tools a:hover { + color: red; + text-decoration: underline; +} + +/* Gutter with line number */ + +.dp-highlighter .gutter { + padding-right: 5px; + padding-left: 10px; + width: 5px; + background-color: #eee; + border-right: 1px solid gray; + color: gray; + text-align: right; + vertical-align: top; +} + +/* Single line style */ + +.dp-highlighter .line { + padding-left: 10px; + border-bottom: 1px solid #F7F7F7; + white-space:nowrap; +} + +/* About dialog styles */ + +.dp-about { + background-color: #fff; + margin: 0px; +} + +.dp-about table { + width: 100%; + height: 100%; + font-size: 11px; + font-family: Tahoma, Verdana, Arial, sans-serif !important; +} + +.dp-about td { + padding: 10px; + vertical-align: top; +} + +.dp-about .copy { + border-bottom: 1px solid #ACA899; + height: 95%; +} + +.dp-about .title { + color: red; + font-weight: bold; +} + +.dp-about .para { + margin-bottom: 4px; +} + +.dp-about .footer { + background-color: #ECEADB; + border-top: 1px solid #fff; + text-align: right; +} + +.dp-about .close { + font-size: 11px; + font-family: Tahoma, Verdana, Arial, sans-serif !important; + background-color: #ECEADB; + width: 60px; + height: 22px; +} + +/* Language specific styles */ + +.dp-c {} +.dp-c .comment { color: green; } +.dp-c .string { color: blue; } +.dp-c .preprocessor { color: gray; } +.dp-c .keyword { color: blue; } +.dp-c .vars { color: #d00; } + +.dp-vb {} +.dp-vb .comment { color: green; } +.dp-vb .string { color: blue; } +.dp-vb .preprocessor { color: gray; } +.dp-vb .keyword { color: blue; } + +.dp-sql {} +.dp-sql .comment { color: green; } +.dp-sql .string { color: red; } +.dp-sql .keyword { color: blue; } +.dp-sql .func { color: #ff1493; } +.dp-sql .op { color: #808080; } + +.dp-xml {} +.dp-xml .cdata { color: #ff1493; } +.dp-xml .comments { color: green; } +.dp-xml .tag { color: blue; } +.dp-xml .tag-name { color: black; font-weight: bold; } +.dp-xml .attribute { color: red; } +.dp-xml .attribute-value { color: blue; } + +.dp-delphi {} +.dp-delphi .comment { color: #008200; font-style: italic; } +.dp-delphi .string { color: blue; } +.dp-delphi .number { color: blue; } +.dp-delphi .directive { color: #008284; } +.dp-delphi .keyword { font-weight: bold; color: navy; } +.dp-delphi .vars { color: #000; } + +.dp-py {} +.dp-py .comment { color: green; } +.dp-py .string { color: red; } +.dp-py .docstring { color: brown; } +.dp-py .keyword { color: blue; font-weight: bold;} +.dp-py .builtins { color: #ff1493; } +.dp-py .magicmethods { color: #808080; } +.dp-py .exceptions { color: brown; } +.dp-py .types { color: brown; font-style: italic; } +.dp-py .commonlibs { color: #8A2BE2; font-style: italic; } diff --git a/src/usr/local/www/code-syntax-highlighter/gpl.txt b/src/usr/local/www/code-syntax-highlighter/gpl.txt new file mode 100644 index 0000000..5b6e7c6 --- /dev/null +++ b/src/usr/local/www/code-syntax-highlighter/gpl.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/src/usr/local/www/code-syntax-highlighter/shBrushCSharp.js b/src/usr/local/www/code-syntax-highlighter/shBrushCSharp.js new file mode 100644 index 0000000..5743b93 --- /dev/null +++ b/src/usr/local/www/code-syntax-highlighter/shBrushCSharp.js @@ -0,0 +1,30 @@ +dp.sh.Brushes.CSharp = function() +{ + var keywords = 'abstract as base bool break byte case catch char checked class const ' + + 'continue decimal default delegate do double else enum event explicit ' + + 'extern false finally fixed float for foreach get goto if implicit in int ' + + 'interface internal is lock long namespace new null object operator out ' + + 'override params private protected public readonly ref return sbyte sealed set ' + + 'short sizeof stackalloc static string struct switch this throw true try ' + + 'typeof uint ulong unchecked unsafe ushort using virtual void while'; + + this.regexList = [ + // There's a slight problem with matching single line comments and figuring out + // a difference between // and ///. Using lookahead and lookbehind solves the + // problem, unfortunately JavaScript doesn't support lookbehind. So I'm at a + // loss how to translate that regular expression to JavaScript compatible one. +// { regex: new RegExp('(?) + | () + | (<)*(\w+)*\s*(\w+)\s*=\s*(".*?"|'.*?'|\w+)(/*>)* + | () + */ + var index = 0; + var match = null; + var regex = null; + + // Match CDATA in the following format + // <\!\[[\w\s]*?\[(.|\s)*?\]\]> + this.GetMatches(new RegExp('<\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\]>', 'gm'), 'cdata'); + + // Match comments + // + this.GetMatches(new RegExp('', 'gm'), 'comments'); + + // Match attributes and their values + // (\w+)\s*=\s*(".*?"|\'.*?\'|\w+)* + regex = new RegExp('([\\w-\.]+)\\s*=\\s*(".*?"|\'.*?\'|\\w+)*', 'gm'); + while((match = regex.exec(this.code)) != null) + { + push(this.matches, new dp.sh.Match(match[1], match.index, 'attribute')); + + // if xml is invalid and attribute has no property value, ignore it + if(match[2] != undefined) + { + push(this.matches, new dp.sh.Match(match[2], match.index + match[0].indexOf(match[2]), 'attribute-value')); + } + } + + // Match opening and closing tag brackets + // + this.GetMatches(new RegExp('', 'gm'), 'tag'); + + // Match tag names + // + * + * + * + * + * + * + ** + * History: + * 1.1.0 - March 23rd, 2005 + * - split brushes into separate files + * - now works in Safari + * - added missing strings to PHP matches + * + * 1.0.4 - February 2nd, 2005 + * - added Delphi & Python + * - multi-line comments fixed + * - language name can be set through w3c valid 'class' attribute + * - HighlightAll(name, [showGutter], [showTools]) + * + * 1.0.3 - December 31th, 2004 (added PHP & SQL) + * 1.0.2 - December 28th, 2004 (refactoring with namespaces) + * 1.0.1 - December 14th, 2004 + * 1.0.0 - November 13th, 2004 + */ + +// create namespaces +var dp = { + sh : // dp.sh + { + Utils : {}, // dp.sh.Utils + Brushes : {} // dp.sh.Brushes + } +}; + +dp.sh.Config = { + Version : '1.1.0', + About : 'About...
dp.SyntaxHighlighter
Version: {V}
©2004-2005 Dream Projections Inc. All right reserved.
' +}; + +dp.SyntaxHighlighter = dp.sh; + + + +// opens a new windows and puts the original unformatted source code inside. +dp.sh.Utils.ViewSource = function(sender) +{ + var code = sender.parentNode.originalCode; + var wnd = window.open('', '_blank', 'width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=1'); + + code = code.replace(/' + code + ''); + wnd.document.close(); +} + +// copies the original source code in to the clipboard (IE only) +dp.sh.Utils.ToClipboard = function(sender) +{ + var code = sender.parentNode.originalCode; + + // This works only for IE. There's a way to make it work with Mozilla as well, + // but it requires security settings changed on the client, which isn't by + // default, so 99% of users won't have it working anyways. + if(window.clipboardData) + { + window.clipboardData.setData('text', code); + + alert('The code is in your clipboard now.'); + } +} + +// creates an invisible iframe, puts the original source code inside and prints it +dp.sh.Utils.PrintSource = function(sender) +{ + var td = sender.parentNode; + var code = td.processedCode; + var iframe = document.createElement('iframe'); + var doc = null; + var wnd = + + // this hides the iframe + iframe.style.cssText = 'position:absolute; width:0px; height:0px; left:-5px; top:-5px;'; + + td.appendChild(iframe); + + doc = iframe.contentWindow.document; + code = code.replace(/' + code + ''); + doc.close(); + + iframe.contentWindow.focus(); + iframe.contentWindow.print(); + + td.removeChild(iframe); +} + +dp.sh.Utils.About = function() +{ + var wnd = window.open('', '_blank', 'dialog, width=320, height=150'); + var doc = wnd.document; + + var styles = document.getElementsByTagName('style'); + var links = document.getElementsByTagName('link'); + + doc.write(dp.sh.Config.About.replace('{V}', dp.sh.Config.Version)); + + // copy over ALL the styles from the parent page + for(var i = 0; i < styles.length; i++) + doc.write(''); + + for(var i = 0; i < links.length; i++) + if(links[i].rel.toLowerCase() == 'stylesheet') + doc.write(''); + + doc.close(); + wnd.focus(); +} + + + + + +// creates a new match object +dp.sh.Match = function(value, index, css) +{ + this.value = value; + this.index = index; + this.length = value.length; + this.css = css; +} + + + + + +dp.sh.Highlighter = function() +{ + this.addGutter = true; + this.addControls = true; + this.tabsToSpaces = true; +} + +// static callback for the match sorting +dp.sh.Highlighter.SortCallback = function(m1, m2) +{ + // sort matches by index first + if(m1.index < m2.index) + return -1; + else if(m1.index > m2.index) + return 1; + else + { + // if index is the same, sort by length + if(m1.length < m2.length) + return -1; + else if(m1.length > m2.length) + return 1; + } + return 0; +} + +// gets a list of all matches for a given regular expression +dp.sh.Highlighter.prototype.GetMatches = function(regex, css) +{ + var index = 0; + var match = null; + + while((match = regex.exec(this.code)) != null) + { + this.matches[this.matches.length] = new dp.sh.Match(match[0], match.index, css); + } +} + +dp.sh.Highlighter.prototype.AddBit = function(str, css) +{ + var span = document.createElement('span'); + + str = str.replace(/&/g, '&'); + str = str.replace(/ /g, ' '); + str = str.replace(/'); + + // when adding a piece of code, check to see if it has line breaks in it + // and if it does, wrap individual line breaks with span tags + if(css != null) + { + var regex = new RegExp('
', 'gi'); + + if(regex.test(str)) + { + var lines = str.split(' 
'); + + str = ''; + + for(var i = 0; i < lines.length; i++) + { + span = document.createElement('span'); + span.className = css; + span.innerHTML = lines[i]; + + this.div.appendChild(span); + + // don't add a
for the last line + if(i + 1 < lines.length) + { + this.div.appendChild(document.createElement('br')); + } + } + } + else + { + span.className = css; + span.innerHTML = str; + this.div.appendChild(span); + } + } + else + { + span.innerHTML = str; + this.div.appendChild(span); + } +} + +// checks if one match is inside another +dp.sh.Highlighter.prototype.IsInside = function(match) +{ + if(match == null || match.length == 0) + { + return; + } + + for(var i = 0; i < this.matches.length; i++) + { + var c = this.matches[i]; + + if(c == null) + { + continue; + } + + if((match.index > c.index) && (match.index <= c.index + c.length)) + { + return true; + } + } + + return false; +} + +dp.sh.Highlighter.prototype.ProcessRegexList = function() +{ + for(var i = 0; i < this.regexList.length; i++) + { + this.GetMatches(this.regexList[i].regex, this.regexList[i].css); + } +} + +dp.sh.Highlighter.prototype.ProcessSmartTabs = function(code) +{ + var lines = code.split('\n'); + var result = ''; + var tabSize = 4; + var tab = '\t'; + + // This function inserts specified amount of spaces in the string + // where a tab is while removing that given tab. + function InsertSpaces(line, pos, count) + { + var left = line.substr(0, pos); + var right = line.substr(pos + 1, line.length); // pos + 1 will get rid of the tab + var spaces = ''; + + for(var i = 0; i < count; i++) + { + spaces += ' '; + } + + return left + spaces + right; + } + + // This function process one line for 'smart tabs' + function ProcessLine(line, tabSize) + { + if(line.indexOf(tab) == -1) + { + return line; + } + + var pos = 0; + + while((pos = line.indexOf(tab)) != -1) + { + // This is pretty much all there is to the 'smart tabs' logic. + // Based on the position within the line and size of a tab, + // calculate the amount of spaces we need to insert. + var spaces = tabSize - pos % tabSize; + + line = InsertSpaces(line, pos, spaces); + } + + return line; + } + + // Go through all the lines and do the 'smart tabs' magic. + for(var i = 0; i < lines.length; i++) + { + var line = lines[i]; + result += ProcessLine(line, tabSize) + '\n'; + } + + return result; +} + +dp.sh.Highlighter.prototype.SwitchToTable = function() +{ + // Safari fix: for some reason lowercase
isn't getting picked up, even though 'i' is set + var lines = this.div.innerHTML.split(/
/gi); + var row = null; + var cell = null; + var html = ''; + var pipe = ' | '; + + // creates an anchor to a utility + function UtilHref(util, text) + { + return '' + text + ''; + } + + row = this.table.insertRow(-1); + + if(this.addGutter == true) + { + cell = row.insertCell(-1); + cell.className = 'tools-corner'; + } + + if(this.addControls == true) + { + cell = row.insertCell(-1); + + cell.originalCode = this.originalCode; + cell.processedCode = this.code; + + cell.className = 'tools'; + cell.innerHTML = UtilHref('ViewSource', 'view plain') + pipe + UtilHref('PrintSource', 'print'); + + if(window.clipboardData) + { + cell.innerHTML += pipe + UtilHref('ToClipboard', 'copy to clipboard'); + } + + cell.innerHTML += pipe + UtilHref('About', '?'); + } + + for(var i = 0; i < lines.length - 1; i++) + { + row = this.table.insertRow(-1); + + if(this.addGutter == true) + { + cell = row.insertCell(-1); + cell.className = 'gutter'; + cell.innerHTML = i + 1; + } + + cell = row.insertCell(-1); + cell.className = 'line'; + cell.innerHTML = lines[i]; + } + + this.div.innerHTML = ''; +} + +dp.sh.Highlighter.prototype.Highlight = function(code) +{ + // This function strips all new lines and spaces + // from the beging and end of the string . + function Trim(str) + { + var begining = new RegExp('^[\\s\\n]', 'g'); + var end = new RegExp('[\\s\\n]$', 'g'); + + while(begining.test(str)) + { + str = str.substr(1); + } + + while(end.test(str)) + { + str = str.substr(0, str.length - 1); + } + + return str; + } + + // This function returns a portions of the string + // from pos1 to pos2 inclusive. + function Copy(string, pos1, pos2) + { + return string.substr(pos1, pos2 - pos1); + } + + var pos = 0; + + this.originalCode = code; + this.code = Trim(code); + this.div = document.createElement('div'); + this.table = document.createElement('table'); + this.matches = new Array(); + + if(this.CssClass != null) + { + this.table.className = this.CssClass; + } + + // replace tabs with spaces + if(this.tabsToSpaces == true) + { + this.code = this.ProcessSmartTabs(this.code); + } + + this.table.border = 0; + this.table.cellSpacing = 0; + this.table.cellPadding = 0; + + this.ProcessRegexList(); + + // if no matches found, do nothing + if(this.matches.length == 0) + { + return; + } + + // sort the matches + this.matches = this.matches.sort(dp.sh.Highlighter.SortCallback); + + // The following loop checks to see if any of the matches are inside + // of other matches. This process would get rid of highligting strings + // inside comments, keywords inside strings and so on. + for(var i = 0; i < this.matches.length; i++) + { + if(this.IsInside(this.matches[i])) + { + this.matches[i] = null; + } + } + + // Finally, go through the final list of matches and pull the all + // together adding everything in between that isn't a match. + for(var i = 0; i < this.matches.length; i++) + { + var match = this.matches[i]; + + if(match == null || match.length == 0) + { + continue; + } + + this.AddBit(Copy(this.code, pos, match.index), null); + this.AddBit(match.value, match.css); + + pos = match.index + match.length; + } + + this.AddBit(this.code.substr(pos), null); + + this.SwitchToTable(); +} + +dp.sh.Highlighter.prototype.GetKeywords = function(str) +{ + return '\\b' + str.replace(/ /g, '\\b|\\b') + '\\b'; +} + +// highlightes all elements identified by name and gets source code from specified property +dp.sh.HighlightAll = function(name, showGutter /* optional */, showControls /* optional */) +{ + var elements = document.getElementsByName(name); + var highlighter = null; + var registered = new Object(); + var propertyName = 'value'; + + function FindValue() + { + var a = arguments; + + for(var i = 0; i < a.length; i++) + if(a[i] != null && ((typeof(a[i]) == 'string' && a[i] != '') || (typeof(a[i]) == 'object' && a[i].value != ''))) + return a[i]; + + return null; + } + + if(elements == null) + { + return; + } + + // if showGutter isn't set, default to TRUE + if(showGutter == null) + { + showGutter = true; + } + + // if showControls isn't set, default to TRUE + if(showControls == null) + { + showControls = true; + } + + // register all brushes + for(var brush in dp.sh.Brushes) + { + var aliases = dp.sh.Brushes[brush].Aliases; + + if(aliases == null) + { + continue; + } + + for(var i = 0; i < aliases.length; i++) + { + registered[aliases[i]] = brush; + } + } + + for(var i = 0; i < elements.length; i++) + { + var element = elements[i]; + var language = FindValue(element.attributes['class'], element.className, element.attributes['language'], element.language); + + if(language == null) + continue; + + if(language.value) + language = language.value; + + language = (language + '').toLowerCase(); + + if(registered[language] == null) + { + continue; + } + + // instantiate a brush + highlighter = new dp.sh.Brushes[registered[language]](); + + // hide the original element + element.style.display = 'none'; + + highlighter.addGutter = showGutter; + highlighter.addControls = showControls; + highlighter.Highlight(element[propertyName]); + + // place the result table inside a div + var div = document.createElement('div'); + + div.className = 'dp-highlighter'; + div.appendChild(highlighter.table); + + element.parentNode.insertBefore(div, element); + } +} diff --git a/src/usr/local/www/code-syntax-highlighter/shCore.uncompressed.js b/src/usr/local/www/code-syntax-highlighter/shCore.uncompressed.js new file mode 100644 index 0000000..8d92721 --- /dev/null +++ b/src/usr/local/www/code-syntax-highlighter/shCore.uncompressed.js @@ -0,0 +1,636 @@ +/** + * Code Syntax Highlighter. + * Version 1.3.0 + * Copyright (C) 2004 Alex Gorbatchev. + * http://www.dreamprojections.com/syntaxhighlighter/ + * + * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General + * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +// +// create namespaces +// +var dp = { + sh : + { + Toolbar : {}, + Utils : {}, + RegexLib: {}, + Brushes : {}, + Strings : {}, + Version : '1.4.1' + } +}; + +dp.sh.Strings = { + AboutDialog : 'About...

dp.SyntaxHighlighter

Version: {V}

http://www.dreamprojections.com/SyntaxHighlighter

©2004-2005 Alex Gorbatchev. All right reserved.
' +}; + +dp.SyntaxHighlighter = dp.sh; + +// +// Toolbar functions +// + +dp.sh.Toolbar.Commands = { + ExpandSource: { + label: '+ expand source', + check: function(highlighter) { return highlighter.collapse; }, + func: function(sender, highlighter) + { + sender.parentNode.removeChild(sender); + highlighter.div.className = highlighter.div.className.replace('collapsed', ''); + } + }, + + // opens a new windows and puts the original unformatted source code inside. + ViewSource: { + label: 'view plain', + func: function(sender, highlighter) + { + var code = highlighter.originalCode.replace(/' + code + ''); + wnd.document.close(); + } + }, + + // copies the original source code in to the clipboard (IE only) + CopyToClipboard: { + label: 'copy to clipboard', + check: function() { return window.clipboardData != null; }, + func: function(sender, highlighter) + { + window.clipboardData.setData('text', highlighter.originalCode); + alert('The code is in your clipboard now'); + } + }, + + // creates an invisible iframe, puts the original source code inside and prints it + PrintSource: { + label: 'print', + func: function(sender, highlighter) + { + var iframe = document.createElement('IFRAME'); + var doc = null; + + // this hides the iframe + iframe.style.cssText = 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;'; + + document.body.appendChild(iframe); + doc = iframe.contentWindow.document; + + dp.sh.Utils.CopyStyles(doc, window.document); + doc.write('
' + highlighter.div.innerHTML + '
'); + doc.close(); + + iframe.contentWindow.focus(); + iframe.contentWindow.print(); + + alert('Printing...'); + + document.body.removeChild(iframe); + } + }, + + About: { + label: '?', + func: function(highlighter) + { + var wnd = window.open('', '_blank', 'dialog,width=300,height=150,scrollbars=0'); + var doc = wnd.document; + + dp.sh.Utils.CopyStyles(doc, window.document); + + doc.write(dp.sh.Strings.AboutDialog.replace('{V}', dp.sh.Version)); + doc.close(); + wnd.focus(); + } + } +}; + +// creates a
with all toolbar links +dp.sh.Toolbar.Create = function(highlighter) +{ + var div = document.createElement('div'); + + div.className = 'tools'; + + for(var name in dp.sh.Toolbar.Commands) + { + var cmd = dp.sh.Toolbar.Commands[name]; + + if(cmd.check != null && !cmd.check(highlighter)) + continue; + + div.innerHTML += '' + cmd.label + ''; + } + + return div; +} + +// executes toolbar command by name +dp.sh.Toolbar.Command = function(name, sender) +{ + var n = sender; + + while(n != null && n.className.indexOf('dp-highlighter') == -1) + n = n.parentNode; + + if(n != null) + dp.sh.Toolbar.Commands[name].func(sender, n.highlighter); +} + +// copies all from 'target' window to 'dest' +dp.sh.Utils.CopyStyles = function(destDoc, sourceDoc) +{ + var links = sourceDoc.getElementsByTagName('link'); + + for(var i = 0; i < links.length; i++) + if(links[i].rel.toLowerCase() == 'stylesheet') + destDoc.write(''); +} + +// +// Common reusable regular expressions +// +dp.sh.RegexLib = { + MultiLineCComments : new RegExp('/\\*[\\s\\S]*?\\*/', 'gm'), + SingleLineCComments : new RegExp('//.*$', 'gm'), + SingleLinePerlComments : new RegExp('#.*$', 'gm'), + DoubleQuotedString : new RegExp('"(?:\\.|(\\\\\\")|[^\\""])*"','g'), + SingleQuotedString : new RegExp("'(?:\\.|(\\\\\\')|[^\\''])*'", 'g') +}; + +// +// Match object +// +dp.sh.Match = function(value, index, css) +{ + this.value = value; + this.index = index; + this.length = value.length; + this.css = css; +} + +// +// Highlighter object +// +dp.sh.Highlighter = function() +{ + this.noGutter = false; + this.addControls = true; + this.collapse = false; + this.tabsToSpaces = true; + this.wrapColumn = 80; + this.showColumns = true; +} + +// static callback for the match sorting +dp.sh.Highlighter.SortCallback = function(m1, m2) +{ + // sort matches by index first + if(m1.index < m2.index) + return -1; + else if(m1.index > m2.index) + return 1; + else + { + // if index is the same, sort by length + if(m1.length < m2.length) + return -1; + else if(m1.length > m2.length) + return 1; + } + return 0; +} + +dp.sh.Highlighter.prototype.createElement = function(name) +{ + var result = document.createElement(name); + result.highlighter = this; + return result; +} + +// gets a list of all matches for a given regular expression +dp.sh.Highlighter.prototype.GetMatches = function(regex, css) +{ + var index = 0; + var match = null; + + while((match = regex.exec(this.code)) != null) + this.matches[this.matches.length] = new dp.sh.Match(match[0], match.index, css); +} + +dp.sh.Highlighter.prototype.AddBit = function(str, css) +{ + if(str == null || str.length == 0) + return; + + var span = this.createElement('span'); + + str = str.replace(/&/g, '&'); + str = str.replace(/ /g, ' '); + str = str.replace(/'); + + // when adding a piece of code, check to see if it has line breaks in it + // and if it does, wrap individual line breaks with span tags + if(css != null) + { + var regex = new RegExp('
', 'gi'); + + if(regex.test(str)) + { + var lines = str.split(' 
'); + + str = ''; + + for(var i = 0; i < lines.length; i++) + { + span = this.createElement('span'); + span.className = css; + span.innerHTML = lines[i]; + + this.div.appendChild(span); + + // don't add a
for the last line + if(i + 1 < lines.length) + this.div.appendChild(this.createElement('br')); + } + } + else + { + span.className = css; + span.innerHTML = str; + this.div.appendChild(span); + } + } + else + { + span.innerHTML = str; + this.div.appendChild(span); + } +} + +// checks if one match is inside any other match +dp.sh.Highlighter.prototype.IsInside = function(match) +{ + if(match == null || match.length == 0) + return false; + + for(var i = 0; i < this.matches.length; i++) + { + var c = this.matches[i]; + + if(c == null) + continue; + + if((match.index > c.index) && (match.index < c.index + c.length)) + return true; + } + + return false; +} + +dp.sh.Highlighter.prototype.ProcessRegexList = function() +{ + for(var i = 0; i < this.regexList.length; i++) + this.GetMatches(this.regexList[i].regex, this.regexList[i].css); +} + +dp.sh.Highlighter.prototype.ProcessSmartTabs = function(code) +{ + var lines = code.split('\n'); + var result = ''; + var tabSize = 4; + var tab = '\t'; + + // This function inserts specified amount of spaces in the string + // where a tab is while removing that given tab. + function InsertSpaces(line, pos, count) + { + var left = line.substr(0, pos); + var right = line.substr(pos + 1, line.length); // pos + 1 will get rid of the tab + var spaces = ''; + + for(var i = 0; i < count; i++) + spaces += ' '; + + return left + spaces + right; + } + + // This function process one line for 'smart tabs' + function ProcessLine(line, tabSize) + { + if(line.indexOf(tab) == -1) + return line; + + var pos = 0; + + while((pos = line.indexOf(tab)) != -1) + { + // This is pretty much all there is to the 'smart tabs' logic. + // Based on the position within the line and size of a tab, + // calculate the amount of spaces we need to insert. + var spaces = tabSize - pos % tabSize; + + line = InsertSpaces(line, pos, spaces); + } + + return line; + } + + // Go through all the lines and do the 'smart tabs' magic. + for(var i = 0; i < lines.length; i++) + result += ProcessLine(lines[i], tabSize) + '\n'; + + return result; +} + +dp.sh.Highlighter.prototype.SwitchToList = function() +{ + // thanks to Lachlan Donald from SitePoint.com for this
tag fix. + var html = this.div.innerHTML.replace(/<(br)\/?>/gi, '\n'); + var lines = html.split('\n'); + + if(this.addControls == true) + this.bar.appendChild(dp.sh.Toolbar.Create(this)); + + // add columns ruler + if(this.showColumns) + { + var div = this.createElement('div'); + var columns = this.createElement('div'); + var showEvery = 10; + var i = 1; + + while(i <= 150) + { + if(i % showEvery == 0) + { + div.innerHTML += i; + i += (i + '').length; + } + else + { + div.innerHTML += '·'; + i++; + } + } + + columns.className = 'columns'; + columns.appendChild(div); + this.bar.appendChild(columns); + } + + for(var i = 0, lineIndex = this.firstLine; i < lines.length - 1; i++, lineIndex++) + { + var li = this.createElement('li'); + var span = this.createElement('span'); + + // uses .line1 and .line2 css styles for alternating lines + li.className = (i % 2 == 0) ? 'alt' : ''; + span.innerHTML = lines[i] + ' '; + + li.appendChild(span); + this.ol.appendChild(li); + } + + this.div.innerHTML = ''; +} + +dp.sh.Highlighter.prototype.Highlight = function(code) +{ + function Trim(str) + { + return str.replace(/^\s*(.*?)[\s\n]*$/g, '$1'); + } + + function Chop(str) + { + return str.replace(/\n*$/, '').replace(/^\n*/, ''); + } + + function Unindent(str) + { + var lines = str.split('\n'); + var indents = new Array(); + var regex = new RegExp('^\\s*', 'g'); + var min = 1000; + + // go through every line and check for common number of indents + for(var i = 0; i < lines.length && min > 0; i++) + { + if(Trim(lines[i]).length == 0) + continue; + + var matches = regex.exec(lines[i]); + + if(matches != null && matches.length > 0) + min = Math.min(matches[0].length, min); + } + + // trim minimum common number of white space from the begining of every line + if(min > 0) + for(var i = 0; i < lines.length; i++) + lines[i] = lines[i].substr(min); + + return lines.join('\n'); + } + + // This function returns a portions of the string from pos1 to pos2 inclusive + function Copy(string, pos1, pos2) + { + return string.substr(pos1, pos2 - pos1); + } + + var pos = 0; + + this.originalCode = code; + this.code = Chop(Unindent(code)); + this.div = this.createElement('div'); + this.bar = this.createElement('div'); + this.ol = this.createElement('ol'); + this.matches = new Array(); + + this.div.className = 'dp-highlighter'; + this.div.highlighter = this; + + this.bar.className = 'bar'; + + // set the first line + this.ol.start = this.firstLine; + + if(this.CssClass != null) + this.ol.className = this.CssClass; + + if(this.collapse) + this.div.className += ' collapsed'; + + if(this.noGutter) + this.div.className += ' nogutter'; + + // replace tabs with spaces + if(this.tabsToSpaces == true) + this.code = this.ProcessSmartTabs(this.code); + + this.ProcessRegexList(); + + // if no matches found, add entire code as plain text + if(this.matches.length == 0) + { + this.AddBit(this.code, null); + this.SwitchToList(); + this.div.appendChild(this.ol); + return; + } + + // sort the matches + this.matches = this.matches.sort(dp.sh.Highlighter.SortCallback); + + // The following loop checks to see if any of the matches are inside + // of other matches. This process would get rid of highligted strings + // inside comments, keywords inside strings and so on. + for(var i = 0; i < this.matches.length; i++) + if(this.IsInside(this.matches[i])) + this.matches[i] = null; + + // Finally, go through the final list of matches and pull the all + // together adding everything in between that isn't a match. + for(var i = 0; i < this.matches.length; i++) + { + var match = this.matches[i]; + + if(match == null || match.length == 0) + continue; + + this.AddBit(Copy(this.code, pos, match.index), null); + this.AddBit(match.value, match.css); + + pos = match.index + match.length; + } + + this.AddBit(this.code.substr(pos), null); + + this.SwitchToList(); + this.div.appendChild(this.bar); + this.div.appendChild(this.ol); +} + +dp.sh.Highlighter.prototype.GetKeywords = function(str) +{ + return '\\b' + str.replace(/ /g, '\\b|\\b') + '\\b'; +} + +// highlightes all elements identified by name and gets source code from specified property +dp.sh.HighlightAll = function(name, showGutter /* optional */, showControls /* optional */, collapseAll /* optional */, firstLine /* optional */, showColumns /* optional */) +{ + function FindValue() + { + var a = arguments; + + for(var i = 0; i < a.length; i++) + { + if(a[i] == null) + continue; + + if(typeof(a[i]) == 'string' && a[i] != '') + return a[i] + ''; + + if(typeof(a[i]) == 'object' && a[i].value != '') + return a[i].value + ''; + } + + return null; + } + + function IsOptionSet(value, list) + { + for(var i = 0; i < list.length; i++) + if(list[i] == value) + return true; + + return false; + } + + function GetOptionValue(name, list, defaultValue) + { + var regex = new RegExp('^' + name + '\\[(\\w+)\\]$', 'gi'); + var matches = null; + + for(var i = 0; i < list.length; i++) + if((matches = regex.exec(list[i])) != null) + return matches[1]; + + return defaultValue; + } + + var elements = document.getElementsByName(name); + var highlighter = null; + var registered = new Object(); + var propertyName = 'value'; + + // if no code blocks found, leave + if(elements == null) + return; + + // register all brushes + for(var brush in dp.sh.Brushes) + { + var aliases = dp.sh.Brushes[brush].Aliases; + + if(aliases == null) + continue; + + for(var i = 0; i < aliases.length; i++) + registered[aliases[i]] = brush; + } + + for(var i = 0; i < elements.length; i++) + { + var element = elements[i]; + var options = FindValue( + element.attributes['class'], element.className, + element.attributes['language'], element.language + ); + var language = ''; + + if(options == null) + continue; + + options = options.split(':'); + + language = options[0].toLowerCase(); + + if(registered[language] == null) + continue; + + // instantiate a brush + highlighter = new dp.sh.Brushes[registered[language]](); + + // hide the original element + element.style.display = 'none'; + + highlighter.noGutter = (showGutter == null) ? IsOptionSet('nogutter', options) : !showGutter; + highlighter.addControls = (showControls == null) ? !IsOptionSet('nocontrols', options) : showControls; + highlighter.collapse = (collapseAll == null) ? IsOptionSet('collapse', options) : collapseAll; + highlighter.showColumns = (showColumns == null) ? IsOptionSet('showcolumns', options) : showColumns; + + // first line idea comes from Andrew Collington, thanks! + highlighter.firstLine = (firstLine == null) ? parseInt(GetOptionValue('firstline', options, 1)) : firstLine; + + highlighter.Highlight(element[propertyName]); + + element.parentNode.insertBefore(highlighter.div, element); + } +} diff --git a/src/usr/local/www/crash_reporter.php b/src/usr/local/www/crash_reporter.php new file mode 100644 index 0000000..3b00e47 --- /dev/null +++ b/src/usr/local/www/crash_reporter.php @@ -0,0 +1,156 @@ +" . gettext("Unfortunately we have detected a programming bug.") . "

"; + echo "

" . gettext("Would you like to submit the programming debug logs to the pfSense developers for inspection?") . "

"; + echo "

" . gettext("Please double check the contents to ensure you are comfortable sending this information before clicking Yes.") . "

"; + echo "

" . gettext("Contents of crash reports") . ":
"; + echo "

"; + echo "

" . gettext(" - Submit this to the developers for inspection") . "

"; + echo "

" . gettext(" - Just delete the crash report and take me back to the Dashboard") . "

"; + echo ""; +} + +$pgtitle = array(gettext("Diagnostics"), gettext("Crash reporter")); +include('head.inc'); + +$crash_report_header = "Crash report begins. Anonymous machine information:\n\n"; +$crash_report_header .= php_uname("m") . "\n"; +$crash_report_header .= php_uname("r") . "\n"; +$crash_report_header .= php_uname("v") . "\n"; +$crash_report_header .= "\nCrash report details:\n"; + +exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors); + +?> + + + + + +
+ +"; + echo gettext("Uploading..."); + ob_flush(); + flush(); + if (is_array($files_to_upload)) { + $resp = upload_crash_report($files_to_upload); + array_map('unlink', glob("/var/crash/*")); + // Erase the contents of the PHP error log + fclose(fopen("/tmp/PHP_errors.log", 'w')); + echo "
"; + print_r($resp); + echo "

" . gettext("Continue") . "" . gettext(" and delete crash report files from local disk.") . "

"; + } else { + echo "Could not find any crash files."; + } + } else if (gettext($_POST['Submit']) == "No") { + array_map('unlink', glob("/var/crash/*")); + // Erase the contents of the PHP error log + fclose(fopen("/tmp/PHP_errors.log", 'w')); + header("Location: /"); + exit; + } else { + $crash_files = glob("/var/crash/*"); + $crash_reports = $crash_report_header; + if (count($php_errors) > 0) { + $crash_reports .= "\nPHP Errors:\n"; + $crash_reports .= implode("\n", $php_errors) . "\n\n"; + } + if (is_array($crash_files)) { + foreach ($crash_files as $cf) { + if (filesize($cf) < FILE_SIZE) { + $crash_reports .= "\nFilename: {$cf}\n"; + $crash_reports .= file_get_contents($cf); + } + } + } else { + echo "Could not locate any crash data."; + } + output_crash_reporter_html($crash_reports); + } +?> + + + + + diff --git a/src/usr/local/www/csrf/csrf-magic.js b/src/usr/local/www/csrf/csrf-magic.js new file mode 100644 index 0000000..d358b0f --- /dev/null +++ b/src/usr/local/www/csrf/csrf-magic.js @@ -0,0 +1,186 @@ +/** + * @file + * + * Rewrites XMLHttpRequest to automatically send CSRF token with it. In theory + * plays nice with other JavaScript libraries, needs testing though. + */ + +// Here are the basic overloaded method definitions +// The wrapper must be set BEFORE onreadystatechange is written to, since +// a bug in ActiveXObject prevents us from properly testing for it. +CsrfMagic = function(real) { + // try to make it ourselves, if you didn't pass it + if (!real) try { real = new XMLHttpRequest; } catch (e) {;} + if (!real) try { real = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) {;} + if (!real) try { real = new ActiveXObject('Microsoft.XMLHTTP'); } catch (e) {;} + if (!real) try { real = new ActiveXObject('Msxml2.XMLHTTP.4.0'); } catch (e) {;} + this.csrf = real; + // properties + var csrfMagic = this; + real.onreadystatechange = function() { + csrfMagic._updateProps(); + return csrfMagic.onreadystatechange ? csrfMagic.onreadystatechange() : null; + }; + csrfMagic._updateProps(); +} + +CsrfMagic.prototype = { + + open: function(method, url, async, username, password) { + if (method == 'POST') this.csrf_isPost = true; + // deal with Opera bug, thanks jQuery + if (username) return this.csrf_open(method, url, async, username, password); + else return this.csrf_open(method, url, async); + }, + csrf_open: function(method, url, async, username, password) { + if (username) return this.csrf.open(method, url, async, username, password); + else return this.csrf.open(method, url, async); + }, + + send: function(data) { + if (!this.csrf_isPost) return this.csrf_send(data); + prepend = csrfMagicName + '=' + csrfMagicToken + '&'; + if (this.csrf_purportedLength === undefined) { + this.csrf_setRequestHeader("Content-length", this.csrf_purportedLength + prepend.length); + delete this.csrf_purportedLength; + } + delete this.csrf_isPost; + return this.csrf_send(prepend + data); + }, + csrf_send: function(data) { + return this.csrf.send(data); + }, + + setRequestHeader: function(header, value) { + // We have to auto-set this at the end, since we don't know how long the + // nonce is when added to the data. + if (this.csrf_isPost && header == "Content-length") { + this.csrf_purportedLength = value; + return; + } + return this.csrf_setRequestHeader(header, value); + }, + csrf_setRequestHeader: function(header, value) { + return this.csrf.setRequestHeader(header, value); + }, + + abort: function() { + return this.csrf.abort(); + }, + getAllResponseHeaders: function() { + return this.csrf.getAllResponseHeaders(); + }, + getResponseHeader: function(header) { + return this.csrf.getResponseHeader(header); + } // , +} + +// proprietary +CsrfMagic.prototype._updateProps = function() { + this.readyState = this.csrf.readyState; + if (this.readyState == 4) { + this.responseText = this.csrf.responseText; + this.responseXML = this.csrf.responseXML; + this.status = this.csrf.status; + this.statusText = this.csrf.statusText; + } +} +CsrfMagic.process = function(base) { + var prepend = csrfMagicName + '=' + csrfMagicToken; + if (base) return prepend + '&' + base; + return prepend; +} +// callback function for when everything on the page has loaded +CsrfMagic.end = function() { + // This rewrites forms AGAIN, so in case buffering didn't work this + // certainly will. + forms = document.getElementsByTagName('form'); + for (var i = 0; i < forms.length; i++) { + form = forms[i]; + if (form.method.toUpperCase() !== 'POST') continue; + if (form.elements[csrfMagicName]) continue; + var input = document.createElement('input'); + input.setAttribute('name', csrfMagicName); + input.setAttribute('value', csrfMagicToken); + input.setAttribute('type', 'hidden'); + form.appendChild(input); + } +} + +// Sets things up for Mozilla/Opera/nice browsers +// We very specifically match against Internet Explorer, since they haven't +// implemented prototypes correctly yet. +if (window.XMLHttpRequest && window.XMLHttpRequest.prototype && '\v' != 'v') { + var x = XMLHttpRequest.prototype; + var c = CsrfMagic.prototype; + + // Save the original functions + x.csrf_open = x.open; + x.csrf_send = x.send; + x.csrf_setRequestHeader = x.setRequestHeader; + + // Notice that CsrfMagic is itself an instantiatable object, but only + // open, send and setRequestHeader are necessary as decorators. + x.open = c.open; + x.send = c.send; + x.setRequestHeader = c.setRequestHeader; +} else { + // The only way we can do this is by modifying a library you have been + // using. We support YUI, script.aculo.us, prototype, MooTools, + // jQuery, Ext and Dojo. + if (window.jQuery) { + // jQuery didn't implement a new XMLHttpRequest function, so we have + // to do this the hard way. + jQuery.csrf_ajax = jQuery.ajax; + jQuery.ajax = function( s ) { + if (s.type && s.type.toUpperCase() == 'POST') { + s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s)); + if ( s.data && s.processData && typeof s.data != "string" ) { + s.data = jQuery.param(s.data); + } + s.data = CsrfMagic.process(s.data); + } + return jQuery.csrf_ajax( s ); + } + } + if (window.Prototype) { + // This works for script.aculo.us too + Ajax.csrf_getTransport = Ajax.getTransport; + Ajax.getTransport = function() { + return new CsrfMagic(Ajax.csrf_getTransport()); + } + } + if (window.MooTools) { + Browser.csrf_Request = Browser.Request; + Browser.Request = function () { + return new CsrfMagic(Browser.csrf_Request()); + } + } + if (window.YAHOO) { + // old YUI API + YAHOO.util.Connect.csrf_createXhrObject = YAHOO.util.Connect.createXhrObject; + YAHOO.util.Connect.createXhrObject = function (transaction) { + obj = YAHOO.util.Connect.csrf_createXhrObject(transaction); + obj.conn = new CsrfMagic(obj.conn); + return obj; + } + } + if (window.Ext) { + // Ext can use other js libraries as loaders, so it has to come last + // Ext's implementation is pretty identical to Yahoo's, but we duplicate + // it for comprehensiveness's sake. + Ext.lib.Ajax.csrf_createXhrObject = Ext.lib.Ajax.createXhrObject; + Ext.lib.Ajax.createXhrObject = function (transaction) { + obj = Ext.lib.Ajax.csrf_createXhrObject(transaction); + obj.conn = new CsrfMagic(obj.conn); + return obj; + } + } + if (window.dojo) { + // NOTE: this doesn't work with latest dojo + dojo.csrf__xhrObj = dojo._xhrObj; + dojo._xhrObj = function () { + return new CsrfMagic(dojo.csrf__xhrObj()); + } + } +} diff --git a/src/usr/local/www/csrf/csrf-magic.php b/src/usr/local/www/csrf/csrf-magic.php new file mode 100644 index 0000000..58f4eba --- /dev/null +++ b/src/usr/local/www/csrf/csrf-magic.php @@ -0,0 +1,403 @@ + + */ +$GLOBALS['csrf']['input-name'] = '__csrf_magic'; + +/** + * Set this to false if your site must work inside of frame/iframe elements, + * but do so at your own risk: this configuration protects you against CSS + * overlay attacks that defeat tokens. + */ +$GLOBALS['csrf']['frame-breaker'] = true; + +/** + * Whether or not CSRF Magic should be allowed to start a new session in order + * to determine the key. + */ +$GLOBALS['csrf']['auto-session'] = true; + +/** + * Whether or not csrf-magic should produce XHTML style tags. + */ +$GLOBALS['csrf']['xhtml'] = true; + +// FUNCTIONS: + +// Don't edit this! +$GLOBALS['csrf']['version'] = '1.0.4'; + +/** + * Rewrites on the fly to add CSRF tokens to them. This can also + * inject our JavaScript library. + */ +function csrf_ob_handler($buffer, $flags) { + // Even though the user told us to rewrite, we should do a quick heuristic + // to check if the page is *actually* HTML. We don't begin rewriting until + // we hit the first "; + $buffer = preg_replace('#(]*method\s*=\s*["\']post["\'][^>]*>)#i', '$1' . $input, $buffer); + if ($GLOBALS['csrf']['frame-breaker']) { + $buffer = str_ireplace('', '', $buffer); + } + if ($js = $GLOBALS['csrf']['rewrite-js']) { + $buffer = str_ireplace( + '', + ''. + '', + $buffer + ); + $script = ''; + $buffer = str_ireplace('', $script . '', $buffer, $count); + if (!$count) { + $buffer .= $script; + } + } + return $buffer; +} + +/** + * Checks if this is a post request, and if it is, checks if the nonce is valid. + * @param bool $fatal Whether or not to fatally error out if there is a problem. + * @return True if check passes or is not necessary, false if failure. + */ +function csrf_check($fatal = true) { + if ($_SERVER['REQUEST_METHOD'] !== 'POST') return true; + csrf_start(); + $name = $GLOBALS['csrf']['input-name']; + $ok = false; + $tokens = ''; + do { + if (!isset($_POST[$name])) break; + // we don't regenerate a token and check it because some token creation + // schemes are volatile. + $tokens = $_POST[$name]; + if (!csrf_check_tokens($tokens)) break; + $ok = true; + } while (false); + if ($fatal && !$ok) { + $callback = $GLOBALS['csrf']['callback']; + if (trim($tokens, 'A..Za..z0..9:;,') !== '') $tokens = 'hidden'; + $callback($tokens); + exit; + } + return $ok; +} + +/** + * Retrieves a valid token(s) for a particular context. Tokens are separated + * by semicolons. + */ +function csrf_get_tokens() { + $has_cookies = !empty($_COOKIE); + + // $ip implements a composite key, which is sent if the user hasn't sent + // any cookies. It may or may not be used, depending on whether or not + // the cookies "stick" + $secret = csrf_get_secret(); + if (!$has_cookies && $secret) { + // :TODO: Harden this against proxy-spoofing attacks + $ip = ';ip:' . csrf_hash($_SERVER['IP_ADDRESS']); + } else { + $ip = ''; + } + csrf_start(); + + // These are "strong" algorithms that don't require per se a secret + if (session_id()) return 'sid:' . csrf_hash(session_id()) . $ip; + if ($GLOBALS['csrf']['cookie']) { + $val = csrf_generate_secret(); + setcookie($GLOBALS['csrf']['cookie'], $val); + return 'cookie:' . csrf_hash($val) . $ip; + } + if ($GLOBALS['csrf']['key']) return 'key:' . csrf_hash($GLOBALS['csrf']['key']) . $ip; + // These further algorithms require a server-side secret + if (!$secret) return 'invalid'; + if ($GLOBALS['csrf']['user'] !== false) { + return 'user:' . csrf_hash($GLOBALS['csrf']['user']); + } + if ($GLOBALS['csrf']['allow-ip']) { + return ltrim($ip, ';'); + } + return 'invalid'; +} + +function csrf_flattenpost($data) { + $ret = array(); + foreach($data as $n => $v) { + $ret = array_merge($ret, csrf_flattenpost2(1, $n, $v)); + } + return $ret; +} +function csrf_flattenpost2($level, $key, $data) { + if(!is_array($data)) return array($key => $data); + $ret = array(); + foreach($data as $n => $v) { + $nk = $level >= 1 ? $key."[$n]" : "[$n]"; + $ret = array_merge($ret, csrf_flattenpost2($level+1, $nk, $v)); + } + return $ret; +} + +/** + * @param $tokens is safe for HTML consumption + */ +function csrf_callback($tokens) { + // (yes, $tokens is safe to echo without escaping) + header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden'); + $data = ''; + foreach (csrf_flattenpost($_POST) as $key => $value) { + if ($key == $GLOBALS['csrf']['input-name']) continue; + $data .= ''; + } + echo "CSRF check failed + +

CSRF check failed. Your form session may have expired, or you may not have + cookies enabled.

+ $data +

Debug: $tokens

+"; +} + +/** + * Checks if a composite token is valid. Outward facing code should use this + * instead of csrf_check_token() + */ +function csrf_check_tokens($tokens) { + if (is_string($tokens)) $tokens = explode(';', $tokens); + foreach ($tokens as $token) { + if (csrf_check_token($token)) return true; + } + return false; +} + +/** + * Checks if a token is valid. + */ +function csrf_check_token($token) { + if (strpos($token, ':') === false) return false; + list($type, $value) = explode(':', $token, 2); + if (strpos($value, ',') === false) return false; + list($x, $time) = explode(',', $token, 2); + if ($GLOBALS['csrf']['expires']) { + if (time() > $time + $GLOBALS['csrf']['expires']) return false; + } + switch ($type) { + case 'sid': + return $value === csrf_hash(session_id(), $time); + case 'cookie': + $n = $GLOBALS['csrf']['cookie']; + if (!$n) return false; + if (!isset($_COOKIE[$n])) return false; + return $value === csrf_hash($_COOKIE[$n], $time); + case 'key': + if (!$GLOBALS['csrf']['key']) return false; + return $value === csrf_hash($GLOBALS['csrf']['key'], $time); + // We could disable these 'weaker' checks if 'key' was set, but + // that doesn't make me feel good then about the cookie-based + // implementation. + case 'user': + if (!csrf_get_secret()) return false; + if ($GLOBALS['csrf']['user'] === false) return false; + return $value === csrf_hash($GLOBALS['csrf']['user'], $time); + case 'ip': + if (!csrf_get_secret()) return false; + // do not allow IP-based checks if the username is set, or if + // the browser sent cookies + if ($GLOBALS['csrf']['user'] !== false) return false; + if (!empty($_COOKIE)) return false; + if (!$GLOBALS['csrf']['allow-ip']) return false; + return $value === csrf_hash($_SERVER['IP_ADDRESS'], $time); + } + return false; +} + +/** + * Sets a configuration value. + */ +function csrf_conf($key, $val) { + if (!isset($GLOBALS['csrf'][$key])) { + trigger_error('No such configuration ' . $key, E_USER_WARNING); + return; + } + $GLOBALS['csrf'][$key] = $val; +} + +/** + * Starts a session if we're allowed to. + */ +function csrf_start() { + if ($GLOBALS['csrf']['auto-session'] && !session_id()) { + session_start(); + } +} + +/** + * Retrieves the secret, and generates one if necessary. + */ +function csrf_get_secret() { + if ($GLOBALS['csrf']['secret']) return $GLOBALS['csrf']['secret']; + $dir = dirname(__FILE__); + $file = $dir . '/csrf-secret.php'; + $secret = ''; + if (file_exists($file)) { + include $file; + return $secret; + } + if (is_writable($dir)) { + $secret = csrf_generate_secret(); + $fh = fopen($file, 'w'); + fwrite($fh, ' + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2005 Paul Taylor (paultaylor@winndixie.com) and Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /bin/cat /usr/sbin/arp + pfSense_MODULE: arp +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-arptable +##|*NAME=Diagnostics: ARP Table page +##|*DESCR=Allow access to the 'Diagnostics: ARP Table' page. +##|*MATCH=diag_arp.php* +##|-PRIV + +@ini_set('zlib.output_compression', 0); +@ini_set('implicit_flush', 1); + +require("guiconfig.inc"); + +function leasecmp($a, $b) { + return strcmp($a[$_GET['order']], $b[$_GET['order']]); +} + +function adjust_gmt($dt) { + $ts = strtotime($dt . " GMT"); + return strftime("%Y/%m/%d %H:%M:%S", $ts); +} + +function remove_duplicate($array, $field) { + foreach ($array as $sub) { + $cmp[] = $sub[$field]; + } + $unique = array_unique($cmp); + foreach ($unique as $k => $rien) { + $new[] = $array[$k]; + } + return $new; +} + +// Define path to AWK +$awk = "/usr/bin/awk"; + +// Read in leases file +$leasesfile = "{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases"; + +/* this pattern sticks comments into a single array item */ +$cleanpattern = "'{ gsub(\"#.*\", \"\");} { gsub(\";\", \"\"); print;}'"; + +/* We then split the leases file by } */ +$splitpattern = "'BEGIN { RS=\"}\";} {for (i=1; i<=NF; i++) printf \"%s \", \$i; printf \"}\\n\";}'"; + +/* stuff the leases file in a proper format into an array by line */ +exec("cat {$leasesfile} | {$awk} {$cleanpattern} | {$awk} {$splitpattern}", $leases_content); +$leases_count = count($leases_content); + +$pools = array(); +$leases = array(); +$i = 0; +$l = 0; +$p = 0; +// Put everything together again +while ($i < $leases_count) { + /* split the line by space */ + $data = explode(" ", $leases_content[$i]); + /* walk the fields */ + $f = 0; + $fcount = count($data); + /* with less then 20 fields there is nothing useful */ + if ($fcount < 20) { + $i++; + continue; + } + while ($f < $fcount) { + switch ($data[$f]) { + case "failover": + $pools[$p]['name'] = $data[$f+2]; + $pools[$p]['mystate'] = $data[$f+7]; + $pools[$p]['peerstate'] = $data[$f+14]; + $pools[$p]['mydate'] = $data[$f+10]; + $pools[$p]['mydate'] .= " " . $data[$f+11]; + $pools[$p]['peerdate'] = $data[$f+17]; + $pools[$p]['peerdate'] .= " " . $data[$f+18]; + $p++; + $i++; + continue 3; + case "lease": + $leases[$l]['ip'] = $data[$f+1]; + $leases[$l]['type'] = "dynamic"; + $f = $f+2; + break; + case "starts": + $leases[$l]['start'] = $data[$f+2]; + $leases[$l]['start'] .= " " . $data[$f+3]; + $f = $f+3; + break; + case "ends": + $leases[$l]['end'] = $data[$f+2]; + $leases[$l]['end'] .= " " . $data[$f+3]; + $f = $f+3; + break; + case "tstp": + $f = $f+3; + break; + case "tsfp": + $f = $f+3; + break; + case "atsfp": + $f = $f+3; + break; + case "cltt": + $f = $f+3; + break; + case "binding": + switch ($data[$f+2]) { + case "active": + $leases[$l]['act'] = "active"; + break; + case "free": + $leases[$l]['act'] = "expired"; + $leases[$l]['online'] = "offline"; + break; + case "backup": + $leases[$l]['act'] = "reserved"; + $leases[$l]['online'] = "offline"; + break; + } + $f = $f+1; + break; + case "next": + /* skip the next binding statement */ + $f = $f+3; + break; + case "rewind": + /* skip the rewind binding statement */ + $f = $f+3; + break; + case "hardware": + $leases[$l]['mac'] = $data[$f+2]; + /* check if it's online and the lease is active */ + if ($leases[$l]['act'] == "active") { + $online = exec("/usr/sbin/arp -an |/usr/bin/awk '/{$leases[$l]['ip']}/ {print}'|wc -l"); + if ($online == 1) { + $leases[$l]['online'] = 'online'; + } else { + $leases[$l]['online'] = 'offline'; + } + } + $f = $f+2; + break; + case "client-hostname": + if ($data[$f+1] <> "") { + $leases[$l]['hostname'] = preg_replace('/"/', '', $data[$f+1]); + } else { + $hostname = gethostbyaddr($leases[$l]['ip']); + if ($hostname <> "") { + $leases[$l]['hostname'] = $hostname; + } + } + $f = $f+1; + break; + case "uid": + $f = $f+1; + break; + } + $f++; + } + $l++; + $i++; +} + +/* remove duplicate items by mac address */ +if (count($leases) > 0) { + $leases = remove_duplicate($leases, "ip"); +} + +if (count($pools) > 0) { + $pools = remove_duplicate($pools, "name"); + asort($pools); +} + +// Put this in an easy to use form +$dhcpmac = array(); +$dhcpip = array(); + +foreach ($leases as $value) { + $dhcpmac[$value['mac']] = $value['hostname']; + $dhcpip[$value['ip']] = $value['hostname']; +} + +exec("/usr/sbin/arp -an", $rawdata); + +$i = 0; + +/* if list */ +$ifdescrs = get_configured_interface_with_descr(); + +foreach ($ifdescrs as $key => $interface) { + $thisif = convert_friendly_interface_to_real_interface_name($key); + if (!empty($thisif)) { + $hwif[$thisif] = $interface; + } +} + +$data = array(); +foreach ($rawdata as $line) { + $elements = explode(' ', $line); + + if ($elements[3] != "(incomplete)") { + $arpent = array(); + $arpent['ip'] = trim(str_replace(array('(', ')'), '', $elements[1])); + $arpent['mac'] = trim($elements[3]); + $arpent['interface'] = trim($elements[5]); + $data[] = $arpent; + } +} + +function _getHostName($mac, $ip) { + global $dhcpmac, $dhcpip; + + if ($dhcpmac[$mac]) { + return $dhcpmac[$mac]; + } else if ($dhcpip[$ip]) { + return $dhcpip[$ip]; + } else { + exec("host -W 1 " . escapeshellarg($ip), $output); + if (preg_match('/.*pointer ([A-Za-z_0-9.-]+)\..*/', $output[0], $matches)) { + if ($matches[1] <> $ip) { + return $matches[1]; + } + } + } + return ""; +} + +$pgtitle = array(gettext("Diagnostics"), gettext("ARP Table")); +include("head.inc"); + +?> + + + + + +
+ loader +

 

+
+ + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ {$mac_man[$mac_hi]}"; } + ?> + + +
+

.
+ + + + + + diff --git a/src/usr/local/www/diag_authentication.php b/src/usr/local/www/diag_authentication.php new file mode 100644 index 0000000..d0b81d5 --- /dev/null +++ b/src/usr/local/www/diag_authentication.php @@ -0,0 +1,138 @@ +" . gettext("This user is a member of these groups") . ":
"; + foreach ($groups as $group) { + $savemsg .= "{$group} "; + } + } else { + $input_errors[] = gettext("Authentication failed."); + } + } +} +$pgtitle = array(gettext("Diagnostics"), gettext("Authentication")); +$shortcut_section = "authentication"; +include("head.inc"); + +?> + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
  + " /> +
+
+
+
+ + + + diff --git a/src/usr/local/www/diag_backup.php b/src/usr/local/www/diag_backup.php new file mode 100644 index 0000000..6e454a4 --- /dev/null +++ b/src/usr/local/www/diag_backup.php @@ -0,0 +1,818 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /sbin/shutdown + pfSense_MODULE: backup +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-backup/restore +##|*NAME=Diagnostics: Backup/restore page +##|*DESCR=Allow access to the 'Diagnostics: Backup/restore' page. +##|*MATCH=diag_backup.php* +##|-PRIV + +/* Allow additional execution time 0 = no limit. */ +ini_set('max_execution_time', '0'); +ini_set('max_input_time', '0'); + +/* omit no-cache headers because it confuses IE with file downloads */ +$omit_nocacheheaders = true; +$nocsrf = true; +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +$rrddbpath = "/var/db/rrd"; +$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool"; + +function rrd_data_xml() { + global $rrddbpath; + global $rrdtool; + + $result = "\t\n"; + $rrd_files = glob("{$rrddbpath}/*.rrd"); + $xml_files = array(); + foreach ($rrd_files as $rrd_file) { + $basename = basename($rrd_file); + $xml_file = preg_replace('/\.rrd$/', ".xml", $rrd_file); + exec("$rrdtool dump '{$rrd_file}' '{$xml_file}'"); + $xml_data = file_get_contents($xml_file); + unlink($xml_file); + if ($xml_data !== false) { + $result .= "\t\t\n"; + $result .= "\t\t\t{$basename}\n"; + $result .= "\t\t\t" . base64_encode(gzdeflate($xml_data)) . "\n"; + $result .= "\t\t\n"; + } + } + $result .= "\t\n"; + return $result; +} + +function restore_rrddata() { + global $config, $g, $rrdtool, $input_errors; + foreach ($config['rrddata']['rrddatafile'] as $rrd) { + if ($rrd['xmldata']) { + $rrd_file = "{$g['vardb_path']}/rrd/{$rrd['filename']}"; + $xml_file = preg_replace('/\.rrd$/', ".xml", $rrd_file); + if (file_put_contents($xml_file, gzinflate(base64_decode($rrd['xmldata']))) === false) { + log_error("Cannot write $xml_file"); + continue; + } + $output = array(); + $status = null; + exec("$rrdtool restore -f '{$xml_file}' '{$rrd_file}'", $output, $status); + if ($status) { + log_error("rrdtool restore -f '{$xml_file}' '{$rrd_file}' failed returning {$status}."); + continue; + } + unlink($xml_file); + } else if ($rrd['data']) { + $rrd_file = "{$g['vardb_path']}/rrd/{$rrd['filename']}"; + $rrd_fd = fopen($rrd_file, "w"); + if (!$rrd_fd) { + log_error("Cannot write $rrd_file"); + continue; + } + $data = base64_decode($rrd['data']); + /* Try to decompress the data. */ + $dcomp = @gzinflate($data); + if ($dcomp) { + /* If the decompression worked, write the decompressed data */ + if (fwrite($rrd_fd, $dcomp) === false) { + log_error("fwrite $rrd_file failed"); + continue; + } + } else { + /* If the decompression failed, it wasn't compressed, so write raw data */ + if (fwrite($rrd_fd, $data) === false) { + log_error("fwrite $rrd_file failed"); + continue; + } + } + if (fclose($rrd_fd) === false) { + log_error("fclose $rrd_file failed"); + continue; + } + } + } +} + +function add_base_packages_menu_items() { + global $g, $config; + $base_packages = explode(",", $g['base_packages']); + $modified_config = false; + foreach ($base_packages as $bp) { + $basepkg_path = "/usr/local/pkg/{$bp}"; + $tmpinfo = pathinfo($basepkg_path, PATHINFO_EXTENSION); + if ($tmpinfo['extension'] == "xml" && file_exists($basepkg_path)) { + $pkg_config = parse_xml_config_pkg($basepkg_path, "packagegui"); + if ($pkg_config['menu'] != "") { + if (is_array($pkg_config['menu'])) { + foreach ($pkg_config['menu'] as $menu) { + if (is_array($config['installedpackages']['menu'])) { + foreach ($config['installedpackages']['menu'] as $amenu) { + if ($amenu['name'] == $menu['name']) { + continue; + } + } + } + $config['installedpackages']['menu'][] = $menu; + $modified_config = true; + } + } + $static_output .= "done.\n"; + update_output_window($static_output); + } + } + } + if ($modified_config) { + write_config(gettext("Restored base_package menus after configuration restore.")); + $config = parse_config(true); + } +} + +function remove_bad_chars($string) { + return preg_replace('/[^a-z_0-9]/i', '', $string); +} + +function check_and_returnif_section_exists($section) { + global $config; + if (is_array($config[$section])) { + return true; + } + return false; +} + +function spit_out_select_items($name, $showall) { + global $config; + + $areas = array("aliases" => gettext("Aliases"), + "captiveportal" => gettext("Captive Portal"), + "voucher" => gettext("Captive Portal Vouchers"), + "dnsmasq" => gettext("DNS Forwarder"), + "unbound" => gettext("DNS Resolver"), + "dhcpd" => gettext("DHCP Server"), + "dhcpdv6" => gettext("DHCPv6 Server"), + "filter" => gettext("Firewall Rules"), + "interfaces" => gettext("Interfaces"), + "ipsec" => gettext("IPSEC"), + "nat" => gettext("NAT"), + "openvpn" => gettext("OpenVPN"), + "installedpackages" => gettext("Package Manager"), + "pptpd" => gettext("PPTP Server"), + "rrddata" => gettext("RRD Data"), + "cron" => gettext("Scheduled Tasks"), + "syslog" => gettext("Syslog"), + "system" => gettext("System"), + "staticroutes" => gettext("Static routes"), + "sysctl" => gettext("System tunables"), + "snmpd" => gettext("SNMP Server"), + "shaper" => gettext("Traffic Shaper"), + "vlans" => gettext("VLANS"), + "wol" => gettext("Wake on LAN") + ); + + $select = "\n"; + + if ($name === "backuparea") { + $select .= << + // + +END_SCRIPT_BLOCK; + } + + echo $select; + +} + +if ($_POST['apply']) { + ob_flush(); + flush(); + conf_mount_rw(); + clear_subsystem_dirty("restore"); + conf_mount_ro(); + exit; +} + +if ($_POST) { + unset($input_errors); + if (stristr($_POST['Submit'], gettext("Restore configuration"))) { + $mode = "restore"; + } else if (stristr($_POST['Submit'], gettext("Reinstall"))) { + $mode = "reinstallpackages"; + } else if (stristr($_POST['Submit'], gettext("Clear Package Lock"))) { + $mode = "clearpackagelock"; + } else if (stristr($_POST['Submit'], gettext("Download"))) { + $mode = "download"; + } else if (stristr($_POST['Submit'], gettext("Restore version"))) { + $mode = "restore_ver"; + } + if ($_POST["nopackages"] <> "") { + $options = "nopackages"; + } + if ($_POST["ver"] <> "") { + $ver2restore = $_POST["ver"]; + } + if ($mode) { + if ($mode == "download") { + if ($_POST['encrypt']) { + if (!$_POST['encrypt_password'] || !$_POST['encrypt_passconf']) { + $input_errors[] = gettext("You must supply and confirm the password for encryption."); + } + if ($_POST['encrypt_password'] != $_POST['encrypt_passconf']) { + $input_errors[] = gettext("The supplied 'Password' and 'Confirm' field values must match."); + } + } + + if (!$input_errors) { + + //$lockbckp = lock('config'); + + $host = "{$config['system']['hostname']}.{$config['system']['domain']}"; + $name = "config-{$host}-".date("YmdHis").".xml"; + $data = ""; + + if ($options == "nopackages") { + if (!$_POST['backuparea']) { + /* backup entire configuration */ + $data = file_get_contents("{$g['conf_path']}/config.xml"); + } else { + /* backup specific area of configuration */ + $data = backup_config_section($_POST['backuparea']); + $name = "{$_POST['backuparea']}-{$name}"; + } + $sfn = "{$g['tmp_path']}/config.xml.nopkg"; + file_put_contents($sfn, $data); + exec("sed '//,/<\/installedpackages>/d' {$sfn} > {$sfn}-new"); + $data = file_get_contents($sfn . "-new"); + } else { + if (!$_POST['backuparea']) { + /* backup entire configuration */ + $data = file_get_contents("{$g['conf_path']}/config.xml"); + } else if ($_POST['backuparea'] === "rrddata") { + $data = rrd_data_xml(); + $name = "{$_POST['backuparea']}-{$name}"; + } else { + /* backup specific area of configuration */ + $data = backup_config_section($_POST['backuparea']); + $name = "{$_POST['backuparea']}-{$name}"; + } + } + + //unlock($lockbckp); + + /* + * Backup RRD Data + */ + if ($_POST['backuparea'] !== "rrddata" && !$_POST['donotbackuprrd']) { + $rrd_data_xml = rrd_data_xml(); + $closing_tag = ""; + $data = str_replace($closing_tag, $rrd_data_xml . $closing_tag, $data); + } + + if ($_POST['encrypt']) { + $data = encrypt_data($data, $_POST['encrypt_password']); + tagfile_reformat($data, $data, "config.xml"); + } + + $size = strlen($data); + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$name}"); + header("Content-Length: $size"); + if (isset($_SERVER['HTTPS'])) { + header('Pragma: '); + header('Cache-Control: '); + } else { + header("Pragma: private"); + header("Cache-Control: private, must-revalidate"); + } + echo $data; + + exit; + } + } + + if ($mode == "restore") { + if ($_POST['decrypt']) { + if (!$_POST['decrypt_password'] || !$_POST['decrypt_passconf']) { + $input_errors[] = gettext("You must supply and confirm the password for decryption."); + } + if ($_POST['decrypt_password'] != $_POST['decrypt_passconf']) { + $input_errors[] = gettext("The supplied 'Password' and 'Confirm' field values must match."); + } + } + + if (!$input_errors) { + if (is_uploaded_file($_FILES['conffile']['tmp_name'])) { + + /* read the file contents */ + $data = file_get_contents($_FILES['conffile']['tmp_name']); + if (!$data) { + log_error(sprintf(gettext("Warning, could not read file %s"), $_FILES['conffile']['tmp_name'])); + return 1; + } + + if ($_POST['decrypt']) { + if (!tagfile_deformat($data, $data, "config.xml")) { + $input_errors[] = gettext("The uploaded file does not appear to contain an encrypted pfsense configuration."); + return 1; + } + $data = decrypt_data($data, $_POST['decrypt_password']); + } + + if (stristr($data, "")) { + log_error(gettext("Upgrading m0n0wall configuration to pfsense.")); + /* m0n0wall was found in config. convert it. */ + $data = str_replace("m0n0wall", "pfsense", $data); + $m0n0wall_upgrade = true; + } + if ($_POST['restorearea']) { + /* restore a specific area of the configuration */ + if (!stristr($data, "<" . $_POST['restorearea'] . ">")) { + $input_errors[] = gettext("You have selected to restore an area but we could not locate the correct xml tag."); + } else { + if (!restore_config_section($_POST['restorearea'], $data)) { + $input_errors[] = gettext("You have selected to restore an area but we could not locate the correct xml tag."); + } else { + if ($config['rrddata']) { + restore_rrddata(); + unset($config['rrddata']); + unlink_if_exists("{$g['tmp_path']}/config.cache"); + write_config(); + add_base_packages_menu_items(); + convert_config(); + conf_mount_ro(); + } + filter_configure(); + $savemsg = gettext("The configuration area has been restored. You may need to reboot the firewall."); + } + } + } else { + if (!stristr($data, "<" . $g['xml_rootobj'] . ">")) { + $input_errors[] = sprintf(gettext("You have selected to restore the full configuration but we could not locate a %s tag."), $g['xml_rootobj']); + } else { + /* restore the entire configuration */ + file_put_contents($_FILES['conffile']['tmp_name'], $data); + if (config_install($_FILES['conffile']['tmp_name']) == 0) { + /* this will be picked up by /index.php */ + conf_mount_rw(); + mark_subsystem_dirty("restore"); + touch("/conf/needs_package_sync"); + /* remove cache, we will force a config reboot */ + if (file_exists("{$g['tmp_path']}/config.cache")) { + unlink("{$g['tmp_path']}/config.cache"); + } + $config = parse_config(true); + if (file_exists("/boot/loader.conf")) { + $loaderconf = file_get_contents("/boot/loader.conf"); + if (strpos($loaderconf, "console=\"comconsole")) { + $config['system']['enableserial'] = true; + write_config("Restore serial console enabling in configuration."); + } + unset($loaderconf); + } + /* extract out rrd items, unset from $config when done */ + if ($config['rrddata']) { + restore_rrddata(); + unset($config['rrddata']); + unlink_if_exists("{$g['tmp_path']}/config.cache"); + write_config(); + add_base_packages_menu_items(); + convert_config(); + conf_mount_ro(); + } + if ($m0n0wall_upgrade == true) { + if ($config['system']['gateway'] <> "") { + $config['interfaces']['wan']['gateway'] = $config['system']['gateway']; + } + unset($config['shaper']); + /* optional if list */ + $ifdescrs = get_configured_interface_list(true, true); + /* remove special characters from interface descriptions */ + if (is_array($ifdescrs)) { + foreach ($ifdescrs as $iface) { + $config['interfaces'][$iface]['descr'] = remove_bad_chars($config['interfaces'][$iface]['descr']); + } + } + /* check for interface names with an alias */ + if (is_array($ifdescrs)) { + foreach ($ifdescrs as $iface) { + if (is_alias($config['interfaces'][$iface]['descr'])) { + // Firewall rules + $origname = $config['interfaces'][$iface]['descr']; + $newname = $config['interfaces'][$iface]['descr'] . "Alias"; + update_alias_names_upon_change(array('filter', 'rule'), array('source', 'address'), $newname, $origname); + update_alias_names_upon_change(array('filter', 'rule'), array('destination', 'address'), $newname, $origname); + // NAT Rules + update_alias_names_upon_change(array('nat', 'rule'), array('source', 'address'), $newname, $origname); + update_alias_names_upon_change(array('nat', 'rule'), array('destination', 'address'), $newname, $origname); + update_alias_names_upon_change(array('nat', 'rule'), array('target'), $newname, $origname); + // Alias in an alias + update_alias_names_upon_change(array('aliases', 'alias'), array('address'), $newname, $origname); + } + } + } + unlink_if_exists("{$g['tmp_path']}/config.cache"); + // Reset configuration version to something low + // in order to force the config upgrade code to + // run through with all steps that are required. + $config['system']['version'] = "1.0"; + // Deal with descriptions longer than 63 characters + for ($i = 0; isset($config["filter"]["rule"][$i]); $i++) { + if (count($config['filter']['rule'][$i]['descr']) > 63) { + $config['filter']['rule'][$i]['descr'] = substr($config['filter']['rule'][$i]['descr'], 0, 63); + } + } + // Move interface from ipsec to enc0 + for ($i = 0; isset($config["filter"]["rule"][$i]); $i++) { + if ($config['filter']['rule'][$i]['interface'] == "ipsec") { + $config['filter']['rule'][$i]['interface'] = "enc0"; + } + } + // Convert icmp types + // http://www.openbsd.org/cgi-bin/man.cgi?query=icmp&sektion=4&arch=i386&apropos=0&manpath=OpenBSD+Current + for ($i = 0; isset($config["filter"]["rule"][$i]); $i++) { + if ($config["filter"]["rule"][$i]['icmptype']) { + switch ($config["filter"]["rule"][$i]['icmptype']) { + case "echo": + $config["filter"]["rule"][$i]['icmptype'] = "echoreq"; + break; + case "unreach": + $config["filter"]["rule"][$i]['icmptype'] = "unreach"; + break; + case "echorep": + $config["filter"]["rule"][$i]['icmptype'] = "echorep"; + break; + case "squench": + $config["filter"]["rule"][$i]['icmptype'] = "squench"; + break; + case "redir": + $config["filter"]["rule"][$i]['icmptype'] = "redir"; + break; + case "timex": + $config["filter"]["rule"][$i]['icmptype'] = "timex"; + break; + case "paramprob": + $config["filter"]["rule"][$i]['icmptype'] = "paramprob"; + break; + case "timest": + $config["filter"]["rule"][$i]['icmptype'] = "timereq"; + break; + case "timestrep": + $config["filter"]["rule"][$i]['icmptype'] = "timerep"; + break; + case "inforeq": + $config["filter"]["rule"][$i]['icmptype'] = "inforeq"; + break; + case "inforep": + $config["filter"]["rule"][$i]['icmptype'] = "inforep"; + break; + case "maskreq": + $config["filter"]["rule"][$i]['icmptype'] = "maskreq"; + break; + case "maskrep": + $config["filter"]["rule"][$i]['icmptype'] = "maskrep"; + break; + } + } + } + $config['diag']['ipv6nat'] = true; + write_config(); + add_base_packages_menu_items(); + convert_config(); + conf_mount_ro(); + $savemsg = gettext("The m0n0wall configuration has been restored and upgraded to pfSense."); + mark_subsystem_dirty("restore"); + } + if (is_array($config['captiveportal'])) { + foreach ($config['captiveportal'] as $cp) { + if (isset($cp['enable'])) { + /* for some reason ipfw doesn't init correctly except on bootup sequence */ + mark_subsystem_dirty("restore"); + break; + } + } + } + setup_serial_port(); + if (is_interface_mismatch() == true) { + touch("/var/run/interface_mismatch_reboot_needed"); + clear_subsystem_dirty("restore"); + convert_config(); + header("Location: interfaces_assign.php"); + exit; + } + if (is_interface_vlan_mismatch() == true) { + touch("/var/run/interface_mismatch_reboot_needed"); + clear_subsystem_dirty("restore"); + convert_config(); + header("Location: interfaces_assign.php"); + exit; + } + } else { + $input_errors[] = gettext("The configuration could not be restored."); + } + } + } + } else { + $input_errors[] = gettext("The configuration could not be restored (file upload error)."); + } + } + } + + if ($mode == "reinstallpackages") { + header("Location: pkg_mgr_install.php?mode=reinstallall"); + exit; + } else if ($mode == "clearpackagelock") { + clear_subsystem_dirty('packagelock'); + $savemsg = "Package Lock Cleared"; + } else if ($mode == "restore_ver") { + $input_errors[] = gettext("XXX - this feature may hose your config (do NOT backrev configs!) - billm"); + if ($ver2restore <> "") { + $conf_file = "{$g['cf_conf_path']}/bak/config-" . strtotime($ver2restore) . ".xml"; + if (config_install($conf_file) == 0) { + mark_subsystem_dirty("restore"); + } else { + $input_errors[] = gettext("The configuration could not be restored."); + } + } else { + $input_errors[] = gettext("No version selected."); + } + } + } +} + +$id = rand() . '.' . time(); + +$mth = ini_get('upload_progress_meter.store_method'); +$dir = ini_get('upload_progress_meter.file.filename_template'); + +$pgtitle = array(gettext("Diagnostics"), gettext("Backup/restore")); +include("head.inc"); + +?> + + + + + + + +
+
+ +" . gettext("The firewall is now rebooting."));?>
+
+ +
+ + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  +



+ + + + + +
+ + + +
+ + + + + + + + + +
+ + + +
+ + + +
+ + + + + + + + + +
+ + + +
+ + + +
+

" />

+
 
  + +

+ +

+ + + + + +
+ + + +
+ + + + + + + + + +
+ + + +
+ + + +
+

" />

+



+
 
  + +



+ " /> +
+
+ + +



+ " /> + +

+
+
+
+
+ + + + + + + diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php new file mode 100644 index 0000000..cc1da99 --- /dev/null +++ b/src/usr/local/www/diag_confbak.php @@ -0,0 +1,301 @@ += 0)) { + $config['system']['backupcount'] = $_POST['backupcount']; + $changedescr = $config['system']['backupcount']; + } else { + unset($config['system']['backupcount']); + $changedescr = "(platform default)"; + } + write_config("Changed backup revision count to {$changedescr}"); +} elseif ($_POST) { + if (!isset($_POST['confirm']) || ($_POST['confirm'] != gettext("Confirm")) || (!isset($_POST['newver']) && !isset($_POST['rmver']))) { + header("Location: diag_confbak.php"); + return; + } + + conf_mount_rw(); + $confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache')); + if ($_POST['newver'] != "") { + if (config_restore($g['conf_path'] . '/backup/config-' . $_POST['newver'] . '.xml') == 0) { + $savemsg = sprintf(gettext('Successfully reverted to timestamp %1$s with description "%2$s".'), date(gettext("n/j/y H:i:s"), $_POST['newver']), htmlspecialchars($confvers[$_POST['newver']]['description'])); + } else { + $savemsg = gettext("Unable to revert to the selected configuration."); + } + } + if ($_POST['rmver'] != "") { + unlink_if_exists($g['conf_path'] . '/backup/config-' . $_POST['rmver'] . '.xml'); + $savemsg = sprintf(gettext('Deleted backup with timestamp %1$s and description "%2$s".'), date(gettext("n/j/y H:i:s"), $_POST['rmver']), htmlspecialchars($confvers[$_POST['rmver']]['description'])); + } + conf_mount_ro(); +} + +if ($_GET['getcfg'] != "") { + $file = $g['conf_path'] . '/backup/config-' . $_GET['getcfg'] . '.xml'; + + $exp_name = urlencode("config-{$config['system']['hostname']}.{$config['system']['domain']}-{$_GET['getcfg']}.xml"); + $exp_data = file_get_contents($file); + $exp_size = strlen($exp_data); + + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$exp_name}"); + header("Content-Length: $exp_size"); + echo $exp_data; + exit; +} + +if (($_GET['diff'] == 'Diff') && isset($_GET['oldtime']) && isset($_GET['newtime']) && + (is_numeric($_GET['oldtime'])) && + (is_numeric($_GET['newtime']) || ($_GET['newtime'] == 'current'))) { + $diff = ""; + $oldfile = $g['conf_path'] . '/backup/config-' . $_GET['oldtime'] . '.xml'; + $oldtime = $_GET['oldtime']; + if ($_GET['newtime'] == 'current') { + $newfile = $g['conf_path'] . '/config.xml'; + $newtime = $config['revision']['time']; + } else { + $newfile = $g['conf_path'] . '/backup/config-' . $_GET['newtime'] . '.xml'; + $newtime = $_GET['newtime']; + } + if (file_exists($oldfile) && file_exists($newfile)) { + exec("/usr/bin/diff -u " . escapeshellarg($oldfile) . " " . escapeshellarg($newfile), $diff); + } +} + +cleanup_backupcache(false); +$confvers = get_backups(); +unset($confvers['versions']); + +$pgtitle = array(gettext("Diagnostics"), gettext("Configuration History")); +include("head.inc"); + +?> + + + + + + + + + + + + + +
+
+ + + + + + + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
  + + : +
+
: + + " /> + + " /> + +
: + +
" /> +
  + + + + " />
  + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

+
" /> 
+ +
+ + + + + +   + + + + <?=gettext(" title="" /> + + + <?=gettext(" title="" /> + + + <?=gettext(" title="" /> + +
" />
+ +
+
+
+
+ + + + diff --git a/src/usr/local/www/diag_defaults.php b/src/usr/local/www/diag_defaults.php new file mode 100755 index 0000000..7c17511 --- /dev/null +++ b/src/usr/local/www/diag_defaults.php @@ -0,0 +1,90 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: config +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-factorydefaults +##|*NAME=Diagnostics: Factory defaults page +##|*DESCR=Allow access to the 'Diagnostics: Factory defaults' page. +##|*MATCH=diag_defaults.php* +##|-PRIV + +require("guiconfig.inc"); + +if ($_POST['Submit'] == " " . gettext("No") . " ") { + header("Location: index.php"); + exit; +} + +$pgtitle = array(gettext("Diagnostics"), gettext("Factory defaults")); +include("head.inc"); + +?> + + + + + +
+
+
+ +
+

+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • ''
  • +
+

+

+ " /> + " /> +

+
+ + + + diff --git a/src/usr/local/www/diag_dns.php b/src/usr/local/www/diag_dns.php new file mode 100644 index 0000000..4c57223 --- /dev/null +++ b/src/usr/local/www/diag_dns.php @@ -0,0 +1,320 @@ + "") { + if (!$isfirst) { + $addresses .= " "; + } + $addresses .= rtrim($re) . "/32"; + $isfirst = false; + } + } + $newalias = array(); + if ($override) { + $alias_exists = false; + } + if ($alias_exists == false) { + $newalias['name'] = $aliasname; + $newalias['type'] = "network"; + $newalias['address'] = $addresses; + $newalias['descr'] = "Created from Diagnostics-> DNS Lookup"; + if ($override) { + $a_aliases[$id] = $newalias; + } else { + $a_aliases[] = $newalias; + } + write_config(); + $createdalias = true; + } + } +} + +if ($_POST) { + unset($input_errors); + + $reqdfields = explode(" ", "host"); + $reqdfieldsn = explode(",", "Host"); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (!is_hostname($host) && !is_ipaddr($host)) { + $input_errors[] = gettext("Host must be a valid hostname or IP address."); + } else { + // Test resolution speed of each DNS server. + $dns_speeds = array(); + $dns_servers = array(); + exec("/usr/bin/grep nameserver /etc/resolv.conf | /usr/bin/cut -f2 -d' '", $dns_servers); + foreach ($dns_servers as $dns_server) { + $query_time = exec("/usr/bin/drill {$host_esc} " . escapeshellarg("@" . trim($dns_server)) . " | /usr/bin/grep Query | /usr/bin/cut -d':' -f2"); + if ($query_time == "") { + $query_time = gettext("No response"); + } + $new_qt = array(); + $new_qt['dns_server'] = $dns_server; + $new_qt['query_time'] = $query_time; + $dns_speeds[] = $new_qt; + unset($new_qt); + } + } + + $type = "unknown"; + $resolved = ""; + $ipaddr = ""; + $hostname = ""; + if (!$input_errors) { + if (is_ipaddr($host)) { + $type = "ip"; + $resolved = gethostbyaddr($host); + $ipaddr = $host; + if ($host != $resolved) { + $hostname = $resolved; + } + } elseif (is_hostname($host)) { + $type = "hostname"; + $resolved = gethostbyname($host); + if ($resolved) { + $resolved = array(); + exec("/usr/bin/drill {$host_esc} A | /usr/bin/grep {$host_esc} | /usr/bin/grep -v ';' | /usr/bin/awk '{ print $5 }'", $resolved); + } + $hostname = $host; + if ($host != $resolved) { + $ipaddr = $resolved[0]; + } + } + + if ($host == $resolved) { + $resolved = gettext("No record found"); + } + } +} + +if (($_POST['host']) && ($_POST['dialog_output'])) { + display_host_results ($host, $resolved, $dns_speeds); + exit; +} + +function display_host_results ($address, $hostname, $dns_speeds) { + $map_lengths = function($element) { return strlen($element[0]); }; + + echo gettext("IP Address") . ": {$address} \n"; + echo gettext("Host Name") . ": {$hostname} \n"; + echo "\n"; + $text_table = array(); + $text_table[] = array(gettext("Server"), gettext("Query Time")); + if (is_array($dns_speeds)) { + foreach ($dns_speeds as $qt) { + $text_table[] = array(trim($qt['dns_server']), trim($qt['query_time'])); + } + } + $col0_padlength = max(array_map($map_lengths, $text_table)) + 4; + foreach ($text_table as $text_row) { + echo str_pad($text_row[0], $col0_padlength) . $text_row[1] . "\n"; + } +} + +include("head.inc"); ?> + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ +  =  + + "") { + echo $hostitem . "
"; + $found++; + } + } + } else { + echo $resolved; + } + if ($found > 0) { +?> +
+
+ + + An alias already exists for the hostname .
+ + + + + + Alias created with name + +
+
+
+ + + + + + + + + + + +
+ + + +
+ + + +
+
+
+ +

+

+
+ +

+
  +
  + " /> +
+
+
+ + + diff --git a/src/usr/local/www/diag_dump_states.php b/src/usr/local/www/diag_dump_states.php new file mode 100755 index 0000000..ebb3b06 --- /dev/null +++ b/src/usr/local/www/diag_dump_states.php @@ -0,0 +1,280 @@ + + +"> + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + +
+ : + + + + " /> + + " /> + +
+
+
+ + + + + + + + + + + += 10000) { + break; + } + + $line_split = preg_split("/\s+/", $line); + + $iface = array_shift($line_split); + $proto = array_shift($line_split); + $state = array_pop($line_split); + $info = implode(" ", $line_split); + + // We may want to make this optional, with a large state table, this could get to be expensive. + $iface = convert_real_interface_to_friendly_descr($iface); + + /* break up info and extract $srcip and $dstip */ + $ends = preg_split("/\?/", $info); + if (strstr($info, "[")) { + // IPv6 + $parts = explode("[", $ends[0]); + if (strstr($info, "->")) { + $srcip = trim($parts[0]); + } else { + $dstip = trim($parts[0]); + } + $parts = explode("[", $ends[count($ends) - 1]); + if (strstr($info, "->")) { + $dstip = trim($parts[0]); + } else { + $srcip = trim($parts[0]); + } + } else { + // IPv4 + $parts = explode(":", $ends[0]); + if (strstr($info, "->")) { + $srcip = trim($parts[0]); + } else { + $dstip = trim($parts[0]); + } + $parts = explode(":", $ends[count($ends) - 1]); + if (strstr($info, "->")) { + $dstip = trim($parts[0]); + } else { + $srcip = trim($parts[0]); + } + } +?> + + + + + + + + + + + + + +
Router -> Destination");?>
+ +
+ +
+
+ + : + +
+ + + +
+
+ + + + diff --git a/src/usr/local/www/diag_dump_states_sources.php b/src/usr/local/www/diag_dump_states_sources.php new file mode 100644 index 0000000..4cb14c2 --- /dev/null +++ b/src/usr/local/www/diag_dump_states_sources.php @@ -0,0 +1,211 @@ + + +"> + +
+ + + + + + + + + + +
+ +
+
+ + + + + + + + + + +
+ + + + + + +
  + + + " /> +
+ +
+ + + + + + + + + + + + 0) { + foreach ($sources as $line) { + if ($row >= 1000) { + break; + } + + // 192.168.20.2 -> 216.252.56.1 ( states 10, connections 0, rate 0.0/0s ) + + $source_split = ""; + preg_match("/(.*)\s\(\sstates\s(.*),\sconnections\s(.*),\srate\s(.*)\s\)/", $line, $source_split); + list($all, $info, $numstates, $numconnections, $rate) = $source_split; + + $source_split = ""; + preg_match("/(.*)\s\?\s(.*)/", $info, $source_split); + list($all, $srcip, $dstip) = $source_split; + + ?> + + + + + + + + + + "; +} +?> + +
Destination");?>
+ /images/icons/icon_x.gif' height='17' width='17' border='0' + onclick="removeSource();" style='cursor:pointer;' + name='i:' + title='' alt='' /> +
+ " . gettext("No source tracking entries were found.") . " +
+
+ + + +
+
+ + + + diff --git a/src/usr/local/www/diag_gmirror.php b/src/usr/local/www/diag_gmirror.php new file mode 100644 index 0000000..f0f5bff --- /dev/null +++ b/src/usr/local/www/diag_gmirror.php @@ -0,0 +1,406 @@ + + +"> + + + + gettext("Forget all formerly connected consumers"), + "clear" => gettext("Remove metadata from disk"), + "insert" => gettext("Insert consumer into mirror"), + "remove" => gettext("Remove consumer from mirror"), + "activate" => gettext("Reactivate consumer on mirror"), + "deactivate" => gettext("Deactivate consumer from mirror"), + "rebuild" => gettext("Force rebuild of mirror consumer"), +); + +/* User tried to pass a bogus action */ +if (!empty($_REQUEST['action']) && !array_key_exists($_REQUEST['action'], $action_list)) { + header("Location: diag_gmirror.php"); + return; +} + +if ($_POST) { + if (!isset($_POST['confirm']) || ($_POST['confirm'] != gettext("Confirm"))) { + header("Location: diag_gmirror.php"); + return; + } + $input_errors = ""; + + if (($_POST['action'] != "clear") && !is_valid_mirror($_POST['mirror'])) { + $input_errors[] = gettext("You must supply a valid mirror name."); + } + + if (!empty($_POST['consumer']) && !is_valid_consumer($_POST['consumer'])) { + $input_errors[] = gettext("You must supply a valid consumer name"); + } + + /* Additional action-specific validation that hasn't already been tested */ + switch ($_POST['action']) { + case "insert": + if (!is_consumer_unused($_POST['consumer'])) { + $input_errors[] = gettext("Consumer is already in use and cannot be inserted. Remove consumer from existing mirror first."); + } + if (gmirror_consumer_has_metadata($_POST['consumer'])) { + $input_errors[] = gettext("Consumer has metadata from an existing mirror. Clear metadata before inserting consumer."); + } + $mstat = gmirror_get_status_single($_POST['mirror']); + if (strtoupper($mstat) != "COMPLETE") { + $input_errors[] = gettext("Mirror is not in a COMPLETE state, cannot insert consumer. Forget disconnected disks or wait for rebuild to finish."); + } + break; + case "clear": + if (!is_consumer_unused($_POST['consumer'])) { + $input_errors[] = gettext("Consumer is in use and cannot be cleared. Deactivate disk first."); + } + if (!gmirror_consumer_has_metadata($_POST['consumer'])) { + $input_errors[] = gettext("Consumer has no metadata to clear."); + } + break; + case "activate": + if (is_consumer_in_mirror($_POST['consumer'], $_POST['mirror'])) { + $input_errors[] = gettext("Consumer is already present on specified mirror."); + } + if (!gmirror_consumer_has_metadata($_POST['consumer'])) { + $input_errors[] = gettext("Consumer has no metadata and cannot be reactivated."); + } + + break; + case "remove": + case "deactivate": + case "rebuild": + if (!is_consumer_in_mirror($_POST['consumer'], $_POST['mirror'])) { + $input_errors[] = gettext("Consumer must be present on the specified mirror."); + } + break; + } + + $result = 0; + if (empty($input_errors)) { + switch ($_POST['action']) { + case "forget": + $result = gmirror_forget_disconnected($_POST['mirror']); + break; + case "clear": + $result = gmirror_clear_consumer($_POST['consumer']); + break; + case "insert": + $result = gmirror_insert_consumer($_POST['mirror'], $_POST['consumer']); + break; + case "remove": + $result = gmirror_remove_consumer($_POST['mirror'], $_POST['consumer']); + break; + case "activate": + $result = gmirror_activate_consumer($_POST['mirror'], $_POST['consumer']); + break; + case "deactivate": + $result = gmirror_deactivate_consumer($_POST['mirror'], $_POST['consumer']); + break; + case "rebuild": + $result = gmirror_force_rebuild($_POST['mirror'], $_POST['consumer']); + break; + } + $redir = "Location: diag_gmirror.php"; + if ($result != 0) { + $redir .= "?error=" . urlencode($result); + } + /* If we reload the page too fast, the gmirror information may be missing or not up-to-date. */ + sleep(3); + header($redir); + return; + } +} + +$mirror_status = gmirror_get_status(); +$mirror_list = gmirror_get_mirrors(); +$unused_disks = gmirror_get_disks(); +$unused_consumers = array(); +foreach ($unused_disks as $disk) { + if (is_consumer_unused($disk)) { + $unused_consumers = array_merge($unused_consumers, gmirror_get_all_unused_consumer_sizes_on_disk($disk)); + } +} + +if ($input_errors) { + print_input_errors($input_errors); +} +if ($_GET["error"] && ($_GET["error"] != 0)) { + print_info_box(gettext("There was an error performing the chosen mirror operation. Check the System Log for details.")); +} + +?> +
+ + + + +
+
+ + +   + + +
  +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  + : +
+
: + " /> + +
: + " /> + + +
: + " /> + +
+
" /> +
+ + + 0): +?> + + + + + + $name): + $components = count($name["components"]); +?> + + + + + + 1): + $morecomponents = array_slice($name["components"], 1); + foreach ($morecomponents as $component): +?> + + + + + + + + + +
+ +
Size: +
+ + +
[] + +
+ + +
+ 1)): +?> + [] + [] + [] + +
+ + +
+ 1)): +?> + [] + [] + [] + +
+
+
+ + + + 0): +?> + + + + + + + + + + + + + + + + + +
+ + + + [] +
[] + $mirror_size): +?> + + +
+ +
+
+
 
+

+
+
+ + + + +"; +echo "jQuery('#loading').html('');"; +echo ""; + +?> diff --git a/src/usr/local/www/diag_ipsec.php b/src/usr/local/www/diag_ipsec.php new file mode 100644 index 0000000..96c6835 --- /dev/null +++ b/src/usr/local/www/diag_ipsec.php @@ -0,0 +1,555 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Parts of this code was originally based on vpn_ipsec_sad.php + Copyright (C) 2003-2004 Manuel Kasper + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: ipsec +*/ + +##|+PRIV +##|*IDENT=page-status-ipsec +##|*NAME=Status: IPsec page +##|*DESCR=Allow access to the 'Status: IPsec' page. +##|*MATCH=diag_ipsec.php* +##|-PRIV + + +global $g; + +$pgtitle = array(gettext("Status"), gettext("IPsec")); +$shortcut_section = "ipsec"; + +require("guiconfig.inc"); +include("head.inc"); +require("ipsec.inc"); + +if ($_GET['act'] == 'connect') { + if (ctype_digit($_GET['ikeid'])) { + $ph1ent = ipsec_get_phase1($_GET['ikeid']); + if (!empty($ph1ent)) { + if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == 'ikev1') { + $ph2entries = ipsec_get_number_of_phase2($_GET['ikeid']); + for ($i = 0; $i < $ph2entries; $i++) { + $connid = escapeshellarg("con{$_GET['ikeid']}00{$i}"); + mwexec("/usr/local/sbin/ipsec down {$connid}"); + mwexec("/usr/local/sbin/ipsec up {$connid}"); + } + } else { + mwexec("/usr/local/sbin/ipsec down con" . escapeshellarg($_GET['ikeid'])); + mwexec("/usr/local/sbin/ipsec up con" . escapeshellarg($_GET['ikeid'])); + } + } + } +} else if ($_GET['act'] == 'ikedisconnect') { + if (ctype_digit($_GET['ikeid'])) { + if (!empty($_GET['ikesaid']) && ctype_digit($_GET['ikesaid'])) { + mwexec("/usr/local/sbin/ipsec down con" . escapeshellarg($_GET['ikeid']) . "[" . escapeshellarg($_GET['ikesaid']) . "]"); + } else { + mwexec("/usr/local/sbin/ipsec down con" . escapeshellarg($_GET['ikeid'])); + } + } +} else if ($_GET['act'] == 'childdisconnect') { + if (ctype_digit($_GET['ikeid'])) { + if (!empty($_GET['ikesaid']) && ctype_digit($_GET['ikesaid'])) { + mwexec("/usr/local/sbin/ipsec down con" . escapeshellarg($_GET['ikeid']) . "{" . escapeshellarg($_GET['ikesaid']) . "}"); + } + } +} + +if (!is_array($config['ipsec']['phase1'])) { + $config['ipsec']['phase1'] = array(); +} + +$a_phase1 = &$config['ipsec']['phase1']; + +$status = ipsec_smp_dump_status(); + +?> + +"> + +
+ + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + $ikesa): + $con_id = substr($ikesa['peerconfig'], 3); + if ($ikesa['version'] == 1) { + $ph1idx = substr($con_id, 0, strrpos(substr($con_id, 0, -1), '00')); + $ipsecconnected[$ph1idx] = $ph1idx; + } else { + $ipsecconnected[$con_id] = $ph1idx = $con_id; + } + + if (ipsec_phase1_status($status['query']['ikesalist']['ikesa'], $ikesa['id'])) { + $icon = "pass"; + } elseif (!isset($config['ipsec']['enable'])) { + $icon = "block"; + } else { + $icon = "reject"; + } +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +' . + gettext('Port: ') . htmlspecialchars($ikesa['local']['port']); + } else { + echo gettext("Unknown"); + } + if ($ikesa['local']['port'] == '4500') { + echo " NAT-T"; + } + } +?> + +{$identity}"; + } else { + if (empty($identity)) { + echo gettext("Unknown"); + } else { + echo $identity; + } + } + } +?> + +' . + gettext('Port: ') . htmlspecialchars($ikesa['remote']['port']); + } else { + echo gettext("Unknown"); + } + if ($ikesa['remote']['port'] == '4500') { + echo " NAT-T"; + } + } +?> + + IKEv +
+ +
+ + +"; + echo htmlspecialchars($ikesa['intalg']); + echo "
"; + echo htmlspecialchars($ikesa['prfalg']); + echo "
"; + echo htmlspecialchars($ikesa['dhgroup']); +?> +
+
+ +
+
+
+
+ +
+ + <?php title= border="0"/> + +
+ +
+ + <?php title= border="0"/> + + + <?php title= border="0"/> + +
+ +
+ +
+
+
+ - Show child SA entries +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ alt=""/> +
+
+
+ +
+
+
+ alt=""/> +
+
+
+
+ + <?php title= border="0"/> + +
+
+ +
+
+
+
+ +

+ +
+
+ + here. +

+ + + + diff --git a/src/usr/local/www/diag_ipsec_leases.php b/src/usr/local/www/diag_ipsec_leases.php new file mode 100644 index 0000000..501c83a --- /dev/null +++ b/src/usr/local/www/diag_ipsec_leases.php @@ -0,0 +1,131 @@ + + + + + + + + + + + +
+ +
+
+ + + + + + + 0): ?> + + + + + + + + + + + + + + + + + + +
+ +
+
+

+
+ + + + + + +
+

+
+ +
+
+ +

+
+ +

+ + + + diff --git a/src/usr/local/www/diag_ipsec_sad.php b/src/usr/local/www/diag_ipsec_sad.php new file mode 100644 index 0000000..f958d29 --- /dev/null +++ b/src/usr/local/www/diag_ipsec_sad.php @@ -0,0 +1,141 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /sbin/setkey + pfSense_MODULE: ipsec +*/ + +##|+PRIV +##|*IDENT=page-status-ipsec-sad +##|*NAME=Status: IPsec: SAD page +##|*DESCR=Allow access to the 'Status: IPsec: SAD' page. +##|*MATCH=diag_ipsec_sad.php* +##|-PRIV + +require("guiconfig.inc"); +require("ipsec.inc"); + +$pgtitle = array(gettext("Status"), gettext("IPsec"), gettext("SAD")); +$shortcut_section = "ipsec"; +include("head.inc"); + +$sad = ipsec_dump_sad(); + +/* delete any SA? */ +if ($_GET['act'] == "del") { + $fd = @popen("/sbin/setkey -c > /dev/null 2>&1", "w"); + if ($fd) { + fwrite($fd, "delete {$_GET['src']} {$_GET['dst']} {$_GET['proto']} {$_GET['spi']} ;\n"); + pclose($fd); + sleep(1); + } +} + +?> + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + ')"> + delete + +
+

+
+
+
+ +

+
+ +

+ + + + diff --git a/src/usr/local/www/diag_ipsec_spd.php b/src/usr/local/www/diag_ipsec_spd.php new file mode 100644 index 0000000..5efeda3 --- /dev/null +++ b/src/usr/local/www/diag_ipsec_spd.php @@ -0,0 +1,138 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /sbin/setkey + pfSense_MODULE: ipsec +*/ + +##|+PRIV +##|*IDENT=page-status-ipsec-spd +##|*NAME=Status: IPsec: SPD page +##|*DESCR=Allow access to the 'Status: IPsec: SPD' page. +##|*MATCH=diag_ipsec_spd.php* +##|-PRIV + +require("guiconfig.inc"); +require("ipsec.inc"); + +$pgtitle = array(gettext("Status"), gettext("IPsec"), gettext("SPD")); +$shortcut_section = "ipsec"; +include("head.inc"); + +$spd = ipsec_dump_spd(); +?> + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+ direction + -> + +
+
+ + + + + + + + + + + + + + + + + +
in
out
+

+
+
+
+ +

+
+ +

+ + + + diff --git a/src/usr/local/www/diag_ipsec_xml.php b/src/usr/local/www/diag_ipsec_xml.php new file mode 100644 index 0000000..82dcbea --- /dev/null +++ b/src/usr/local/www/diag_ipsec_xml.php @@ -0,0 +1,84 @@ + diff --git a/src/usr/local/www/diag_limiter_info.php b/src/usr/local/www/diag_limiter_info.php new file mode 100644 index 0000000..d4e5b06 --- /dev/null +++ b/src/usr/local/www/diag_limiter_info.php @@ -0,0 +1,121 @@ + + + + +
+"; + print_info_box($savemsg); + echo "
"; + } + if ($input_errors) { + print_input_errors($input_errors); + } +?> + + + + +
+ + + + +
+ + +
+
+ +
+
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs.php b/src/usr/local/www/diag_logs.php new file mode 100755 index 0000000..2cbfcbb --- /dev/null +++ b/src/usr/local/www/diag_logs.php @@ -0,0 +1,145 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-logs-system +##|*NAME=Diagnostics: Logs: System page +##|*DESCR=Allow access to the 'Diagnostics: Logs: System' page. +##|*MATCH=diag_logs.php* +##|-PRIV + +require("guiconfig.inc"); + +$system_logfile = "{$g['varlog_path']}/system.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($system_logfile); +} + +if ($_GET['filtertext']) { + $filtertext = htmlspecialchars($_GET['filtertext']); +} + +if ($_POST['filtertext']) { + $filtertext = htmlspecialchars($_POST['filtertext']); +} + +if ($filtertext) { + $filtertextmeta="?filtertext=$filtertext"; +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("General")); +include("head.inc"); + +?> + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + + +
+
+ " /> +
+
+
+ + " /> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_auth.php b/src/usr/local/www/diag_logs_auth.php new file mode 100644 index 0000000..42bc0ba --- /dev/null +++ b/src/usr/local/www/diag_logs_auth.php @@ -0,0 +1,112 @@ +. + All rights reserved. + + part of pfSense + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-status-systemlogs-portalauth +##|*NAME=Status: System logs: Portal Auth page +##|*DESCR=Allow access to the 'Status: System logs: Portal Auth' page. +##|*MATCH=diag_logs_auth.php* +##|-PRIV + +require("guiconfig.inc"); + +$portal_logfile = "{$g['varlog_path']}/portalauth.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($portal_logfile); +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Portal Auth")); +$shortcut_section = "captiveportal"; +include("head.inc"); + +?> + + + + + + + + + + +
+ +
+
+ + + + + + + + +
+ +
+
+
+ "/> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_dhcp.php b/src/usr/local/www/diag_logs_dhcp.php new file mode 100644 index 0000000..f87845d --- /dev/null +++ b/src/usr/local/www/diag_logs_dhcp.php @@ -0,0 +1,115 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: dhcpserver +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-logs-dhcp +##|*NAME=Diagnostics: Logs: DHCP page +##|*DESCR=Allow access to the 'Diagnostics: Logs: DHCP' page. +##|*MATCH=diag_logs_dhcp.php* +##|-PRIV + +require("guiconfig.inc"); + +$dhcpd_logfile = "{$g['varlog_path']}/dhcpd.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($dhcpd_logfile); + killbyname("dhcpd"); + services_dhcpd_configure(); +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("DHCP")); +$shortcut_section = "dhcp"; +include("head.inc"); + +?> + + + + + + + + + + +
+ +
+
+ + + + + + + + + +
+ +
+
+
+ " /> +
+
NOTE: Clearing the log file will restart the DHCP daemon.
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_filter.php b/src/usr/local/www/diag_logs_filter.php new file mode 100644 index 0000000..b583035 --- /dev/null +++ b/src/usr/local/www/diag_logs_filter.php @@ -0,0 +1,503 @@ +, + Jim Pingle jim@pingle.org + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: filter +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-logs-firewall +##|*NAME=Diagnostics: Logs: Firewall page +##|*DESCR=Allow access to the 'Diagnostics: Logs: Firewall' page. +##|*MATCH=diag_logs_filter.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter_log.inc"); + +# --- AJAX RESOLVE --- +if (isset($_POST['resolve'])) { + $ip = strtolower($_POST['resolve']); + $res = (is_ipaddr($ip) ? gethostbyaddr($ip) : ''); + + if ($res && $res != $ip) { + $response = array('resolve_ip' => $ip, 'resolve_text' => $res); + } else { + $response = array('resolve_ip' => $ip, 'resolve_text' => gettext("Cannot resolve")); + } + + echo json_encode(str_replace("\\", "\\\\", $response)); // single escape chars can break JSON decode + exit; +} + +function getGETPOSTsettingvalue($settingname, $default) { + $settingvalue = $default; + if ($_GET[$settingname]) { + $settingvalue = $_GET[$settingname]; + } + if ($_POST[$settingname]) { + $settingvalue = $_POST[$settingname]; + } + return $settingvalue; +} + +$rulenum = getGETPOSTsettingvalue('getrulenum', null); +if ($rulenum) { + list($rulenum, $tracker, $type) = explode(',', $rulenum); + $rule = find_rule_by_number($rulenum, $tracker, $type); + echo gettext("The rule that triggered this action is") . ":\n\n{$rule}"; + exit; +} + +$filtersubmit = getGETPOSTsettingvalue('filtersubmit', null); +if ($filtersubmit) { + $interfacefilter = getGETPOSTsettingvalue('interface', null); + $filtertext = getGETPOSTsettingvalue('filtertext', ""); + $filterlogentries_qty = getGETPOSTsettingvalue('filterlogentries_qty', null); +} + +$filterlogentries_submit = getGETPOSTsettingvalue('filterlogentries_submit', null); +if ($filterlogentries_submit) { + $filterfieldsarray = array(); + + $actpass = getGETPOSTsettingvalue('actpass', null); + $actblock = getGETPOSTsettingvalue('actblock', null); + + $filterfieldsarray['act'] = str_replace(" ", " ", trim($actpass . " " . $actblock)); + $filterfieldsarray['act'] = $filterfieldsarray['act'] != "" ? $filterfieldsarray['act'] : 'All'; + $filterfieldsarray['time'] = getGETPOSTsettingvalue('filterlogentries_time', null); + $filterfieldsarray['interface'] = getGETPOSTsettingvalue('filterlogentries_interfaces', null); + $filterfieldsarray['srcip'] = getGETPOSTsettingvalue('filterlogentries_sourceipaddress', null); + $filterfieldsarray['srcport'] = getGETPOSTsettingvalue('filterlogentries_sourceport', null); + $filterfieldsarray['dstip'] = getGETPOSTsettingvalue('filterlogentries_destinationipaddress', null); + $filterfieldsarray['dstport'] = getGETPOSTsettingvalue('filterlogentries_destinationport', null); + $filterfieldsarray['proto'] = getGETPOSTsettingvalue('filterlogentries_protocol', null); + $filterfieldsarray['tcpflags'] = getGETPOSTsettingvalue('filterlogentries_protocolflags', null); + $filterlogentries_qty = getGETPOSTsettingvalue('filterlogentries_qty', null); +} + +$filter_logfile = "{$g['varlog_path']}/filter.log"; + +$nentries = $config['syslog']['nentries']; + +# Override Display Quantity +if ($filterlogentries_qty) { + $nentries = $filterlogentries_qty; +} + +if (!$nentries || !is_numeric($nentries)) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($filter_logfile); +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Firewall")); +$shortcut_section = "firewall"; +include("head.inc"); + +?> + + + + + + + + + + + + + +
+ +
+ +
+
+ " summary="main area"> + + + + + + + + + + + + + + + + + + + + + + + +" . find_rule_by_number_buffer($filterent['rulenum'], $filterent['tracker'], $filterent['act']) . ""); + } + + $int = strtolower($filterent['interface']); + $proto = strtolower($filterent['proto']); + if ($filterent['version'] == '6') { + $ipproto = "inet6"; + $filterent['srcip'] = "[{$filterent['srcip']}]"; + $filterent['dstip'] = "[{$filterent['dstip']}]"; + } else { + $ipproto = "inet"; + } + + $srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto); + $src_htmlclass = str_replace(array('.', ':'), '-', $filterent['srcip']); + $dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto); + $dst_htmlclass = str_replace(array('.', ':'), '-', $filterent['dstip']); +?> + + + + + + + + + + + + + + + + + +
+
"> +
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ /> Pass
+ /> Block
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
" />
+
+ ', '');?>   +    +
+
+
+
"> +
+ + + + + + + + + + + +
+
+
+ +
+
+
+
+
+
+
+
+
 
+
" />
+
+ ', '');?>   +
+
+
+ +
" class="listtopic"> + +
+
+ ', outputrule);"> + <?php echo $filterent['act'] .'/'. $filterent['tracker'];?> + + +
+
+ + Direction=OUT + + + + ');" title="" class="ICON-" border="0" src="/themes//images/icons/icon_log.gif" alt="Icon Reverse Resolve with DNS"/> + " title="" onclick="return confirm('')"> + Icon Easy Rule: Add to Block List + + ';?> + + ');" title="" class="ICON-" border="0" src="/themes//images/icons/icon_log.gif" alt="Icon Reverse Resolve with DNS"/> + " title="" onclick="return confirm('')"> + Icon Easy Rule: Pass this traffic + + ';?> +
+
+ +
+
+ " /> +
+
+
+
+ +

TCP Flags: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, W - CWR

+ + + + + + + + diff --git a/src/usr/local/www/diag_logs_filter_dynamic.php b/src/usr/local/www/diag_logs_filter_dynamic.php new file mode 100755 index 0000000..16ced9f --- /dev/null +++ b/src/usr/local/www/diag_logs_filter_dynamic.php @@ -0,0 +1,223 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: filter +*/ + +##|+PRIV +##|*IDENT=page-hidden-nolongerincluded +##|*NAME=Hidden: No longer included page +##|*DESCR=Allow access to the 'Hidden: No longer included' page. +##|*MATCH=diag_logs_filter_dynamic.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter_log.inc"); + +$filter_logfile = "{$g['varlog_path']}/filter.log"; + +/* Hardcode this. AJAX doesn't do so well with large numbers */ +$nentries = 50; + +/* AJAX related routines */ +handle_ajax($nentries, $nentries + 20); + +if ($_POST['clear']) { + clear_log_file($filter_logfile); +} + +$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100); + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Firewall (Dynamic View)")); +$shortcut_section = "firewall"; +include("head.inc"); + +?> + + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ; +
+ ', outputrule);"> + <?php echo $filterent['act'] .'/'. $filterent['tracker'];?> + +
+
+
+

: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR

+ + + diff --git a/src/usr/local/www/diag_logs_filter_summary.php b/src/usr/local/www/diag_logs_filter_summary.php new file mode 100644 index 0000000..331df0d --- /dev/null +++ b/src/usr/local/www/diag_logs_filter_summary.php @@ -0,0 +1,249 @@ + gettext("Actions"), + 'interface' => gettext("Interfaces"), + 'proto' => gettext("Protocols"), + 'srcip' => gettext("Source IPs"), + 'dstip' => gettext("Destination IPs"), + 'srcport' => gettext("Source Ports"), + 'dstport' => gettext("Destination Ports")); + +$summary = array(); +foreach (array_keys($fields) as $f) { + $summary[$f] = array(); +} + +$totals = array(); + +function cmp($a, $b) { + if ($a == $b) { + return 0; + } + return ($a < $b) ? 1 : -1; +} + +function stat_block($summary, $stat, $num) { + global $g, $gotlines, $fields; + uasort($summary[$stat] , 'cmp'); + print ""; + print ""; + $k = array_keys($summary[$stat]); + $total = 0; + $numentries = 0; + for ($i = 0; $i < $num; $i++) { + if ($k[$i]) { + $total += $summary[$stat][$k[$i]]; + $numentries++; + $outstr = $k[$i]; + if (is_ipaddr($outstr)) { + $outstr = "\"log\" {$outstr}"; + } elseif (substr_count($outstr, '/') == 1) { + list($proto, $port) = explode('/', $outstr); + $service = getservbyport($port, strtolower($proto)); + if ($service) { + $outstr .= ": {$service}"; + } + } + print ""; + } + } + $leftover = $gotlines - $total; + if ($leftover > 0) { + print ""; + } + print "
{$fields[$stat]} ".gettext("data")."
{$outstr}{$summary[$stat][$k[$i]]}
Other{$leftover}
"; +} + +function pie_block($summary, $stat, $num) { + global $gotlines, $fields; + uasort($summary[$stat] , 'cmp'); + $k = array_keys($summary[$stat]); + $total = 0; + $numentries = 0; + print "\n\n"; + print ""; + print ""; + print ""; + print "
{$fields[$stat]}
\n"; +} + +foreach ($filterlog as $fe) { + $specialfields = array('srcport', 'dstport'); + foreach (array_keys($fields) as $field) { + if (!in_array($field, $specialfields)) { + $summary[$field][$fe[$field]]++; + } + } + /* Handle some special cases */ + if ($fe['srcport']) { + $summary['srcport'][$fe['proto'].'/'.$fe['srcport']]++; + } else { + $summary['srcport'][$fe['srcport']]++; + } + if ($fe['dstport']) { + $summary['dstport'][$fe['proto'].'/'.$fe['dstport']]++; + } else { + $summary['dstport'][$fe['dstport']]++; + } +} + +include("head.inc"); ?> + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + +
+ +
+ + +
"; + stat_block($summary, $field , $entriesperblock); + echo "

"; +} +?> +
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_gateways.php b/src/usr/local/www/diag_logs_gateways.php new file mode 100755 index 0000000..bb88615 --- /dev/null +++ b/src/usr/local/www/diag_logs_gateways.php @@ -0,0 +1,147 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-logs-gateways +##|*NAME=Diagnostics: Logs: System: Gateways page +##|*DESCR=Allow access to the 'Diagnostics: Logs: System: Gateways' page. +##|*MATCH=diag_logs_gateways.php* +##|-PRIV + +require("guiconfig.inc"); + +$system_logfile = "{$g['varlog_path']}/gateways.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($system_logfile); +} + +if ($_GET['filtertext']) { + $filtertext = htmlspecialchars($_GET['filtertext']); +} + +if ($_POST['filtertext']) { + $filtertext = htmlspecialchars($_POST['filtertext']); +} + +if ($filtertext) { + $filtertextmeta="?filtertext=$filtertext"; +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Gateways")); +$shortcut_section = "gateways"; +include("head.inc"); + +?> + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + + +
+
+ " /> +
+
+
+ + " /> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_ipsec.php b/src/usr/local/www/diag_logs_ipsec.php new file mode 100644 index 0000000..8fa79ce --- /dev/null +++ b/src/usr/local/www/diag_logs_ipsec.php @@ -0,0 +1,123 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /sbin/ifconfig /usr/bin/awk + pfSense_MODULE: ipsec +*/ + +##|+PRIV +##|*IDENT=page-status-systemlogs-ipsecvpn +##|*NAME=Status: System logs: IPsec VPN page +##|*DESCR=Allow access to the 'Status: System logs: IPsec VPN' page. +##|*MATCH=diag_logs_ipsec.php* +##|-PRIV + +require("guiconfig.inc"); +require("ipsec.inc"); + +$ipsec_logfile = "{$g['varlog_path']}/ipsec.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($ipsec_logfile); +} + +$ipsec_logarr = return_clog($ipsec_logfile, $nentries); + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("IPsec VPN")); +$shortcut_section = "ipsec"; +include("head.inc"); + +?> + + + + + + + + + +
+ +
+
+ + + + + \n"; + $entry_date_time = htmlspecialchars(join(" ", array_slice($logent, 0, 3))); + echo "\n"; + echo "\n"; + echo "\n"; + } + ?> + + + +
" . $entry_date_time . "" . $logent[4] . " " . $logent[5] . "
+
+
+ " /> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_ntpd.php b/src/usr/local/www/diag_logs_ntpd.php new file mode 100644 index 0000000..d9f6bf5 --- /dev/null +++ b/src/usr/local/www/diag_logs_ntpd.php @@ -0,0 +1,110 @@ +. + Copyright (C) 2003-2004 Manuel Kasper . + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: ntpd +*/ + +##|+PRIV +##|*IDENT=page-status-systemlogs-ntpd +##|*NAME=Status: System logs: NTP page +##|*DESCR=Allow access to the 'Status: System logs: NTP' page. +##|*MATCH=diag_logs_ntpd.php* +##|-PRIV + +require("guiconfig.inc"); + +$ntpd_logfile = "{$g['varlog_path']}/ntpd.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($ntpd_logfile); +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("NTP")); +$shortcut_section = "ntp"; +include("head.inc"); + +?> + + + + + + + + + + +
+ +
+
+ + + + + + + + +
+ +
+
+
+ " /> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_openvpn.php b/src/usr/local/www/diag_logs_openvpn.php new file mode 100644 index 0000000..374014d --- /dev/null +++ b/src/usr/local/www/diag_logs_openvpn.php @@ -0,0 +1,111 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: openvpn +*/ + +##|+PRIV +##|*IDENT=page-status-systemlogs-openvpn +##|*NAME=Status: System logs: OpenVPN page +##|*DESCR=Allow access to the 'Status: System logs: OpenVPN' page. +##|*MATCH=diag_logs_openvpn.php* +##|-PRIV + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("OpenVPN")); +$shortcut_section = "openvpn"; + +require("guiconfig.inc"); +require_once("vpn.inc"); + +$openvpn_logfile = "{$g['varlog_path']}/openvpn.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($openvpn_logfile); +} + +include("head.inc"); + +?> + + + + + + + + + +
+ +
+
+ + + + + + + + +
+
+
+ " /> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_ppp.php b/src/usr/local/www/diag_logs_ppp.php new file mode 100644 index 0000000..4ef3f9c --- /dev/null +++ b/src/usr/local/www/diag_logs_ppp.php @@ -0,0 +1,109 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /sbin/ifconfig /usr/bin/awk + pfSense_MODULE: +*/ + +##|+PRIV +##|*IDENT=page-status-systemlogs-ppp +##|*NAME=Status: System logs: IPsec VPN page +##|*DESCR=Allow access to the 'Status: System logs: IPsec VPN' page. +##|*MATCH=diag_logs_ppp.php* +##|-PRIV + +require("guiconfig.inc"); + +$ppp_logfile = "{$g['varlog_path']}/ppp.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($ppp_logfile); +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("PPP")); +include("head.inc"); + +?> + + + + + + + + + +
+ +
+
+ + + + + + + + +
+
+
+ " /> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_relayd.php b/src/usr/local/www/diag_logs_relayd.php new file mode 100644 index 0000000..5468761 --- /dev/null +++ b/src/usr/local/www/diag_logs_relayd.php @@ -0,0 +1,111 @@ +. + Copyright (C) 2008 Seth Mos . + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-status-systemlogs-loadbalancer +##|*NAME=Status: System logs: Load Balancer page +##|*DESCR=Allow access to the 'Status: System logs: Load Balancer' page. +##|*MATCH=diag_logs_relayd.php* +##|-PRIV + +require("guiconfig.inc"); + +$relayd_logfile = "{$g['varlog_path']}/relayd.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($relayd_logfile); +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Load Balancer")); +$shortcut_section = "relayd"; +include("head.inc"); + +?> + + + + + + + + + + +
+ +
+
+ + + + + + + + +
+ +
+
+
+ " /> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_resolver.php b/src/usr/local/www/diag_logs_resolver.php new file mode 100755 index 0000000..73e39a9 --- /dev/null +++ b/src/usr/local/www/diag_logs_resolver.php @@ -0,0 +1,152 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-logs-resolver +##|*NAME=Diagnostics: Logs: System: Resolver page +##|*DESCR=Allow access to the 'Diagnostics: Logs: System: Resolver' page. +##|*MATCH=diag_logs_resolver.php* +##|-PRIV + +require("guiconfig.inc"); + +$system_logfile = "{$g['varlog_path']}/resolver.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($system_logfile); +} + +if ($_GET['filtertext']) { + $filtertext = htmlspecialchars($_GET['filtertext']); +} + +if ($_POST['filtertext']) { + $filtertext = htmlspecialchars($_POST['filtertext']); +} + +if ($filtertext) { + $filtertextmeta="?filtertext=$filtertext"; +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Resolver")); +if (isset($config['dnsmasq']['enable'])) { + $shortcut_section = "forwarder"; +} else { + $shortcut_section = "resolver"; +} + +include("head.inc"); + +?> + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + + +
+
+ " /> +
+
+
+ + " /> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_routing.php b/src/usr/local/www/diag_logs_routing.php new file mode 100644 index 0000000..debbf18 --- /dev/null +++ b/src/usr/local/www/diag_logs_routing.php @@ -0,0 +1,123 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-status-systemlogs-routing +##|*NAME=Status: System logs: Routing page +##|*DESCR=Allow access to the 'Status: System logs: System: Routing' page. +##|*MATCH=diag_logs_routing.php* +##|-PRIV + +require("guiconfig.inc"); + +$routing_logfile = "{$g['varlog_path']}/routing.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($routing_logfile); +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Routing")); +$shortcut_section = "routing"; +include("head.inc"); + +?> + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + +
+ +
+
+
+ " /> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_logs_settings.php b/src/usr/local/www/diag_logs_settings.php new file mode 100644 index 0000000..c9f2791 --- /dev/null +++ b/src/usr/local/www/diag_logs_settings.php @@ -0,0 +1,517 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-logs-settings +##|*NAME=Diagnostics: Logs: Settings page +##|*DESCR=Allow access to the 'Diagnostics: Logs: Settings' page. +##|*MATCH=diag_logs_settings.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +$pconfig['reverse'] = isset($config['syslog']['reverse']); +$pconfig['nentries'] = $config['syslog']['nentries']; +$pconfig['remoteserver'] = $config['syslog']['remoteserver']; +$pconfig['remoteserver2'] = $config['syslog']['remoteserver2']; +$pconfig['remoteserver3'] = $config['syslog']['remoteserver3']; +$pconfig['sourceip'] = $config['syslog']['sourceip']; +$pconfig['ipproto'] = $config['syslog']['ipproto']; +$pconfig['filter'] = isset($config['syslog']['filter']); +$pconfig['dhcp'] = isset($config['syslog']['dhcp']); +$pconfig['portalauth'] = isset($config['syslog']['portalauth']); +$pconfig['vpn'] = isset($config['syslog']['vpn']); +$pconfig['apinger'] = isset($config['syslog']['apinger']); +$pconfig['relayd'] = isset($config['syslog']['relayd']); +$pconfig['hostapd'] = isset($config['syslog']['hostapd']); +$pconfig['logall'] = isset($config['syslog']['logall']); +$pconfig['system'] = isset($config['syslog']['system']); +$pconfig['enable'] = isset($config['syslog']['enable']); +$pconfig['logdefaultblock'] = !isset($config['syslog']['nologdefaultblock']); +$pconfig['logdefaultpass'] = isset($config['syslog']['nologdefaultpass']); +$pconfig['logbogons'] = !isset($config['syslog']['nologbogons']); +$pconfig['logprivatenets'] = !isset($config['syslog']['nologprivatenets']); +$pconfig['loglighttpd'] = !isset($config['syslog']['nologlighttpd']); +$pconfig['rawfilter'] = isset($config['syslog']['rawfilter']); +$pconfig['filterdescriptions'] = $config['syslog']['filterdescriptions']; +$pconfig['disablelocallogging'] = isset($config['syslog']['disablelocallogging']); +$pconfig['logfilesize'] = $config['syslog']['logfilesize']; + +if (!$pconfig['nentries']) { + $pconfig['nentries'] = 50; +} + +function is_valid_syslog_server($target) { + return (is_ipaddr($target) + || is_ipaddrwithport($target) + || is_hostname($target) + || is_hostnamewithport($target)); +} + +if ($_POST['resetlogs'] == gettext("Reset Log Files")) { + clear_all_log_files(); + $savemsg .= gettext("The log files have been reset."); +} elseif ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if ($_POST['enable'] && !is_valid_syslog_server($_POST['remoteserver'])) { + $input_errors[] = gettext("A valid IP address/hostname or IP/hostname:port must be specified for remote syslog server #1."); + } + if ($_POST['enable'] && $_POST['remoteserver2'] && !is_valid_syslog_server($_POST['remoteserver2'])) { + $input_errors[] = gettext("A valid IP address/hostname or IP/hostname:port must be specified for remote syslog server #2."); + } + if ($_POST['enable'] && $_POST['remoteserver3'] && !is_valid_syslog_server($_POST['remoteserver3'])) { + $input_errors[] = gettext("A valid IP address/hostname or IP/hostname:port must be specified for remote syslog server #3."); + } + + if (($_POST['nentries'] < 5) || ($_POST['nentries'] > 2000)) { + $input_errors[] = gettext("Number of log entries to show must be between 5 and 2000."); + } + + if (isset($_POST['logfilesize']) && (strlen($_POST['logfilesize']) > 0)) { + if (!is_numeric($_POST['logfilesize']) || ($_POST['logfilesize'] < 100000)) { + $input_errors[] = gettext("Log file size must be numeric and greater than or equal to 100000."); + } + } + if (!$input_errors) { + $config['syslog']['reverse'] = $_POST['reverse'] ? true : false; + $config['syslog']['nentries'] = (int)$_POST['nentries']; + $pconfig['nentries'] = $config['syslog']['nentries']; + if (isset($_POST['logfilesize']) && (strlen($_POST['logfilesize']) > 0)) { + $config['syslog']['logfilesize'] = (int)$_POST['logfilesize']; + $pconfig['logfilesize'] = $config['syslog']['logfilesize']; + } else { + unset($config['syslog']['logfilesize']); + } + $config['syslog']['remoteserver'] = $_POST['remoteserver']; + $config['syslog']['remoteserver2'] = $_POST['remoteserver2']; + $config['syslog']['remoteserver3'] = $_POST['remoteserver3']; + $config['syslog']['sourceip'] = $_POST['sourceip']; + $config['syslog']['ipproto'] = $_POST['ipproto']; + $config['syslog']['filter'] = $_POST['filter'] ? true : false; + $config['syslog']['dhcp'] = $_POST['dhcp'] ? true : false; + $config['syslog']['portalauth'] = $_POST['portalauth'] ? true : false; + $config['syslog']['vpn'] = $_POST['vpn'] ? true : false; + $config['syslog']['apinger'] = $_POST['apinger'] ? true : false; + $config['syslog']['relayd'] = $_POST['relayd'] ? true : false; + $config['syslog']['hostapd'] = $_POST['hostapd'] ? true : false; + $config['syslog']['logall'] = $_POST['logall'] ? true : false; + $config['syslog']['system'] = $_POST['system'] ? true : false; + $config['syslog']['disablelocallogging'] = $_POST['disablelocallogging'] ? true : false; + $config['syslog']['enable'] = $_POST['enable'] ? true : false; + $oldnologdefaultblock = isset($config['syslog']['nologdefaultblock']); + $oldnologdefaultpass = isset($config['syslog']['nologdefaultpass']); + $oldnologbogons = isset($config['syslog']['nologbogons']); + $oldnologprivatenets = isset($config['syslog']['nologprivatenets']); + $oldnologlighttpd = isset($config['syslog']['nologlighttpd']); + $config['syslog']['nologdefaultblock'] = $_POST['logdefaultblock'] ? false : true; + $config['syslog']['nologdefaultpass'] = $_POST['logdefaultpass'] ? true : false; + $config['syslog']['nologbogons'] = $_POST['logbogons'] ? false : true; + $config['syslog']['nologprivatenets'] = $_POST['logprivatenets'] ? false : true; + $config['syslog']['nologlighttpd'] = $_POST['loglighttpd'] ? false : true; + $config['syslog']['rawfilter'] = $_POST['rawfilter'] ? true : false; + if (is_numeric($_POST['filterdescriptions']) && $_POST['filterdescriptions'] > 0) { + $config['syslog']['filterdescriptions'] = $_POST['filterdescriptions']; + } else { + unset($config['syslog']['filterdescriptions']); + } + if ($config['syslog']['enable'] == false) { + unset($config['syslog']['remoteserver']); + unset($config['syslog']['remoteserver2']); + unset($config['syslog']['remoteserver3']); + } + + write_config(); + + $retval = 0; + $retval = system_syslogd_start(); + if (($oldnologdefaultblock !== isset($config['syslog']['nologdefaultblock'])) || + ($oldnologdefaultpass !== isset($config['syslog']['nologdefaultpass'])) || + ($oldnologbogons !== isset($config['syslog']['nologbogons'])) || + ($oldnologprivatenets !== isset($config['syslog']['nologprivatenets']))) { + $retval |= filter_configure(); + } + + $savemsg = get_std_save_message($retval); + + if ($oldnologlighttpd !== isset($config['syslog']['nologlighttpd'])) { + ob_flush(); + flush(); + log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator.")); + send_event("service restart webgui"); + $savemsg .= "
" . gettext("WebGUI process is restarting."); + } + + filter_pflog_start(true); + } +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Settings")); +$closehead = false; +include("head.inc"); + +?> + + + + + + +
+ + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Forward/Reverse Display + /> + +
GUI Log Entries to Display +
+ +
Log File Size (Bytes) +
+ +

+ + + . + . +
Log Firewall Default Blocks + /> +
+ +
+ /> +
+ +
+ /> +
+
+ /> +
+
Web Server Log + /> +
+ +
Raw Logs + /> +
+ +
Filter descriptions + + +
+ +
Local Logging + onclick="enable_change(false)" /> + + + + + + + +
Reset Logs + " onclick="return confirm('')" /> +

+ +
 
+ +
+ + +

+ +
+ +
+ +
+ onclick="enable_change(false)" /> + +
+ + + + + + + + + + + + + + + + + +
 
+
+ onclick="check_everything();" /> +

+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+ /> +
+
  + " onclick="enable_change(true)" /> +
  + + + + + +
+ . +
+
+
+
+ + + + diff --git a/src/usr/local/www/diag_logs_vpn.php b/src/usr/local/www/diag_logs_vpn.php new file mode 100755 index 0000000..d1dc748 --- /dev/null +++ b/src/usr/local/www/diag_logs_vpn.php @@ -0,0 +1,211 @@ +#!/usr/local/bin/php +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /usr/sbin/fifolog_reader /usr/local/sbin/clog + pfSense_MODULE: vpn +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-logs-pptpvpn +##|*NAME=Diagnostics: Logs: VPN page +##|*DESCR=Allow access to the 'Diagnostics: Logs: VPN' page. +##|*MATCH=diag_logs_vpn.php* +##|-PRIV + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("VPN")); +require("guiconfig.inc"); +require_once("vpn.inc"); + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if (htmlspecialchars($_POST['vpntype'])) { + $vpntype = htmlspecialchars($_POST['vpntype']); +} elseif (htmlspecialchars($_GET['vpntype'])) { + $vpntype = htmlspecialchars($_GET['vpntype']); +} else { + $vpntype = "pptp"; +} +if (htmlspecialchars($_POST['mode'])) { + $mode = htmlspecialchars($_POST['mode']); +} elseif (htmlspecialchars($_GET['mode'])) { + $mode = htmlspecialchars($_GET['mode']); +} else { + $mode = "login"; +} +switch ($vpntype) { + case 'pptp': + $logname = "pptps"; + break; + case 'poes': + $logname = "poes"; + break; + case 'l2tp': + $logname = "l2tps"; + break; +} + +if ($_POST['clear']) { + if ($mode != "raw") { + clear_log_file("/var/log/vpn.log"); + } else { + clear_log_file("/var/log/{$logname}.log"); + } +} + +function dump_clog_vpn($logfile, $tail) { + global $g, $config, $vpntype; + + $sor = isset($config['syslog']['reverse']) ? "-r" : ""; + + $logarr = ""; + + if (isset($config['system']['usefifolog'])) { + exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr); + } else { + exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr); + } + + foreach ($logarr as $logent) { + $logent = preg_split("/\s+/", $logent, 6); + $llent = explode(",", $logent[5]); + $iftype = substr($llent[1], 0, 4); + if ($iftype != $vpntype) { + continue; + } + echo "\n"; + echo "" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "\n"; + + if ($llent[0] == "login") { + echo "\"in\"\n"; + } else { + echo "\"out\"\n"; + } + + echo "" . htmlspecialchars($llent[3]) . "\n"; + echo "" . htmlspecialchars($llent[2]) . " \n"; + echo "\n"; + } +} + +include("head.inc"); + +?> + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + + + + + + +
+ +
+
+ + + " /> +
+
+ + + diff --git a/src/usr/local/www/diag_logs_wireless.php b/src/usr/local/www/diag_logs_wireless.php new file mode 100644 index 0000000..4979d1e --- /dev/null +++ b/src/usr/local/www/diag_logs_wireless.php @@ -0,0 +1,125 @@ +. + Copyright (C) 2008 Seth Mos . + Copyright (C) 2011 Jim Pingle . + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-status-systemlogs-wireless +##|*NAME=Status: System logs: Wireless page +##|*DESCR=Allow access to the 'Status: System logs: System: Wireless' page. +##|*MATCH=diag_logs_wireless.php* +##|-PRIV + +require("guiconfig.inc"); + +$wireless_logfile = "{$g['varlog_path']}/wireless.log"; + +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +if ($_POST['clear']) { + clear_log_file($wireless_logfile); +} + +$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Wireless")); +$shortcut_section = "wireless"; +include("head.inc"); + +?> + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + +
+ +
+
+
+ " /> +
+
+
+
+ + + diff --git a/src/usr/local/www/diag_nanobsd.php b/src/usr/local/www/diag_nanobsd.php new file mode 100644 index 0000000..63a4f35 --- /dev/null +++ b/src/usr/local/www/diag_nanobsd.php @@ -0,0 +1,289 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /sbin/mount /sbin/glabel /usr/bin/grep /usr/bin/cut /usr/bin/head /bin/cp + pfSense_BUILDER_BINARIES: /usr/sbin/boot0cfg /bin/mkdir /sbin/fsck_ufs /sbin/mount /bin/dd /sbin/tunefs + pfSense_MODULE: nanobsd +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-nanobsd +##|*NAME=Diagnostics: NanoBSD +##|*DESCR=Allow access to the 'Diagnostics: NanoBSD' page. +##|*MATCH=diag_nanobsd.php* +##|-PRIV + +ini_set('zlib.output_compression', 0); +ini_set('implicit_flush', 1); +ini_set('max_input_time', '9999'); + +require_once("guiconfig.inc"); +require_once("config.inc"); + +$pgtitle = array(gettext("Diagnostics"), gettext("NanoBSD")); +include("head.inc"); + +// Survey slice info +global $SLICE, $OLDSLICE, $TOFLASH, $COMPLETE_PATH, $COMPLETE_BOOT_PATH; +global $GLABEL_SLICE, $UFS_ID, $OLD_UFS_ID, $BOOTFLASH; +global $BOOT_DEVICE, $REAL_BOOT_DEVICE, $BOOT_DRIVE, $ACTIVE_SLICE; +nanobsd_detect_slice_info(); + +?> + +"> + + + + + + $statusmsg +

  + +EOF; + nanobsd_switch_boot_slice(); + $savemsg = gettext("The boot slice has been set to") . " " . nanobsd_get_active_slice(); + // Survey slice info + nanobsd_detect_slice_info(); + +} + +if ($_POST['destslice']) { + $statusmsg = gettext("Duplicating slice. Please wait, this will take a moment..."); + echo << + + $statusmsg +

  + +EOF; + if (nanobsd_clone_slice($_POST['destslice'])) { + $savemsg = gettext("The slice has been duplicated.") . "

" . gettext("If you would like to boot from this newly duplicated slice please set it using the bootup information area."); + } else { + $savemsg = gettext("There was an error while duplicating the slice. Operation aborted."); + } + // Re-Survey slice info + nanobsd_detect_slice_info(); +} + +if ($_POST['changero']) { + if (is_writable("/")) { + conf_mount_ro(); + } else { + conf_mount_rw(); + } +} + +if ($_POST['setrw']) { + conf_mount_rw(); + if (isset($_POST['nanobsd_force_rw'])) { + $config['system']['nanobsd_force_rw'] = true; + } else { + unset($config['system']['nanobsd_force_rw']); + } + + write_config("Changed Permanent Read/Write Setting"); + conf_mount_ro(); +} + +if ($savemsg) { + print_info_box($savemsg); +} + +?> + + + + + + + +
+ +
+
+ + +   + + +
  +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +

+
+ +
+
 
Current Read/Write Status: +
+ "; + } + } else { + echo gettext("Read-Only"); + if (!isset($config['system']['nanobsd_force_rw'])) { + echo "
"; + } + } ?> +
+
+
Permanent Read/Write: +
+ > +
+
+
 
+
+ + +
+ +
+
+
 
+ Advanced, Miscellaneous tab")?>. +
 
+ "; + echo str_ireplace("pfsense", $g['product_name'], file_get_contents("/conf/upgrade_log.txt")); + echo "\nFile list:\n"; + echo str_ireplace("pfsense", $g['product_name'], file_get_contents("/conf/file_upgrade_log.txt")); + echo "\nMisc log:\n"; + echo str_ireplace("pfsense", $g['product_name'], file_get_contents("/conf/firmware_update_misc_log.txt")); + echo "\nfdisk/bsdlabel log:\n"; + echo str_ireplace("pfsense", $g['product_name'], file_get_contents("/conf/fdisk_upgrade_log.txt")); + echo ""; + } else { + echo "
"; + echo ""; + } + ?> +
 
+

+
+ + + + +"; +echo "jQuery('#loading').html('');"; +echo ""; + +?> diff --git a/src/usr/local/www/diag_ndp.php b/src/usr/local/www/diag_ndp.php new file mode 100644 index 0000000..233d8ee --- /dev/null +++ b/src/usr/local/www/diag_ndp.php @@ -0,0 +1,184 @@ + + Copyright (C) 2011 Seth Mos + All rights reserved. + + originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2005 Paul Taylor (paultaylor@winndixie.com) and Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /bin/cat /usr/sbin/arp + pfSense_MODULE: arp +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-ndptable +##|*NAME=Diagnostics: NDP Table page +##|*DESCR=Allow access to the 'Diagnostics: NDP Table' page. +##|*MATCH=diag_ndp.php* +##|-PRIV + +@ini_set('zlib.output_compression', 0); +@ini_set('implicit_flush', 1); + +require("guiconfig.inc"); + +exec("/usr/sbin/ndp -na", $rawdata); + +$i = 0; + +/* if list */ +$ifdescrs = get_configured_interface_with_descr(); + +foreach ($ifdescrs as $key =>$interface) { + $hwif[$config['interfaces'][$key]['if']] = $interface; +} + +/* Array ( [0] => Neighbor [1] => Linklayer [2] => Address +[3] => Netif [4] => Expire [5] => S +[6] => Flags ) */ +$data = array(); +array_shift($rawdata); +foreach ($rawdata as $line) { + $elements = preg_split('/[ ]+/', $line); + + $ndpent = array(); + $ndpent['ipv6'] = trim($elements[0]); + $ndpent['mac'] = trim($elements[1]); + $ndpent['interface'] = trim($elements[2]); + $data[] = $ndpent; +} + +/* FIXME: Not ipv6 compatible dns resolving. PHP needs fixing */ +function _getHostName($mac, $ip) { + if (is_ipaddr($ip)) { + list($ip, $scope) = explode("%", $ip); + if (gethostbyaddr($ip) <> "" and gethostbyaddr($ip) <> $ip) { + return gethostbyaddr($ip); + } else { + return ""; + } + } +} + +// Resolve hostnames and replace Z_ with "". The intention +// is to sort the list by hostnames, alpha and then the non +// resolvable addresses will appear last in the list. +foreach ($data as &$entry) { + $dns = trim(_getHostName($entry['mac'], $entry['ipv6'])); + if (trim($dns)) { + $entry['dnsresolve'] = "$dns"; + } else { + $entry['dnsresolve'] = "Z_ "; + } +} + +// Sort the data alpha first +$data = msort($data, "dnsresolve"); + +// Load MAC-Manufacturer table +$mac_man = load_mac_manufacturer_table(); + +$pgtitle = array(gettext("Diagnostics"), gettext("NDP Table")); +include("head.inc"); + +?> + + + + + +

+ loader +

 

+
+ + + + + + +
+ + + + + + + + + + + + + + + + +
+ {$mac_man[$mac_hi]}"; + } + ?> + + + + +
+
+ + + + + + diff --git a/src/usr/local/www/diag_packet_capture.php b/src/usr/local/www/diag_packet_capture.php new file mode 100644 index 0000000..14be5d1 --- /dev/null +++ b/src/usr/local/www/diag_packet_capture.php @@ -0,0 +1,485 @@ + 0) ? get_host_boolean($value, $host) : ""; + if (is_ipaddr($host)) { + return "{$andor}host {$not}" . $host; + } elseif (is_subnet($host)) { + return "{$andor}net {$not}" . $host; + } else { + return ""; + } +} + +if ($_POST['downloadbtn'] == gettext("Download Capture")) { + $nocsrf = true; +} + +$pgtitle = array(gettext("Diagnostics"), gettext("Packet Capture")); +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); + +$fp = "/root/"; +$fn = "packetcapture.cap"; +$snaplen = 0;//default packet length +$count = 100;//default number of packets to capture + +$fams = array('ip', 'ip6'); +$protos = array('icmp', 'icmp6', 'tcp', 'udp', 'arp', 'carp', 'esp', + '!icmp', '!icmp6', '!tcp', '!udp', '!arp', '!carp', '!esp'); + +$input_errors = array(); + +$interfaces = get_configured_interface_with_descr(); +if (isset($config['ipsec']['enable'])) { + $interfaces['ipsec'] = "IPsec"; +} +foreach (array('server', 'client') as $mode) { + if (is_array($config['openvpn']["openvpn-{$mode}"])) { + foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { + if (!isset($setting['disable'])) { + $interfaces['ovpn' . substr($mode, 0, 1) . $setting['vpnid']] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']); + } + } + } +} + +if ($_POST) { + $host = $_POST['host']; + $selectedif = $_POST['interface']; + $count = $_POST['count']; + $snaplen = $_POST['snaplen']; + $port = $_POST['port']; + $detail = $_POST['detail']; + $fam = $_POST['fam']; + $proto = $_POST['proto']; + + if (!array_key_exists($selectedif, $interfaces)) { + $input_errors[] = gettext("Invalid interface."); + } + if ($fam !== "" && $fam !== "ip" && $fam !== "ip6") { + $input_errors[] = gettext("Invalid address family."); + } + if ($proto !== "" && !in_array(strip_not($proto), $protos)) { + $input_errors[] = gettext("Invalid protocol."); + } + + if ($host != "") { + $host_string = str_replace(array(" ", "|", ","), array("", "#|", "#+"), $host); + if (strpos($host_string, '#') === false) { + $hosts = array($host); + } else { + $hosts = explode('#', $host_string); + } + foreach ($hosts as $h) { + if (!is_subnet(strip_host_logic($h)) && !is_ipaddr(strip_host_logic($h))) { + $input_errors[] = sprintf(gettext("A valid IP address or CIDR block must be specified. [%s]"), $h); + } + } + } + if ($port != "") { + if (!is_port(strip_not($port))) { + $input_errors[] = gettext("Invalid value specified for port."); + } + } + if ($snaplen == "") { + $snaplen = 0; + } else { + if (!is_numeric($snaplen) || $snaplen < 0) { + $input_errors[] = gettext("Invalid value specified for packet length."); + } + } + if ($count == "") { + $count = 0; + } else { + if (!is_numeric($count) || $count < 0) { + $input_errors[] = gettext("Invalid value specified for packet count."); + } + } + + if (!count($input_errors)) { + $do_tcpdump = true; + + conf_mount_rw(); + + if ($_POST['promiscuous']) { + //if promiscuous mode is checked + $disablepromiscuous = ""; + } else { + //if promiscuous mode is unchecked + $disablepromiscuous = "-p"; + } + + if ($_POST['dnsquery']) { + //if dns lookup is checked + $disabledns = ""; + } else { + //if dns lookup is unchecked + $disabledns = "-n"; + } + + if ($_POST['startbtn'] != "") { + $action = gettext("Start"); + + //delete previous packet capture if it exists + if (file_exists($fp.$fn)) { + unlink ($fp.$fn); + } + + } elseif ($_POST['stopbtn'] != "") { + $action = gettext("Stop"); + $processes_running = trim(shell_exec("/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep {$fn} | /usr/bin/egrep -v '(pflog|grep)'")); + + //explode processes into an array, (delimiter is new line) + $processes_running_array = explode("\n", $processes_running); + + //kill each of the packetcapture processes + foreach ($processes_running_array as $process) { + $process_id_pos = strpos($process, ' '); + $process_id = substr($process, 0, $process_id_pos); + exec("kill $process_id"); + } + + } elseif ($_POST['downloadbtn'] != "") { + //download file + $fs = filesize($fp.$fn); + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename=$fn"); + header("Content-Length: $fs"); + readfile($fp.$fn); + exit; + } + } +} else { + $do_tcpdump = false; +} + +include("head.inc"); ?> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ /> +
+
: +
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+ +
+
+ +
" . gettext("Enter 0 (zero) for no count limit.");?> +
+ +
+ " . + gettext("Note:") . " " . + gettext("This option does not affect the level of detail when downloading the packet capture.");?> +
+ /> +
+
: +
  + "; + } else { + echo " "; + } + if (file_exists($fp.$fn) and $processisrunning != true) { + echo " "; + echo ""; + echo "
" . gettext("The packet capture file was last updated:") . " " . date("F jS, Y g:i:s a.", filemtime($fp.$fn)); + } +?> +
+ + + + + +
+"; + if ($processisrunning == true) { + echo("" . gettext("Packet Capture is running.") . "
"); + } + + if ($do_tcpdump) { + $matches = array(); + + if (in_array($fam, $fams)) { + $matches[] = $fam; + } + + if (in_array($proto, $protos)) { + $matches[] = fixup_not($proto); + } + + if ($port != "") { + $matches[] = "port ".fixup_not($port); + } + + if ($host != "") { + $hostmatch = ""; + $hostcount = 0; + foreach ($hosts as $h) { + $h = fixup_host($h, $hostcount++); + if (!empty($h)) { + $hostmatch .= " " . $h; + } + } + if (!empty($hostmatch)) { + $matches[] = "({$hostmatch})"; + } + } + + if ($count != "0") { + $searchcount = "-c " . $count; + } else { + $searchcount = ""; + } + + $selectedif = convert_friendly_interface_to_real_interface_name($selectedif); + + if ($action == gettext("Start")) { + $matchstr = implode($matches, " and "); + echo("" . gettext("Packet Capture is running.") . "
"); + $cmd = "/usr/sbin/tcpdump -i {$selectedif} {$disablepromiscuous} {$searchcount} -s {$snaplen} -w {$fp}{$fn} " . escapeshellarg($matchstr); + // Debug + //echo $cmd; + mwexec_bg ($cmd); + } else { + //action = stop + echo("" . gettext("Packet Capture stopped.") . "

" . gettext("Packets Captured:") . "

"); +?> + + + +   +
+
+ + + + diff --git a/src/usr/local/www/diag_patterns.php b/src/usr/local/www/diag_patterns.php new file mode 100644 index 0000000..1c3528d --- /dev/null +++ b/src/usr/local/www/diag_patterns.php @@ -0,0 +1,97 @@ + + + + +" . $ulmsg . "

\n"; ?> +
+
+ + + + + + + + + + + + + + + +
+ +
    + " /> +
+
+
+ + + diff --git a/src/usr/local/www/diag_pf_info.php b/src/usr/local/www/diag_pf_info.php new file mode 100644 index 0000000..369c0f4 --- /dev/null +++ b/src/usr/local/www/diag_pf_info.php @@ -0,0 +1,117 @@ +"; + $text .= `/sbin/pfctl -vvsm`; + $text .= "

"; + $text .= `/sbin/pfctl -vvst`; + $text .= "

"; + $text .= `/sbin/pfctl -vvsI`; + echo $text; + exit; +} + +include("head.inc"); + +?> + + + +

+"; + print_info_box($savemsg); + echo "
"; + } + if ($input_errors) { + print_input_errors($input_errors); + } +?> + + + + +
+ + + + +
+ + + + +
+
+ +
+
+
+
+ + + + diff --git a/src/usr/local/www/diag_ping.php b/src/usr/local/www/diag_ping.php new file mode 100644 index 0000000..102b097 --- /dev/null +++ b/src/usr/local/www/diag_ping.php @@ -0,0 +1,202 @@ +. + All rights reserved. + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /sbin/ping /sbin/ping6 + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-ping +##|*NAME=Diagnostics: Ping page +##|*DESCR=Allow access to the 'Diagnostics: Ping' page. +##|*MATCH=diag_ping.php* +##|-PRIV + +$allowautocomplete = true; +$pgtitle = array(gettext("Diagnostics"), gettext("Ping")); +require_once("guiconfig.inc"); + +define('MAX_COUNT', 10); +define('DEFAULT_COUNT', 3); + +if ($_POST || $_REQUEST['host']) { + unset($input_errors); + unset($do_ping); + + /* input validation */ + $reqdfields = explode(" ", "host count"); + $reqdfieldsn = array(gettext("Host"), gettext("Count")); + do_input_validation($_REQUEST, $reqdfields, $reqdfieldsn, $input_errors); + + if (($_REQUEST['count'] < 1) || ($_REQUEST['count'] > MAX_COUNT)) { + $input_errors[] = sprintf(gettext("Count must be between 1 and %s"), MAX_COUNT); + } + + $host = trim($_REQUEST['host']); + $ipproto = $_REQUEST['ipproto']; + if (($ipproto == "ipv4") && is_ipaddrv6($host)) { + $input_errors[] = gettext("When using IPv4, the target host must be an IPv4 address or hostname."); + } + if (($ipproto == "ipv6") && is_ipaddrv4($host)) { + $input_errors[] = gettext("When using IPv6, the target host must be an IPv6 address or hostname."); + } + + if (!$input_errors) { + $do_ping = true; + $sourceip = $_REQUEST['sourceip']; + $count = $_POST['count']; + if (preg_match('/[^0-9]/', $count)) { + $count = DEFAULT_COUNT; + } + } +} +if (!isset($do_ping)) { + $do_ping = false; + $host = ''; + $count = DEFAULT_COUNT; +} + +include("head.inc"); ?> + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
  + " /> +
+ "; + echo "" . gettext("Ping output") . ":
"; + ?> + + "; + $ifscope = ''; + $command = "/sbin/ping"; + if ($ipproto == "ipv6") { + $command .= "6"; + $ifaddr = is_ipaddr($sourceip) ? $sourceip : get_interface_ipv6($sourceip); + if (is_linklocal($ifaddr)) { + $ifscope = get_ll_scope($ifaddr); + } + } else { + $ifaddr = is_ipaddr($sourceip) ? $sourceip : get_interface_ip($sourceip); + } + if ($ifaddr && (is_ipaddr($host) || is_hostname($host))) { + $srcip = "-S" . escapeshellarg($ifaddr); + if (is_linklocal($host) && !strstr($host, "%") && !empty($ifscope)) { + $host .= "%{$ifscope}"; + } + } + + $cmd = "{$command} {$srcip} -c" . escapeshellarg($count) . " " . escapeshellarg($host); + //echo "Ping command: {$cmd}\n"; + system($cmd); + echo(' '); + } + ?> +
  
+
+
+ + + diff --git a/src/usr/local/www/diag_pkglogs.php b/src/usr/local/www/diag_pkglogs.php new file mode 100755 index 0000000..6575c48 --- /dev/null +++ b/src/usr/local/www/diag_pkglogs.php @@ -0,0 +1,147 @@ + + arpwatch + arpwatch + + + + /var/log/arpwatch.log + +*/ + +/* + pfSense_BUILDER_BINARIES: /usr/bin/netstat + pfSense_MODULE: pkgs +*/ + +##|+PRIV +##|*IDENT=page-status-packagelogs +##|*NAME=Status: Package logs page +##|*DESCR=Allow access to the 'Status: Package logs' page. +##|*MATCH=diag_pkglogs.php* +##|-PRIV + +require("guiconfig.inc"); +require("pkg-utils.inc"); + +if (!($nentries = $config['syslog']['nentries'])) { + $nentries = 50; +} + +//if ($_POST['clear']) +// clear_log_file($logfile); + +$i = 0; +$pkgwithlogging = false; +$apkg = $_GET['pkg']; +if (!$apkg) { // If we aren't looking for a specific package, locate the first package that handles logging. + if ($config['installedpackages']['package'] <> "") { + foreach ($config['installedpackages']['package'] as $package) { + if (is_array($package['logging'])) { + $pkgwithlogging = true; + $apkg = $package['name']; + $apkgid = $i; + break; + } + $i++; + } + } +} elseif ($apkg) { + $apkgid = get_package_id($apkg); + if ($apkgid != -1) { + $pkgwithlogging = true; + $i = $apkgid; + } +} + +$pgtitle = array(gettext("Status"), gettext("Package logs")); +include("head.inc"); + +?> + + + + +
+
'; + include("fend.inc"); + exit; + } + $tab_array = array(); + foreach ($config['installedpackages']['package'] as $package) { + if (is_array($package['logging'])) { + if (!($logtab = $package['logging']['logtab'])) { + $logtab = $package['name']; + } + if ($apkg == $package['name']) { + $curtab = $logtab; + $tab_array[] = array(sprintf(gettext("%s"), $logtab), true, "diag_pkglogs.php?pkg=".$package['name']); + } else { + $tab_array[] = array(sprintf(gettext("%s"), $logtab), false, "diag_pkglogs.php?pkg=".$package['name']); + } + } + } + display_top_tabs($tab_array); + ?> + + + + +
+ + + + + +
+ +
+ +
+ + + + + + diff --git a/src/usr/local/www/diag_resetstate.php b/src/usr/local/www/diag_resetstate.php new file mode 100644 index 0000000..07d3575 --- /dev/null +++ b/src/usr/local/www/diag_resetstate.php @@ -0,0 +1,143 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_MODULE: filter +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-resetstate +##|*NAME=Diagnostics: Reset state page +##|*DESCR=Allow access to the 'Diagnostics: Reset state' page. +##|*MATCH=diag_resetstate.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter.inc"); + +if ($_POST) { + $savemsg = ""; + if ($_POST['statetable']) { + filter_flush_state_table(); + if ($savemsg) { + $savemsg .= " "; + } + $savemsg .= gettext("The state table has been flushed successfully."); + } + if ($_POST['sourcetracking']) { + mwexec("/sbin/pfctl -F Sources"); + if ($savemsg) { + $savemsg .= "
"; + } + $savemsg .= gettext("The source tracking table has been flushed successfully."); + } +} + +$pgtitle = array(gettext("Diagnostics"), gettext("Reset state")); +include("head.inc"); + +?> + + + + +
+ + + + + + + +
+ +
+ + + + + + + + + + + + + + + +
 

+ +
+
+
+
+

+
+

+
 

+ +
+
+
+
+

+

+
  + " /> +
+
+
+ + + diff --git a/src/usr/local/www/diag_routes.php b/src/usr/local/www/diag_routes.php new file mode 100644 index 0000000..ff2fe8d --- /dev/null +++ b/src/usr/local/www/diag_routes.php @@ -0,0 +1,247 @@ + 0) { + $netstat .= " | /usr/bin/head -n {$_REQUEST['limit']}"; + } + + echo htmlspecialchars_decode(shell_exec($netstat)); + + exit; +} + +$pgtitle = array(gettext("Diagnostics"), gettext("Routing tables")); +$shortcut_section = "routing"; + +include('head.inc'); + +?> + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
+ /> +
+ +
+ +
+ +
+ +
+ +
  + " /> +
+
+ +
+
+ + + + + + + + +
IPv4
+ + + + + + + +
IPv6
+ +
+ + + + + diff --git a/src/usr/local/www/diag_smart.php b/src/usr/local/www/diag_smart.php new file mode 100644 index 0000000..1cc9161 --- /dev/null +++ b/src/usr/local/www/diag_smart.php @@ -0,0 +1,453 @@ + + + + + + +' . gettext("PASSED") . ''; + $replacements[1] = '' . gettext("FAILED") . ''; + $replacements[2] = '' . gettext("Warning") . ''; + ksort($patterns); + ksort($replacements); + return preg_replace($patterns, $replacements, $string); +} + +// Edits smartd.conf file, adds or removes email for failed disk reporting +function update_email($email) { + // Did they pass an email? + if (!empty($email)) { + // Put it in the smartd.conf file + shell_exec("/usr/bin/sed -i old 's/^DEVICESCAN.*/DEVICESCAN -H -m " . escapeshellarg($email) . "/' /usr/local/etc/smartd.conf"); + } else { + // Remove email flags in smartd.conf + shell_exec("/usr/bin/sed -i old 's/^DEVICESCAN.*/DEVICESCAN/' /usr/local/etc/smartd.conf"); + } +} + +function smartmonctl($action) { + global $start_script; + shell_exec($start_script . escapeshellarg($action)); +} + +// What page, aka. action is being wanted +// If they "get" a page but don't pass all arguments, smartctl will throw an error +$action = (isset($_POST['action']) ? $_POST['action'] : $_GET['action']); +$targetdev = basename($_POST['device']); +if (!file_exists('/dev/' . $targetdev)) { + echo "Device does not exist, bailing."; + return; +} +switch ($action) { + // Testing devices + case 'test': + { + $test = $_POST['testType']; + if (!in_array($test, $valid_test_types)) { + echo "Invalid test type, bailing."; + return; + } + $output = add_colors(shell_exec($smartctl . " -t " . escapeshellarg($test) . " /dev/" . escapeshellarg($targetdev))); + echo '
' . $output . '
+		
+ + + +
+
'; + break; + } + + // Info on devices + case 'info': + { + $type = $_POST['type']; + if (!in_array($type, $valid_info_types)) { + echo "Invalid info type, bailing."; + return; + } + $output = add_colors(shell_exec($smartctl . " -" . escapeshellarg($type) . " /dev/" . escapeshellarg($targetdev))); + echo "
$output
"; + break; + } + + // View logs + case 'logs': + { + $type = $_POST['type']; + if (!in_array($type, $valid_log_types)) { + echo "Invalid log type, bailing."; + return; + } + $output = add_colors(shell_exec($smartctl . " -l " . escapeshellarg($type) . " /dev/" . escapeshellarg($targetdev))); + echo "
$output
"; + break; + } + + // Abort tests + case 'abort': + { + $output = shell_exec($smartctl . " -X /dev/" . escapeshellarg($targetdev)); + echo "
$output
"; + break; + } + + // Config changes, users email in xml config and write changes to smartd.conf + case 'config': + { + if (isset($_POST['submit'])) { + // DOES NOT WORK YET... + if ($_POST['testemail']) { +// FIXME shell_exec($smartd . " -M test -m " . $config['system']['smartmonemail']); + $savemsg = sprintf(gettext("Email sent to %s"), $config['system']['smartmonemail']); + smartmonctl("stop"); + smartmonctl("start"); + } else { + $config['system']['smartmonemail'] = $_POST['smartmonemail']; + write_config(); + + // Don't know what all this means, but it adds the config changed header when config is saved + $retval = 0; + config_lock(); + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + config_unlock(); + + if ($_POST['email']) { + // Write the changes to the smartd.conf file + update_email($_POST['smartmonemail']); + } + + // Send sig HUP to smartd, rereads the config file + shell_exec("/usr/bin/killall -HUP smartd"); + } + } + // Was the config changed? if so , print the message + if ($savemsg) { + print_info_box($savemsg); + } + // Get users email from the xml file + $pconfig['smartmonemail'] = $config['system']['smartmonemail']; + + ?> + + + + + +
+ +
+ +
+ + + + + + + + + + + + + + +
+ +
  + + + " class="formbtn" /> +
+
+ + +
+ + + + + + + + + + + + + + +
  + +
  + + + " class="formbtn" /> +
+
+ + + + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
  + + " class="formbtn" /> +
+
+ +
+ + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ +
  + + " class="formbtn" /> +
+
+ +
+ + + + + + + + + + + + + + + + + + +
+
+
+
+ +
  + + " class="formbtn" /> +
+
+ +
+ + + + + + + + + + + + + + +
+ +
  + + " class="formbtn" onclick="return confirm('')" /> +
+
+ + + " onclick="window.location.href=''" /> + +
+" . $ulmsg . "

\n"; +} +?> + + + + diff --git a/src/usr/local/www/diag_sockets.php b/src/usr/local/www/diag_sockets.php new file mode 100644 index 0000000..cdcfeb7 --- /dev/null +++ b/src/usr/local/www/diag_sockets.php @@ -0,0 +1,181 @@ + + + +
+ + + + + + + + + + +
Information about listening sockets for both IPv4 and IPv6.
For explanation about the meaning of the information listed for each socket click here.
To show information about both listening and connected sockets click this.
+ + $table) { + $elements = ($tabindex == 0 ? 7 : 7); + $name = ($tabindex == 0 ? 'IPv4' : 'IPv6'); +?> + + + + + + + + +
+ + $line) { + if ($i == 0) { + $class = 'listhdrr'; + } else { + $class = 'listlr'; + } + + if (trim($line) == "") { + continue; + } + print("\n"); + $j = 0; + foreach (explode(' ', $line) as $entry) { + if ($entry == '' || $entry == "ADDRESS") { + continue; + } + if ($i == 0) { + print("\n"); + } else { + print("\n"); + } + if ($i > 0) { + $class = 'listr'; + } + $j++; + } + print("\n"); + } + ?> +
$entry$entry
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Socket information explanation
+This page show the output for the commands: "sockstat -4lL" and "sockstat -6lL".
+Or in case of showing all sockets the output for: "sockstat -4" and "sockstat -6".
+
+The information listed for each socket is: +
USER The user who owns the socket.
COMMANDThe command which holds the socket.
PIDThe process ID of the command which holds the socket.
FDThe file descriptor number of the socket.
PROTOThe transport protocol associated with the socket for Internet sockets, or the type of socket (stream or data-gram) for UNIX sockets.
ADDRESS(UNIX sockets only) For bound sockets, this is the file-name of the socket. For other sockets, it is the name, PID and file descriptor number of the peer, or ``(none)'' if the socket is neither bound nor connected.
LOCAL ADDRESS(Internet sockets only) The address the local end of the socket is bound to (see getsockname(2)).
FOREIGN ADDRESS(Internet sockets only) The address the foreign end of the socket is bound to (see getpeername(2)).
+
+ + + diff --git a/src/usr/local/www/diag_states_summary.php b/src/usr/local/www/diag_states_summary.php new file mode 100644 index 0000000..7aa91d6 --- /dev/null +++ b/src/usr/local/www/diag_states_summary.php @@ -0,0 +1,206 @@ + 0) { + foreach ($states as $line) { + $line_split = preg_split("/\s+/", $line); + $iface = array_shift($line_split); + $proto = array_shift($line_split); + $state = array_pop($line_split); + $info = implode(" ", $line_split); + + /* Handle NAT cases + Replaces an external IP + NAT by the internal IP */ + if (strpos($info, ') ->') !== FALSE) { + /* Outbound NAT */ + $info = preg_replace('/(\S+) \((\S+)\)/U', "$2", $info); + } elseif (strpos($info, ') <-') !== FALSE) { + /* Inbound NAT/Port Forward */ + $info = preg_replace('/(\S+) \((\S+)\)/U', "$1", $info); + } + + /* break up info and extract $srcip and $dstip */ + $ends = preg_split("/\?/", $info); + + if (strpos($info, '->') === FALSE) { + $srcinfo = $ends[count($ends) - 1]; + $dstinfo = $ends[0]; + } else { + $srcinfo = $ends[0]; + $dstinfo = $ends[count($ends) - 1]; + } + + /* Handle IPv6 */ + $parts = explode(":", $srcinfo); + $partcount = count($parts); + if ($partcount <= 2) { + $srcip = trim($parts[0]); + $srcport = trim($parts[1]); + } else { + preg_match("/([0-9a-f:]+)(\[([0-9]+)\])?/i", $srcinfo, $matches); + $srcip = $matches[1]; + $srcport = trim($matches[3]); + } + + $parts = explode(":", $dstinfo); + $partcount = count($parts); + if ($partcount <= 2) { + $dstip = trim($parts[0]); + $dstport = trim($parts[1]); + } else { + preg_match("/([0-9a-f:]+)(\[([0-9]+)\])?/i", $dstinfo, $matches); + $dstip = $matches[1]; + $dstport = trim($matches[3]); + } + + addipinfo($srcipinfo, $srcip, $proto, $srcport, $dstport); + addipinfo($dstipinfo, $dstip, $proto, $srcport, $dstport); + addipinfo($pairipinfo, "{$srcip} -> {$dstip}", $proto, $srcport, $dstport); + + addipinfo($allipinfo, $srcip, $proto, $srcport, $dstport); + addipinfo($allipinfo, $dstip, $proto, $srcport, $dstport); + + } +} + +function sort_by_ip($a, $b) { + return ip2ulong($a) < ip2ulong($b) ? -1 : 1; +} + +function build_port_info($portarr, $proto) { + if (!$portarr) { + return ''; + } + $ports = array(); + asort($portarr); + foreach (array_reverse($portarr, TRUE) as $port => $count) { + $str = ""; + $service = getservbyport($port, strtolower($proto)); + $port = "{$proto}/{$port}"; + if ($service) { + $port = "{$port} ({$service})"; + } + $ports[] = "{$port}: {$count}"; + } + return implode($ports, ', '); +} + +function print_summary_table($label, $iparr, $sort = TRUE) { ?> + +

+ + + + + + + + + + $ipinfo) { ?> + + + + + + + + + $protoinfo) { ?> + + + + + + + + + + + +
# #
    
  
+ +"; +include("fbegin.inc"); + + +print_summary_table(gettext("By Source IP"), $srcipinfo); +print_summary_table(gettext("By Destination IP"), $dstipinfo); +print_summary_table(gettext("Total per IP"), $allipinfo); +print_summary_table(gettext("By IP Pair"), $pairipinfo, FALSE); +?> + + + + diff --git a/src/usr/local/www/diag_system_activity.php b/src/usr/local/www/diag_system_activity.php new file mode 100644 index 0000000..1f6380f --- /dev/null +++ b/src/usr/local/www/diag_system_activity.php @@ -0,0 +1,115 @@ + + + + +
+"; + print_info_box($savemsg); + echo "
"; + } + if ($input_errors) { + print_input_errors($input_errors); + } +?> + + + + +
+ + + + +
+ + + + +
+
+ +
+
+
+
+ + + + diff --git a/src/usr/local/www/diag_system_pftop.php b/src/usr/local/www/diag_system_pftop.php new file mode 100644 index 0000000..7d51c84 --- /dev/null +++ b/src/usr/local/www/diag_system_pftop.php @@ -0,0 +1,216 @@ + + + +
+ +
+"; + print_info_box($savemsg); + echo "
"; + } + if ($input_errors) { + print_input_errors($input_errors); + } +?> +
+ + + + + + + + + +
+
+ +
+
+
+ +
+
+
+ +
+
+ + + + +
+ + + + +
+
+
+
+
+
+ +
+ + + + diff --git a/src/usr/local/www/diag_tables.php b/src/usr/local/www/diag_tables.php new file mode 100644 index 0000000..fe6778f --- /dev/null +++ b/src/usr/local/www/diag_tables.php @@ -0,0 +1,191 @@ + 89) { + $loading = false; + } + sleep(1); + } + if ($maxtimetowait < 90) { + $savemsg = gettext("The bogons database has been updated."); + } +} + +exec("/sbin/pfctl -t " . escapeshellarg($tablename) . " -T show", $entries); +exec("/sbin/pfctl -sT", $tables); + +include("head.inc"); +?> + + + + +
+ + + + + + +

+ + + + + + + "> + + + + +
+ + + + + delete + + +
" . gettext("No entries exist in this table.") . "  " . " " . gettext(" the latest bogon data."); + } else { + echo "
" . gettext("No entries exist in this table."); + } + } +?> + + 0) { + if (($tablename == "bogons") || ($tablename == "bogonsv6")) { + $last_updated = exec('/usr/bin/grep -i -m 1 -E "^# last updated" /etc/' . escapeshellarg($tablename)); + echo "
 $count " . gettext("entries in this table.") . "  " . " " . gettext(" the latest bogon data.") . "
" . "$last_updated"; + } else { + echo "
" . gettext("Delete") . " " . gettext("all") . " " . "$count " . gettext("entries in this table."); + } + } +?> +
+
+ + + + diff --git a/src/usr/local/www/diag_testport.php b/src/usr/local/www/diag_testport.php new file mode 100644 index 0000000..fbc448a --- /dev/null +++ b/src/usr/local/www/diag_testport.php @@ -0,0 +1,290 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /usr/bin/nc + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-testport +##|*NAME=Diagnostics: Test Port +##|*DESCR=Allow access to the 'Diagnostics: Test Port' page. +##|*MATCH=diag_testport.php* +##|-PRIV + +$allowautocomplete = true; + +$pgtitle = array(gettext("Diagnostics"), gettext("Test Port")); +require("guiconfig.inc"); + +define('NC_TIMEOUT', 10); +$do_testport = false; + +if ($_POST || $_REQUEST['host']) { + unset($input_errors); + + /* input validation */ + $reqdfields = explode(" ", "host port"); + $reqdfieldsn = array(gettext("Host"), gettext("Port")); + do_input_validation($_REQUEST, $reqdfields, $reqdfieldsn, $input_errors); + + if (!is_ipaddr($_REQUEST['host']) && !is_hostname($_REQUEST['host'])) { + $input_errors[] = gettext("Please enter a valid IP or hostname."); + } + + if (!is_port($_REQUEST['port'])) { + $input_errors[] = gettext("Please enter a valid port number."); + } + + if (($_REQUEST['srcport'] != "") && (!is_numeric($_REQUEST['srcport']) || !is_port($_REQUEST['srcport']))) { + $input_errors[] = gettext("Please enter a valid source port number, or leave the field blank."); + } + + if (is_ipaddrv4($_REQUEST['host']) && ($_REQUEST['ipprotocol'] == "ipv6")) { + $input_errors[] = gettext("You cannot connect to an IPv4 address using IPv6."); + } + if (is_ipaddrv6($_REQUEST['host']) && ($_REQUEST['ipprotocol'] == "ipv4")) { + $input_errors[] = gettext("You cannot connect to an IPv6 address using IPv4."); + } + + if (!$input_errors) { + $do_testport = true; + $timeout = NC_TIMEOUT; + } + + /* Save these request vars even if there were input errors. Then the fields are refilled for the user to correct. */ + $host = $_REQUEST['host']; + $sourceip = $_REQUEST['sourceip']; + $port = $_REQUEST['port']; + $srcport = $_REQUEST['srcport']; + $showtext = isset($_REQUEST['showtext']); + $ipprotocol = $_REQUEST['ipprotocol']; +} + +include("head.inc"); ?> + + + +
+ +

+ +


+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ +

+
+ /> +

+
+ +
+ +

+ +
  + " /> +
+ "; + echo "" . gettext("Port Test Results") . ":
"; + ?> + + "; + $result = ""; + $nc_base_cmd = "/usr/bin/nc"; + $nc_args = "-w " . escapeshellarg($timeout); + if (!$showtext) { + $nc_args .= " -z "; + } + if (!empty($srcport)) { + $nc_args .= " -p " . escapeshellarg($srcport) . " "; + } + + /* Attempt to determine the interface address, if possible. Else try both. */ + if (is_ipaddrv4($host)) { + $ifaddr = ($sourceip == "any") ? "" : get_interface_ip($sourceip); + $nc_args .= " -4"; + } elseif (is_ipaddrv6($host)) { + if ($sourceip == "any") { + $ifaddr = ""; + } else if (is_linklocal($sourceip)) { + $ifaddr = $sourceip; + } else { + $ifaddr = get_interface_ipv6($sourceip); + } + $nc_args .= " -6"; + } else { + switch ($ipprotocol) { + case "ipv4": + $ifaddr = get_interface_ip($sourceip); + $nc_ipproto = " -4"; + break; + case "ipv6": + $ifaddr = (is_linklocal($sourceip) ? $sourceip : get_interface_ipv6($sourceip)); + $nc_ipproto = " -6"; + break; + case "any": + $ifaddr = get_interface_ip($sourceip); + $nc_ipproto = (!empty($ifaddr)) ? " -4" : ""; + if (empty($ifaddr)) { + $ifaddr = (is_linklocal($sourceip) ? $sourceip : get_interface_ipv6($sourceip)); + $nc_ipproto = (!empty($ifaddr)) ? " -6" : ""; + } + break; + } + /* Netcat doesn't like it if we try to connect using a certain type of IP without specifying the family. */ + if (!empty($ifaddr)) { + $nc_args .= $nc_ipproto; + } elseif ($sourceip == "any") { + switch ($ipprotocol) { + case "ipv4": + $nc_ipproto = " -4"; + break; + case "ipv6": + $nc_ipproto = " -6"; + break; + } + $nc_args .= $nc_ipproto; + } + } + /* Only add on the interface IP if we managed to find one. */ + if (!empty($ifaddr)) { + $nc_args .= " -s " . escapeshellarg($ifaddr) . " "; + $scope = get_ll_scope($ifaddr); + if (!empty($scope) && !strstr($host, "%")) { + $host .= "%{$scope}"; + } + } + + $nc_cmd = "{$nc_base_cmd} {$nc_args} " . escapeshellarg($host) . " " . escapeshellarg($port) . " 2>&1"; + exec($nc_cmd, $result, $retval); + //echo "NC CMD: {$nc_cmd}\n\n"; + if (empty($result)) { + if ($showtext) { + echo gettext("No output received, or connection failed. Try with \"Show Remote Text\" unchecked first."); + } else { + echo gettext("Connection failed (Refused/Timeout)"); + } + } else { + if (is_array($result)) { + foreach ($result as $resline) { + echo htmlspecialchars($resline) . "\n"; + } + } else { + echo htmlspecialchars($result); + } + } + echo ' ' ; + } + ?> +
+
+
+ + + diff --git a/src/usr/local/www/diag_traceroute.php b/src/usr/local/www/diag_traceroute.php new file mode 100644 index 0000000..d094d49 --- /dev/null +++ b/src/usr/local/www/diag_traceroute.php @@ -0,0 +1,218 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /usr/sbin/traceroute + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-traceroute +##|*NAME=Diagnostics: Traceroute page +##|*DESCR=Allow access to the 'Diagnostics: Traceroute' page. +##|*MATCH=diag_traceroute.php* +##|-PRIV + +require("guiconfig.inc"); + +$allowautocomplete = true; +$pgtitle = array(gettext("Diagnostics"), gettext("Traceroute")); +include("head.inc"); + +?> + + + MAX_TTL)) { + $input_errors[] = sprintf(gettext("Maximum number of hops must be between 1 and %s"), MAX_TTL); + } + $host = trim($_REQUEST['host']); + $ipproto = $_REQUEST['ipproto']; + if (($ipproto == "ipv4") && is_ipaddrv6($host)) { + $input_errors[] = gettext("When using IPv4, the target host must be an IPv4 address or hostname."); + } + if (($ipproto == "ipv6") && is_ipaddrv4($host)) { + $input_errors[] = gettext("When using IPv6, the target host must be an IPv6 address or hostname."); + } + + if (!$input_errors) { + $sourceip = $_REQUEST['sourceip']; + $do_traceroute = true; + $ttl = $_REQUEST['ttl']; + $resolve = $_REQUEST['resolve']; + } +} else { + $resolve = true; +} + +if (!isset($do_traceroute)) { + $do_traceroute = false; + $host = ''; + $ttl = DEFAULT_TTL; +} + +?> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ /> +
+ /> +
  + " /> +
+ + + +

+ +
+
+ \n"; + echo "" . gettext("Traceroute output:") . "
\n"; + ob_end_flush(); + ?> + + "; + $useicmp = isset($_REQUEST['useicmp']) ? "-I" : ""; + $n = isset($resolve) ? "" : "-n"; + + $command = "/usr/sbin/traceroute"; + if ($ipproto == "ipv6") { + $command .= "6"; + $ifaddr = is_ipaddr($sourceip) ? $sourceip : get_interface_ipv6($sourceip); + } else { + $ifaddr = is_ipaddr($sourceip) ? $sourceip : get_interface_ip($sourceip); + } + + if ($ifaddr && (is_ipaddr($host) || is_hostname($host))) { + $srcip = "-s " . escapeshellarg($ifaddr); + } + + $cmd = "{$command} {$n} {$srcip} -w 2 {$useicmp} -m " . escapeshellarg($ttl) . " " . escapeshellarg($host); + + //echo "Traceroute command: {$cmd}\n"; + system($cmd); + echo " "; + } ?> +
+
+ + + diff --git a/src/usr/local/www/easyrule.php b/src/usr/local/www/easyrule.php new file mode 100644 index 0000000..74b1051 --- /dev/null +++ b/src/usr/local/www/easyrule.php @@ -0,0 +1,89 @@ + + + + + +
+ + + +
+: +
+ +.

+, > . +
+ +
+ diff --git a/src/usr/local/www/edit.php b/src/usr/local/www/edit.php new file mode 100644 index 0000000..481b2ce --- /dev/null +++ b/src/usr/local/www/edit.php @@ -0,0 +1,254 @@ + strlen($_POST['data'])) { + echo "|" . gettext("Error while writing file") . ".|"; + } else { + echo "|" . gettext("File successfully saved") . ".|"; + } + } + exit; + } + exit; +} + +$closehead = false; +require("head.inc"); +outputCSSFileInline("code-syntax-highlighter/SyntaxHighlighter.css"); +outputJavaScriptFileInline("filebrowser/browser.js"); +outputJavaScriptFileInline("javascript/base64.js"); + +?> + + + + + + + + + +
+ + + + + +
+ + + + + + +
+ : + + + + +
+ +
+ + + + + + + + + +
+
+ + +
+
+ +
+ + + + + + + + + + + diff --git a/src/usr/local/www/exec.php b/src/usr/local/www/exec.php new file mode 100644 index 0000000..e0220b7 --- /dev/null +++ b/src/usr/local/www/exec.php @@ -0,0 +1,355 @@ +) + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: shell +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-command +##|*NAME=Diagnostics: Command page +##|*DESCR=Allow access to the 'Diagnostics: Command' page. +##|*MATCH=exec.php* +##|-PRIV + +$allowautocomplete = true; + +require("guiconfig.inc"); + +if (($_POST['submit'] == "Download") && file_exists($_POST['dlPath'])) { + session_cache_limiter('public'); + $fd = fopen($_POST['dlPath'], "rb"); + header("Content-Type: application/octet-stream"); + header("Content-Length: " . filesize($_POST['dlPath'])); + header("Content-Disposition: attachment; filename=\"" . + trim(htmlentities(basename($_POST['dlPath']))) . "\""); + if (isset($_SERVER['HTTPS'])) { + header('Pragma: '); + header('Cache-Control: '); + } else { + header("Pragma: private"); + header("Cache-Control: private, must-revalidate"); + } + + fpassthru($fd); + exit; +} else if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) { + move_uploaded_file($_FILES['ulfile']['tmp_name'], "/tmp/" . $_FILES['ulfile']['name']); + $ulmsg = "Uploaded file to /tmp/" . htmlentities($_FILES['ulfile']['name']); + unset($_POST['txtCommand']); +} + +if ($_POST) { + conf_mount_rw(); +} + +// Function: is Blank +// Returns true or false depending on blankness of argument. + +function isBlank($arg) { + return preg_match("/^\s*$/", $arg); +} + +// Function: Puts +// Put string, Ruby-style. + +function puts($arg) { + echo "$arg\n"; +} + +// "Constants". + +$Version = ''; +$ScriptName = $REQUEST['SCRIPT_NAME']; + +// Get year. + +$arrDT = localtime(); +$intYear = $arrDT[5] + 1900; + +$closehead = false; +$pgtitle = array(gettext("Diagnostics"), gettext("Execute command")); +include("head.inc"); +?> + + + + + + + +

!

+ +" . $ulmsg . "

\n"; ?> +"); + puts("\$ " . htmlspecialchars($_POST['txtCommand'])); + putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"); + putenv("SCRIPT_FILENAME=" . strtok($_POST['txtCommand'], " ")); /* PHP scripts */ + $ph = popen($_POST['txtCommand'] . ' 2>&1', "r"); + while ($line = fgets($ph)) { + echo htmlspecialchars($line); + } + pclose($ph); + puts(" "); +} + + +if (!isBlank($_POST['txtPHPCommand'])) { + puts("
");
+	require_once("config.inc");
+	require_once("functions.inc");
+	echo eval($_POST['txtPHPCommand']);
+	puts(" 
"); +} + +?> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
:
    + + + " /> + + " onclick="return Reset_onClick(this.form);" /> +
: + +
    + " /> +
: + +
    + " />
:
    + " /> +

+ : interfaces_sync_setup(); +

+
+
+
+ + + + + + diff --git a/src/usr/local/www/favicon.ico b/src/usr/local/www/favicon.ico new file mode 100755 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/favicon.ico differ diff --git a/src/usr/local/www/fbegin.inc b/src/usr/local/www/fbegin.inc new file mode 100755 index 0000000..50a3f2e --- /dev/null +++ b/src/usr/local/www/fbegin.inc @@ -0,0 +1,459 @@ + "") { + foreach ($config['installedpackages']['menu'] as $menuitem) { + if ($menuitem['section'] != $section) { + continue; + } + if ($menuitem['url'] <> "") { + $test_url=$menuitem['url']; + $addresswithport = getenv("HTTP_HOST"); + $colonpos = strpos($addresswithport, ":"); + if ($colonpos !== False) { + //my url is actually just the IP address of the pfsense box + $myurl = substr($addresswithport, 0, $colonpos); + } else { + $myurl = $addresswithport; + } + $description = str_replace('$myurl', $myurl, $menuitem['url']); + } else { + $description = '/pkg.php?xml=' . $menuitem['configfile']; + $test_url=$description; + } + if (isAllowedPage($test_url)) { + $extarray[] = array($menuitem['name'], $description); + } + } + } + return $extarray; +} + +function output_menu($arrayitem, $target = null) { + foreach ($arrayitem as $item) { + if (isAllowedPage($item[1]) || $item[1] == "/index.php?logout") { + $attr = sprintf("href=\"%s\"", htmlentities($item[1])); + if ($target) { + $attr .= sprintf(" target=\"%s\"", htmlentities($target)); + } + $class = "navlnk"; + if ($item['class']) { + $class .= " {$item['class']}"; + } + $attr .= sprintf(" class=\"%s\"", htmlentities($class)); + if ($item['style']) { + $attr .= sprintf(" style=\"%s\"", htmlentities($item['style'])); + } + echo "
  • \n"; + printf("%s\n", $attr, $item[0]); + echo "
  • \n"; + } + } +} + +// System +$system_menu = array(); +$system_menu[] = array(gettext("Advanced"), "/system_advanced_admin.php"); +$system_menu[] = array(gettext("Firmware"), "/system_firmware.php"); +$system_menu[] = array(gettext("General Setup"), "/system.php"); +$system_menu[] = array(gettext("High Avail. Sync"), "/system_hasync.php"); +$system_menu[] = array(gettext("Logout"), "/index.php?logout"); +if ($g['platform'] == "pfSense" or $g['platform'] == "nanobsd") { + $system_menu[] = array(gettext("Packages"), "/pkg_mgr_installed.php"); +} +$system_menu[] = array(gettext("Setup Wizard"), "/wizard.php?xml=setup_wizard.xml"); +$system_menu[] = array(gettext("Routing"), "/system_gateways.php"); +$system_menu[] = array(gettext("Cert Manager"), "/system_camanager.php"); +if (!isAllowedPage("system_usermanager.php*")) { + $system_menu[] = array(gettext("User Manager"), "/system_usermanager_passwordmg.php"); +} else { + $system_menu[] = array(gettext("User Manager"), "/system_usermanager.php"); +} +$system_menu = msort(array_merge($system_menu, return_ext_menu("System")), 0); + +// Interfaces +$interfaces_menu = array(); +if (!isset($config['system']['webgui']['noassigninterfaces'])) { + $interfaces_menu[] = array(gettext("(assign)"), "/interfaces_assign.php"); +} +$opts = get_configured_interface_with_descr(false, true); +foreach ($opts as $oif => $odescr) { + if (!isset($config['interfaces'][$oif]['ovpn'])) { + $interfaces_menu[] = array(htmlspecialchars($odescr), "/interfaces.php?if={$oif}"); + } +} +$interfaces_menu = msort(array_merge($interfaces_menu, return_ext_menu("Interfaces")), 0); + +// Firewall +$firewall_menu = array(); +$firewall_menu[] = array(gettext("Aliases"), "/firewall_aliases.php"); +$firewall_menu[] = array(gettext("NAT"), "/firewall_nat.php"); +$firewall_menu[] = array(gettext("Rules"), "/firewall_rules.php"); +$firewall_menu[] = array(gettext("Schedules"), "/firewall_schedule.php"); +$firewall_menu[] = array(gettext("Traffic Shaper"), "/firewall_shaper.php"); +$firewall_menu[] = array(gettext("Virtual IPs"), "/firewall_virtual_ip.php"); +$firewall_menu = msort(array_merge($firewall_menu, return_ext_menu("Firewall")), 0); + +// Services +$services_menu = array(); +$services_menu[] = array(gettext("Captive Portal"), "/services_captiveportal.php"); +$services_menu[] = array(gettext("DNS Forwarder"), "/services_dnsmasq.php"); +$services_menu[] = array(gettext("DNS Resolver"), "/services_unbound.php"); +$services_menu[] = array(gettext("DHCP Relay"), "/services_dhcp_relay.php"); +$services_menu[] = array(gettext("DHCPv6 Relay"), "/services_dhcpv6_relay.php"); +if ($g['services_dhcp_server_enable']) { + $services_menu[] = array(gettext("DHCP Server"), "/services_dhcp.php"); + $services_menu[] = array(gettext("DHCPv6 Server/RA"), "/services_dhcpv6.php"); +} +$services_menu[] = array(gettext("Dynamic DNS"), "/services_dyndns.php"); +$services_menu[] = array(gettext("IGMP proxy"), "/services_igmpproxy.php"); +$services_menu[] = array(gettext("Load Balancer"), "/load_balancer_pool.php"); +$services_menu[] = array(gettext("NTP"), "/services_ntpd.php"); +$services_menu[] = array(gettext("PPPoE Server"), "/vpn_pppoe.php"); +$services_menu[] = array(gettext("SNMP"), "/services_snmp.php"); +if (count($config['interfaces']) > 1) { + /* no use for UPnP in single-interface deployments + remove to reduce user confusion + */ + $services_menu[] = array(gettext("UPnP & NAT-PMP"), "/pkg_edit.php?xml=miniupnpd.xml"); +} +$services_menu[] = array(gettext("Wake on LAN"), "/services_wol.php"); +$services_menu = msort(array_merge($services_menu, return_ext_menu("Services")), 0); + +// VPN +$vpn_menu = array(); +$vpn_menu[] = array(gettext("IPsec"), "/vpn_ipsec.php"); +$vpn_menu[] = array(gettext("OpenVPN"), "/vpn_openvpn_server.php"); +$vpn_menu[] = array(gettext("PPTP"), "/vpn_pptp.php"); +$vpn_menu[] = array(gettext("L2TP"), "/vpn_l2tp.php"); +$vpn_menu = msort(array_merge($vpn_menu, return_ext_menu("VPN")), 0); + +// Status +$status_menu = array(); +if (count($config['captiveportal']) > 0) { + $status_menu[] = array(gettext("Captive Portal"), "/status_captiveportal.php"); +} +$status_menu[] = array(gettext("CARP (failover)"), "/carp_status.php"); +$status_menu[] = array(gettext("Dashboard"), "/index.php"); +$status_menu[] = array(gettext("Gateways"), "/status_gateways.php"); +$status_menu[] = array(gettext("DHCP Leases"), "/status_dhcp_leases.php"); +$status_menu[] = array(gettext("DHCPv6 Leases"), "/status_dhcpv6_leases.php"); +$status_menu[] = array(gettext("Filter Reload"), "/status_filter_reload.php"); +$status_menu[] = array(gettext("Interfaces"), "/status_interfaces.php"); +$status_menu[] = array(gettext("IPsec"), "/diag_ipsec.php"); +$status_menu[] = array(gettext("Load Balancer"), "/status_lb_pool.php"); +$status_menu[] = array(gettext("NTP"), "/status_ntpd.php"); +$status_menu[] = array(gettext("OpenVPN"), "/status_openvpn.php"); +if ($g['platform'] == "pfSense") { + $status_menu[] = array(gettext("Package Logs"), "/diag_pkglogs.php"); +} +$status_menu[] = array(gettext("Queues"), "/status_queues.php"); +$status_menu[] = array(gettext("RRD Graphs"), "/status_rrd_graph.php"); +$status_menu[] = array(gettext("Services"), "/status_services.php"); +$status_menu[] = array(gettext("System Logs"), "/diag_logs.php"); +$status_menu[] = array(gettext("Traffic Graph"), "/status_graph.php?if=wan"); +if (count($config['interfaces']) > 1) { + $status_menu[] = array(gettext("UPnP & NAT-PMP"), "/status_upnp.php"); +} +$ifentries = get_configured_interface_with_descr(); +foreach ($ifentries as $ent => $entdesc) { + if (is_array($config['interfaces'][$ent]['wireless']) && + preg_match($g['wireless_regex'], $config['interfaces'][$ent]['if'])) { + $wifdescrs[$ent] = $entdesc; + } +} +if (count($wifdescrs) > 0) { + $status_menu[] = array(gettext("Wireless"), "/status_wireless.php"); +} +$status_menu = msort(array_merge($status_menu, return_ext_menu("Status")), 0); + +// Diagnostics +$diagnostics_menu = array(); +$diagnostics_menu[] = array(gettext("ARP Table"), "/diag_arp.php"); +$diagnostics_menu[] = array(gettext("Authentication"), "/diag_authentication.php"); +$diagnostics_menu[] = array(gettext("Backup/Restore"), "/diag_backup.php"); +$diagnostics_menu[] = array(gettext("Command Prompt"), "/exec.php"); +$diagnostics_menu[] = array(gettext("DNS Lookup"), "/diag_dns.php"); +$diagnostics_menu[] = array(gettext("Edit File"), "/edit.php"); +$diagnostics_menu[] = array(gettext("Factory Defaults"), "/diag_defaults.php"); + +if (file_exists("/var/run/gmirror_active")) { + $diagnostics_menu[] = array(gettext("GEOM Mirrors"), "/diag_gmirror.php"); +} +$diagnostics_menu[] = array(gettext("Halt System"), "/halt.php"); +$diagnostics_menu[] = array(gettext("Limiter Info"), "/diag_limiter_info.php"); +$diagnostics_menu[] = array(gettext("NDP Table"), "/diag_ndp.php"); + +$diagnostics_menu[] = array(gettext("Tables"), "/diag_tables.php"); +$diagnostics_menu[] = array(gettext("Ping"), "/diag_ping.php"); +$diagnostics_menu[] = array(gettext("Test Port"), "/diag_testport.php"); +$diagnostics_menu[] = array(gettext("pfInfo"), "/diag_pf_info.php"); +$diagnostics_menu[] = array(gettext("pfTop"), "/diag_system_pftop.php"); +$diagnostics_menu[] = array(gettext("Reboot"), "/reboot.php"); +$diagnostics_menu[] = array(gettext("Routes"), "/diag_routes.php"); +$diagnostics_menu[] = array(gettext("SMART Status"), "/diag_smart.php"); +$diagnostics_menu[] = array(gettext("Sockets"), "/diag_sockets.php"); +$diagnostics_menu[] = array(gettext("States"), "/diag_dump_states.php"); +$diagnostics_menu[] = array(gettext("States Summary"), "/diag_states_summary.php"); +$diagnostics_menu[] = array(gettext("System Activity"), "/diag_system_activity.php"); +$diagnostics_menu[] = array(gettext("Traceroute"), "/diag_traceroute.php"); +$diagnostics_menu[] = array(gettext("Packet Capture"), "/diag_packet_capture.php"); +if ($g['platform'] == "nanobsd") { + $diagnostics_menu[] = array(gettext("NanoBSD"), "/diag_nanobsd.php"); +} + +if (isset($config['system']['developer'])) { + $diagnostics_menu[] = array(gettext("Restart HTTPD"), "/restart_httpd.php", "style" => "font-weight: bold; color: yellow;"); +} +$diagnostics_menu = msort(array_merge($diagnostics_menu, return_ext_menu("Diagnostics")), 0); + +$gold_menu = array(); +$gold_menu[] = array(gettext("pfSense Gold"), "https://www.pfsense.org/gold"); +$gold_menu = msort(array_merge($gold_menu, return_ext_menu("Gold")), 0); + +if (!$g['disablehelpmenu']) { + $help_menu = array(); + $help_menu[] = array(gettext("About this Page"), $helpurl); + if ($g['product_name'] == "pfSense") { + $help_menu[] = array(gettext("Bug Database"), "https://www.pfsense.org/j.php?jumpto=redmine"); + } + $help_menu[] = array(gettext("User Forum"), "https://www.pfsense.org/j.php?jumpto=forum"); + $help_menu[] = array(gettext("Documentation"), "https://www.pfsense.org/j.php?jumpto=doc"); + $help_menu[] = array(gettext("Developers Wiki"), "https://www.pfsense.org/j.php?jumpto=devwiki"); + $help_menu[] = array(gettext("Paid Support"), "https://www.pfsense.org/j.php?jumpto=portal"); + $help_menu[] = array(gettext("pfSense Book"), "https://www.pfsense.org/j.php?jumpto=book"); + $help_menu[] = array(gettext("Search portal"), "https://www.pfsense.org/j.php?jumpto=searchportal"); + $help_menu[] = array(gettext("FreeBSD Handbook"), "https://www.pfsense.org/j.php?jumpto=fbsdhandbook"); + $help_menu = msort(array_merge($help_menu, return_ext_menu("Help")), 0); +} + +?> + +
    + +
    +
    + + +
    + + + +
    + + + +
    + + + + diff --git a/src/usr/local/www/filebrowser/browser.js b/src/usr/local/www/filebrowser/browser.js new file mode 100644 index 0000000..2769db3 --- /dev/null +++ b/src/usr/local/www/filebrowser/browser.js @@ -0,0 +1,48 @@ +/* + pfSense_MODULE: shell +*/ + +jQuery(document).ready( + function() { + jQuery("#fbOpen").click( + function() { + jQuery("#fbBrowser").fadeIn(750); + fbBrowse(jQuery("#fbTarget").val()); + } + ); + } +); + +function fbBrowse(path) { + jQuery("#fileContent").fadeOut(); + + if (jQuery("#fbCurrentDir")) { + jQuery("#fbCurrentDir").html("Loading ..."); + } + + jQuery.ajax( + "/filebrowser/browser.php?path=" + encodeURI(path ? path : "/"), + { type: "get", complete: fbComplete } + ); + +} + +function fbComplete(req) { + jQuery("#fbBrowser").html(req.responseText); + + var actions = { + fbHome: function() { fbBrowse("/"); }, + fbClose: function() { jQuery("#fbBrowser").fadeOut(750); }, + fbDir: function() { fbBrowse(this.id); }, + fbFile: function() { jQuery("#fbTarget").val(this.id); } + } + + for (var type in actions) { + jQuery("#fbBrowser ." + type).each( + function() { + jQuery(this).click(actions[type]); + jQuery(this).css("cursor","pointer"); + } + ); + } +} diff --git a/src/usr/local/www/filebrowser/browser.php b/src/usr/local/www/filebrowser/browser.php new file mode 100644 index 0000000..8ab05db --- /dev/null +++ b/src/usr/local/www/filebrowser/browser.php @@ -0,0 +1,165 @@ + 0 ? $_GET['path'] : "/"); +if (is_file($path)) { + $path = dirname($path); +} + +// ----- header ----- +?> + + + + + + + + + + + Directory does not exist. + + +
    + Home + + Close +
    + + +
    + + + + +
    + +   +
    + + + + + + + + +
    + +   +
    + + + + + + + diff --git a/src/usr/local/www/filebrowser/images/file_code.gif b/src/usr/local/www/filebrowser/images/file_code.gif new file mode 100755 index 0000000..f06a205 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_code.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_database.gif b/src/usr/local/www/filebrowser/images/file_database.gif new file mode 100755 index 0000000..d479c91 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_database.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_doc.gif b/src/usr/local/www/filebrowser/images/file_doc.gif new file mode 100755 index 0000000..222c31b Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_doc.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_flash.gif b/src/usr/local/www/filebrowser/images/file_flash.gif new file mode 100755 index 0000000..e565c37 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_flash.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_generic.gif b/src/usr/local/www/filebrowser/images/file_generic.gif new file mode 100755 index 0000000..5f39482 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_generic.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_image.gif b/src/usr/local/www/filebrowser/images/file_image.gif new file mode 100755 index 0000000..4960683 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_image.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_js.gif b/src/usr/local/www/filebrowser/images/file_js.gif new file mode 100755 index 0000000..9b6601f Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_js.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_pdf.gif b/src/usr/local/www/filebrowser/images/file_pdf.gif new file mode 100755 index 0000000..b01bb23 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_pdf.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_php.gif b/src/usr/local/www/filebrowser/images/file_php.gif new file mode 100755 index 0000000..ab7f459 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_php.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_ppt.gif b/src/usr/local/www/filebrowser/images/file_ppt.gif new file mode 100755 index 0000000..0383c98 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_ppt.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_system.gif b/src/usr/local/www/filebrowser/images/file_system.gif new file mode 100755 index 0000000..f1997c7 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_system.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_xls.gif b/src/usr/local/www/filebrowser/images/file_xls.gif new file mode 100755 index 0000000..d004013 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_xls.gif differ diff --git a/src/usr/local/www/filebrowser/images/file_zip.gif b/src/usr/local/www/filebrowser/images/file_zip.gif new file mode 100755 index 0000000..ec98255 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/file_zip.gif differ diff --git a/src/usr/local/www/filebrowser/images/folder_generic.gif b/src/usr/local/www/filebrowser/images/folder_generic.gif new file mode 100755 index 0000000..45b191d Binary files /dev/null and b/src/usr/local/www/filebrowser/images/folder_generic.gif differ diff --git a/src/usr/local/www/filebrowser/images/icon_cancel.gif b/src/usr/local/www/filebrowser/images/icon_cancel.gif new file mode 100755 index 0000000..246a819 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/icon_cancel.gif differ diff --git a/src/usr/local/www/filebrowser/images/icon_contract.gif b/src/usr/local/www/filebrowser/images/icon_contract.gif new file mode 100755 index 0000000..cf82159 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/icon_contract.gif differ diff --git a/src/usr/local/www/filebrowser/images/icon_expand.gif b/src/usr/local/www/filebrowser/images/icon_expand.gif new file mode 100755 index 0000000..06c0c68 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/icon_expand.gif differ diff --git a/src/usr/local/www/filebrowser/images/icon_home.gif b/src/usr/local/www/filebrowser/images/icon_home.gif new file mode 100755 index 0000000..f888434 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/icon_home.gif differ diff --git a/src/usr/local/www/filebrowser/images/icon_left.gif b/src/usr/local/www/filebrowser/images/icon_left.gif new file mode 100755 index 0000000..0d1137c Binary files /dev/null and b/src/usr/local/www/filebrowser/images/icon_left.gif differ diff --git a/src/usr/local/www/filebrowser/images/icon_magnifier.gif b/src/usr/local/www/filebrowser/images/icon_magnifier.gif new file mode 100755 index 0000000..e96e548 Binary files /dev/null and b/src/usr/local/www/filebrowser/images/icon_magnifier.gif differ diff --git a/src/usr/local/www/firewall_aliases.php b/src/usr/local/www/firewall_aliases.php new file mode 100644 index 0000000..950a8a2 --- /dev/null +++ b/src/usr/local/www/firewall_aliases.php @@ -0,0 +1,311 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: aliases +*/ + +##|+PRIV +##|*IDENT=page-firewall-aliases +##|*NAME=Firewall: Aliases page +##|*DESCR=Allow access to the 'Firewall: Aliases' page. +##|*MATCH=firewall_aliases.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +if (!is_array($config['aliases']['alias'])) { + $config['aliases']['alias'] = array(); +} +$a_aliases = &$config['aliases']['alias']; + +$tab = ($_REQUEST['tab'] == "" ? "ip" : preg_replace("/\W/", "", $_REQUEST['tab'])); + +if ($_POST) { + + if ($_POST['apply']) { + $retval = 0; + + /* reload all components that use aliases */ + $retval = filter_configure(); + + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + if ($retval == 0) { + clear_subsystem_dirty('aliases'); + } + } +} + +if ($_GET['act'] == "del") { + if ($a_aliases[$_GET['id']]) { + /* make sure rule is not being referenced by any nat or filter rules */ + $is_alias_referenced = false; + $referenced_by = false; + $alias_name = $a_aliases[$_GET['id']]['name']; + // Firewall rules + find_alias_reference(array('filter', 'rule'), array('source', 'address'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('filter', 'rule'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('filter', 'rule'), array('source', 'port'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('filter', 'rule'), array('destination', 'port'), $alias_name, $is_alias_referenced, $referenced_by); + // NAT Rules + find_alias_reference(array('nat', 'rule'), array('source', 'address'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('nat', 'rule'), array('source', 'port'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('nat', 'rule'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('nat', 'rule'), array('destination', 'port'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('nat', 'rule'), array('target'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('nat', 'rule'), array('local-port'), $alias_name, $is_alias_referenced, $referenced_by); + // NAT 1:1 Rules + //find_alias_reference(array('nat', 'onetoone'), array('external'), $alias_name, $is_alias_referenced, $referenced_by); + //find_alias_reference(array('nat', 'onetoone'), array('source', 'address'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('nat', 'onetoone'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by); + // NAT Outbound Rules + find_alias_reference(array('nat', 'outbound', 'rule'), array('source', 'network'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('nat', 'outbound', 'rule'), array('sourceport'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('nat', 'outbound', 'rule'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('nat', 'outbound', 'rule'), array('dstport'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('nat', 'outbound', 'rule'), array('target'), $alias_name, $is_alias_referenced, $referenced_by); + // Alias in an alias + find_alias_reference(array('aliases', 'alias'), array('address'), $alias_name, $is_alias_referenced, $referenced_by); + // Load Balancer + find_alias_reference(array('load_balancer', 'lbpool'), array('port'), $alias_name, $is_alias_referenced, $referenced_by); + find_alias_reference(array('load_balancer', 'virtual_server'), array('port'), $alias_name, $is_alias_referenced, $referenced_by); + // Static routes + find_alias_reference(array('staticroutes', 'route'), array('network'), $alias_name, $is_alias_referenced, $referenced_by); + if ($is_alias_referenced == true) { + $savemsg = sprintf(gettext("Cannot delete alias. Currently in use by %s"), $referenced_by); + } else { + unset($a_aliases[$_GET['id']]); + if (write_config()) { + filter_configure(); + mark_subsystem_dirty('aliases'); + } + header("Location: firewall_aliases.php?tab=" . $tab); + exit; + } + } +} + +function find_alias_reference($section, $field, $origname, &$is_alias_referenced, &$referenced_by) { + global $config; + if (!$origname || $is_alias_referenced) { + return; + } + + $sectionref = &$config; + foreach ($section as $sectionname) { + if (is_array($sectionref) && isset($sectionref[$sectionname])) { + $sectionref = &$sectionref[$sectionname]; + } else { + return; + } + } + + if (is_array($sectionref)) { + foreach ($sectionref as $itemkey => $item) { + $fieldfound = true; + $fieldref = &$sectionref[$itemkey]; + foreach ($field as $fieldname) { + if (is_array($fieldref) && isset($fieldref[$fieldname])) { + $fieldref = &$fieldref[$fieldname]; + } else { + $fieldfound = false; + break; + } + } + if ($fieldfound && $fieldref == $origname) { + $is_alias_referenced = true; + if (is_array($item)) { + $referenced_by = $item['descr']; + } + break; + } + } + } +} + +$pgtitle = array(gettext("Firewall"), gettext("Aliases")); +$shortcut_section = "aliases"; + +include("head.inc"); + +?> + + + +
    + +

    +" . gettext("You must apply the changes in order for them to take effect."));?> + + + + + + + + + +
    + + +
    +
    + + + + + + + + $alias) { + unset ($show_alias); + switch ($tab) { + case "all": + $show_alias= true; + break; + case "ip": + case "host": + case "network": + if (preg_match("/(host|network)/", $alias["type"])) { + $show_alias= true; + } + break; + case "url": + if (preg_match("/(url)/i", $alias["type"])) { + $show_alias= true; + } + break; + case "port": + if ($alias["type"] == "port") { + $show_alias= true; + } + break; + } + if ($show_alias) { + ?> + + + + + + + + + + + + + + + + +
    + + + + + +
      alt="add" />
    +
    + + + "; + } else { + if (is_array($alias["aliasurl"])) { + $aliasurls = implode(", ", array_slice($alias["aliasurl"], 0, 10)); + echo $aliasurls; + if (count($aliasurls) > 10) { + echo "...
    "; + } + echo "
    \n"; + } + $tmpaddr = explode(" ", $alias['address']); + $addresses = implode(", ", array_slice($tmpaddr, 0, 10)); + echo $addresses; + if (count($tmpaddr) > 10) { + echo "..."; + } + } + ?> +
    +   + + + + + + +
    alt="edit" />')"> alt="delete" />
    +
      + + + + + + + +
    + alt="add" /> + + alt="import" /> +
    +
    +


    +
    +
    +
    +

    + + + diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php new file mode 100755 index 0000000..638d1f1 --- /dev/null +++ b/src/usr/local/www/firewall_aliases_edit.php @@ -0,0 +1,890 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /bin/rm /bin/mkdir /usr/bin/fetch + pfSense_MODULE: aliases +*/ + +##|+PRIV +##|*IDENT=page-firewall-alias-edit +##|*NAME=Firewall: Alias: Edit page +##|*DESCR=Allow access to the 'Firewall: Alias: Edit' page. +##|*MATCH=firewall_aliases_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +$pgtitle = array(gettext("Firewall"), gettext("Aliases"), gettext("Edit")); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_aliases.php'); +} + +// Keywords not allowed in names +$reserved_keywords = array("all", "pass", "block", "out", "queue", "max", "min", "pptp", "pppoe", "L2TP", "OpenVPN", "IPsec"); + +// Add all Load balance names to reserved_keywords +if (is_array($config['load_balancer']['lbpool'])) { + foreach ($config['load_balancer']['lbpool'] as $lbpool) { + $reserved_keywords[] = $lbpool['name']; + } +} + +$reserved_ifs = get_configured_interface_list(false, true); +$reserved_keywords = array_merge($reserved_keywords, $reserved_ifs, $reserved_table_names); +$max_alias_addresses = 5000; + +if (!is_array($config['aliases']['alias'])) { + $config['aliases']['alias'] = array(); +} +$a_aliases = &$config['aliases']['alias']; + +$tab = $_REQUEST['tab']; + +if ($_POST) { + $origname = $_POST['origname']; +} + +// Debugging +if ($debug) { + unlink_if_exists("{$g['tmp_path']}/alias_rename_log.txt"); +} + +function alias_same_type($name, $type) { + global $config; + + foreach ($config['aliases']['alias'] as $alias) { + if ($name == $alias['name']) { + if (in_array($type, array("host", "network")) && + in_array($alias['type'], array("host", "network"))) { + return true; + } + if ($type == $alias['type']) { + return true; + } else { + return false; + } + } + } + return true; +} + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_aliases[$id]) { + $original_alias_name = $a_aliases[$id]['name']; + $pconfig['name'] = $a_aliases[$id]['name']; + $pconfig['detail'] = $a_aliases[$id]['detail']; + $pconfig['address'] = $a_aliases[$id]['address']; + $pconfig['type'] = $a_aliases[$id]['type']; + $pconfig['descr'] = html_entity_decode($a_aliases[$id]['descr']); + + if (preg_match("/urltable/i", $a_aliases[$id]['type'])) { + $pconfig['address'] = $a_aliases[$id]['url']; + $pconfig['updatefreq'] = $a_aliases[$id]['updatefreq']; + } + if ($a_aliases[$id]['aliasurl'] <> "") { + if (is_array($a_aliases[$id]['aliasurl'])) { + $pconfig['address'] = implode(" ", $a_aliases[$id]['aliasurl']); + } else { + $pconfig['address'] = $a_aliases[$id]['aliasurl']; + } + } +} + +if ($_POST) { + unset($input_errors); + $vertical_bar_err_text = gettext("Vertical bars (|) at start or end, or double in the middle of descriptions not allowed. Descriptions have been cleaned. Check and save again."); + + /* input validation */ + + $reqdfields = explode(" ", "name"); + $reqdfieldsn = array(gettext("Name")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + $x = is_validaliasname($_POST['name']); + if (!isset($x)) { + $input_errors[] = gettext("Reserved word used for alias name."); + } else if ($_POST['type'] == "port" && (getservbyname($_POST['name'], "tcp") || getservbyname($_POST['name'], "udp"))) { + $input_errors[] = gettext("Reserved word used for alias name."); + } else { + if (is_validaliasname($_POST['name']) == false) { + $input_errors[] = gettext("The alias name must be less than 32 characters long, may not consist of only numbers, and may only contain the following characters") . " a-z, A-Z, 0-9, _."; + } + } + /* check for name conflicts */ + if (empty($a_aliases[$id])) { + foreach ($a_aliases as $alias) { + if ($alias['name'] == $_POST['name']) { + $input_errors[] = gettext("An alias with this name already exists."); + break; + } + } + } + + /* Check for reserved keyword names */ + foreach ($reserved_keywords as $rk) { + if ($rk == $_POST['name']) { + $input_errors[] = sprintf(gettext("Cannot use a reserved keyword as alias name %s"), $rk); + } + } + + /* check for name interface description conflicts */ + foreach ($config['interfaces'] as $interface) { + if ($interface['descr'] == $_POST['name']) { + $input_errors[] = gettext("An interface description with this name already exists."); + break; + } + } + + $alias = array(); + $address = array(); + $final_address_details = array(); + $alias['name'] = $_POST['name']; + + if (preg_match("/urltable/i", $_POST['type'])) { + $address = ""; + + /* item is a url table type */ + if ($_POST['address0']) { + /* fetch down and add in */ + $_POST['address0'] = trim($_POST['address0']); + $address[] = $_POST['address0']; + $alias['url'] = $_POST['address0']; + $alias['updatefreq'] = $_POST['address_subnet0'] ? $_POST['address_subnet0'] : 7; + if (!is_URL($alias['url']) || empty($alias['url'])) { + $input_errors[] = gettext("You must provide a valid URL."); + } elseif (!process_alias_urltable($alias['name'], $alias['url'], 0, true)) { + $input_errors[] = gettext("Unable to fetch usable data."); + } + if ($_POST["detail0"] <> "") { + if ((strpos($_POST["detail0"], "||") === false) && (substr($_POST["detail0"], 0, 1) != "|") && (substr($_POST["detail0"], -1, 1) != "|")) { + $final_address_details[] = $_POST["detail0"]; + } else { + /* Remove leading and trailing vertical bars and replace multiple vertical bars with single, */ + /* and put in the output array so the text is at least redisplayed for the user. */ + $final_address_details[] = preg_replace('/\|\|+/', '|', trim($_POST["detail0"], "|")); + $input_errors[] = $vertical_bar_err_text; + } + } else { + $final_address_details[] = sprintf(gettext("Entry added %s"), date('r')); + } + } + } else if ($_POST['type'] == "url" || $_POST['type'] == "url_ports") { + $desc_fmt_err_found = false; + + /* item is a url type */ + for ($x = 0; $x < $max_alias_addresses - 1; $x++) { + $_POST['address' . $x] = trim($_POST['address' . $x]); + if ($_POST['address' . $x]) { + /* fetch down and add in */ + $temp_filename = tempnam("{$g['tmp_path']}/", "alias_import"); + unlink_if_exists($temp_filename); + $verify_ssl = isset($config['system']['checkaliasesurlcert']); + mkdir($temp_filename); + download_file($_POST['address' . $x], $temp_filename . "/aliases", $verify_ssl); + + /* if the item is tar gzipped then extract */ + if (stristr($_POST['address' . $x], ".tgz")) { + process_alias_tgz($temp_filename); + } else if (stristr($_POST['address' . $x], ".zip")) { + process_alias_unzip($temp_filename); + } + + if (!isset($alias['aliasurl'])) { + $alias['aliasurl'] = array(); + } + + $alias['aliasurl'][] = $_POST['address' . $x]; + if ($_POST["detail{$x}"] <> "") { + if ((strpos($_POST["detail{$x}"], "||") === false) && (substr($_POST["detail{$x}"], 0, 1) != "|") && (substr($_POST["detail{$x}"], -1, 1) != "|")) { + $final_address_details[] = $_POST["detail{$x}"]; + } else { + /* Remove leading and trailing vertical bars and replace multiple vertical bars with single, */ + /* and put in the output array so the text is at least redisplayed for the user. */ + $final_address_details[] = preg_replace('/\|\|+/', '|', trim($_POST["detail{$x}"], "|")); + if (!$desc_fmt_err_found) { + $input_errors[] = $vertical_bar_err_text; + $desc_fmt_err_found = true; + } + } + } else { + $final_address_details[] = sprintf(gettext("Entry added %s"), date('r')); + } + + if (file_exists("{$temp_filename}/aliases")) { + $address = parse_aliases_file("{$temp_filename}/aliases", $_POST['type'], 3000); + if ($address == null) { + /* nothing was found */ + $input_errors[] = sprintf(gettext("You must provide a valid URL. Could not fetch usable data from '%s'."), $_POST['address' . $x]); + } + mwexec("/bin/rm -rf " . escapeshellarg($temp_filename)); + } else { + $input_errors[] = sprintf(gettext("URL '%s' is not valid."), $_POST['address' . $x]); + } + } + } + unset($desc_fmt_err_found); + if ($_POST['type'] == "url_ports") { + $address = group_ports($address); + } + } else { + /* item is a normal alias type */ + $wrongaliases = ""; + $desc_fmt_err_found = false; + $alias_address_count = 0; + $input_addresses = array(); + + // First trim and expand the input data. + // Users can paste strings like "10.1.2.0/24 10.3.0.0/16 9.10.11.0/24" into an address box. + // They can also put an IP range. + // This loop expands out that stuff so it can easily be validated. + for ($x = 0; $x < ($max_alias_addresses - 1); $x++) { + if ($_POST["address{$x}"] <> "") { + if ($_POST["detail{$x}"] <> "") { + if ((strpos($_POST["detail{$x}"], "||") === false) && (substr($_POST["detail{$x}"], 0, 1) != "|") && (substr($_POST["detail{$x}"], -1, 1) != "|")) { + $detail_text = $_POST["detail{$x}"]; + } else { + /* Remove leading and trailing vertical bars and replace multiple vertical bars with single, */ + /* and put in the output array so the text is at least redisplayed for the user. */ + $detail_text = preg_replace('/\|\|+/', '|', trim($_POST["detail{$x}"], "|")); + if (!$desc_fmt_err_found) { + $input_errors[] = $vertical_bar_err_text; + $desc_fmt_err_found = true; + } + } + } else { + $detail_text = sprintf(gettext("Entry added %s"), date('r')); + } + $address_items = explode(" ", trim($_POST["address{$x}"])); + foreach ($address_items as $address_item) { + $iprange_type = is_iprange($address_item); + if ($iprange_type == 4) { + list($startip, $endip) = explode('-', $address_item); + if ($_POST['type'] == "network") { + // For network type aliases, expand an IPv4 range into an array of subnets. + $rangesubnets = ip_range_to_subnet_array($startip, $endip); + foreach ($rangesubnets as $rangesubnet) { + if ($alias_address_count > $max_alias_addresses) { + break; + } + list($address_part, $subnet_part) = explode("/", $rangesubnet); + $input_addresses[] = $address_part; + $input_address_subnet[] = $subnet_part; + $final_address_details[] = $detail_text; + $alias_address_count++; + } + } else { + // For host type aliases, expand an IPv4 range into a list of individual IPv4 addresses. + $rangeaddresses = ip_range_to_address_array($startip, $endip, $max_alias_addresses - $alias_address_count); + if (is_array($rangeaddresses)) { + foreach ($rangeaddresses as $rangeaddress) { + $input_addresses[] = $rangeaddress; + $input_address_subnet[] = ""; + $final_address_details[] = $detail_text; + $alias_address_count++; + } + } else { + $input_errors[] = sprintf(gettext('Range is too large to expand into individual host IP addresses (%s)'), $address_item); + $input_errors[] = sprintf(gettext('The maximum number of entries in an alias is %s'), $max_alias_addresses); + // Put the user-entered data in the output anyway, so it will be re-displayed for correction. + $input_addresses[] = $address_item; + $input_address_subnet[] = ""; + $final_address_details[] = $detail_text; + } + } + } else if ($iprange_type == 6) { + $input_errors[] = sprintf(gettext('IPv6 address ranges are not supported (%s)'), $address_item); + // Put the user-entered data in the output anyway, so it will be re-displayed for correction. + $input_addresses[] = $address_item; + $input_address_subnet[] = ""; + $final_address_details[] = $detail_text; + } else { + $subnet_type = is_subnet($address_item); + if (($_POST['type'] == "host") && $subnet_type) { + if ($subnet_type == 4) { + // For host type aliases, if the user enters an IPv4 subnet, expand it into a list of individual IPv4 addresses. + if (subnet_size($address_item) <= ($max_alias_addresses - $alias_address_count)) { + $rangeaddresses = subnetv4_expand($address_item); + foreach ($rangeaddresses as $rangeaddress) { + $input_addresses[] = $rangeaddress; + $input_address_subnet[] = ""; + $final_address_details[] = $detail_text; + $alias_address_count++; + } + } else { + $input_errors[] = sprintf(gettext('Subnet is too large to expand into individual host IP addresses (%s)'), $address_item); + $input_errors[] = sprintf(gettext('The maximum number of entries in an alias is %s'), $max_alias_addresses); + // Put the user-entered data in the output anyway, so it will be re-displayed for correction. + $input_addresses[] = $address_item; + $input_address_subnet[] = ""; + $final_address_details[] = $detail_text; + } + } else { + $input_errors[] = sprintf(gettext('IPv6 subnets are not supported in host aliases (%s)'), $address_item); + // Put the user-entered data in the output anyway, so it will be re-displayed for correction. + $input_addresses[] = $address_item; + $input_address_subnet[] = ""; + $final_address_details[] = $detail_text; + } + } else { + list($address_part, $subnet_part) = explode("/", $address_item); + if (!empty($subnet_part)) { + if (is_subnet($address_item)) { + $input_addresses[] = $address_part; + $input_address_subnet[] = $subnet_part; + } else { + // The user typed something like "1.2.3.444/24" or "1.2.3.0/36" or similar rubbish. + // Feed it through without splitting it apart, then it will be caught by the validation loop below. + $input_addresses[] = $address_item; + $input_address_subnet[] = ""; + } + } else { + $input_addresses[] = $address_part; + $input_address_subnet[] = $_POST["address_subnet{$x}"]; + } + $final_address_details[] = $detail_text; + $alias_address_count++; + } + } + if ($alias_address_count > $max_alias_addresses) { + $input_errors[] = sprintf(gettext('The maximum number of entries in an alias has been exceeded (%s)'), $max_alias_addresses); + break; + } + } + } + } + + // Validate the input data expanded above. + foreach ($input_addresses as $idx => $input_address) { + if (is_alias($input_address)) { + if (!alias_same_type($input_address, $_POST['type'])) { + // But alias type network can include alias type urltable. Feature#1603. + if (!($_POST['type'] == 'network' && + preg_match("/urltable/i", alias_get_type($input_address)))) { + $wrongaliases .= " " . $input_address; + } + } + } else if ($_POST['type'] == "port") { + if (!is_port($input_address) && !is_portrange($input_address)) { + $input_errors[] = $input_address . " " . gettext("is not a valid port or alias."); + } + } else if ($_POST['type'] == "host" || $_POST['type'] == "network") { + if (is_subnet($input_address) || + (!is_ipaddr($input_address) && !is_hostname($input_address))) { + $input_errors[] = sprintf(gettext('%1$s is not a valid %2$s address, FQDN or alias.'), $input_address, $_POST['type']); + } + } + $tmpaddress = $input_address; + if ($_POST['type'] != "host" && is_ipaddr($input_address) && $input_address_subnet[$idx] <> "") { + if (!is_subnet($input_address . "/" . $input_address_subnet[$idx])) { + $input_errors[] = sprintf(gettext('%s/%s is not a valid subnet.'), $input_address, $input_address_subnet[$idx]); + } else { + $tmpaddress .= "/" . $input_address_subnet[$idx]; + } + } + $address[] = $tmpaddress; + } + unset($desc_fmt_err_found); + if ($wrongaliases <> "") { + $input_errors[] = sprintf(gettext('The alias(es): %s cannot be nested because they are not of the same type.'), $wrongaliases); + } + } + + unset($vertical_bar_err_text); + + // Allow extending of the firewall edit page and include custom input validation + pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/input_validation"); + + if (!$input_errors) { + $alias['address'] = is_array($address) ? implode(" ", $address) : $address; + $alias['descr'] = $_POST['descr']; + $alias['type'] = $_POST['type']; + $alias['detail'] = implode("||", $final_address_details); + + /* Check to see if alias name needs to be + * renamed on referenced rules and such + */ + if ($_POST['name'] <> $_POST['origname']) { + // Firewall rules + update_alias_names_upon_change(array('filter', 'rule'), array('source', 'address'), $_POST['name'], $origname); + update_alias_names_upon_change(array('filter', 'rule'), array('destination', 'address'), $_POST['name'], $origname); + update_alias_names_upon_change(array('filter', 'rule'), array('source', 'port'), $_POST['name'], $origname); + update_alias_names_upon_change(array('filter', 'rule'), array('destination', 'port'), $_POST['name'], $origname); + // NAT Rules + update_alias_names_upon_change(array('nat', 'rule'), array('source', 'address'), $_POST['name'], $origname); + update_alias_names_upon_change(array('nat', 'rule'), array('source', 'port'), $_POST['name'], $origname); + update_alias_names_upon_change(array('nat', 'rule'), array('destination', 'address'), $_POST['name'], $origname); + update_alias_names_upon_change(array('nat', 'rule'), array('destination', 'port'), $_POST['name'], $origname); + update_alias_names_upon_change(array('nat', 'rule'), array('target'), $_POST['name'], $origname); + update_alias_names_upon_change(array('nat', 'rule'), array('local-port'), $_POST['name'], $origname); + // NAT 1:1 Rules + //update_alias_names_upon_change(array('nat', 'onetoone'), array('external'), $_POST['name'], $origname); + //update_alias_names_upon_change(array('nat', 'onetoone'), array('source', 'address'), $_POST['name'], $origname); + update_alias_names_upon_change(array('nat', 'onetoone'), array('destination', 'address'), $_POST['name'], $origname); + // NAT Outbound Rules + update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('source', 'network'), $_POST['name'], $origname); + update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('sourceport'), $_POST['name'], $origname); + update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('destination', 'address'), $_POST['name'], $origname); + update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('dstport'), $_POST['name'], $origname); + update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('target'), $_POST['name'], $origname); + // Alias in an alias + update_alias_names_upon_change(array('aliases', 'alias'), array('address'), $_POST['name'], $origname); + } + + pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/pre_write_config"); + + if (isset($id) && $a_aliases[$id]) { + if ($a_aliases[$id]['name'] <> $alias['name']) { + foreach ($a_aliases as $aliasid => $aliasd) { + if ($aliasd['address'] <> "") { + $tmpdirty = false; + $tmpaddr = explode(" ", $aliasd['address']); + foreach ($tmpaddr as $tmpidx => $tmpalias) { + if ($tmpalias == $a_aliases[$id]['name']) { + $tmpaddr[$tmpidx] = $alias['name']; + $tmpdirty = true; + } + } + if ($tmpdirty == true) { + $a_aliases[$aliasid]['address'] = implode(" ", $tmpaddr); + } + } + } + } + $a_aliases[$id] = $alias; + } else { + $a_aliases[] = $alias; + } + + // Sort list + $a_aliases = msort($a_aliases, "name"); + + if (write_config()) { + mark_subsystem_dirty('aliases'); + } + + if (!empty($tab)) { + header("Location: firewall_aliases.php?tab=" . htmlspecialchars ($tab)); + } else { + header("Location: firewall_aliases.php"); + } + exit; + } else { + //we received input errors, copy data to prevent retype + $pconfig['name'] = $_POST['name']; + $pconfig['descr'] = $_POST['descr']; + if (($_POST['type'] == 'url') || ($_POST['type'] == 'url_ports')) { + $pconfig['address'] = implode(" ", $alias['aliasurl']); + } else { + $pconfig['address'] = implode(" ", $address); + } + $pconfig['type'] = $_POST['type']; + $pconfig['detail'] = implode("||", $final_address_details); + } +} + +include("head.inc"); + +$jscriptstr = << +// + + +EOD; + +?> + +"> + + + + + + + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + + + +
    + +
    + + + +
    + +
    + + + + + + + + + + + + ""): + $addresses = explode(" ", $pconfig['address']); + $details = explode("||", $pconfig['detail']); + while ($counter < count($addresses)): + if (($pconfig['type'] != "host") && is_subnet($addresses[$counter])) { + list($address, $address_subnet) = explode("/", $addresses[$counter]); + } else { + $address = $addresses[$counter]; + $address_subnet = ""; + } + ?> + + + + + + + + +
    +
    +
    CIDR
    + + + + + + + " /> +
    + +
      + " /> + " onclick="window.location.href=''" /> + +
    +
    + + + + + + diff --git a/src/usr/local/www/firewall_aliases_import.php b/src/usr/local/www/firewall_aliases_import.php new file mode 100755 index 0000000..868f5eb --- /dev/null +++ b/src/usr/local/www/firewall_aliases_import.php @@ -0,0 +1,246 @@ + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + +
    + +
    + + . + +
    + +
    + + +
    + +
    172.16.1.2 +
    172.16.0.0/24 +
    10.11.12.100-10.11.12.200 +
    192.168.1.254 Home router +
    10.20.0.0/16 Office network +
    10.40.1.10-10.40.1.19 Managed switches +
    +
      + " /> + " onclick="window.location.href=''" /> + +
    + + +
    +
    + + + + + + + diff --git a/src/usr/local/www/firewall_nat.php b/src/usr/local/www/firewall_nat.php new file mode 100644 index 0000000..70c8041 --- /dev/null +++ b/src/usr/local/www/firewall_nat.php @@ -0,0 +1,399 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: nat +*/ + +##|+PRIV +##|*IDENT=page-firewall-nat-portforward +##|*NAME=Firewall: NAT: Port Forward page +##|*DESCR=Allow access to the 'Firewall: NAT: Port Forward' page. +##|*MATCH=firewall_nat.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("itemid.inc"); + +if (!is_array($config['nat']['rule'])) { + $config['nat']['rule'] = array(); +} + +$a_nat = &$config['nat']['rule']; + +/* if a custom message has been passed along, lets process it */ +if ($_GET['savemsg']) { + $savemsg = $_GET['savemsg']; +} + +if ($_POST) { + + $pconfig = $_POST; + + if ($_POST['apply']) { + + $retval = 0; + + $retval |= filter_configure(); + $savemsg = get_std_save_message($retval); + + pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/apply"); + + if ($retval == 0) { + clear_subsystem_dirty('natconf'); + clear_subsystem_dirty('filter'); + } + + } +} + +if ($_GET['act'] == "del") { + if ($a_nat[$_GET['id']]) { + + if (isset($a_nat[$_GET['id']]['associated-rule-id'])) { + delete_id($a_nat[$_GET['id']]['associated-rule-id'], $config['filter']['rule']); + $want_dirty_filter = true; + } + unset($a_nat[$_GET['id']]); + + if (write_config()) { + mark_subsystem_dirty('natconf'); + if ($want_dirty_filter) { + mark_subsystem_dirty('filter'); + } + } + header("Location: firewall_nat.php"); + exit; + } +} + +if (isset($_POST['del_x'])) { + /* delete selected rules */ + if (is_array($_POST['rule']) && count($_POST['rule'])) { + foreach ($_POST['rule'] as $rulei) { + $target = $rule['target']; + // Check for filter rule associations + if (isset($a_nat[$rulei]['associated-rule-id'])) { + delete_id($a_nat[$rulei]['associated-rule-id'], $config['filter']['rule']); + + mark_subsystem_dirty('filter'); + } + unset($a_nat[$rulei]); + } + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat.php"); + exit; + } + +} else { + /* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */ + unset($movebtn); + foreach ($_POST as $pn => $pd) { + if (preg_match("/move_(\d+)_x/", $pn, $matches)) { + $movebtn = $matches[1]; + break; + } + } + /* move selected rules before this rule */ + if (isset($movebtn) && is_array($_POST['rule']) && count($_POST['rule'])) { + $a_nat_new = array(); + + /* copy all rules < $movebtn and not selected */ + for ($i = 0; $i < $movebtn; $i++) { + if (!in_array($i, $_POST['rule'])) { + $a_nat_new[] = $a_nat[$i]; + } + } + + /* copy all selected rules */ + for ($i = 0; $i < count($a_nat); $i++) { + if ($i == $movebtn) { + continue; + } + if (in_array($i, $_POST['rule'])) { + $a_nat_new[] = $a_nat[$i]; + } + } + + /* copy $movebtn rule */ + if ($movebtn < count($a_nat)) { + $a_nat_new[] = $a_nat[$movebtn]; + } + + /* copy all rules > $movebtn and not selected */ + for ($i = $movebtn+1; $i < count($a_nat); $i++) { + if (!in_array($i, $_POST['rule'])) { + $a_nat_new[] = $a_nat[$i]; + } + } + $a_nat = $a_nat_new; + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat.php"); + exit; + } +} + +$closehead = false; +$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("Port Forward")); +include("head.inc"); + +echo ""; +echo ""; +echo ""; +echo ""; + +?> + + + + +
    + + + +" . gettext("You must apply the changes in order for them to take effect."));?>
    + + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + "; + + $alias_popup = rule_popup($natent['source']['address'], pprint_port($natent['source']['port']), $natent['destination']['address'], pprint_port($natent['destination']['port'])); + + $alias_src_span_begin = $alias_popup["src"]; + $alias_src_port_span_begin = $alias_popup["srcport"]; + $alias_dst_span_begin = $alias_popup["dst"]; + $alias_dst_port_span_begin = $alias_popup["dstport"]; + + $alias_src_span_end = $alias_popup["src_end"]; + $alias_src_port_span_end = $alias_popup["srcport_end"]; + $alias_dst_span_end = $alias_popup["dst_end"]; + $alias_dst_port_span_end = $alias_popup["dstport_end"]; + + $alias_popup = rule_popup("", "", $natent['target'], pprint_port($natent['local-port'])); + + $alias_target_span_begin = $alias_popup["dst"]; + $alias_local_port_span_begin = $alias_popup["dstport"]; + + $alias_target_span_end = $alias_popup["dst_end"]; + $alias_local_port_span_end = $alias_popup["dstport_end"]; + + if (isset($natent['disabled'])) { + $textss = ""; + } else { + $textss = ""; + } + + $textse = ""; + + /* if user does not have access to edit an interface skip on to the next record */ + if (!have_natpfruleint_access($natent['interface'])) { + continue; + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       + + + + + +
    + + " border="0" alt="delete" /> + + " onclick="return confirm('')" /> + + add
    +
    + + " border="0" alt="pass" /> + + " border="0" alt="change" /> + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + +
    " height="17" type="image" width="17" border="0" />">
    ')">" alt="delete" />" width="17" height="17" border="0" alt="add" />
    +
        + + + + + + + + +
    " border="0" alt="move" />" />
    + + " border="0" alt="delete" /> + + " onclick="return confirm('')" /> + + add
    +
     
    pass
    chain
    +
    +
    + + "") { + echo ""; +} +?> + +
    + + + diff --git a/src/usr/local/www/firewall_nat_1to1.php b/src/usr/local/www/firewall_nat_1to1.php new file mode 100644 index 0000000..10b48dc --- /dev/null +++ b/src/usr/local/www/firewall_nat_1to1.php @@ -0,0 +1,371 @@ +. + All rights reserved. + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: nat +*/ + +##|+PRIV +##|*IDENT=page-firewall-nat-1-1 +##|*NAME=Firewall: NAT: 1:1 page +##|*DESCR=Allow access to the 'Firewall: NAT: 1:1' page. +##|*MATCH=firewall_nat_1to1.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +if (!is_array($config['nat']['onetoone'])) { + $config['nat']['onetoone'] = array(); +} + +$a_1to1 = &$config['nat']['onetoone']; + +if ($_POST) { + $pconfig = $_POST; + + if ($_POST['apply']) { + $retval = 0; + $retval |= filter_configure(); + $savemsg = get_std_save_message($retval); + + if ($retval == 0) { + clear_subsystem_dirty('natconf'); + clear_subsystem_dirty('filter'); + } + } +} + +if ($_GET['act'] == "del") { + if ($a_1to1[$_GET['id']]) { + unset($a_1to1[$_GET['id']]); + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_1to1.php"); + exit; + } +} + +if (isset($_POST['del_x'])) { + /* delete selected rules */ + if (is_array($_POST['rule']) && count($_POST['rule'])) { + foreach ($_POST['rule'] as $rulei) { + unset($a_1to1[$rulei]); + } + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_1to1.php"); + exit; + } + +} else if ($_GET['act'] == "toggle") { + if ($a_1to1[$_GET['id']]) { + if (isset($a_1to1[$_GET['id']]['disabled'])) { + unset($a_1to1[$_GET['id']]['disabled']); + } else { + $a_1to1[$_GET['id']]['disabled'] = true; + } + if (write_config("Firewall: NAT: Outbound, enable/disable NAT rule")) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_1to1.php"); + exit; + } +} else { + /* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */ + unset($movebtn); + foreach ($_POST as $pn => $pd) { + if (preg_match("/move_(\d+)_x/", $pn, $matches)) { + $movebtn = $matches[1]; + break; + } + } + /* move selected rules before this rule */ + if (isset($movebtn) && is_array($_POST['rule']) && count($_POST['rule'])) { + $a_1to1_new = array(); + + /* copy all rules < $movebtn and not selected */ + for ($i = 0; $i < $movebtn; $i++) { + if (!in_array($i, $_POST['rule'])) { + $a_1to1_new[] = $a_1to1[$i]; + } + } + + /* copy all selected rules */ + for ($i = 0; $i < count($a_1to1); $i++) { + if ($i == $movebtn) { + continue; + } + if (in_array($i, $_POST['rule'])) { + $a_1to1_new[] = $a_1to1[$i]; + } + } + + /* copy $movebtn rule */ + if ($movebtn < count($a_1to1)) { + $a_1to1_new[] = $a_1to1[$movebtn]; + } + + /* copy all rules > $movebtn and not selected */ + for ($i = $movebtn+1; $i < count($a_1to1); $i++) { + if (!in_array($i, $_POST['rule'])) { + $a_1to1_new[] = $a_1to1[$i]; + } + } + if (count($a_1to1_new) > 0) { + $a_1to1 = $a_1to1_new; + } + + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_1to1.php"); + exit; + } +} + +$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("1:1")); +include("head.inc"); + +?> + + +
    + +" . + gettext("You must apply the changes in order for them to take effect.")); +} +?> +
    + + + +
    + +
    +
    + + + + + + + + + + + +"; + $i = 0; + foreach ($a_1to1 as $natent): + if (isset($natent['disabled'])) { + $textss = ""; + $iconfn = "pass_d"; + } else { + $textss = ""; + $iconfn = "pass"; + } +?> + + + + + + + + + + + + + + + + + + +
       + + + + + +
    + + " alt="add" /> + +
    +
    + + + + " alt="icon" /> + + + + + + + + + + + + + + + + + + + + + +
    + " + type="image" style="height:17;width:17;border:0" /> + + + " alt="edit" /> + +
    + ')"> + " alt="delete" /> + + + + " width="17" height="17" border="0" alt="duplicate" /> + +
    +
    + + + + + + + + +
    + + " border="0" alt="move" /> + + " /> + + + + " alt="add" /> + +
    + + " border="0" alt="delete" /> + + " + onclick="return confirm('')" /> + +
    +
    +

    +
    + +
    + +

    +
    +
    +
    +
    + + + diff --git a/src/usr/local/www/firewall_nat_1to1_edit.php b/src/usr/local/www/firewall_nat_1to1_edit.php new file mode 100644 index 0000000..e415015 --- /dev/null +++ b/src/usr/local/www/firewall_nat_1to1_edit.php @@ -0,0 +1,592 @@ +. + All rights reserved. + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: nat +*/ + +##|+PRIV +##|*IDENT=page-firewall-nat-1-1-edit +##|*NAME=Firewall: NAT: 1:1: Edit page +##|*DESCR=Allow access to the 'Firewall: NAT: 1:1: Edit' page. +##|*MATCH=firewall_nat_1to1_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("interfaces.inc"); +require_once("filter.inc"); +require("shaper.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_nat_1to1.php'); +} + +$specialsrcdst = explode(" ", "any pptp pppoe l2tp openvpn"); +$ifdisp = get_configured_interface_with_descr(); +foreach ($ifdisp as $kif => $kdescr) { + $specialsrcdst[] = "{$kif}"; + $specialsrcdst[] = "{$kif}ip"; +} + +if (!is_array($config['nat']['onetoone'])) { + $config['nat']['onetoone'] = array(); +} + +$a_1to1 = &$config['nat']['onetoone']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +$after = $_GET['after']; +if (isset($_POST['after'])) { + $after = $_POST['after']; +} + +if (isset($_GET['dup'])) { + $id = $_GET['dup']; + $after = $_GET['dup']; +} + +if (isset($id) && $a_1to1[$id]) { + $pconfig['disabled'] = isset($a_1to1[$id]['disabled']); + + address_to_pconfig($a_1to1[$id]['source'], $pconfig['src'], + $pconfig['srcmask'], $pconfig['srcnot'], + $pconfig['srcbeginport'], $pconfig['srcendport']); + + address_to_pconfig($a_1to1[$id]['destination'], $pconfig['dst'], + $pconfig['dstmask'], $pconfig['dstnot'], + $pconfig['dstbeginport'], $pconfig['dstendport']); + + $pconfig['interface'] = $a_1to1[$id]['interface']; + if (!$pconfig['interface']) { + $pconfig['interface'] = "wan"; + } + + $pconfig['external'] = $a_1to1[$id]['external']; + $pconfig['descr'] = $a_1to1[$id]['descr']; + $pconfig['natreflection'] = $a_1to1[$id]['natreflection']; +} else { + $pconfig['interface'] = "wan"; +} + +if (isset($_GET['dup'])) { + unset($id); +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + /* run through $_POST items encoding HTML entities so that the user + * cannot think he is slick and perform a XSS attack on the unwilling + */ + foreach ($_POST as $key => $value) { + $temp = str_replace(">", "", $value); + $newpost = htmlentities($temp); + if ($newpost <> $temp) { + $input_errors[] = sprintf(gettext("Invalid characters detected (%s). Please remove invalid characters and save again."), $temp); + } + } + + /* input validation */ + $reqdfields = explode(" ", "interface external"); + $reqdfieldsn = array(gettext("Interface"), gettext("External subnet")); + if ($_POST['srctype'] == "single" || $_POST['srctype'] == "network") { + $reqdfields[] = "src"; + $reqdfieldsn[] = gettext("Source address"); + } + if ($_POST['dsttype'] == "single" || $_POST['dsttype'] == "network") { + $reqdfields[] = "dst"; + $reqdfieldsn[] = gettext("Destination address"); + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($_POST['external']) { + $_POST['external'] = trim($_POST['external']); + } + if ($_POST['src']) { + $_POST['src'] = trim($_POST['src']); + } + if ($_POST['dst']) { + $_POST['dst'] = trim($_POST['dst']); + } + + if (is_specialnet($_POST['srctype'])) { + $_POST['src'] = $_POST['srctype']; + $_POST['srcmask'] = 0; + } else if ($_POST['srctype'] == "single") { + $_POST['srcmask'] = 32; + } + if (is_specialnet($_POST['dsttype'])) { + $_POST['dst'] = $_POST['dsttype']; + $_POST['dstmask'] = 0; + } else if ($_POST['dsttype'] == "single") { + $_POST['dstmask'] = 32; + } else if (is_ipaddr($_POST['dsttype'])) { + $_POST['dst'] = $_POST['dsttype']; + $_POST['dstmask'] = 32; + $_POST['dsttype'] = "single"; + } + + /* For external, user can enter only ip's */ + if (($_POST['external'] && !is_ipaddr($_POST['external']))) { + $input_errors[] = gettext("A valid external subnet must be specified."); + } + + /* For dst, if user enters an alias and selects "network" then disallow. */ + if ($_POST['dsttype'] == "network" && is_alias($_POST['dst'])) { + $input_errors[] = gettext("You must specify single host or alias for alias entries."); + } + + /* For src, user can enter only ip's or networks */ + if (!is_specialnet($_POST['srctype'])) { + if (($_POST['src'] && !is_ipaddr($_POST['src']))) { + $input_errors[] = sprintf(gettext("%s is not a valid internal IP address."), $_POST['src']); + } + if (($_POST['srcmask'] && !is_numericint($_POST['srcmask']))) { + $input_errors[] = gettext("A valid internal bit count must be specified."); + } + } + + /* For dst, user can enter ip's, networks or aliases */ + if (!is_specialnet($_POST['dsttype'])) { + if (($_POST['dst'] && !is_ipaddroralias($_POST['dst']))) { + $input_errors[] = sprintf(gettext("%s is not a valid destination IP address or alias."), $_POST['dst']); + } + if (($_POST['dstmask'] && !is_numericint($_POST['dstmask']))) { + $input_errors[] = gettext("A valid destination bit count must be specified."); + } + } + + /* check for overlaps with other 1:1 */ + foreach ($a_1to1 as $natent) { + if (isset($id) && ($a_1to1[$id]) && ($a_1to1[$id] === $natent)) { + continue; + } + + if (check_subnets_overlap($_POST['internal'], $_POST['subnet'], $natent['internal'], $natent['subnet'])) { + //$input_errors[] = "Another 1:1 rule overlaps with the specified internal subnet."; + //break; + } + } + + if (!$input_errors) { + $natent = array(); + + $natent['disabled'] = isset($_POST['disabled']) ? true:false; + $natent['external'] = $_POST['external']; + $natent['descr'] = $_POST['descr']; + $natent['interface'] = $_POST['interface']; + + pconfig_to_address($natent['source'], $_POST['src'], + $_POST['srcmask'], $_POST['srcnot']); + + pconfig_to_address($natent['destination'], $_POST['dst'], + $_POST['dstmask'], $_POST['dstnot']); + + if ($_POST['natreflection'] == "enable" || $_POST['natreflection'] == "disable") { + $natent['natreflection'] = $_POST['natreflection']; + } else { + unset($natent['natreflection']); + } + + if (isset($id) && $a_1to1[$id]) { + $a_1to1[$id] = $natent; + } else { + if (is_numeric($after)) { + array_splice($a_1to1, $after+1, 0, array($natent)); + } else { + $a_1to1[] = $natent; + } + } + + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_1to1.php"); + exit; + } +} + +$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("1:1"), gettext("Edit")); +include("head.inc"); + +?> + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + /> +
    + +
    +
    + .
    + .
    +
    + +
    + +
    + +
    +
    + /> + +
    + +
    +
    + + + + + + + + + +
       + +
       + / + +
    +
    + +
    + /> + +
    + +
    +
    + + + + + + + + + +
       + +
       + + / + +
    +
    + +
    + +
    +
    + +
    + + + +
    + +
      + " /> + " onclick="window.location.href=''" /> + + + + +
    +
    + + + + + diff --git a/src/usr/local/www/firewall_nat_edit.php b/src/usr/local/www/firewall_nat_edit.php new file mode 100644 index 0000000..db8a174 --- /dev/null +++ b/src/usr/local/www/firewall_nat_edit.php @@ -0,0 +1,1016 @@ +. + All rights reserved. + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: nat +*/ + +##|+PRIV +##|*IDENT=page-firewall-nat-portforward-edit +##|*NAME=Firewall: NAT: Port Forward: Edit page +##|*DESCR=Allow access to the 'Firewall: NAT: Port Forward: Edit' page. +##|*MATCH=firewall_nat_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("itemid.inc"); +require_once("filter.inc"); +require("shaper.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_nat.php'); +} + +$specialsrcdst = explode(" ", "any (self) pptp pppoe l2tp openvpn"); +$ifdisp = get_configured_interface_with_descr(); +foreach ($ifdisp as $kif => $kdescr) { + $specialsrcdst[] = "{$kif}"; + $specialsrcdst[] = "{$kif}ip"; +} + +if (!is_array($config['nat']['rule'])) { + $config['nat']['rule'] = array(); +} +$a_nat = &$config['nat']['rule']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (is_numericint($_GET['after']) || $_GET['after'] == "-1") { + $after = $_GET['after']; +} +if (isset($_POST['after']) && (is_numericint($_POST['after']) || $_POST['after'] == "-1")) { + $after = $_POST['after']; +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + $id = $_GET['dup']; + $after = $_GET['dup']; +} + +if (isset($id) && $a_nat[$id]) { + if (isset($a_nat[$id]['created']) && is_array($a_nat[$id]['created'])) { + $pconfig['created'] = $a_nat[$id]['created']; + } + + if (isset($a_nat[$id]['updated']) && is_array($a_nat[$id]['updated'])) { + $pconfig['updated'] = $a_nat[$id]['updated']; + } + + $pconfig['disabled'] = isset($a_nat[$id]['disabled']); + $pconfig['nordr'] = isset($a_nat[$id]['nordr']); + address_to_pconfig($a_nat[$id]['source'], $pconfig['src'], + $pconfig['srcmask'], $pconfig['srcnot'], + $pconfig['srcbeginport'], $pconfig['srcendport']); + + address_to_pconfig($a_nat[$id]['destination'], $pconfig['dst'], + $pconfig['dstmask'], $pconfig['dstnot'], + $pconfig['dstbeginport'], $pconfig['dstendport']); + + $pconfig['proto'] = $a_nat[$id]['protocol']; + $pconfig['localip'] = $a_nat[$id]['target']; + $pconfig['localbeginport'] = $a_nat[$id]['local-port']; + $pconfig['descr'] = $a_nat[$id]['descr']; + $pconfig['interface'] = $a_nat[$id]['interface']; + $pconfig['associated-rule-id'] = $a_nat[$id]['associated-rule-id']; + $pconfig['nosync'] = isset($a_nat[$id]['nosync']); + $pconfig['natreflection'] = $a_nat[$id]['natreflection']; + + if (!$pconfig['interface']) { + $pconfig['interface'] = "wan"; + } +} else { + $pconfig['interface'] = "wan"; + $pconfig['src'] = "any"; + $pconfig['srcbeginport'] = "any"; + $pconfig['srcendport'] = "any"; +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + unset($id); +} + +/* run through $_POST items encoding HTML entities so that the user + * cannot think he is slick and perform a XSS attack on the unwilling + */ +unset($input_errors); +foreach ($_POST as $key => $value) { + $temp = $value; + $newpost = htmlentities($temp); + if ($newpost <> $temp) { + $input_errors[] = sprintf(gettext("Invalid characters detected %s. Please remove invalid characters and save again."), $temp); + } +} + +if ($_POST) { + + if (strtoupper($_POST['proto']) == "TCP" || strtoupper($_POST['proto']) == "UDP" || strtoupper($_POST['proto']) == "TCP/UDP") { + if ($_POST['srcbeginport_cust'] && !$_POST['srcbeginport']) { + $_POST['srcbeginport'] = trim($_POST['srcbeginport_cust']); + } + if ($_POST['srcendport_cust'] && !$_POST['srcendport']) { + $_POST['srcendport'] = trim($_POST['srcendport_cust']); + } + + if ($_POST['srcbeginport'] == "any") { + $_POST['srcbeginport'] = 0; + $_POST['srcendport'] = 0; + } else { + if (!$_POST['srcendport']) { + $_POST['srcendport'] = $_POST['srcbeginport']; + } + } + if ($_POST['srcendport'] == "any") { + $_POST['srcendport'] = $_POST['srcbeginport']; + } + + if ($_POST['dstbeginport_cust'] && !$_POST['dstbeginport']) { + $_POST['dstbeginport'] = trim($_POST['dstbeginport_cust']); + } + if ($_POST['dstendport_cust'] && !$_POST['dstendport']) { + $_POST['dstendport'] = trim($_POST['dstendport_cust']); + } + + if ($_POST['dstbeginport'] == "any") { + $_POST['dstbeginport'] = 0; + $_POST['dstendport'] = 0; + } else { + if (!$_POST['dstendport']) { + $_POST['dstendport'] = $_POST['dstbeginport']; + } + } + if ($_POST['dstendport'] == "any") { + $_POST['dstendport'] = $_POST['dstbeginport']; + } + + if ($_POST['localbeginport_cust'] && !$_POST['localbeginport']) { + $_POST['localbeginport'] = trim($_POST['localbeginport_cust']); + } + + /* Make beginning port end port if not defined and endport is */ + if (!$_POST['srcbeginport'] && $_POST['srcendport']) { + $_POST['srcbeginport'] = $_POST['srcendport']; + } + if (!$_POST['dstbeginport'] && $_POST['dstendport']) { + $_POST['dstbeginport'] = $_POST['dstendport']; + } + } else { + $_POST['srcbeginport'] = 0; + $_POST['srcendport'] = 0; + $_POST['dstbeginport'] = 0; + $_POST['dstendport'] = 0; + } + + if (is_specialnet($_POST['srctype'])) { + $_POST['src'] = $_POST['srctype']; + $_POST['srcmask'] = 0; + } else if ($_POST['srctype'] == "single") { + $_POST['srcmask'] = 32; + } + if (is_specialnet($_POST['dsttype'])) { + $_POST['dst'] = $_POST['dsttype']; + $_POST['dstmask'] = 0; + } else if ($_POST['dsttype'] == "single") { + $_POST['dstmask'] = 32; + } else if (is_ipaddr($_POST['dsttype'])) { + $_POST['dst'] = $_POST['dsttype']; + $_POST['dstmask'] = 32; + $_POST['dsttype'] = "single"; + } + + $pconfig = $_POST; + + /* input validation */ + if (strtoupper($_POST['proto']) == "TCP" or strtoupper($_POST['proto']) == "UDP" or strtoupper($_POST['proto']) == "TCP/UDP") { + $reqdfields = explode(" ", "interface proto dstbeginport dstendport"); + $reqdfieldsn = array(gettext("Interface"), gettext("Protocol"), gettext("Destination port from"), gettext("Destination port to")); + } else { + $reqdfields = explode(" ", "interface proto"); + $reqdfieldsn = array(gettext("Interface"), gettext("Protocol")); + } + + if ($_POST['srctype'] == "single" || $_POST['srctype'] == "network") { + $reqdfields[] = "src"; + $reqdfieldsn[] = gettext("Source address"); + } + if ($_POST['dsttype'] == "single" || $_POST['dsttype'] == "network") { + $reqdfields[] = "dst"; + $reqdfieldsn[] = gettext("Destination address"); + } + if (!isset($_POST['nordr'])) { + $reqdfields[] = "localip"; + $reqdfieldsn[] = gettext("Redirect target IP"); + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (!$_POST['srcbeginport']) { + $_POST['srcbeginport'] = 0; + $_POST['srcendport'] = 0; + } + if (!$_POST['dstbeginport']) { + $_POST['dstbeginport'] = 0; + $_POST['dstendport'] = 0; + } + + if ($_POST['src']) { + $_POST['src'] = trim($_POST['src']); + } + if ($_POST['dst']) { + $_POST['dst'] = trim($_POST['dst']); + } + if ($_POST['localip']) { + $_POST['localip'] = trim($_POST['localip']); + } + + if (!isset($_POST['nordr']) && ($_POST['localip'] && !is_ipaddroralias($_POST['localip']))) { + $input_errors[] = sprintf(gettext("\"%s\" is not a valid redirect target IP address or host alias."), $_POST['localip']); + } + + if ($_POST['srcbeginport'] && !is_portoralias($_POST['srcbeginport'])) { + $input_errors[] = sprintf(gettext("%s is not a valid start source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcbeginport']); + } + if ($_POST['srcendport'] && !is_portoralias($_POST['srcendport'])) { + $input_errors[] = sprintf(gettext("%s is not a valid end source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcendport']); + } + if ($_POST['dstbeginport'] && !is_portoralias($_POST['dstbeginport'])) { + $input_errors[] = sprintf(gettext("%s is not a valid start destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstbeginport']); + } + if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport'])) { + $input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstendport']); + } + + if ((strtoupper($_POST['proto']) == "TCP" || strtoupper($_POST['proto']) == "UDP" || strtoupper($_POST['proto']) == "TCP/UDP") && (!isset($_POST['nordr']) && !is_portoralias($_POST['localbeginport']))) { + $input_errors[] = sprintf(gettext("A valid redirect target port must be specified. It must be a port alias or integer between 1 and 65535."), $_POST['localbeginport']); + } + + /* if user enters an alias and selects "network" then disallow. */ + if (($_POST['srctype'] == "network" && is_alias($_POST['src'])) || + ($_POST['dsttype'] == "network" && is_alias($_POST['dst']))) { + $input_errors[] = gettext("You must specify single host or alias for alias entries."); + } + + if (!is_specialnet($_POST['srctype'])) { + if (($_POST['src'] && !is_ipaddroralias($_POST['src']))) { + $input_errors[] = sprintf(gettext("%s is not a valid source IP address or alias."), $_POST['src']); + } + if (($_POST['srcmask'] && !is_numericint($_POST['srcmask']))) { + $input_errors[] = gettext("A valid source bit count must be specified."); + } + } + if (!is_specialnet($_POST['dsttype'])) { + if (($_POST['dst'] && !is_ipaddroralias($_POST['dst']))) { + $input_errors[] = sprintf(gettext("%s is not a valid destination IP address or alias."), $_POST['dst']); + } + if (($_POST['dstmask'] && !is_numericint($_POST['dstmask']))) { + $input_errors[] = gettext("A valid destination bit count must be specified."); + } + } + + if ($_POST['srcbeginport'] > $_POST['srcendport']) { + /* swap */ + $tmp = $_POST['srcendport']; + $_POST['srcendport'] = $_POST['srcbeginport']; + $_POST['srcbeginport'] = $tmp; + } + if ($_POST['dstbeginport'] > $_POST['dstendport']) { + /* swap */ + $tmp = $_POST['dstendport']; + $_POST['dstendport'] = $_POST['dstbeginport']; + $_POST['dstbeginport'] = $tmp; + } + + if (!$input_errors) { + if (!isset($_POST['nordr']) && ($_POST['dstendport'] - $_POST['dstbeginport'] + $_POST['localbeginport']) > 65535) { + $input_errors[] = gettext("The target port range must be an integer between 1 and 65535."); + } + } + + /* check for overlaps */ + foreach ($a_nat as $natent) { + if (isset($id) && ($a_nat[$id]) && ($a_nat[$id] === $natent)) { + continue; + } + if ($natent['interface'] != $_POST['interface']) { + continue; + } + if ($natent['destination']['address'] != $_POST['dst']) { + continue; + } + if (($natent['proto'] != $_POST['proto']) && ($natent['proto'] != "tcp/udp") && ($_POST['proto'] != "tcp/udp")) { + continue; + } + + list($begp, $endp) = explode("-", $natent['destination']['port']); + if (!$endp) { + $endp = $begp; + } + + if (!((($_POST['dstbeginport'] < $begp) && ($_POST['dstendport'] < $begp)) || + (($_POST['dstbeginport'] > $endp) && ($_POST['dstendport'] > $endp)))) { + $input_errors[] = gettext("The destination port range overlaps with an existing entry."); + break; + } + } + + // Allow extending of the firewall edit page and include custom input validation + pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/input_validation"); + + if (!$input_errors) { + $natent = array(); + + $natent['disabled'] = isset($_POST['disabled']) ? true:false; + $natent['nordr'] = isset($_POST['nordr']) ? true:false; + + if ($natent['nordr']) { + $_POST['associated-rule-id'] = ''; + $_POST['filter-rule-association'] = ''; + } + + pconfig_to_address($natent['source'], $_POST['src'], + $_POST['srcmask'], $_POST['srcnot'], + $_POST['srcbeginport'], $_POST['srcendport']); + + pconfig_to_address($natent['destination'], $_POST['dst'], + $_POST['dstmask'], $_POST['dstnot'], + $_POST['dstbeginport'], $_POST['dstendport']); + + $natent['protocol'] = $_POST['proto']; + + if (!$natent['nordr']) { + $natent['target'] = $_POST['localip']; + $natent['local-port'] = $_POST['localbeginport']; + } + $natent['interface'] = $_POST['interface']; + $natent['descr'] = $_POST['descr']; + $natent['associated-rule-id'] = $_POST['associated-rule-id']; + + if ($_POST['filter-rule-association'] == "pass") { + $natent['associated-rule-id'] = "pass"; + } + + if ($_POST['nosync'] == "yes") { + $natent['nosync'] = true; + } else { + unset($natent['nosync']); + } + + if ($_POST['natreflection'] == "enable" || $_POST['natreflection'] == "purenat" || $_POST['natreflection'] == "disable") { + $natent['natreflection'] = $_POST['natreflection']; + } else { + unset($natent['natreflection']); + } + + // If we used to have an associated filter rule, but no-longer should have one + if (!empty($a_nat[$id]) && (empty($natent['associated-rule-id']) || $natent['associated-rule-id'] != $a_nat[$id]['associated-rule-id'])) { + // Delete the previous rule + delete_id($a_nat[$id]['associated-rule-id'], $config['filter']['rule']); + mark_subsystem_dirty('filter'); + } + + $need_filter_rule = false; + // Updating a rule with a filter rule associated + if (!empty($natent['associated-rule-id'])) { + $need_filter_rule = true; + } + // Create a rule or if we want to create a new one + if ($natent['associated-rule-id'] == 'new') { + $need_filter_rule = true; + unset($natent['associated-rule-id']); + $_POST['filter-rule-association']='add-associated'; + } + // If creating a new rule, where we want to add the filter rule, associated or not + else if (isset($_POST['filter-rule-association']) && + ($_POST['filter-rule-association'] == 'add-associated' || + $_POST['filter-rule-association'] == 'add-unassociated')) { + $need_filter_rule = true; + } + + if ($need_filter_rule == true) { + + /* auto-generate a matching firewall rule */ + $filterent = array(); + unset($filterentid); + // If a rule already exists, load it + if (!empty($natent['associated-rule-id'])) { + $filterentid = get_id($natent['associated-rule-id'], $config['filter']['rule']); + if ($filterentid === false) { + $filterent['associated-rule-id'] = $natent['associated-rule-id']; + } else { + $filterent =& $config['filter']['rule'][$filterentid]; + } + } + pconfig_to_address($filterent['source'], $_POST['src'], + $_POST['srcmask'], $_POST['srcnot'], + $_POST['srcbeginport'], $_POST['srcendport']); + + // Update interface, protocol and destination + $filterent['interface'] = $_POST['interface']; + $filterent['protocol'] = $_POST['proto']; + $filterent['destination']['address'] = $_POST['localip']; + + $dstpfrom = $_POST['localbeginport']; + $dstpto = $dstpfrom + $_POST['dstendport'] - $_POST['dstbeginport']; + + if ($dstpfrom == $dstpto) { + $filterent['destination']['port'] = $dstpfrom; + } else { + $filterent['destination']['port'] = $dstpfrom . "-" . $dstpto; + } + + /* + * Our firewall filter description may be no longer than + * 63 characters, so don't let it be. + */ + $filterent['descr'] = substr("NAT " . $_POST['descr'], 0, 62); + + // If this is a new rule, create an ID and add the rule + if ($_POST['filter-rule-association'] == 'add-associated') { + $filterent['associated-rule-id'] = $natent['associated-rule-id'] = get_unique_id(); + $filterent['created'] = make_config_revision_entry(null, gettext("NAT Port Forward")); + $config['filter']['rule'][] = $filterent; + } + + mark_subsystem_dirty('filter'); + } + + if (isset($a_nat[$id]['created']) && is_array($a_nat[$id]['created'])) { + $natent['created'] = $a_nat[$id]['created']; + } + + $natent['updated'] = make_config_revision_entry(); + + // Allow extending of the firewall edit page and include custom input validation + pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_write_config"); + + // Update the NAT entry now + if (isset($id) && $a_nat[$id]) { + $a_nat[$id] = $natent; + } else { + $natent['created'] = make_config_revision_entry(); + if (is_numeric($after)) { + array_splice($a_nat, $after+1, 0, array($natent)); + } else { + $a_nat[] = $natent; + } + } + + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + + header("Location: firewall_nat.php"); + exit; + } +} + +$closehead = false; +$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("Port Forward"), gettext("Edit")); +include("head.inc"); + +?> + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + /> +
    + +
    + /> + +
    +
    +
    +
    +
    +
    + +
    +
    +   +
    +
    + " /> - +
    + /> + +
    + +
    +
    + + + + + + + + + +
       + +
       + + / + +
    +
    + + + + + + + + + +
       + + +
    + + +
    +
    + + +
    + '' +
    +
    + +
    + +
    + + 192.168.1.12 +
    +
    + +
    +
    + +
    +
    + +
    + +
    + />
    + +
    + +
    + \n"; + echo $linkedrule; + ?> +
    + +

    +
     
    + +
    + +
      
      + " /> + " onclick="window.location.href=''" /> + + + + + +
    +
    + + + + + diff --git a/src/usr/local/www/firewall_nat_npt.php b/src/usr/local/www/firewall_nat_npt.php new file mode 100644 index 0000000..003bd88 --- /dev/null +++ b/src/usr/local/www/firewall_nat_npt.php @@ -0,0 +1,195 @@ +. + All rights reserved. + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: nat +*/ + +##|+PRIV +##|*IDENT=page-firewall-nat-npt +##|*NAME=Firewall: NAT: NPT page +##|*DESCR=Allow access to the 'Firewall: NAT: NPT' page. +##|*MATCH=firewall_nat_npt.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +if (!is_array($config['nat']['npt'])) { + $config['nat']['npt'] = array(); +} +$a_npt = &$config['nat']['npt']; + +if ($_POST) { + + $pconfig = $_POST; + + if ($_POST['apply']) { + $retval = 0; + $retval |= filter_configure(); + $savemsg = get_std_save_message($retval); + + if ($retval == 0) { + clear_subsystem_dirty('natconf'); + clear_subsystem_dirty('filter'); + } + } +} + +if ($_GET['act'] == "del") { + if ($a_npt[$_GET['id']]) { + unset($a_npt[$_GET['id']]); + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_npt.php"); + exit; + } +} + +$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("NPt")); +include("head.inc"); + +?> + + +
    + + +" . gettext("You must apply the changes in order for them to take effect."));?>
    + + + + + + +
    + +
    +
    + + + + + + + + +"; + + $i = 0; + foreach ($a_npt as $natent): + + if (isset($natent['disabled'])) { + $textss = ""; + } else { + $textss = ""; + } +?> + + + + + + + + + + + + + +
    + + + + + +
    " alt="add" />
    +
    + + + + + + + +   + + + + + + + +
    " alt="edit" />')">" alt="delete" />
    +
    + + + + + +
    " alt="add" />
    +
    +
    +
    +
    + + + diff --git a/src/usr/local/www/firewall_nat_npt_edit.php b/src/usr/local/www/firewall_nat_npt_edit.php new file mode 100644 index 0000000..addddd2 --- /dev/null +++ b/src/usr/local/www/firewall_nat_npt_edit.php @@ -0,0 +1,311 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: nat +*/ + +##|+PRIV +##|*IDENT=page-firewall-nat-npt-edit +##|*NAME=Firewall: NAT: NPt: Edit page +##|*DESCR=Allow access to the 'Firewall: NAT: NPt: Edit' page. +##|*MATCH=firewall_nat_npt_edit.php* +##|-PRIV + +function natnptcmp($a, $b) { + return ipcmp($a['external'], $b['external']); +} + +function nat_npt_rules_sort() { + global $g, $config; + + if (!is_array($config['nat']['npt'])) { + return; + } + + usort($config['nat']['npt'], "natnptcmp"); +} + +require("guiconfig.inc"); +require_once("interfaces.inc"); +require_once("filter.inc"); +require("shaper.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_nat_npt.php'); +} + +$ifdisp = get_configured_interface_with_descr(); +foreach ($ifdisp as $kif => $kdescr) { + $specialsrcdst[] = "{$kif}"; + $specialsrcdst[] = "{$kif}ip"; +} + +if (!is_array($config['nat']['npt'])) { + $config['nat']['npt'] = array(); +} +$a_npt = &$config['nat']['npt']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_npt[$id]) { + $pconfig['disabled'] = isset($a_npt[$id]['disabled']); + + address_to_pconfig($a_npt[$id]['source'], $pconfig['src'], + $pconfig['srcmask'], $pconfig['srcnot'], + $pconfig['srcbeginport'], $pconfig['srcendport']); + + address_to_pconfig($a_npt[$id]['destination'], $pconfig['dst'], + $pconfig['dstmask'], $pconfig['dstnot'], + $pconfig['dstbeginport'], $pconfig['dstendport']); + + $pconfig['interface'] = $a_npt[$id]['interface']; + if (!$pconfig['interface']) { + $pconfig['interface'] = "wan"; + } + + $pconfig['external'] = $a_npt[$id]['external']; + $pconfig['descr'] = $a_npt[$id]['descr']; +} else { + $pconfig['interface'] = "wan"; +} + + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "interface"); + $reqdfieldsn = array(gettext("Interface")); + $reqdfields[] = "src"; + $reqdfieldsn[] = gettext("Source prefix"); + $reqdfields[] = "dst"; + $reqdfieldsn[] = gettext("Destination prefix"); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (!$input_errors) { + $natent = array(); + + $natent['disabled'] = isset($_POST['disabled']) ? true:false; + $natent['descr'] = $_POST['descr']; + $natent['interface'] = $_POST['interface']; + + if ($_POST['src']) { + $_POST['src'] = trim($_POST['src']); + } + if ($_POST['dst']) { + $_POST['dst'] = trim($_POST['dst']); + } + + pconfig_to_address($natent['source'], $_POST['src'], $_POST['srcmask'], $_POST['srcnot']); + + pconfig_to_address($natent['destination'], $_POST['dst'], $_POST['dstmask'], $_POST['dstnot']); + + if (isset($id) && $a_npt[$id]) { + $a_npt[$id] = $natent; + } else { + $a_npt[] = $natent; + } + nat_npt_rules_sort(); + + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + + header("Location: firewall_nat_npt.php"); + exit; + } +} + +$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("NPt"), gettext("Edit")); +include("head.inc"); + +?> + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + /> +
    + +
    +
    + .
    + . +
    +
    + /> + +
    + +
    +
    + + + + + +
       + / + +
    +
    + +
    + /> + +
    + +
    +
    + + + + + +
       + + / + +
    +
    +
    +
    + +
    +
      + " /> + " onclick="window.location.href=''" /> + + + + +
    +
    + + + diff --git a/src/usr/local/www/firewall_nat_out.php b/src/usr/local/www/firewall_nat_out.php new file mode 100644 index 0000000..d560abe --- /dev/null +++ b/src/usr/local/www/firewall_nat_out.php @@ -0,0 +1,695 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: nat +*/ + +##|+PRIV +##|*IDENT=page-firewall-nat-outbound +##|*NAME=Firewall: NAT: Outbound page +##|*DESCR=Allow access to the 'Firewall: NAT: Outbound' page. +##|*MATCH=firewall_nat_out.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +global $FilterIflist; +global $GatewaysList; + +if (!is_array($config['nat']['outbound'])) { + $config['nat']['outbound'] = array(); +} + +if (!is_array($config['nat']['outbound']['rule'])) { + $config['nat']['outbound']['rule'] = array(); +} + +$a_out = &$config['nat']['outbound']['rule']; + +if (!isset($config['nat']['outbound']['mode'])) { + $config['nat']['outbound']['mode'] = "automatic"; +} + +$mode = $config['nat']['outbound']['mode']; + +if ($_POST['apply']) { + $retval = 0; + $retval |= filter_configure(); + + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + + if ($retval == 0) { + clear_subsystem_dirty('natconf'); + clear_subsystem_dirty('filter'); + } +} + +if (isset($_POST['save']) && $_POST['save'] == "Save") { + /* mutually exclusive settings - if user wants advanced NAT, we don't generate automatic rules */ + if ($_POST['mode'] == "advanced" && ($mode == "automatic" || $mode == "hybrid")) { + /* + * user has enabled advanced outbound NAT and doesn't have rules + * lets automatically create entries + * for all of the interfaces to make life easier on the pip-o-chap + */ + if (empty($FilterIflist)) { + filter_generate_optcfg_array(); + } + if (empty($GatewaysList)) { + filter_generate_gateways(); + } + $tonathosts = filter_nat_rules_automatic_tonathosts(true); + $automatic_rules = filter_nat_rules_outbound_automatic(""); + + foreach ($tonathosts as $tonathost) { + foreach ($automatic_rules as $natent) { + $natent['source']['network'] = $tonathost['subnet']; + $natent['descr'] .= sprintf(gettext(' - %1$s to %2$s'), + $tonathost['descr'], + convert_real_interface_to_friendly_descr($natent['interface'])); + $natent['created'] = make_config_revision_entry(null, gettext("Manual Outbound NAT Switch")); + + /* Try to detect already auto created rules and avoid duplicating them */ + $found = false; + foreach ($a_out as $rule) { + if ($rule['interface'] == $natent['interface'] && + $rule['source']['network'] == $natent['source']['network'] && + $rule['dstport'] == $natent['dstport'] && + $rule['target'] == $natent['target'] && + $rule['descr'] == $natent['descr']) { + $found = true; + break; + } + } + + if ($found === false) { + $a_out[] = $natent; + } + } + } + $savemsg = gettext("Default rules for each interface have been created."); + unset($FilterIflist, $GatewaysList); + } + + $config['nat']['outbound']['mode'] = $_POST['mode']; + + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_out.php"); + exit; +} + +if ($_GET['act'] == "del") { + if ($a_out[$_GET['id']]) { + unset($a_out[$_GET['id']]); + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_out.php"); + exit; + } +} + +if (isset($_POST['del_x'])) { + /* delete selected rules */ + if (is_array($_POST['rule']) && count($_POST['rule'])) { + foreach ($_POST['rule'] as $rulei) { + unset($a_out[$rulei]); + } + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_out.php"); + exit; + } + +} else if ($_GET['act'] == "toggle") { + if ($a_out[$_GET['id']]) { + if (isset($a_out[$_GET['id']]['disabled'])) { + unset($a_out[$_GET['id']]['disabled']); + } else { + $a_out[$_GET['id']]['disabled'] = true; + } + if (write_config("Firewall: NAT: Outbound, enable/disable NAT rule")) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_out.php"); + exit; + } +} else { + /* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */ + unset($movebtn); + foreach ($_POST as $pn => $pd) { + if (preg_match("/move_(\d+)_x/", $pn, $matches)) { + $movebtn = $matches[1]; + break; + } + } + /* move selected rules before this rule */ + if (isset($movebtn) && is_array($_POST['rule']) && count($_POST['rule'])) { + $a_out_new = array(); + + /* copy all rules < $movebtn and not selected */ + for ($i = 0; $i < $movebtn; $i++) { + if (!in_array($i, $_POST['rule'])) { + $a_out_new[] = $a_out[$i]; + } + } + + /* copy all selected rules */ + for ($i = 0; $i < count($a_out); $i++) { + if ($i == $movebtn) { + continue; + } + if (in_array($i, $_POST['rule'])) { + $a_out_new[] = $a_out[$i]; + } + } + + /* copy $movebtn rule */ + if ($movebtn < count($a_out)) { + $a_out_new[] = $a_out[$movebtn]; + } + + /* copy all rules > $movebtn and not selected */ + for ($i = $movebtn+1; $i < count($a_out); $i++) { + if (!in_array($i, $_POST['rule'])) { + $a_out_new[] = $a_out[$i]; + } + } + if (count($a_out_new) > 0) { + $a_out = $a_out_new; + } + + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_out.php"); + exit; + } +} + +$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("Outbound")); +include("head.inc"); + +?> + + +
    + +".gettext("You must apply the changes in order for them to take effect.")); +} +?> +
    + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + /> + + +
    + +
    +
    + /> + + +
    + +
    +
    + " /> +
    +   +
    + /> + + +
    + +
    +
    + /> + + +
    + +
    +
    +   +
    + + + + + + + + + + + + + + + + + +"; + $textse = ""; + $iconfn .= "_d"; + } + + //build Alias popup box + $alias_src_span_begin = ""; + $alias_src_port_span_begin = ""; + $alias_dst_span_begin = ""; + $alias_dst_port_span_begin = ""; + + $alias_popup = rule_popup($natent['source']['network'], pprint_port($natent['sourceport']), $natent['destination']['address'], pprint_port($natent['dstport'])); + + $alias_src_span_begin = $alias_popup["src"]; + $alias_src_port_span_begin = $alias_popup["srcport"]; + $alias_dst_span_begin = $alias_popup["dst"]; + $alias_dst_port_span_begin = $alias_popup["dstport"]; + + $alias_src_span_end = $alias_popup["src_end"]; + $alias_src_port_span_end = $alias_popup["srcport_end"]; + $alias_dst_span_end = $alias_popup["dst_end"]; + $alias_dst_port_span_end = $alias_popup["dstport_end"]; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
       + + + + + +
    + + " alt="add" /> + +
    +
    + + + + " alt="icon" /> + + + " alt="icon" /> + + + + +   + + + + + + + + + + +NO NAT'; + } elseif (!$natent['target']) { + echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])) . " address"; + } elseif ($natent['target'] == "other-subnet") { + echo $natent['targetip'] . '/' . $natent['targetip_subnet']; + } else { + echo $natent['target']; + } + echo $textse; +?> + + + + + +   + + + + + + + + + + +
    " type="image" style="height:17;width:17;border:0" /> + + " alt="edit" /> + +
    + ')"> + " alt="delete" /> + + + + " width="17" height="17" border="0" alt="duplicate" /> + +
    +
    + + + + + + + + +
    + + " border="0" alt="move" /> + + " /> + + + + " alt="add" /> + +
    + + " border="0" alt="delete" /> + + " onclick="return confirm('')" /> + +
    +
     
     
       
      + " alt="icon" /> + + +   + + + + + + + + + +NO NAT'; + } elseif (!$natent['target']) { + echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])) . " address"; + } elseif ($natent['target'] == "other-subnet") { + echo $natent['targetip'] . '/' . $natent['targetip_subnet']; + } else { + echo $natent['target']; + } +?> + + + + + +   +  
    +

    +
    +
    " . + "If manual outbound NAT is selected, outbound NAT rules will not be " . + "automatically generated and only the mappings you specify on this page " . + "will be used.

    " . + "If hybrid outbound NAT is selected, mappings you specify on this page will " . + "be used, followed by the automatically generated ones.

    " . + "If disable outbound NAT is selected, no rules will be used.

    " . + "If a target address other than an interface's IP address is used, " . + "then depending on the way the WAN connection is setup, a "); ?> + + +

    +
    +
    +
    +
    + + + diff --git a/src/usr/local/www/firewall_nat_out_edit.php b/src/usr/local/www/firewall_nat_out_edit.php new file mode 100644 index 0000000..e99cebb --- /dev/null +++ b/src/usr/local/www/firewall_nat_out_edit.php @@ -0,0 +1,905 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: nat +*/ + +##|+PRIV +##|*IDENT=page-firewall-nat-outbound-edit +##|*NAME=Firewall: NAT: Outbound: Edit page +##|*DESCR=Allow access to the 'Firewall: NAT: Outbound: Edit' page. +##|*MATCH=firewall_nat_out_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter.inc"); +require("shaper.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_nat_out.php'); +} + +if (!is_array($config['nat']['outbound'])) { + $config['nat']['outbound'] = array(); +} + +if (!is_array($config['nat']['outbound']['rule'])) { + $config['nat']['outbound']['rule'] = array(); +} + +$a_out = &$config['nat']['outbound']['rule']; + +if (!is_array($config['aliases']['alias'])) { + $config['aliases']['alias'] = array(); +} +$a_aliases = &$config['aliases']['alias']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (is_numericint($_GET['after']) || $_GET['after'] == "-1") { + $after = $_GET['after']; +} +if (isset($_POST['after']) && (is_numericint($_POST['after']) || $_POST['after'] == "-1")) { + $after = $_POST['after']; +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + $id = $_GET['dup']; + $after = $_GET['dup']; +} + +if (isset($id) && $a_out[$id]) { + if (isset($a_out[$id]['created']) && is_array($a_out[$id]['created'])) { + $pconfig['created'] = $a_out[$id]['created']; + } + + if (isset($a_out[$id]['updated']) && is_array($a_out[$id]['updated'])) { + $pconfig['updated'] = $a_out[$id]['updated']; + } + + $pconfig['protocol'] = $a_out[$id]['protocol']; + list($pconfig['source'], $pconfig['source_subnet']) = explode('/', $a_out[$id]['source']['network']); + if (!is_numeric($pconfig['source_subnet'])) { + $pconfig['source_subnet'] = 32; + } + $pconfig['sourceport'] = $a_out[$id]['sourceport']; + address_to_pconfig($a_out[$id]['destination'], $pconfig['destination'], + $pconfig['destination_subnet'], $pconfig['destination_not'], + $none, $none); + $pconfig['dstport'] = $a_out[$id]['dstport']; + $pconfig['natport'] = $a_out[$id]['natport']; + $pconfig['target'] = $a_out[$id]['target']; + $pconfig['targetip'] = $a_out[$id]['targetip']; + $pconfig['targetip_subnet'] = $a_out[$id]['targetip_subnet']; + $pconfig['poolopts'] = $a_out[$id]['poolopts']; + $pconfig['interface'] = $a_out[$id]['interface']; + if (!$pconfig['interface']) { + $pconfig['interface'] = "wan"; + } + $pconfig['descr'] = $a_out[$id]['descr']; + $pconfig['nonat'] = $a_out[$id]['nonat']; + $pconfig['disabled'] = isset($a_out[$id]['disabled']); + $pconfig['staticnatport'] = isset($a_out[$id]['staticnatport']); + $pconfig['nosync'] = isset($a_out[$id]['nosync']); +} else { + $pconfig['source_subnet'] = 24; + $pconfig['destination'] = "any"; + $pconfig['destination_subnet'] = 24; + $pconfig['interface'] = "wan"; +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + unset($id); +} + +if ($_POST) { + if ($_POST['destination_type'] == "any") { + $_POST['destination'] = "any"; + $_POST['destination_subnet'] = 24; + } + if ($_POST['source_type'] == "any") { + $_POST['source'] = "any"; + $_POST['source_subnet'] = 24; + } elseif ($_POST['source_type'] == "(self)") { + $_POST['source'] = "(self)"; + $_POST['source_subnet'] = 24; + } + + unset($input_errors); + $pconfig = $_POST; + /* run through $_POST items encoding HTML entitles so that the user + * cannot think he is slick and perform a XSS attack on the unwilling + */ + foreach ($_POST as $key => $value) { + $temp = str_replace(">", "", $value); + $newpost = htmlentities($temp); + if ($newpost <> $temp) { + $input_errors[] = sprintf(gettext("Invalid characters detected (%s). Please remove invalid characters and save again."), $temp); + } + } + + /* input validation */ + $reqdfields = explode(" ", "interface protocol source source_subnet destination destination_subnet"); + $reqdfieldsn = array(gettext("Interface"), gettext("Protocol"), gettext("Source"), gettext("Source bit count"), gettext("Destination"), gettext("Destination bit count")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + $protocol_uses_ports = in_array($_POST['protocol'], explode(" ", "any tcp udp tcp/udp")); + + if ($_POST['source']) { + $_POST['source'] = trim($_POST['source']); + } + if ($_POST['destination']) { + $_POST['destination'] = trim($_POST['destination']); + } + if ($_POST['targetip']) { + $_POST['targetip'] = trim($_POST['targetip']); + } + if ($_POST['sourceport']) { + $_POST['sourceport'] = trim($_POST['sourceport']); + } + if ($_POST['dstport']) { + $_POST['dstport'] = trim($_POST['dstport']); + } + if ($_POST['natport']) { + $_POST['natport'] = trim($_POST['natport']); + } + + if ($protocol_uses_ports && $_POST['sourceport'] <> "" && !(is_portoralias($_POST['sourceport']) || is_portrange($_POST['sourceport']))) { + $input_errors[] = gettext("You must supply either a valid port or port alias for the source port entry."); + } + + if ($protocol_uses_ports && $_POST['dstport'] <> "" && !(is_portoralias($_POST['dstport']) || is_portrange($_POST['dstport']))) { + $input_errors[] = gettext("You must supply either a valid port or port alias for the destination port entry."); + } + + if ($protocol_uses_ports && $_POST['natport'] <> "" && !is_port($_POST['natport']) && !isset($_POST['nonat'])) { + $input_errors[] = gettext("You must supply a valid port for the NAT port entry."); + } + + if (($_POST['source_type'] != "any") && ($_POST['source_type'] != "(self)")) { + if ($_POST['source'] && !is_ipaddroralias($_POST['source']) && $_POST['source'] <> "any") { + $input_errors[] = gettext("A valid source must be specified."); + } + } + if ($_POST['source_subnet'] && !is_numericint($_POST['source_subnet'])) { + $input_errors[] = gettext("A valid source bit count must be specified."); + } + if ($_POST['destination_type'] != "any") { + if ($_POST['destination'] && !is_ipaddroralias($_POST['destination'])) { + $input_errors[] = gettext("A valid destination must be specified."); + } + } + if ($_POST['destination_subnet'] && !is_numericint($_POST['destination_subnet'])) { + $input_errors[] = gettext("A valid destination bit count must be specified."); + } + if ($_POST['destination_type'] == "any") { + if ($_POST['destination_not']) { + $input_errors[] = gettext("Negating destination address of \"any\" is invalid."); + } + } + + if ($_POST['target'] && !is_ipaddr($_POST['target']) && !is_subnet($_POST['target']) && !is_alias($_POST['target']) && !isset($_POST['nonat']) && !($_POST['target'] == "other-subnet")) { + $input_errors[] = gettext("A valid target IP address must be specified."); + } + + if ($_POST['target'] == "other-subnet") { + if (!is_ipaddr($_POST['targetip'])) { + $input_errors[] = gettext("A valid target IP must be specified when using the 'Other Subnet' type."); + } + if (!is_numericint($_POST['targetip_subnet'])) { + $input_errors[] = gettext("A valid target bit count must be specified when using the 'Other Subnet' type."); + } + } + + /* Verify Pool Options */ + $poolopts = ""; + if ($_POST['poolopts']) { + if (is_subnet($_POST['target']) || ($_POST['target'] == "other-subnet")) { + $poolopts = $_POST['poolopts']; + } elseif (is_alias($_POST['target'])) { + if (substr($_POST['poolopts'], 0, 11) == "round-robin") { + $poolopts = $_POST['poolopts']; + } else { + $input_errors[] = gettext("Only Round Robin pool options may be chosen when selecting an alias."); + } + } + } + + /* if user has selected any as source, set it here */ + if ($_POST['source_type'] == "any") { + $osn = "any"; + } else if ($_POST['source_type'] == "(self)") { + $osn = "(self)"; + } else if (is_alias($_POST['source'])) { + $osn = $_POST['source']; + } else { + $osn = gen_subnet($_POST['source'], $_POST['source_subnet']) . "/" . $_POST['source_subnet']; + } + + /* check for existing entries */ + if ($_POST['destination_type'] == "any") { + $ext = "any"; + } else if (is_alias($_POST['destination'])) { + $ext = $_POST['destination']; + } else { + $ext = gen_subnet($_POST['destination'], $_POST['destination_subnet']) . "/" . $_POST['destination_subnet']; + } + + foreach ($a_out as $natent) { + if (isset($id) && ($a_out[$id]) && ($a_out[$id] === $natent)) { + continue; + } + + if (!$natent['interface']) { + $natent['interface'] == "wan"; + } + } + + // Allow extending of the firewall edit page and include custom input validation + pfSense_handle_custom_code("/usr/local/pkg/firewall_aon/input_validation"); + + if (!$input_errors) { + $natent = array(); + $natent['source']['network'] = $osn; + $natent['sourceport'] = ($protocol_uses_ports) ? $_POST['sourceport'] : ""; + $natent['descr'] = $_POST['descr']; + $natent['target'] = (!isset($_POST['nonat'])) ? $_POST['target'] : ""; + $natent['targetip'] = (!isset($_POST['nonat'])) ? $_POST['targetip'] : ""; + $natent['targetip_subnet'] = (!isset($_POST['nonat'])) ? $_POST['targetip_subnet'] : ""; + $natent['interface'] = $_POST['interface']; + $natent['poolopts'] = $poolopts; + + /* static-port */ + if (isset($_POST['staticnatport']) && $protocol_uses_ports && !isset($_POST['nonat'])) { + $natent['staticnatport'] = true; + } else { + unset($natent['staticnatport']); + } + + if (isset($_POST['disabled'])) { + $natent['disabled'] = true; + } else { + unset($natent['disabled']); + } + + /* if user has selected not nat, set it here */ + if (isset($_POST['nonat'])) { + $natent['nonat'] = true; + } else { + unset($natent['nonat']); + } + + if ($_POST['protocol'] && $_POST['protocol'] != "any") { + $natent['protocol'] = $_POST['protocol']; + } else { + unset($natent['protocol']); + } + + if ($ext == "any") { + $natent['destination']['any'] = true; + } else { + $natent['destination']['address'] = $ext; + } + if ($_POST['natport'] != "" && $protocol_uses_ports && !isset($_POST['nonat'])) { + $natent['natport'] = $_POST['natport']; + } else { + unset($natent['natport']); + } + if ($_POST['dstport'] != "" && $protocol_uses_ports) { + $natent['dstport'] = $_POST['dstport']; + } else { + unset($natent['dstport']); + } + + if ($_POST['nosync'] == "yes") { + $natent['nosync'] = true; + } else { + unset($natent['nosync']); + } + + if (isset($_POST['destination_not']) && $ext != "any") { + $natent['destination']['not'] = true; + } + + if (isset($a_out[$id]['created']) && is_array($a_out[$id]['created'])) { + $natent['created'] = $a_out[$id]['created']; + } + + $natent['updated'] = make_config_revision_entry(); + + // Allow extending of the firewall edit page and include custom input validation + pfSense_handle_custom_code("/usr/local/pkg/firewall_aon/pre_write_config"); + + if (isset($id) && $a_out[$id]) { + $a_out[$id] = $natent; + } else { + $natent['created'] = make_config_revision_entry(); + if (is_numeric($after)) { + array_splice($a_out, $after+1, 0, array($natent)); + } else { + $a_out[] = $natent; + } + } + + if (write_config()) { + mark_subsystem_dirty('natconf'); + } + header("Location: firewall_nat_out.php"); + exit; + } +} + +$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("Outbound"), gettext("Edit")); +$closehead = false; +include("head.inc"); + +?> + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + /> +
    + +
    + /> + +
    +
    +
    +
    + +
    +
    +
    +
    +", " "); +?> +
    +
    + + + + + + + + + + + + + + + + + +
       + +
       + / + +
      + +
       + + +
    +
    + /> +
    +
    +
    + + + + + + + + + + + + + + + + + +
       + +
       + / + +
      + +
       + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       + +
       + / + +
      +
    + + + +

    +
    Pool Options + +
    + +
    + *
    + *
    + *
    + *
    + *
    +

    +
       + +
      + +
       + /> +
    +
    + />
    + +
    + +
    + +
     
    + +
    + +
      + " /> + " onclick="window.location.href=''" /> + + + + + +
    +
    + + + + diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php new file mode 100644 index 0000000..d3e8f24 --- /dev/null +++ b/src/usr/local/www/firewall_rules.php @@ -0,0 +1,944 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: filter +*/ + +##|+PRIV +##|*IDENT=page-firewall-rules +##|*NAME=Firewall: Rules page +##|*DESCR=Allow access to the 'Firewall: Rules' page. +##|*MATCH=firewall_rules.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +$pgtitle = array(gettext("Firewall"), gettext("Rules")); +$shortcut_section = "firewall"; + +function delete_nat_association($id) { + global $config; + + if (!$id || !is_array($config['nat']['rule'])) { + return; + } + + $a_nat = &$config['nat']['rule']; + + foreach ($a_nat as &$natent) { + if ($natent['associated-rule-id'] == $id) { + $natent['associated-rule-id'] = ''; + } + } +} + +if (!is_array($config['filter']['rule'])) { + $config['filter']['rule'] = array(); +} +filter_rules_sort(); +$a_filter = &$config['filter']['rule']; + +$if = $_GET['if']; +if ($_POST['if']) { + $if = $_POST['if']; +} + +$ifdescs = get_configured_interface_with_descr(); + +/* add group interfaces */ +if (is_array($config['ifgroups']['ifgroupentry'])) { + foreach ($config['ifgroups']['ifgroupentry'] as $ifgen) { + if (have_ruleint_access($ifgen['ifname'])) { + $iflist[$ifgen['ifname']] = $ifgen['ifname']; + } + } +} + +foreach ($ifdescs as $ifent => $ifdesc) { + if (have_ruleint_access($ifent)) { + $iflist[$ifent] = $ifdesc; + } +} + +if ($config['l2tp']['mode'] == "server") { + if (have_ruleint_access("l2tp")) { + $iflist['l2tp'] = "L2TP VPN"; + } +} + +if ($config['pptpd']['mode'] == "server") { + if (have_ruleint_access("pptp")) { + $iflist['pptp'] = "PPTP VPN"; + } +} + +if (is_array($config['pppoes']['pppoe'])) { + foreach ($config['pppoes']['pppoe'] as $pppoes) { + if (($pppoes['mode'] == 'server') && have_ruleint_access("pppoe")) { + $iflist['pppoe'] = "PPPoE Server"; + } + } +} + +/* add ipsec interfaces */ +if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) { + if (have_ruleint_access("enc0")) { + $iflist["enc0"] = "IPsec"; + } +} + +/* add openvpn/tun interfaces */ +if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) { + $iflist["openvpn"] = "OpenVPN"; +} + +pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/interfaces_override"); + +if (!$if || !isset($iflist[$if])) { + if ("any" == $if) { + $if = "FloatingRules"; + } else if ("FloatingRules" != $if) { + if (isset($iflist['wan'])) { + $if = "wan"; + } else { + $if = "FloatingRules"; + } + } +} + +if ($_POST) { + + $pconfig = $_POST; + + if ($_POST['apply']) { + $retval = 0; + $retval = filter_configure(); + + clear_subsystem_dirty('filter'); + + pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/apply"); + + $savemsg = sprintf(gettext("The settings have been applied. The firewall rules are now reloading in the background.
    You can also %s monitor %s the reload progress"), "", ""); + } +} + +if ($_GET['act'] == "del") { + if ($a_filter[$_GET['id']]) { + if (!empty($a_filter[$_GET['id']]['associated-rule-id'])) { + delete_nat_association($a_filter[$_GET['id']]['associated-rule-id']); + } + unset($a_filter[$_GET['id']]); + if (write_config()) { + mark_subsystem_dirty('filter'); + } + header("Location: firewall_rules.php?if=" . htmlspecialchars($if)); + exit; + } +} + +// Handle save msg if defined +if ($_REQUEST['savemsg']) { + $savemsg = htmlentities($_REQUEST['savemsg']); +} + +if (isset($_POST['del_x'])) { + /* delete selected rules */ + if (is_array($_POST['rule']) && count($_POST['rule'])) { + foreach ($_POST['rule'] as $rulei) { + delete_nat_association($a_filter[$rulei]['associated-rule-id']); + unset($a_filter[$rulei]); + } + if (write_config()) { + mark_subsystem_dirty('filter'); + } + header("Location: firewall_rules.php?if=" . htmlspecialchars($if)); + exit; + } +} else if ($_GET['act'] == "toggle") { + if ($a_filter[$_GET['id']]) { + if (isset($a_filter[$_GET['id']]['disabled'])) { + unset($a_filter[$_GET['id']]['disabled']); + } else { + $a_filter[$_GET['id']]['disabled'] = true; + } + if (write_config()) { + mark_subsystem_dirty('filter'); + } + header("Location: firewall_rules.php?if=" . htmlspecialchars($if)); + exit; + } +} else { + /* yuck - IE won't send value attributes for image buttons, while Mozilla does - + so we use .x/.y to fine move button clicks instead... */ + unset($movebtn); + foreach ($_POST as $pn => $pd) { + if (preg_match("/move_(\d+)_x/", $pn, $matches)) { + $movebtn = $matches[1]; + break; + } + } + /* move selected rules before this rule */ + if (isset($movebtn) && is_array($_POST['rule']) && count($_POST['rule'])) { + $a_filter_new = array(); + + /* copy all rules < $movebtn and not selected */ + for ($i = 0; $i < $movebtn; $i++) { + if (!in_array($i, $_POST['rule'])) { + $a_filter_new[] = $a_filter[$i]; + } + } + + /* copy all selected rules */ + for ($i = 0; $i < count($a_filter); $i++) { + if ($i == $movebtn) { + continue; + } + if (in_array($i, $_POST['rule'])) { + $a_filter_new[] = $a_filter[$i]; + } + } + + /* copy $movebtn rule */ + if ($movebtn < count($a_filter)) { + $a_filter_new[] = $a_filter[$movebtn]; + } + + /* copy all rules > $movebtn and not selected */ + for ($i = $movebtn+1; $i < count($a_filter); $i++) { + if (!in_array($i, $_POST['rule'])) { + $a_filter_new[] = $a_filter[$i]; + } + } + + $a_filter = $a_filter_new; + if (write_config()) { + mark_subsystem_dirty('filter'); + } + header("Location: firewall_rules.php?if=" . htmlspecialchars($if)); + exit; + } +} +$closehead = false; + +include("head.inc"); +?> + + + + + + +
    + + + +

    +" . gettext("You must apply the changes in order for them to take effect."), "apply", "", true); ?> +
    + + + + + +
    + $ifname) { + if ($ifent == $if) { + $active = true; + } else { + $active = false; + } + $tab_array[] = array($ifname, $active, "firewall_rules.php?if={$ifent}"); + } + display_top_tabs($tab_array); + ?> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + 1, or WAN with an if count of 1. + if (!isset($config['system']['webgui']['noantilockout']) && + (((count($config['interfaces']) > 1) && ($if == 'lan')) || + ((count($config['interfaces']) == 1) && ($if == 'wan')))): + + $alports = implode('
    ', filter_get_antilockout_ports(true)); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"; + } else { + $advanced_set = ""; + } +?> + + + + "" and is_array($config['schedules']['schedule'])) { + foreach ($a_schedules as $schedule) { + if ($schedule['name'] == $filterent['sched']) { + $schedstatus = filter_get_time_based_rule_status($schedule); + + foreach ($schedule['timerange'] as $timerange) { + $tempFriendlyTime = ""; + $tempID = ""; + $firstprint = false; + if ($timerange) { + $dayFriendly = ""; + $tempFriendlyTime = ""; + + //get hours + $temptimerange = $timerange['hour']; + $temptimeseparator = strrpos($temptimerange, "-"); + + $starttime = substr ($temptimerange, 0, $temptimeseparator); + $stoptime = substr ($temptimerange, $temptimeseparator+1); + + if ($timerange['month']) { + $tempmontharray = explode(",", $timerange['month']); + $tempdayarray = explode(",", $timerange['day']); + $arraycounter = 0; + $firstDayFound = false; + $firstPrint = false; + foreach ($tempmontharray as $monthtmp) { + $month = $tempmontharray[$arraycounter]; + $day = $tempdayarray[$arraycounter]; + + if (!$firstDayFound) { + $firstDay = $day; + $firstmonth = $month; + $firstDayFound = true; + } + + $currentDay = $day; + $nextDay = $tempdayarray[$arraycounter+1]; + $currentDay++; + if (($currentDay != $nextDay) || ($tempmontharray[$arraycounter] != $tempmontharray[$arraycounter+1])) { + if ($firstPrint) { + $dayFriendly .= ", "; + } + $currentDay--; + if ($currentDay != $firstDay) { + $dayFriendly .= $monthArray[$firstmonth-1] . " " . $firstDay . " - " . $currentDay ; + } else { + $dayFriendly .= $monthArray[$month-1] . " " . $day; + } + $firstDayFound = false; + $firstPrint = true; + } + $arraycounter++; + } + } else { + $tempdayFriendly = $timerange['position']; + $firstDayFound = false; + $tempFriendlyDayArray = explode(",", $tempdayFriendly); + $currentDay = ""; + $firstDay = ""; + $nextDay = ""; + $counter = 0; + foreach ($tempFriendlyDayArray as $day) { + if ($day != "") { + if (!$firstDayFound) { + $firstDay = $tempFriendlyDayArray[$counter]; + $firstDayFound = true; + } + $currentDay =$tempFriendlyDayArray[$counter]; + //get next day + $nextDay = $tempFriendlyDayArray[$counter+1]; + $currentDay++; + if ($currentDay != $nextDay) { + if ($firstprint) { + $dayFriendly .= ", "; + } + $currentDay--; + if ($currentDay != $firstDay) { + $dayFriendly .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1]; + } else { + $dayFriendly .= $dayArray[$firstDay-1]; + } + $firstDayFound = false; + $firstprint = true; + } + $counter++; + } + } + } + $timeFriendly = $starttime . " - " . $stoptime; + $description = $timerange['rangedescr']; + $sched_content .= $dayFriendly . "; " . $timeFriendly . "
    "; + } + } + $sched_caption_escaped = str_replace("'", "\'", $schedule['descr']); + $schedule_span_begin = "{$sched_caption_escaped}

    {$sched_content}

    ', 'trail', true, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle');\" onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\">"; + $schedule_span_end = "
    "; + } + } + } + $printicon = false; + $alttext = ""; + $image = ""; + if (!isset($filterent['disabled'])) { + if ($schedstatus) { + if ($iconfn == "block" || $iconfn == "reject") { + $image = "icon_block"; + $alttext = gettext("Traffic matching this rule is currently being denied"); + } else { + $image = "icon_pass"; + $alttext = gettext("Traffic matching this rule is currently being allowed"); + } + $printicon = true; + } else if ($filterent['sched']) { + if ($iconfn == "block" || $iconfn == "reject") { + $image = "icon_block_d"; + } else { + $image = "icon_block"; + } + $alttext = gettext("This rule is not currently active because its period has expired"); + $printicon = true; + } + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       + + + + + + +
    + + " border="0" alt="delete" /> + " onclick="return confirm('')" /> + + + + " width="17" height="17" border="0" alt="add" /> + +
    +
     pass *** Address**  + + + + + + + + + +
    " alt="move" />" width="17" height="17" border="0" alt="edit" />
    " width="17" height="17" border="0" alt="add" />
    +
     block ******  + + + + + + + + + +
    " alt="edit" />" width="17" height="17" border="0" alt="edit" />
    " width="17" height="17" border="0" alt="add" />
    +
     block ******* + + + + + + + + + +
    " alt="move" />" width="17" height="17" border="0" alt=" edit" />
    " width="17" height="17" border="0" alt="add" />
    +
    + + + + "; + $textse = ""; + $iconfn .= "_d"; + } else { + $textss = $textse = ""; + } + ?> + " alt="icon" /> + +
    icon + +
    + + + + ', $selected_descs); + } + ?> + + + + '; + echo $filterent['icmptype']; + echo ''; + } + } else { + echo "*"; + } + ?> + + + + + + + + + + + + + + {$desc}"; + $desc = $filterent['defaultqueue']; + echo "/{$desc}"; + } else if (isset($filterent['defaultqueue'])) { + $desc = $filterent['defaultqueue']; + echo "{$desc}"; + } else { + echo gettext("none"); + } + ?> + + + + icon  + + +   + + + + + + + + + + +
    " onmouseover="fr_insline(, true)" onmouseout="fr_insline(, false)" />" width="17" height="17" border="0" alt="edit" />
    " onclick="return confirm('Do you really want to delete this rule?')" alt="delete" />" width="17" height="17" border="0" alt="add" />
    +
    align="center" valign="middle"> + + +

    + +
    +

    + + " border="0" width="17" height="17" align="middle" alt="add" />
    +
               + + + + + + + + + +
    + " border="0" alt="move" />" onmouseover="fr_insline(, true)" onmouseout="fr_insline(, false)" /> +
    + + " border="0" alt="delete" /> + " onclick="return confirm('')" /> + + + " width="17" height="17" border="0" alt="add" /> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    passmatchblockrejectlog
    pass disabled match disabled block disabled reject disabled log disabled
    +

     

    + + +
    +
      + +
    • +
    • + +
    • +
    • + +
    +
    +
    +
    + +

    + + + diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php new file mode 100644 index 0000000..b0af4cc --- /dev/null +++ b/src/usr/local/www/firewall_rules_edit.php @@ -0,0 +1,1946 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: filter +*/ + +##|+PRIV +##|*IDENT=page-firewall-rules-edit +##|*NAME=Firewall: Rules: Edit page +##|*DESCR=Allow access to the 'Firewall: Rules: Edit' page. +##|*MATCH=firewall_rules_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter.inc"); +require("shaper.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_rules.php'); +} + +function is_posnumericint($arg) { + // Note that to be safe we do not allow any leading zero - "01", "007" + return (is_numericint($arg) && $arg[0] != '0' && $arg > 0); +} + +function is_aoadv_used($rule_config) { + // Note that the user could set "tag" or "tagged" to the string "0", which is valid but empty(). + // And if the user enters "0" in other fields, we want to present an error message, and keep the Advanced Options section open. + if ((isset($rule_config['allowopts'])) || + (isset($rule_config['disablereplyto'])) || + ($rule_config['tag'] != "") || + ($rule_config['tagged'] != "") || + ($rule_config['max'] != "") || + ($rule_config['max-src-nodes'] != "") || + ($rule_config['max-src-conn'] != "") || + ($rule_config['max-src-states'] != "") || + ($rule_config['max-src-conn-rate'] != "") || + ($rule_config['max-src-conn-rates'] != "") || + ($rule_config['statetimeout'] != "")) { + return true; + } + return false; +} + +$ostypes = array(); +exec('/sbin/pfctl -s osfp | /usr/bin/tr \'\t\' \' \'', $ostypes); + +if (count($ostypes) > 2) { + // Remove header rows from pfctl output + array_shift($ostypes); + array_shift($ostypes); +} else { + // Fall back to a default list + $ostypes = array( + "AIX", + "Linux", + "FreeBSD", + "NetBSD", + "OpenBSD", + "Solaris", + "MacOS", + "Windows", + "Novell", + "NMAP" + ); +} + +$specialsrcdst = explode(" ", "any (self) pptp pppoe l2tp openvpn"); +$ifdisp = get_configured_interface_with_descr(); +foreach ($ifdisp as $kif => $kdescr) { + $specialsrcdst[] = "{$kif}"; + $specialsrcdst[] = "{$kif}ip"; +} + +if (!is_array($config['filter']['rule'])) { + $config['filter']['rule'] = array(); +} +filter_rules_sort(); +$a_filter = &$config['filter']['rule']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (is_numericint($_GET['after']) || $_GET['after'] == "-1") { + $after = $_GET['after']; +} +if (isset($_POST['after']) && (is_numericint($_POST['after']) || $_POST['after'] == "-1")) { + $after = $_POST['after']; +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + $id = $_GET['dup']; + $after = $_GET['dup']; +} + +if (isset($id) && $a_filter[$id]) { + $pconfig['interface'] = $a_filter[$id]['interface']; + + if (isset($a_filter[$id]['id'])) { + $pconfig['ruleid'] = $a_filter[$id]['id']; + } + + if (isset($a_filter[$id]['created']) && is_array($a_filter[$id]['created'])) { + $pconfig['created'] = $a_filter[$id]['created']; + } + + if (isset($a_filter[$id]['updated']) && is_array($a_filter[$id]['updated'])) { + $pconfig['updated'] = $a_filter[$id]['updated']; + } + + if (!isset($a_filter[$id]['type'])) { + $pconfig['type'] = "pass"; + } else { + $pconfig['type'] = $a_filter[$id]['type']; + } + + if (isset($a_filter[$id]['floating']) || $if == "FloatingRules") { + $pconfig['floating'] = $a_filter[$id]['floating']; + if (isset($a_filter[$id]['interface']) && $a_filter[$id]['interface'] <> "") { + $pconfig['interface'] = $a_filter[$id]['interface']; + } + } + + if (isset($a_filter['floating'])) { + $pconfig['floating'] = "yes"; + } + + if (isset($a_filter[$id]['direction'])) { + $pconfig['direction'] = $a_filter[$id]['direction']; + } + + if (isset($a_filter[$id]['ipprotocol'])) { + $pconfig['ipprotocol'] = $a_filter[$id]['ipprotocol']; + } + + if (isset($a_filter[$id]['protocol'])) { + $pconfig['proto'] = $a_filter[$id]['protocol']; + } else { + $pconfig['proto'] = "any"; + } + + if ($a_filter[$id]['protocol'] == "icmp") { + $pconfig['icmptype'] = $a_filter[$id]['icmptype']; + } + + address_to_pconfig($a_filter[$id]['source'], $pconfig['src'], + $pconfig['srcmask'], $pconfig['srcnot'], + $pconfig['srcbeginport'], $pconfig['srcendport']); + + if ($a_filter[$id]['os'] <> "") { + $pconfig['os'] = $a_filter[$id]['os']; + } + + address_to_pconfig($a_filter[$id]['destination'], $pconfig['dst'], + $pconfig['dstmask'], $pconfig['dstnot'], + $pconfig['dstbeginport'], $pconfig['dstendport']); + + if ($a_filter[$id]['dscp'] <> "") { + $pconfig['dscp'] = $a_filter[$id]['dscp']; + } + + $pconfig['disabled'] = isset($a_filter[$id]['disabled']); + $pconfig['log'] = isset($a_filter[$id]['log']); + $pconfig['descr'] = $a_filter[$id]['descr']; + + if (isset($a_filter[$id]['tcpflags_any'])) { + $pconfig['tcpflags_any'] = true; + } else { + if (isset($a_filter[$id]['tcpflags1']) && $a_filter[$id]['tcpflags1'] <> "") { + $pconfig['tcpflags1'] = $a_filter[$id]['tcpflags1']; + } + if (isset($a_filter[$id]['tcpflags2']) && $a_filter[$id]['tcpflags2'] <> "") { + $pconfig['tcpflags2'] = $a_filter[$id]['tcpflags2']; + } + } + + if (isset($a_filter[$id]['tag']) && $a_filter[$id]['tag'] <> "") { + $pconfig['tag'] = $a_filter[$id]['tag']; + } + if (isset($a_filter[$id]['tagged']) && $a_filter[$id]['tagged'] <> "") { + $pconfig['tagged'] = $a_filter[$id]['tagged']; + } + if (isset($a_filter[$id]['quick']) && $a_filter[$id]['quick']) { + $pconfig['quick'] = $a_filter[$id]['quick']; + } + if (isset($a_filter[$id]['allowopts'])) { + $pconfig['allowopts'] = true; + } + if (isset($a_filter[$id]['disablereplyto'])) { + $pconfig['disablereplyto'] = true; + } + + /* advanced */ + $pconfig['max'] = $a_filter[$id]['max']; + $pconfig['max-src-nodes'] = $a_filter[$id]['max-src-nodes']; + $pconfig['max-src-conn'] = $a_filter[$id]['max-src-conn']; + $pconfig['max-src-states'] = $a_filter[$id]['max-src-states']; + $pconfig['statetype'] = $a_filter[$id]['statetype']; + $pconfig['statetimeout'] = $a_filter[$id]['statetimeout']; + $pconfig['nopfsync'] = isset($a_filter[$id]['nopfsync']); + + /* advanced - nosync */ + $pconfig['nosync'] = isset($a_filter[$id]['nosync']); + + /* advanced - new connection per second banning*/ + $pconfig['max-src-conn-rate'] = $a_filter[$id]['max-src-conn-rate']; + $pconfig['max-src-conn-rates'] = $a_filter[$id]['max-src-conn-rates']; + + /* Multi-WAN next-hop support */ + $pconfig['gateway'] = $a_filter[$id]['gateway']; + + /* Shaper support */ + $pconfig['defaultqueue'] = (($a_filter[$id]['ackqueue'] == "none") ? '' : $a_filter[$id]['defaultqueue']); + $pconfig['ackqueue'] = (($a_filter[$id]['ackqueue'] == "none") ? '' : $a_filter[$id]['ackqueue']); + $pconfig['dnpipe'] = (($a_filter[$id]['dnpipe'] == "none") ? '' : $a_filter[$id]['dnpipe']); + $pconfig['pdnpipe'] = (($a_filter[$id]['pdnpipe'] == "none") ? '' : $a_filter[$id]['pdnpipe']); + $pconfig['l7container'] = (($a_filter[$id]['l7container'] == "none") ? '' : $a_filter[$id]['l7container']); + + //schedule support + $pconfig['sched'] = (($a_filter[$id]['sched'] == "none") ? '' : $a_filter[$id]['sched']); + $pconfig['vlanprio'] = (($a_filter[$id]['vlanprio'] == "none") ? '' : $a_filter[$id]['vlanprio']); + $pconfig['vlanprioset'] = (($a_filter[$id]['vlanprioset'] == "none") ? '' : $a_filter[$id]['vlanprioset']); + if (!isset($_GET['dup']) || !is_numericint($_GET['dup'])) { + $pconfig['associated-rule-id'] = $a_filter[$id]['associated-rule-id']; + } + + $pconfig['tracker'] = $a_filter[$id]['tracker']; + +} else { + /* defaults */ + if ($_GET['if']) { + $pconfig['interface'] = $_GET['if']; + } + $pconfig['type'] = "pass"; + $pconfig['src'] = "any"; + $pconfig['dst'] = "any"; +} +/* Allow the FloatingRules to work */ +$if = $pconfig['interface']; + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + unset($id); +} + +read_altq_config(); /* XXX: */ +$qlist =& get_unique_queue_list(); +read_dummynet_config(); /* XXX: */ +$dnqlist =& get_unique_dnqueue_list(); +read_layer7_config(); +$l7clist =& get_l7_unique_list(); +$a_gatewaygroups = return_gateway_groups_array(); + +if ($_POST) { + unset($input_errors); + + if (isset($a_filter[$id]['associated-rule-id'])) { + $_POST['proto'] = $pconfig['proto']; + if ($pconfig['proto'] == "icmp") { + $_POST['icmptype'] = $pconfig['icmptype']; + } + } + + if (($_POST['ipprotocol'] <> "") && ($_POST['gateway'] <> "")) { + if (is_array($config['gateways']['gateway_group'])) { + foreach ($config['gateways']['gateway_group'] as $gw_group) { + if ($gw_group['name'] == $_POST['gateway']) { + $family = $a_gatewaygroups[$_POST['gateway']]['ipprotocol']; + if ($_POST['ipprotocol'] == $family) { + continue; + } + if (($_POST['ipprotocol'] == "inet46") && ($_POST['ipprotocol'] != $family)) { + $input_errors[] = gettext("You can not assign a gateway to a rule that applies to IPv4 and IPv6"); + } + if (($_POST['ipprotocol'] == "inet6") && ($_POST['ipprotocol'] != $family)) { + $input_errors[] = gettext("You can not assign an IPv4 gateway group on IPv6 Address Family rule"); + } + if (($_POST['ipprotocol'] == "inet") && ($_POST['ipprotocol'] != $family)) { + $input_errors[] = gettext("You can not assign an IPv6 gateway group on IPv4 Address Family rule"); + } + } + } + } + } + if (($_POST['ipprotocol'] <> "") && ($_POST['gateway'] <> "") && (is_ipaddr(lookup_gateway_ip_by_name($_POST['gateway'])))) { + if (($_POST['ipprotocol'] == "inet46") && ($_POST['gateway'] <> "")) { + $input_errors[] = gettext("You can not assign a gateway to a rule that applies to IPv4 and IPv6"); + } + if (($_POST['ipprotocol'] == "inet6") && (!is_ipaddrv6(lookup_gateway_ip_by_name($_POST['gateway'])))) { + $input_errors[] = gettext("You can not assign an IPv4 Gateway to an IPv6 Filter rule"); + } + if (($_POST['ipprotocol'] == "inet") && (!is_ipaddrv4(lookup_gateway_ip_by_name($_POST['gateway'])))) { + $input_errors[] = gettext("You can not assign an IPv6 Gateway to an IPv4 Filter rule"); + } + } + if (($_POST['proto'] == "icmp") && ($_POST['icmptype'] <> "")) { + if ($_POST['ipprotocol'] == "inet46") { + $input_errors[] = gettext("You can not assign a ICMP type to a rule that applies to IPv4 and IPv6"); + } + } + + if (($_POST['proto'] != "tcp") && ($_POST['proto'] != "udp") && ($_POST['proto'] != "tcp/udp")) { + $_POST['srcbeginport'] = 0; + $_POST['srcendport'] = 0; + $_POST['dstbeginport'] = 0; + $_POST['dstendport'] = 0; + } else { + if ($_POST['srcbeginport_cust'] && !$_POST['srcbeginport']) { + $_POST['srcbeginport'] = trim($_POST['srcbeginport_cust']); + } + if ($_POST['srcendport_cust'] && !$_POST['srcendport']) { + $_POST['srcendport'] = trim($_POST['srcendport_cust']); + } + if ($_POST['srcbeginport'] == "any") { + $_POST['srcbeginport'] = 0; + $_POST['srcendport'] = 0; + } else { + if (!$_POST['srcendport']) { + $_POST['srcendport'] = $_POST['srcbeginport']; + } + } + if ($_POST['srcendport'] == "any") { + $_POST['srcendport'] = $_POST['srcbeginport']; + } + + if ($_POST['dstbeginport_cust'] && !$_POST['dstbeginport']) { + $_POST['dstbeginport'] = trim($_POST['dstbeginport_cust']); + } + if ($_POST['dstendport_cust'] && !$_POST['dstendport']) { + $_POST['dstendport'] = trim($_POST['dstendport_cust']); + } + + if ($_POST['dstbeginport'] == "any") { + $_POST['dstbeginport'] = 0; + $_POST['dstendport'] = 0; + } else { + if (!$_POST['dstendport']) { + $_POST['dstendport'] = $_POST['dstbeginport']; + } + } + if ($_POST['dstendport'] == "any") { + $_POST['dstendport'] = $_POST['dstbeginport']; + } + } + + if (is_specialnet($_POST['srctype'])) { + $_POST['src'] = $_POST['srctype']; + $_POST['srcmask'] = 0; + } else if ($_POST['srctype'] == "single") { + if (is_ipaddrv6($_POST['src'])) { + $_POST['srcmask'] = 128; + } else { + $_POST['srcmask'] = 32; + } + } + if (is_specialnet($_POST['dsttype'])) { + $_POST['dst'] = $_POST['dsttype']; + $_POST['dstmask'] = 0; + } else if ($_POST['dsttype'] == "single") { + if (is_ipaddrv6($_POST['dst'])) { + $_POST['dstmask'] = 128; + } else { + $_POST['dstmask'] = 32; + } + } + + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "type proto"); + if (isset($a_filter[$id]['associated-rule-id']) === false) { + $reqdfields[] = "src"; + $reqdfields[] = "dst"; + } + $reqdfieldsn = explode(",", "Type,Protocol"); + if (isset($a_filter[$id]['associated-rule-id']) === false) { + $reqdfieldsn[] = "Source"; + $reqdfieldsn[] = "Destination"; + } + + if ($_POST['statetype'] == "modulate state" or $_POST['statetype'] == "synproxy state") { + if ($_POST['proto'] != "tcp") { + $input_errors[] = sprintf(gettext("%s is only valid with protocol TCP."), $_POST['statetype']); + } + if (($_POST['statetype'] == "synproxy state") && ($_POST['gateway'] != "")) { + $input_errors[] = sprintf(gettext("%s is only valid if the gateway is set to 'default'."), $_POST['statetype']); + } + } + + if (isset($a_filter[$id]['associated-rule-id']) === false && + (!(is_specialnet($_POST['srctype']) || ($_POST['srctype'] == "single")))) { + $reqdfields[] = "srcmask"; + $reqdfieldsn[] = "Source bit count"; + } + if (isset($a_filter[$id]['associated-rule-id']) === false && + (!(is_specialnet($_POST['dsttype']) || ($_POST['dsttype'] == "single")))) { + $reqdfields[] = "dstmask"; + $reqdfieldsn[] = gettext("Destination bit count"); + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (!$_POST['srcbeginport']) { + $_POST['srcbeginport'] = 0; + $_POST['srcendport'] = 0; + } + if (!$_POST['dstbeginport']) { + $_POST['dstbeginport'] = 0; + $_POST['dstendport'] = 0; + } + + if ($_POST['srcbeginport'] && !is_portoralias($_POST['srcbeginport'])) { + $input_errors[] = sprintf(gettext("%s is not a valid start source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcbeginposrt']); + } + if ($_POST['srcendport'] && !is_portoralias($_POST['srcendport'])) { + $input_errors[] = sprintf(gettext("%s is not a valid end source port. It must be a port alias or integer between 1 and 65535."), $_POST['srcendport']); + } + if ($_POST['dstbeginport'] && !is_portoralias($_POST['dstbeginport'])) { + $input_errors[] = sprintf(gettext("%s is not a valid start destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstbeginport']); + } + if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport'])) { + $input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstendport']); + } + if (!$_POST['srcbeginport_cust'] && $_POST['srcendport_cust']) { + if (is_alias($_POST['srcendport_cust'])) { + $input_errors[] = 'If you put port alias in Source port range to: field you must put the same port alias in from: field'; + } + } + if ($_POST['srcbeginport_cust'] && $_POST['srcendport_cust']) { + if (is_alias($_POST['srcendport_cust']) && is_alias($_POST['srcendport_cust']) && $_POST['srcbeginport_cust'] != $_POST['srcendport_cust']) { + $input_errors[] = 'The same port alias must be used in Source port range from: and to: fields'; + } + if ((is_alias($_POST['srcbeginport_cust']) && (!is_alias($_POST['srcendport_cust']) && $_POST['srcendport_cust'] != '')) || + ((!is_alias($_POST['srcbeginport_cust']) && $_POST['srcbeginport_cust'] != '') && is_alias($_POST['srcendport_cust']))) { + $input_errors[] = 'You cannot specify numbers and port aliases at the same time in Source port range from: and to: field'; + } + } + if (!$_POST['dstbeginport_cust'] && $_POST['dstendport_cust']) { + if (is_alias($_POST['dstendport_cust'])) { + $input_errors[] = 'If you put port alias in Destination port range to: field you must put the same port alias in from: field'; + } + } + if ($_POST['dstbeginport_cust'] && $_POST['dstendport_cust']) { + if (is_alias($_POST['dstendport_cust']) && is_alias($_POST['dstendport_cust']) && $_POST['dstbeginport_cust'] != $_POST['dstendport_cust']) { + $input_errors[] = 'The same port alias must be used in Destination port range from: and to: fields'; + } + if ((is_alias($_POST['dstbeginport_cust']) && (!is_alias($_POST['dstendport_cust']) && $_POST['dstendport_cust'] != '')) || + ((!is_alias($_POST['dstbeginport_cust']) && $_POST['dstbeginport_cust'] != '') && is_alias($_POST['dstendport_cust']))) { + $input_errors[] = 'You cannot specify numbers and port aliases at the same time in Destination port range from: and to: field'; + } + } + + if ($_POST['src']) { + $_POST['src'] = trim($_POST['src']); + } + if ($_POST['dst']) { + $_POST['dst'] = trim($_POST['dst']); + } + + /* if user enters an alias and selects "network" then disallow. */ + if ($_POST['srctype'] == "network") { + if (is_alias($_POST['src'])) { + $input_errors[] = gettext("You must specify single host or alias for alias entries."); + } + } + if ($_POST['dsttype'] == "network") { + if (is_alias($_POST['dst'])) { + $input_errors[] = gettext("You must specify single host or alias for alias entries."); + } + } + + if (!is_specialnet($_POST['srctype'])) { + if (($_POST['src'] && !is_ipaddroralias($_POST['src']))) { + $input_errors[] = sprintf(gettext("%s is not a valid source IP address or alias."), $_POST['src']); + } + if (($_POST['srcmask'] && !is_numericint($_POST['srcmask']))) { + $input_errors[] = gettext("A valid source bit count must be specified."); + } + } + if (!is_specialnet($_POST['dsttype'])) { + if (($_POST['dst'] && !is_ipaddroralias($_POST['dst']))) { + $input_errors[] = sprintf(gettext("%s is not a valid destination IP address or alias."), $_POST['dst']); + } + if (($_POST['dstmask'] && !is_numericint($_POST['dstmask']))) { + $input_errors[] = gettext("A valid destination bit count must be specified."); + } + } + if ((is_ipaddr($_POST['src']) && is_ipaddr($_POST['dst']))) { + if (!validate_address_family($_POST['src'], $_POST['dst'])) { + $input_errors[] = sprintf(gettext("The Source IP address %s Address Family differs from the destination %s."), $_POST['src'], $_POST['dst']); + } + if ((is_ipaddrv6($_POST['src']) || is_ipaddrv6($_POST['dst'])) && ($_POST['ipprotocol'] == "inet")) { + $input_errors[] = gettext("You can not use IPv6 addresses in IPv4 rules."); + } + if ((is_ipaddrv4($_POST['src']) || is_ipaddrv4($_POST['dst'])) && ($_POST['ipprotocol'] == "inet6")) { + $input_errors[] = gettext("You can not use IPv4 addresses in IPv6 rules."); + } + } + + if ((is_ipaddr($_POST['src']) || is_ipaddr($_POST['dst'])) && ($_POST['ipprotocol'] == "inet46")) { + $input_errors[] = gettext("You can not use a IPv4 or IPv6 address in combined IPv4 + IPv6 rules."); + } + + if ($_POST['srcbeginport'] > $_POST['srcendport']) { + /* swap */ + $tmp = $_POST['srcendport']; + $_POST['srcendport'] = $_POST['srcbeginport']; + $_POST['srcbeginport'] = $tmp; + } + if ($_POST['dstbeginport'] > $_POST['dstendport']) { + /* swap */ + $tmp = $_POST['dstendport']; + $_POST['dstendport'] = $_POST['dstbeginport']; + $_POST['dstbeginport'] = $tmp; + } + if ($_POST['os']) { + if ($_POST['proto'] != "tcp") { + $input_errors[] = gettext("OS detection is only valid with protocol TCP."); + } + if (!in_array($_POST['os'], $ostypes)) { + $input_errors[] = gettext("Invalid OS detection selection. Please select a valid OS."); + } + } + + if ($_POST['ackqueue'] != "") { + if ($_POST['defaultqueue'] == "") { + $input_errors[] = gettext("You have to select a queue when you select an acknowledge queue too."); + } else if ($_POST['ackqueue'] == $_POST['defaultqueue']) { + $input_errors[] = gettext("Acknowledge queue and Queue cannot be the same."); + } + } + if (isset($_POST['floating']) && $_POST['pdnpipe'] != "" && (empty($_POST['direction']) || $_POST['direction'] == "any")) { + $input_errors[] = gettext("You can not use limiters in Floating rules without choosing a direction."); + } + if (isset($_POST['floating']) && $_POST['gateway'] != "" && (empty($_POST['direction']) || $_POST['direction'] == "any")) { + $input_errors[] = gettext("You can not use gateways in Floating rules without choosing a direction."); + } + if ($_POST['pdnpipe'] && $_POST['pdnpipe'] != "") { + if ($_POST['dnpipe'] == "") { + $input_errors[] = gettext("You must select a queue for the In direction before selecting one for Out too."); + } else if ($_POST['pdnpipe'] == $_POST['dnpipe']) { + $input_errors[] = gettext("In and Out Queue cannot be the same."); + } else if ($dnqlist[$_POST['pdnpipe']][0] == "?" && $dnqlist[$_POST['dnpipe']][0] <> "?") { + $input_errors[] = gettext("You cannot select one queue and one virtual interface for IN and Out. Both must be from the same type."); + } else if ($dnqlist[$_POST['dnpipe']][0] == "?" && $dnqlist[$_POST['pdnpipe']][0] <> "?") { + $input_errors[] = gettext("You cannot select one queue and one virtual interface for IN and Out. Both must be from the same type."); + } + if ($_POST['direction'] == "out" && empty($_POST['gateway'])) { + $input_errors[] = gettext("Please select a gateway, normally the interface selected gateway, so the limiters work correctly"); + } + } + if (!empty($_POST['ruleid']) && !ctype_digit($_POST['ruleid'])) { + $input_errors[] = gettext('ID must be an integer'); + } + if ($_POST['l7container'] && $_POST['l7container'] != "") { + if (!($_POST['proto'] == "tcp" || $_POST['proto'] == "udp" || $_POST['proto'] == "tcp/udp")) { + $input_errors[] = gettext("You can only select a layer7 container for TCP and/or UDP protocols"); + } + if ($_POST['type'] <> "pass") { + $input_errors[] = gettext("You can only select a layer7 container for Pass type rules."); + } + } + + if (!in_array($_POST['proto'], array("tcp", "tcp/udp"))) { + if (!empty($_POST['max-src-conn'])) { + $input_errors[] = gettext("You can only specify the maximum number of established connections per host (advanced option) for TCP protocol."); + } + if (!empty($_POST['max-src-conn-rate']) || !empty($_POST['max-src-conn-rates'])) { + $input_errors[] = gettext("You can only specify the maximum new connections per host / per second(s) (advanced option) for TCP protocol."); + } + if (!empty($_POST['statetimeout'])) { + $input_errors[] = gettext("You can only specify the state timeout (advanced option) for TCP protocol."); + } + } + + if ($_POST['type'] <> "pass") { + if (!empty($_POST['max'])) { + $input_errors[] = gettext("You can only specify the maximum state entries (advanced option) for Pass type rules."); + } + if (!empty($_POST['max-src-nodes'])) { + $input_errors[] = gettext("You can only specify the maximum number of unique source hosts (advanced option) for Pass type rules."); + } + if (!empty($_POST['max-src-conn'])) { + $input_errors[] = gettext("You can only specify the maximum number of established connections per host (advanced option) for Pass type rules."); + } + if (!empty($_POST['max-src-states'])) { + $input_errors[] = gettext("You can only specify the maximum state entries per host (advanced option) for Pass type rules."); + } + if (!empty($_POST['max-src-conn-rate']) || !empty($_POST['max-src-conn-rates'])) { + $input_errors[] = gettext("You can only specify the maximum new connections per host / per second(s) (advanced option) for Pass type rules."); + } + if (!empty($_POST['statetimeout'])) { + $input_errors[] = gettext("You can only specify the state timeout (advanced option) for Pass type rules."); + } + } + + if (($_POST['statetype'] == "none") && (empty($_POST['l7container']))) { + if (!empty($_POST['max'])) { + $input_errors[] = gettext("You cannot specify the maximum state entries (advanced option) if statetype is none and no L7 container is selected."); + } + if (!empty($_POST['max-src-nodes'])) { + $input_errors[] = gettext("You cannot specify the maximum number of unique source hosts (advanced option) if statetype is none and no L7 container is selected."); + } + if (!empty($_POST['max-src-conn'])) { + $input_errors[] = gettext("You cannot specify the maximum number of established connections per host (advanced option) if statetype is none and no L7 container is selected."); + } + if (!empty($_POST['max-src-states'])) { + $input_errors[] = gettext("You cannot specify the maximum state entries per host (advanced option) if statetype is none and no L7 container is selected."); + } + if (!empty($_POST['max-src-conn-rate']) || !empty($_POST['max-src-conn-rates'])) { + $input_errors[] = gettext("You cannot specify the maximum new connections per host / per second(s) (advanced option) if statetype is none and no L7 container is selected."); + } + if (!empty($_POST['statetimeout'])) { + $input_errors[] = gettext("You cannot specify the state timeout (advanced option) if statetype is none and no L7 container is selected."); + } + } + + if (($_POST['max'] != "") && !is_posnumericint($_POST['max'])) { + $input_errors[] = gettext("Maximum state entries (advanced option) must be a positive integer"); + } + + if (($_POST['max-src-nodes'] != "") && !is_posnumericint($_POST['max-src-nodes'])) { + $input_errors[] = gettext("Maximum number of unique source hosts (advanced option) must be a positive integer"); + } + + if (($_POST['max-src-conn'] != "") && !is_posnumericint($_POST['max-src-conn'])) { + $input_errors[] = gettext("Maximum number of established connections per host (advanced option) must be a positive integer"); + } + + if (($_POST['max-src-states'] != "") && !is_posnumericint($_POST['max-src-states'])) { + $input_errors[] = gettext("Maximum state entries per host (advanced option) must be a positive integer"); + } + + if (($_POST['max-src-conn-rate'] != "") && !is_posnumericint($_POST['max-src-conn-rate'])) { + $input_errors[] = gettext("Maximum new connections per host / per second(s) (advanced option) must be a positive integer"); + } + + if (($_POST['statetimeout'] != "") && !is_posnumericint($_POST['statetimeout'])) { + $input_errors[] = gettext("State timeout (advanced option) must be a positive integer"); + } + + if ((($_POST['max-src-conn-rate'] <> "" and $_POST['max-src-conn-rates'] == "")) || + (($_POST['max-src-conn-rate'] == "" and $_POST['max-src-conn-rates'] <> ""))) { + $input_errors[] = gettext("Both maximum new connections per host and the interval (per second(s)) must be specified"); + } + + if (!$_POST['tcpflags_any']) { + $settcpflags = array(); + $outoftcpflags = array(); + foreach ($tcpflags as $tcpflag) { + if ($_POST['tcpflags1_' . $tcpflag] == "on") { + $settcpflags[] = $tcpflag; + } + if ($_POST['tcpflags2_' . $tcpflag] == "on") { + $outoftcpflags[] = $tcpflag; + } + } + if (empty($outoftcpflags) && !empty($settcpflags)) { + $input_errors[] = gettext("If you specify TCP flags that should be set you should specify out of which flags as well."); + } + } + + // Allow extending of the firewall edit page and include custom input validation + pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/input_validation"); + + if (!$input_errors) { + $filterent = array(); + $filterent['id'] = $_POST['ruleid']>0?$_POST['ruleid']:''; + + $filterent['tracker'] = empty($_POST['tracker']) ? (int)microtime(true) : $_POST['tracker']; + + $filterent['type'] = $_POST['type']; + if (isset($_POST['interface'])) { + $filterent['interface'] = $_POST['interface']; + } + + if (isset($_POST['ipprotocol'])) { + $filterent['ipprotocol'] = $_POST['ipprotocol']; + } + + if ($_POST['tcpflags_any']) { + $filterent['tcpflags_any'] = true; + } else { + $settcpflags = array(); + $outoftcpflags = array(); + foreach ($tcpflags as $tcpflag) { + if ($_POST['tcpflags1_' . $tcpflag] == "on") { + $settcpflags[] = $tcpflag; + } + if ($_POST['tcpflags2_' . $tcpflag] == "on") { + $outoftcpflags[] = $tcpflag; + } + } + if (!empty($outoftcpflags)) { + $filterent['tcpflags2'] = join(",", $outoftcpflags); + if (!empty($settcpflags)) { + $filterent['tcpflags1'] = join(",", $settcpflags); + } + } + } + + if (isset($_POST['tag'])) { + $filterent['tag'] = $_POST['tag']; + } + if (isset($_POST['tagged'])) { + $filterent['tagged'] = $_POST['tagged']; + } + if ($if == "FloatingRules" || isset($_POST['floating'])) { + $filterent['direction'] = $_POST['direction']; + if (isset($_POST['quick']) && $_POST['quick'] <> "") { + $filterent['quick'] = $_POST['quick']; + } + $filterent['floating'] = "yes"; + if (isset($_POST['interface']) && count($_POST['interface']) > 0) { + $filterent['interface'] = implode(",", $_POST['interface']); + } + } + + /* Advanced options */ + if ($_POST['allowopts'] == "yes") { + $filterent['allowopts'] = true; + } else { + unset($filterent['allowopts']); + } + if ($_POST['disablereplyto'] == "yes") { + $filterent['disablereplyto'] = true; + } else { + unset($filterent['disablereplyto']); + } + $filterent['max'] = $_POST['max']; + $filterent['max-src-nodes'] = $_POST['max-src-nodes']; + $filterent['max-src-conn'] = $_POST['max-src-conn']; + $filterent['max-src-states'] = $_POST['max-src-states']; + $filterent['statetimeout'] = $_POST['statetimeout']; + $filterent['statetype'] = $_POST['statetype']; + $filterent['os'] = $_POST['os']; + if ($_POST['nopfsync'] <> "") { + $filterent['nopfsync'] = true; + } else { + unset($filterent['nopfsync']); + } + + /* Nosync directive - do not xmlrpc sync this item */ + if ($_POST['nosync'] <> "") { + $filterent['nosync'] = true; + } else { + unset($filterent['nosync']); + } + + /* unless both values are provided, unset the values - ticket #650 */ + if ($_POST['max-src-conn-rate'] <> "" and $_POST['max-src-conn-rates'] <> "") { + $filterent['max-src-conn-rate'] = $_POST['max-src-conn-rate']; + $filterent['max-src-conn-rates'] = $_POST['max-src-conn-rates']; + } else { + unset($filterent['max-src-conn-rate']); + unset($filterent['max-src-conn-rates']); + } + + if ($_POST['proto'] != "any") { + $filterent['protocol'] = $_POST['proto']; + } else { + unset($filterent['protocol']); + } + + if ($_POST['proto'] == "icmp") { + if ($filterent['ipprotocol'] == 'inet6' && $_POST['icmp6type']) { + $filterent['icmptype'] = $_POST['icmp6type']; + } else if ($filterent['ipprotocol'] != 'inet6' && $_POST['icmptype']) { + $filterent['icmptype'] = $_POST['icmptype']; + } else { + unset($filterent['icmptype']); + } + } else { + unset($filterent['icmptype']); + } + + pconfig_to_address($filterent['source'], $_POST['src'], + $_POST['srcmask'], $_POST['srcnot'], + $_POST['srcbeginport'], $_POST['srcendport']); + + pconfig_to_address($filterent['destination'], $_POST['dst'], + $_POST['dstmask'], $_POST['dstnot'], + $_POST['dstbeginport'], $_POST['dstendport']); + + if ($_POST['disabled']) { + $filterent['disabled'] = true; + } else { + unset($filterent['disabled']); + } + + if ($_POST['dscp']) { + $filterent['dscp'] = $_POST['dscp']; + } + + if ($_POST['log']) { + $filterent['log'] = true; + } else { + unset($filterent['log']); + } + strncpy($filterent['descr'], $_POST['descr'], 52); + + if ($_POST['gateway'] != "") { + $filterent['gateway'] = $_POST['gateway']; + } + + if ($_POST['defaultqueue'] != "") { + $filterent['defaultqueue'] = $_POST['defaultqueue']; + if ($_POST['ackqueue'] != "") { + $filterent['ackqueue'] = $_POST['ackqueue']; + } + } + + if ($_POST['dnpipe'] != "") { + $filterent['dnpipe'] = $_POST['dnpipe']; + if ($_POST['pdnpipe'] != "") { + $filterent['pdnpipe'] = $_POST['pdnpipe']; + } + } + + if ($_POST['l7container'] != "") { + $filterent['l7container'] = $_POST['l7container']; + } + + if ($_POST['sched'] != "") { + $filterent['sched'] = $_POST['sched']; + } + + if ($_POST['vlanprio'] != "") { + $filterent['vlanprio'] = $_POST['vlanprio']; + } + if ($_POST['vlanprioset'] != "") { + $filterent['vlanprioset'] = $_POST['vlanprioset']; + } + + // If we have an associated nat rule, make sure the source and destination doesn't change + if (isset($a_filter[$id]['associated-rule-id'])) { + $filterent['interface'] = $a_filter[$id]['interface']; + if (isset($a_filter[$id]['protocol'])) { + $filterent['protocol'] = $a_filter[$id]['protocol']; + } else if (isset($filterent['protocol'])) { + unset($filterent['protocol']); + } + if ($a_filter[$id]['protocol'] == "icmp" && $a_filter[$id]['icmptype']) { + $filterent['icmptype'] = $a_filter[$id]['icmptype']; + } else if (isset($filterent['icmptype'])) { + unset($filterent['icmptype']); + } + + $filterent['source'] = $a_filter[$id]['source']; + $filterent['destination'] = $a_filter[$id]['destination']; + $filterent['associated-rule-id'] = $a_filter[$id]['associated-rule-id']; + } + + if (isset($a_filter[$id]['created']) && is_array($a_filter[$id]['created'])) { + $filterent['created'] = $a_filter[$id]['created']; + } + + $filterent['updated'] = make_config_revision_entry(); + + // Allow extending of the firewall edit page and include custom input validation + pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_write_config"); + + if (isset($id) && $a_filter[$id]) { + $a_filter[$id] = $filterent; + } else { + $filterent['created'] = make_config_revision_entry(); + if (is_numeric($after)) { + array_splice($a_filter, $after+1, 0, array($filterent)); + } else { + $a_filter[] = $filterent; + } + } + + filter_rules_sort(); + + if (write_config()) { + mark_subsystem_dirty('filter'); + } + + if (isset($_POST['floating'])) { + header("Location: firewall_rules.php?if=FloatingRules"); + } else { + header("Location: firewall_rules.php?if=" . htmlspecialchars($_POST['interface'])); + } + exit; + } +} + +$pgtitle = array(gettext("Firewall"), gettext("Rules"), gettext("Edit")); +$shortcut_section = "firewall"; + +$closehead = false; + +$page_filename = "firewall_rules_edit.php"; +include("head.inc"); + +?> + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "")): ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "") { + $schedules[] = $schedule['name']; + } + } + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    +
    + /> +
    + +
    + + + /> +
    + +
    +
    +
    +
    + $nat_rule) { + if (isset($nat_rule['associated-rule-id']) && $nat_rule['associated-rule-id'] == $pconfig['associated-rule-id']) { + echo "" . gettext("View the NAT rule") . "
    "; + break; + } + } + } + echo ""; + if (!empty($pconfig['interface'])) { + echo ""; + } + ?> + +
    + + > + $ifdesc) { + if (have_ruleint_access($ifent)) { + $interfaces[$ifent] = $ifdesc; + } + } + if ($config['l2tp']['mode'] == "server") { + if (have_ruleint_access("l2tp")) { + $interfaces['l2tp'] = "L2TP VPN"; + } + } + if ($config['pptpd']['mode'] == "server") { + if (have_ruleint_access("pptp")) { + $interfaces['pptp'] = "PPTP VPN"; + } + } + + if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) { + $interfaces['pppoe'] = "PPPoE Server"; + } + /* add ipsec interfaces */ + if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) { + if (have_ruleint_access("enc0")) { + $interfaces["enc0"] = "IPsec"; + } + } + /* add openvpn/tun interfaces */ + if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) { + $interfaces["openvpn"] = "OpenVPN"; + } + if (is_array($pconfig['interface'])) { + $pconfig['interface'] = implode(",", $pconfig['interface']); + } + $selected_interfaces = explode(",", $pconfig['interface']); + foreach ($interfaces as $iface => $ifacename): ?> + + + +
    + + + + + +
    + + + + +
    + +
    +
    + +
    +
    TCP  
    +
    + +
    + +
    + +
    + +
    + name="srcnot" type="checkbox" id="srcnot" value="yes" /> + +
    + +
    +
    + + + + + + + + + +
       + +
       + autocomplete='off' name="src" type="text" class="formfldalias ipv4v6" id="src" size="20" value="" /> / + +
    +
    +

    + type="button" onclick="show_source_port_range()" value="" /> - +

    +
    +
    + name="dstnot" type="checkbox" id="dstnot" value="yes" /> + +
    + +
    +
    + + + + + + + + + +
       + +
       + autocomplete='off' name="dst" type="text" class="formfldalias ipv4v6" id="dst" size="20" value="" /> + / + +
    +
    + + + + + + + + + +
       + + autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value="" /> +
    + + autocomplete='off' class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value="" /> +
    +
    + + +
    + +
    +
    + /> + +
    + ( ). +
    + +
    + +
      +  
      + " /> + " onclick="window.location.href=''" /> + + + + +
     
    +
    > + " /> - +
    +
    > +   + +
    + +
    +
    +
    > + " /> - +
    +
    > + +
    +
    +
    > + " /> - +
    +
    > + /> +
    +

    + /> +
    +

    + +
    +

    + +
    +

    +

    +

    +

    +

    + / +
    + +

    +
    + +

    +

    +
    +
    +
    > + " /> - +
    +
    > +
    + + "; + $tcpflags1 = ""; + $tcpflags2 = ""; + foreach ($tcpflags as $tcpflag) { + $header .= "\n"; + $tcpflags1 .= "\n"; + echo "{$tcpflags1}\n"; + echo "{$tcpflags2}\n"; + ?> +
    setout of" . strtoupper($tcpflag) . " {$header}
    +
    +
    + />
    +
    + +
    +
    +
    > + " /> - +
    +
    > + /> + + NO pfsync
    +
    +

    +
    + + + + + + + + +
    +
    +
    +
    > + " /> - +
    +
    > + />
    + +
    +
    +
    > + " /> - +
    +
    > + +{$vprio}\n"; + } else { + $opts .= "\n"; + } + } + + $optsset = ""; + foreach ($vlanprio as $vprioset) { + if ($vprioset == $pconfig['vlanprioset']) { + $selected = " selected=\"selected\""; + } else { + $selected = ""; + } + if ($vprioset == "none") { + $optsset .= "\n"; + } else { + $optsset .= "\n"; + } + } +?> + +

    + +

    +
    +
    +
    > + " /> - +
    +
    > + +

    +
    +
    +
    > + " /> - +
    +
    > + +

    +
    +
    +
    > + " /> - +
    +
    > + / + +
    + ".gettext("The Out selection is applied to traffic leaving the interface where the rule is created, In is applied to traffic coming into the chosen interface.")."
    ".gettext("If you are creating a floating rule, if the direction is In then the same rules apply, if the direction is out the selections are reverted Out is for incoming and In is for outgoing.");?>
    +
    +
    +
    > + " /> - +
    +
    > + / + +
    + +
    +
    +
    > + " /> - +
    +
    > + +
    + + + +
    +
     
    + +
    + +
      +  
      + " /> + " onclick="window.location.href=''" /> + + + + + + +
    +
    + + + + diff --git a/src/usr/local/www/firewall_schedule.php b/src/usr/local/www/firewall_schedule.php new file mode 100644 index 0000000..e6b7a21 --- /dev/null +++ b/src/usr/local/www/firewall_schedule.php @@ -0,0 +1,255 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: schedules +*/ +##|+PRIV +##|*IDENT=page-firewall-schedules +##|*NAME=Firewall: Schedules page +##|*DESCR=Allow access to the 'Firewall: Schedules' page. +##|*MATCH=firewall_schedule.php* +##|-PRIV + + +$dayArray = array (gettext('Mon'), gettext('Tues'), gettext('Wed'), gettext('Thur'), gettext('Fri'), gettext('Sat'), gettext('Sun')); +$monthArray = array (gettext('January'), gettext('February'), gettext('March'), gettext('April'), gettext('May'), gettext('June'), gettext('July'), gettext('August'), gettext('September'), gettext('October'), gettext('November'), gettext('December')); + +require("guiconfig.inc"); +require_once("filter.inc"); +require("shaper.inc"); + +$pgtitle = array(gettext("Firewall"), gettext("Schedules")); + +if (!is_array($config['schedules']['schedule'])) { + $config['schedules']['schedule'] = array(); +} + +$a_schedules = &$config['schedules']['schedule']; + + +if ($_GET['act'] == "del") { + if ($a_schedules[$_GET['id']]) { + /* make sure rule is not being referenced by any nat or filter rules */ + $is_schedule_referenced = false; + $referenced_by = false; + $schedule_name = $a_schedules[$_GET['id']]['name']; + + if (is_array($config['filter']['rule'])) { + foreach ($config['filter']['rule'] as $rule) { + //check for this later once this is established + if ($rule['sched'] == $schedule_name) { + $referenced_by = $rule['descr']; + $is_schedule_referenced = true; + break; + } + } + } + + if ($is_schedule_referenced == true) { + $savemsg = sprintf(gettext("Cannot delete Schedule. Currently in use by %s"), $referenced_by); + } else { + unset($a_schedules[$_GET['id']]); + write_config(); + header("Location: firewall_schedule.php"); + exit; + } + } +} + +include("head.inc"); +?> + + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    " alt="add" />
    +
    + + +  " width="17" height="17" border="0" alt="schedule" /> + + + + "; + } + $currentDay--; + if ($currentDay != $firstDay) { + $dayFriendly .= $monthArray[$firstmonth-1] . " " . $firstDay . " - " . $currentDay ; + } else { + $dayFriendly .= $monthArray[$month-1] . " " . $day; + } + $firstDayFound = false; + $firstPrint = true; + } + $arraycounter++; + } + } else { + $tempdayFriendly = $timerange['position']; + $firstDayFound = false; + $tempFriendlyDayArray = explode(",", $tempdayFriendly); + $currentDay = ""; + $firstDay = ""; + $nextDay = ""; + $counter = 0; + foreach ($tempFriendlyDayArray as $day) { + if ($day != "") { + if (!$firstDayFound) { + $firstDay = $tempFriendlyDayArray[$counter]; + $firstDayFound = true; + } + $currentDay =$tempFriendlyDayArray[$counter]; + //get next day + $nextDay = $tempFriendlyDayArray[$counter+1]; + $currentDay++; + if ($currentDay != $nextDay) { + if ($firstprint) { + $dayFriendly .= "
    "; + } + $currentDay--; + if ($currentDay != $firstDay) { + $dayFriendly .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1]; + } else { + $dayFriendly .= $dayArray[$firstDay-1]; + } + $firstDayFound = false; + $firstprint = true; + } + $counter++; + } + } + } + $timeFriendly = $starttime . "-" . $stoptime; + $description = $timerange['rangedescr']; + + ?> + + + + + + +
    +
    +   + + + + + + +
    " alt="edit" />" alt="delete" />
    +
    + + + + + +
    " alt="add" />
    +
    +


    +
    +
    + + + diff --git a/src/usr/local/www/firewall_schedule_edit.php b/src/usr/local/www/firewall_schedule_edit.php new file mode 100644 index 0000000..e7c4bca --- /dev/null +++ b/src/usr/local/www/firewall_schedule_edit.php @@ -0,0 +1,1151 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: schedules +*/ + +##|+PRIV +##|*IDENT=page-firewall-schedules-edit +##|*NAME=Firewall: Schedules: Edit page +##|*DESCR=Allow access to the 'Firewall: Schedules: Edit' page. +##|*MATCH=firewall_schedule_edit.php* +##|-PRIV + +function schedulecmp($a, $b) { + return strcmp($a['name'], $b['name']); +} + +function schedule_sort() { + global $g, $config; + + if (!is_array($config['schedules']['schedule'])) { + return; + } + + usort($config['schedules']['schedule'], "schedulecmp"); +} + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +$pgtitle = array(gettext("Firewall"), gettext("Schedules"), gettext("Edit")); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_schedule.php'); +} + +$dayArray = array (gettext('Mon'), gettext('Tues'), gettext('Wed'), gettext('Thur'), gettext('Fri'), gettext('Sat'), gettext('Sun')); +$monthArray = array (gettext('January'), gettext('February'), gettext('March'), gettext('April'), gettext('May'), gettext('June'), gettext('July'), gettext('August'), gettext('September'), gettext('October'), gettext('November'), gettext('December')); + +if (!is_array($config['schedules']['schedule'])) { + $config['schedules']['schedule'] = array(); +} + +$a_schedules = &$config['schedules']['schedule']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_schedules[$id]) { + $pconfig['name'] = $a_schedules[$id]['name']; + $pconfig['descr'] = html_entity_decode($a_schedules[$id]['descr']); + $pconfig['timerange'] = $a_schedules[$id]['timerange']; + $pconfig['schedlabel'] = $a_schedules[$id]['schedlabel']; + $getSchedule = true; +} + +if ($_POST) { + + if (strtolower($_POST['name']) == "lan") { + $input_errors[] = gettext("Schedule may not be named LAN."); + } + if (strtolower($_POST['name']) == "wan") { + $input_errors[] = gettext("Schedule may not be named WAN."); + } + if (strtolower($_POST['name']) == "") { + $input_errors[] = gettext("Schedule name cannot be blank."); + } + + $x = is_validaliasname($_POST['name']); + if (!isset($x)) { + $input_errors[] = gettext("Reserved word used for schedule name."); + } else { + if (is_validaliasname($_POST['name']) == false) { + $input_errors[] = gettext("The schedule name may only consist of the characters a-z, A-Z, 0-9"); + } + } + + /* check for name conflicts */ + foreach ($a_schedules as $schedule) { + if (isset($id) && ($a_schedules[$id]) && ($a_schedules[$id] === $schedule)) { + continue; + } + + if ($schedule['name'] == $_POST['name']) { + $input_errors[] = gettext("A Schedule with this name already exists."); + break; + } + } + $schedule = array(); + + $schedule['name'] = $_POST['name']; + $schedule['descr'] = htmlentities($_POST['descr'], ENT_QUOTES, 'UTF-8'); + + $timerangeFound = false; + for ($x = 0; $x < 99; $x++) { + if ($_POST['schedule' . $x]) { + if (!preg_match('/^[0-9]+:[0-9]+$/', $_POST['starttime' . $x])) { + $input_errors[] = sprintf(gettext("Invalid start time - '%s'"), $_POST['starttime' . $x]); + continue; + } + if (!preg_match('/^[0-9]+:[0-9]+$/', $_POST['stoptime' . $x])) { + $input_errors[] = sprintf(gettext("Invalid stop time - '%s'"), $_POST['stoptime' . $x]); + continue; + } + $timerangeFound = true; + $timeparts = array(); + $firstprint = false; + $timestr = $_POST['schedule' . $x]; + $timehourstr = $_POST['starttime' . $x]; + $timehourstr .= "-"; + $timehourstr .= $_POST['stoptime' . $x]; + $timedescrstr = htmlentities($_POST['timedescr' . $x], ENT_QUOTES, 'UTF-8'); + $dashpos = strpos($timestr, '-'); + if ($dashpos === false) { + $timeparts['position'] = $timestr; + } else { + $tempindarray = array(); + $monthstr = ""; + $daystr = ""; + $tempindarray = explode(",", $timestr); + foreach ($tempindarray as $currentselection) { + if ($currentselection) { + if ($firstprint) { + $monthstr .= ","; + $daystr .= ","; + } + $tempstr = ""; + $monthpos = strpos($currentselection, "m"); + $daypos = strpos($currentselection, "d"); + $monthstr .= substr($currentselection, $monthpos+1, $daypos-$monthpos-1); + $daystr .= substr($currentselection, $daypos+1); + $firstprint = true; + } + } + $timeparts['month'] = $monthstr; + $timeparts['day'] = $daystr; + } + $timeparts['hour'] = $timehourstr; + $timeparts['rangedescr'] = $timedescrstr; + $schedule['timerange'][$x] = $timeparts; + } + } + + if (!$timerangeFound) { + $input_errors[] = gettext("The schedule must have at least one time range configured."); + } + + if (!$input_errors) { + + if (!empty($pconfig['schedlabel'])) { + $schedule['schedlabel'] = $pconfig['schedlabel']; + } else { + $schedule['schedlabel'] = uniqid(); + } + + if (isset($id) && $a_schedules[$id]) { + $a_schedules[$id] = $schedule; + } else { + $a_schedules[] = $schedule; + } + schedule_sort(); + if (write_config()) { + filter_configure(); + } + + header("Location: firewall_schedule.php"); + exit; + } else { + //we received input errors, copy data to prevent retype + if (!$_POST['schedule0']) { + $getSchedule = false; + } else { + $getSchedule = true; + } + $pconfig['name'] = $schedule['name']; + $pconfig['descr'] = $schedule['descr']; + $pconfig['timerange'] = $schedule['timerange']; + } + +} +include("head.inc"); + +/* put your custom HTML head content here */ +/* using some of the $pfSenseHead function calls */ +$jscriptstr = << +// stoptimehour) { + errors = "Error: Start Hour cannot be greater than Stop Hour."; + passedValidiation = false; + + } else if (starttimehour == stoptimehour) { + if (starttimemin > stoptimemin) { + errors = "Error: Start Minute cannot be greater than Stop Minute."; + passedValidiation = false; + } + } + + if (passedValidiation) { + addTimeRange(); + } else { + if (errors != "") { + alert(errors); + } + } +} + +function addTimeRange() { + var tempdayarray = daysSelected.split(","); + var tempstr, tempFriendlyDay, starttimehour, starttimemin, stoptimehour, nrtempFriendlyTime, rtempFriendlyTime, nrtempID, rtempID = ""; + var stoptimemin, timeRange, tempstrdaypos, week, daypos, day, month, dashpos, nrtempTime, rtempTime, monthstr, daystr = ""; + rtempFriendlyTime = ""; + nrtempFriendlyTime = ""; + nrtempID = ""; + rtempID = ""; + nrtempTime = ""; + rtempTime = ""; + tempdayarray.sort(); + rtempFriendlyDay = ""; + monthstr = ""; + daystr = ""; + + //check for existing entries + var findCurrentCounter; + for (u = 0; u < 99; u++) { + findCurrentCounter = document.getElementById("schedule" + u); + if (!findCurrentCounter) { + schCounter = u; + break; + } + } + + if (daysSelected != "") { + //get days selected + for (i = 0; i < tempdayarray.length; i++) { + tempstr = tempdayarray[i]; + if (tempstr != "") { + tempstrdaypos = tempstr.search("p"); + week = tempstr.substring(1, tempstrdaypos); + week = parseInt(week); + dashpos = tempstr.search("-"); + + if (dashpos != "-1") { + var nonrepeatingfound = true; + daypos = tempstr.substring(tempstrdaypos+1, dashpos); + daypos = parseInt(daypos); + monthpos = tempstr.search("m"); + tempstrdaypos = tempstr.search("d"); + month = tempstr.substring(monthpos+1, tempstrdaypos); + month = parseInt(month); + day = tempstr.substring(tempstrdaypos+1); + day = parseInt(day); + monthstr += month + ","; + daystr += day + ","; + nrtempID += tempstr + ","; + } else { + var repeatingfound = true; + daypos = tempstr.substr(tempstrdaypos+1); + daypos = parseInt(daypos); + rtempFriendlyDay += daypos + ","; + rtempID += daypos + ","; + } + } + } + + //code below spits out friendly look format for nonrepeating schedules + var foundEnd = false; + var firstDayFound = false; + var firstprint = false; + var tempFriendlyMonthArray = monthstr.split(","); + var tempFriendlyDayArray = daystr.split(","); + var currentDay, firstDay, nextDay, currentMonth, nextMonth, firstDay, firstMonth = ""; + for (k = 0; k < tempFriendlyMonthArray.length; k++) { + tempstr = tempFriendlyMonthArray[k]; + if (tempstr != "") { + if (!firstDayFound) { + firstDay = tempFriendlyDayArray[k]; + firstDay = parseInt(firstDay); + firstMonth = tempFriendlyMonthArray[k]; + firstMonth = parseInt(firstMonth); + firstDayFound = true; + } + currentDay = tempFriendlyDayArray[k]; + currentDay = parseInt(currentDay); + //get next day + nextDay = tempFriendlyDayArray[k+1]; + nextDay = parseInt(nextDay); + //get next month + + currentDay++; + if ((currentDay != nextDay) || (tempFriendlyMonthArray[k] != tempFriendlyMonthArray[k+1])) { + if (firstprint) { + nrtempFriendlyTime += ", "; + } + currentDay--; + if (currentDay != firstDay) { + nrtempFriendlyTime += month_array[firstMonth-1] + " " + firstDay + "-" + currentDay; + } else { + nrtempFriendlyTime += month_array[firstMonth-1] + " " + currentDay; + } + firstDayFound = false; + firstprint = true; + } + } + } + + //code below spits out friendly look format for repeating schedules + foundEnd = false; + firstDayFound = false; + firstprint = false; + tempFriendlyDayArray = rtempFriendlyDay.split(","); + tempFriendlyDayArray.sort(); + currentDay, firstDay, nextDay = ""; + for (k = 0; k < tempFriendlyDayArray.length; k++) { + tempstr = tempFriendlyDayArray[k]; + if (tempstr != "") { + if (!firstDayFound) { + firstDay = tempFriendlyDayArray[k]; + firstDay = parseInt(firstDay); + firstDayFound = true; + } + currentDay = tempFriendlyDayArray[k]; + currentDay = parseInt(currentDay); + //get next day + nextDay = tempFriendlyDayArray[k+1]; + nextDay = parseInt(nextDay); + currentDay++; + if (currentDay != nextDay) { + if (firstprint) { + rtempFriendlyTime += ", "; + } + currentDay--; + if (currentDay != firstDay) { + rtempFriendlyTime += day_array[firstDay-1] + " - " + day_array[currentDay-1]; + } else { + rtempFriendlyTime += day_array[firstDay-1]; + } + firstDayFound = false; + firstprint = true; + } + } + } + + //sort the tempID + var tempsortArray = rtempID.split(","); + var isFirstdone = false; + tempsortArray.sort(); + //clear tempID + rtempID = ""; + for (t = 0; t < tempsortArray.length; t++) { + if (tempsortArray[t] != "") { + if (!isFirstdone) { + rtempID += tempsortArray[t]; + isFirstdone = true; + } else { + rtempID += "," + tempsortArray[t]; + } + } + } + + + //get time specified + starttimehour = document.getElementById("starttimehour").value + starttimemin = document.getElementById("starttimemin").value; + stoptimehour = document.getElementById("stoptimehour").value; + stoptimemin = document.getElementById("stoptimemin").value; + + timeRange = "||" + starttimehour + ":"; + timeRange += starttimemin + "-"; + timeRange += stoptimehour + ":"; + timeRange += stoptimemin; + + //get description for time range + var tempdescr = document.getElementById("timerangedescr").value + + if (nonrepeatingfound) { + nrtempTime += nrtempID; + //add time ranges + nrtempTime += timeRange; + //add description + nrtempTime += "||" + tempdescr; + insertElements(nrtempFriendlyTime, starttimehour, starttimemin, stoptimehour, stoptimemin, tempdescr, nrtempTime, nrtempID); + } + + if (repeatingfound) { + rtempTime += rtempID; + //add time ranges + rtempTime += timeRange; + //add description + rtempTime += "||" + tempdescr; + insertElements(rtempFriendlyTime, starttimehour, starttimemin, stoptimehour, stoptimemin, tempdescr, rtempTime, rtempID); + } + + } else { + //no days were selected, alert user + alert ("You must select at least 1 day before adding time"); + } +} + +function insertElements(tempFriendlyTime, starttimehour, starttimemin, stoptimehour, stoptimemin, tempdescr, tempTime, tempID) { + + //add it to the schedule list + d = document; + tbody = d.getElementById("scheduletable").getElementsByTagName("tbody").item(0); + tr = d.createElement("tr"); + td = d.createElement("td"); + td.innerHTML= "" + tempFriendlyTime + "<\/span>"; + tr.appendChild(td); + + td = d.createElement("td"); + td.innerHTML=""; + tr.appendChild(td); + + td = d.createElement("td"); + td.innerHTML=""; + tr.appendChild(td); + + td = d.createElement("td"); + td.innerHTML=""; + tr.appendChild(td); + + td = d.createElement("td"); + td.innerHTML = "edit"; + tr.appendChild(td); + + td = d.createElement("td"); + td.innerHTML = "remove"; + tr.appendChild(td); + + td = d.createElement("td"); + td.innerHTML=""; + tr.appendChild(td); + tbody.appendChild(tr); + + schCounter++; + + //reset calendar and time and descr + clearCalendar(); + clearTime(); + clearDescr(); +} + + +function clearCalendar() { + var tempstr, daycell = ""; + //clear days selected + daysSelected = ""; + //loop through all 52 weeks + for (j=1; j<=53; j++) { + //loop through all 7 days + for (k=1; k<8; k++) { + tempstr = 'w' + j + 'p' + k; + daycell = eval('document.getElementById(tempstr)'); + if (daycell != null) { + daycell.style.backgroundColor = "#FFFFFF"; // white + } + } + } +} + +function clearTime() { + document.getElementById("starttimehour").value = "0"; + document.getElementById("starttimemin").value = "00"; + document.getElementById("stoptimehour").value = "23"; + document.getElementById("stoptimemin").value = "59"; +} + +function clearDescr() { + document.getElementById("timerangedescr").value = ""; +} + +function editRow(incTime, el) { + var check = checkForRanges(); + + if (check) { + + //reset calendar and time + clearCalendar(); + clearTime(); + + var starttimehour, descr, days, tempstr, starttimemin, hours, stoptimehour, stoptimemin = ""; + + tempArray = incTime.split ("||"); + + days = tempArray[0]; + hours = tempArray[1]; + descr = tempArray[2]; + + var tempdayArray = days.split(","); + var temphourArray = hours.split("-"); + tempstr = temphourArray[0]; + var temphourArray2 = tempstr.split(":"); + + document.getElementById("starttimehour").value = temphourArray2[0]; + document.getElementById("starttimemin").value = temphourArray2[1]; + + tempstr = temphourArray[1]; + temphourArray2 = tempstr.split(":"); + + document.getElementById("stoptimehour").value = temphourArray2[0]; + document.getElementById("stoptimemin").value = temphourArray2[1]; + + document.getElementById("timerangedescr").value = descr; + + //toggle the appropriate days + for (i = 0; i < tempdayArray.length; i++) { + if (tempdayArray[i]) { + var tempweekstr = tempdayArray[i]; + dashpos = tempweekstr.search("-"); + + if (dashpos == "-1") { + tempstr = "w2p" + tempdayArray[i]; + } else { + tempstr = tempdayArray[i]; + } + daytoggle(tempstr); + } + } + removeRownoprompt(el); + } +} + +function removeRownoprompt(el) { + var cel; + while (el && el.nodeName.toLowerCase() != "tr") { + el = el.parentNode; + } + + if (el && el.parentNode) { + cel = el.getElementsByTagName("td").item(0); + el.parentNode.removeChild(el); + } +} + + +function removeRow(el) { + var check = confirm ("Do you really want to delete this time range?"); + if (check) { + var cel; + while (el && el.nodeName.toLowerCase() != "tr") { + el = el.parentNode; + } + + if (el && el.parentNode) { + cel = el.getElementsByTagName("td").item(0); + el.parentNode.removeChild(el); + } + } +} +//]]> + +EOD; +?> + +"> + + + + +
    + +
    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +

    + +

    + +
    + + + + +

    + + + +
    + +

    + +
    " style=" position:relative; display:"> + + + + + + + + + + + + + + "; + } + if ($firstdayofmonth == $positioncounter) { + ?> + "; + } + + if ($positioncounter == 7 || $daycounter > $numberofdays) { + $positioncounter = 1; + echo ""; + } else { + $positioncounter++; + } + + } //end while loop + ?> +
    + "; + } elseif ($firstdayprinted == TRUE && $daycounter <= $numberofdays) { + ?> + + "; + } else { + echo "
    +
    + +
    + +
    + + + + + + + + + +
    +     +   + +     +   +
    +
    + +

    + + + +
      + " class="formbtn" onclick="javascript:processEntries();" />    + " class="formbtn" onclick="javascript:clearCalendar(); clearTime(); clearDescr();" /> +
    + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + /images/icons/icon_e.gif' alt='edit' /> + + /images/icons/icon_x.gif' alt='remove' /> + + +
    +
      + " /> + " onclick="window.location.href=''" /> + + + + +
    +
    +
    + + + diff --git a/src/usr/local/www/firewall_shaper.php b/src/usr/local/www/firewall_shaper.php new file mode 100644 index 0000000..7b8f489 --- /dev/null +++ b/src/usr/local/www/firewall_shaper.php @@ -0,0 +1,486 @@ + "") { + /* XXX: Huh, why are we killing php? */ + mwexec("killall -9 pfctl php"); + exit; +} + +$pgtitle = array(gettext("Firewall"), gettext("Traffic Shaper")); +$shortcut_section = "trafficshaper"; + +$shaperIFlist = get_configured_interface_with_descr(); +read_altq_config(); +/* + * The whole logic in these code maybe can be specified. + * If you find a better way contact me :). + */ + +if ($_GET) { + if ($_GET['queue']) { + $qname = htmlspecialchars(trim($_GET['queue'])); + } + if ($_GET['interface']) { + $interface = htmlspecialchars(trim($_GET['interface'])); + } + if ($_GET['action']) { + $action = htmlspecialchars($_GET['action']); + } +} +if ($_POST) { + if ($_POST['name']) { + $qname = htmlspecialchars(trim($_POST['name'])); + } + if ($_POST['interface']) { + $interface = htmlspecialchars(trim($_POST['interface'])); + } + if ($_POST['parentqueue']) { + $parentqueue = htmlspecialchars(trim($_POST['parentqueue'])); + } +} + +if ($interface) { + $altq = $altq_list_queues[$interface]; + if ($altq) { + $queue =& $altq->find_queue($interface, $qname); + } else { + $addnewaltq = true; + } +} + +$dontshow = false; +$newqueue = false; +$output_form = ""; + +if ($_GET) { + switch ($action) { + case "delete": + if ($queue) { + $queue->delete_queue(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + } + header("Location: firewall_shaper.php"); + exit; + break; + case "resetall": + foreach ($altq_list_queues as $altq) { + $altq->delete_all(); + } + unset($altq_list_queues); + $altq_list_queues = array(); + $tree = "
      "; + $tree .= get_interface_list_to_show(); + $tree .= "
    "; + unset($config['shaper']['queue']); + unset($queue); + unset($altq); + $can_add = false; + $can_enable = false; + $dontshow = true; + foreach ($config['filter']['rule'] as $key => $rule) { + if (isset($rule['wizard']) && $rule['wizard'] == "yes") { + unset($config['filter']['rule'][$key]); + } + } + if (write_config()) { + $retval = 0; + $retval |= filter_configure(); + $savemsg = get_std_save_message($retval); + + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + } else { + $savemsg = gettext("Unable to write config.xml (Access Denied?)"); + } + $output_form = $default_shaper_message; + + break; + case "add": + /* XXX: Find better way because we shouldn't know about this */ + if ($altq) { + switch ($altq->GetScheduler()) { + case "PRIQ": + $q = new priq_queue(); + break; + case "FAIRQ": + $q = new fairq_queue(); + break; + case "HFSC": + $q = new hfsc_queue(); + break; + case "CBQ": + $q = new cbq_queue(); + break; + default: + /* XXX: Happens when sched == NONE?! */ + $q = new altq_root_queue(); + break; + } + } else if ($addnewaltq) { + $q = new altq_root_queue(); + } else { + $input_errors[] = gettext("Could not create new queue/discipline!"); + } + + if ($q) { + $q->SetInterface($interface); + $output_form .= $q->build_form(); + $output_form .= ""; + $newjavascript = $q->build_javascript(); + unset($q); + $newqueue = true; + } + break; + case "show": + if ($queue) { + $output_form .= $queue->build_form(); + } else { + $input_errors[] = gettext("Queue not found!"); + } + break; + case "enable": + if ($queue) { + $queue->SetEnabled("on"); + $output_form .= $queue->build_form(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + } else { + $input_errors[] = gettext("Queue not found!"); + } + break; + case "disable": + if ($queue) { + $queue->SetEnabled(""); + $output_form .= $queue->build_form(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + } else { + $input_errors[] = gettext("Queue not found!"); + } + break; + default: + $output_form .= $default_shaper_msg; + $dontshow = true; + break; + } +} else if ($_POST) { + unset($input_errors); + + if ($addnewaltq) { + $altq =& new altq_root_queue(); + $altq->SetInterface($interface); + + switch ($altq->GetBwscale()) { + case "Mb": + $factor = 1000 * 1000; + brak; + case "Kb": + $factor = 1000; + break; + case "b": + $factor = 1; + break; + case "Gb": + $factor = 1000 * 1000 * 1000; + break; + case "%": /* We don't use it for root_XXX queues. */ + default: /* XXX assume Kb by default. */ + $factor = 1000; + break; + } + $altq->SetAvailableBandwidth($altq->GetBandwidth() * $factor); + $altq->ReadConfig($_POST); + $altq->validate_input($_POST, $input_errors); + if (!$input_errors) { + unset($tmppath); + $tmppath[] = $altq->GetInterface(); + $altq->SetLink($tmppath); + $altq->wconfig(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + $can_enable = true; + $can_add = true; + } + read_altq_config(); + $output_form .= $altq->build_form(); + + } else if ($parentqueue) { /* Add a new queue */ + $qtmp =& $altq->find_queue($interface, $parentqueue); + if ($qtmp) { + $tmppath =& $qtmp->GetLink(); + array_push($tmppath, $qname); + $tmp =& $qtmp->add_queue($interface, $_POST, $tmppath, $input_errors); + if (!$input_errors) { + array_pop($tmppath); + $tmp->wconfig(); + $can_enable = true; + if ($tmp->CanHaveChildren() && $can_enable) { + if ($tmp->GetDefault() <> "") { + $can_add = false; + } else { + $can_add = true; + } + } else { + $can_add = false; + } + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + $can_enable = true; + if ($altq->GetScheduler() != "PRIQ") { /* XXX */ + if ($tmp->GetDefault() <> "") { + $can_add = false; + } else { + $can_add = true; + } + } + } + read_altq_config(); + $output_form .= $tmp->build_form(); + } else { + $input_errors[] = gettext("Could not add new queue."); + } + } else if ($_POST['apply']) { + write_config(); + + $retval = 0; + $retval = filter_configure(); + $savemsg = get_std_save_message($retval); + + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + + /* reset rrd queues */ + system("rm -f /var/db/rrd/*queuedrops.rrd"); + system("rm -f /var/db/rrd/*queues.rrd"); + enable_rrd_graphing(); + + clear_subsystem_dirty('shaper'); + + if ($queue) { + $output_form .= $queue->build_form(); + $dontshow = false; + } else { + $output_form .= $default_shaper_message; + $dontshow = true; + } + } else if ($queue) { + $queue->validate_input($_POST, $input_errors); + if (!$input_errors) { + $queue->update_altq_queue_data($_POST); + $queue->wconfig(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + $dontshow = false; + } + read_altq_config(); + $output_form .= $queue->build_form(); + } else { + $output_form .= $default_shaper_msg; + $dontshow = true; + } + mwexec("killall qstats"); +} else { + $output_form .= $default_shaper_msg; + $dontshow = true; +} + +if ($queue) { + if ($queue->GetEnabled()) { + $can_enable = true; + } else { + $can_enable = false; + } + if ($queue->CanHaveChildren() && $can_enable) { + if ($altq->GetQname() <> $queue->GetQname() && $queue->GetDefault() <> "") { + $can_add = false; + } else { + $can_add = true; + } + } else { + $can_add = false; + } +} + +$tree = "
      "; +if (is_array($altq_list_queues)) { + foreach ($altq_list_queues as $tmpaltq) { + $tree .= $tmpaltq->build_tree(); + } + $tree .= get_interface_list_to_show(); +} +$tree .= "
    "; + +if (!$dontshow || $newqueue) { + + $output_form .= ""; + $output_form .= "
    " . gettext("Queue Actions") . "
    "; + $output_form .= "
    "; + + $output_form .= ""; + if ($can_add || $addnewaltq) { + $output_form .= "
    GetQname(); + } + $output_form .= "&action=add\">"; + $output_form .= ""; + $output_form .= ""; + } + $output_form .= ""; + $output_form .= ""; + } else { + $output_form .= " value=\"" . gettext("Disable shaper on interface") . "\" />"; + } + $output_form .= ""; + $output_form .= "
    "; + $output_form .= ""; +} else { + $output_form .= ""; +} + +$output = ""; +$output .= $output_form; + +//$pgtitle = "Firewall: Shaper: By Interface View"; +$closehead = false; +include("head.inc"); +?> + + + + + +build_javascript(); +} +echo $newjavascript; + +include("fbegin.inc"); +?> +
    + + + + + +

    +".gettext("You must apply the changes in order for them to take effect."));?>

    + +
    + + + + +
    + +
    +
    + + 0): ?> + + + + + + + + + +
    + + " class="formbtn" /> + +
    + + +
    + +
    +
    +
    +
    + + + + diff --git a/src/usr/local/www/firewall_shaper_layer7.php b/src/usr/local/www/firewall_shaper_layer7.php new file mode 100644 index 0000000..9a72233 --- /dev/null +++ b/src/usr/local/www/firewall_shaper_layer7.php @@ -0,0 +1,584 @@ +"; +$default_layer7shaper_msg .= "" . gettext("Note") . ":
    "; +$default_layer7shaper_msg .= "
    " . gettext("You can add new layer7 protocol patterns by simply uploading the file") . " " . gettext("here") . ".

    "; +$default_layer7shaper_msg .= ""; + +read_layer7_config(); + +if ($_GET['reset'] <> "") { + // kill all ipfw-classifyd processes + mwexec("killall -9 ipfw-classifyd"); + exit; +} + +if ($_GET) { + if ($_GET['container']) { + $name = htmlspecialchars(trim($_GET['container'])); + } + if ($_GET['action']) { + $action = htmlspecialchars($_GET['action']); + } +} + +if ($_POST) { + if ($_POST['container']) { + $name = htmlspecialchars(trim($_POST['container'])); + } +} + +if ($name) { + //Get the object from the 7rules list + $container = $layer7_rules_list[$name]; +} + +if ($_GET) { + switch ($action) { + case "add": + $show_proto_form = true; + $container = new layer7(); + $output_form .= $container->build_form(); //constructs the graphical interface on the right side + unset($container); + break; + case "show": + $show_proto_form = true; + if ($container) { + $output_form .= $container->build_form(); + } else { + $show_proto_form = false; + $input_errors[] = gettext("Layer7 Rules Container not found!"); + } + break; + default: + echo log_error("Get default"); + $show_proto_form = false; + $output_form .= $dn_default_shaper_msg . $default_layer7shaper_msg; + break; + } +} else if ($_POST) { + //add a new l7rules container + $show_proto_form = true; + unset($input_errors); + + if ($_POST['submit']) { + if (isset($layer7_rules_list[$name])) { + $l7r = $layer7_rules_list[$name]; + $_POST['divert_port'] = $l7r->GetRPort(); + } else { + $l7r =& new layer7(); + $_POST['divert_port'] = $l7r->gen_divert_port(); + } + for ($i = 0; $_POST['protocol'][$i] <> ""; $i++) { + $_POST['l7rules'][$i]['protocol'] = $_POST['protocol'][$i]; + $_POST['l7rules'][$i]['structure'] = $_POST['structure'][$i]; + $_POST['l7rules'][$i]['behaviour'] = $_POST['behaviour'][$i]; + } + $l7r->validate_input($_POST, $input_errors); + $l7r->ReadConfig($_POST['container'], $_POST); + //Before writing the results, we need to test for repeated protocols + $non_dupes = array(); + $dupes = array(); + for ($j = 0; $j < $i; $j++) { + if (!$non_dupes[$_POST['protocol'][$j]]) { + $non_dupes[$_POST['protocol'][$j]] = true; + } else { + $dupes[] = $_POST['protocol'][$j]; + } + } + unset($non_dupes); + if (sizeof($dupes) == 0 && !$input_errors) { + $l7r->wconfig(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + + read_layer7_config(); + } else { + if (sizeof($dupes) > 0) { + $dupe_error = gettext("Found the following repeated protocol definitions") . ": "; + foreach ($dupes as $dupe) { + $dupe_error .= "$dupe "; + } + $input_errors[] .= $dupe_error; + } + } + unset($dupes); + unset($dupe_error); + //Even if there are repeated protocols, we won't lose any previous values + //The user will be able to solve the situation + $output_form .= $l7r->build_form(); + //Necessary to correctly build the proto form + $container = $layer7_rules_list[$name]; + if ($input_errors) { + $container =& $l7r; + } + } else if ($_POST['apply']) { + write_config(); + + $retval = 0; + $retval = filter_configure(); + $savemsg = get_std_save_message($retval); + + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + + clear_subsystem_dirty('shaper'); + + if ($container) { + $output_form .= $container->build_form(); + } else { + $show_proto_form = false; + $output_form .= $dn_default_shaper_msg . $default_layer7shaper_msg; + } + } else if ($_POST['delete']) { + $container->delete_l7c(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + unset($container); + + header("Location: firewall_shaper_layer7.php"); + exit; + } else { + $show_proto_form = false; + } +} else { + $show_proto_form = false; + $output_form .= $dn_default_shaper_msg . $default_layer7shaper_msg; +} + +// Builds the left tree +$tree = "
      "; +if (is_array($layer7_rules_list)) { + foreach ($layer7_rules_list as $tmpl7) { + $tree .= $tmpl7->build_tree(); + } +} +$tree .= "
    "; +$closehead = false; +include("head.inc"); +?> + + + + + + + + + +
    + + +
    + + +

    +" . gettext("You must apply the changes in order for them to take effect."));?>

    + + + + + + +
    + +
    +
    + + + 0): ?> + + + + + + + + + +
    + +

    + + " width="17" height="17" border="0" alt="add" /> + +
    +
    +
    + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + + + rsets as $l7rule) { + ?> + + + + + + + + +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + + + + + + + x +
    + + " /> +
    +   + + " /> + + + " /> + + + " /> + + +
    +
    +
    +
    +
    +
    + + + + diff --git a/src/usr/local/www/firewall_shaper_queues.php b/src/usr/local/www/firewall_shaper_queues.php new file mode 100644 index 0000000..6aa062b --- /dev/null +++ b/src/usr/local/www/firewall_shaper_queues.php @@ -0,0 +1,244 @@ + "") { + mwexec("killall -9 pfctl"); + exit; +} + +$shaperIFlist = get_configured_interface_with_descr(); +read_altq_config(); +$qlist =& get_unique_queue_list(); + +if (!is_array($qlist)) { + $qlist = array(); +} + +$tree = ""; + +if ($_GET) { + if ($_GET['queue']) { + $qname = htmlspecialchars(trim($_GET['queue'])); + } + if ($_GET['interface']) { + $interface = htmlspecialchars(trim($_GET['interface'])); + } + if ($_GET['action']) { + $action = htmlspecialchars($_GET['action']); + } + + switch ($action) { + case "delete": + $altq =& $altq_list_queues[$interface]; + $qtmp =& $altq->find_queue("", $qname); + if ($qtmp) { + $qtmp->delete_queue(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + } + header("Location: firewall_shaper_queues.php"); + exit; + break; + case "add": + /* + * XXX: WARNING: This returns the first it finds. + * Maybe the user expects something else?! + */ + foreach ($altq_list_queues as $altq) { + $qtmp =& $altq->find_queue("", $qname); + if ($qtmp) { + $copycfg = array(); + $qtmp->copy_queue($interface, $copycfg); + $aq =& $altq_list_queues[$interface]; + if ($qname == $qtmp->GetInterface()) { + $config['shaper']['queue'][] = $copycfg; + } else if ($aq) { + $tmp1 =& $qtmp->find_parentqueue($interface, $qname); + if ($tmp1) { + $tmp =& $aq->find_queue($interface, $tmp1->GetQname()); + } + + if ($tmp) { + $link =& get_reference_to_me_in_config($tmp->GetLink()); + } else { + $link =& get_reference_to_me_in_config($aq->GetLink()); + } + $link['queue'][] = $copycfg; + } else { + $newroot = array(); + $newroot['name'] = $interface; + $newroot['interface'] = $interface; + $newroot['scheduler'] = $altq->GetScheduler(); + $newroot['queue'] = array(); + $newroot['queue'][] = $copycfg; + $config['shaper']['queue'][] = $newroot; + } + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + break; + } + } + + header("Location: firewall_shaper_queues.php?queue=".$qname."&action=show"); + exit; + break; + case "show": + foreach ($config['interfaces'] as $if => $ifdesc) { + $altq = $altq_list_queues[$if]; + if ($altq) { + $qtmp =& $altq->find_queue("", $qname); + if ($qtmp) { + $output .= $qtmp->build_shortform(); + } else { + $output .= build_iface_without_this_queue($if, $qname); + } + } else { + if (!is_altq_capable($ifdesc['if'])) { + continue; + } + if (!isset($ifdesc['enable']) && $if != "lan" && $if != "wan") { + continue; + } + $output .= build_iface_without_this_queue($if, $qname); + } + } + break; + } +} + +if ($_POST['apply']) { + write_config(); + + $retval = 0; + /* Setup pf rules since the user may have changed the optimization value */ + $retval = filter_configure(); + $savemsg = get_std_save_message($retval); + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + + /* reset rrd queues */ + system("rm -f /var/db/rrd/*queuedrops.rrd"); + system("rm -f /var/db/rrd/*queues.rrd"); + enable_rrd_graphing(); + + clear_subsystem_dirty('shaper'); +} + +$pgtitle = gettext("Firewall: Shaper: By Queues View"); +$shortcut_section = "trafficshaper"; +$closehead = false; +include("head.inc"); +?> + + + + + + +
    + +
    + +

    +" . gettext("You must apply the changes in order for them to take effect."));?>

    + + + + + + +
    + +
    +
    + + + + + +
    + + + " . $qname . "


    "; + } + echo ""; + echo $output; + echo ""; + echo "
     
    "; + ?> +
    +
    +
    +
    + + + diff --git a/src/usr/local/www/firewall_shaper_vinterface.php b/src/usr/local/www/firewall_shaper_vinterface.php new file mode 100644 index 0000000..ffa3f15 --- /dev/null +++ b/src/usr/local/www/firewall_shaper_vinterface.php @@ -0,0 +1,475 @@ + "") { + mwexec("/usr/bin/killall -9 pfctl"); + exit; +} + +$pgtitle = array(gettext("Firewall"), gettext("Traffic Shaper"), gettext("Limiter")); +$shortcut_section = "trafficshaper-limiters"; + +read_dummynet_config(); +/* + * The whole logic in these code maybe can be specified. + * If you find a better way contact me :). + */ + +if ($_GET) { + if ($_GET['queue']) { + $qname = htmlspecialchars(trim($_GET['queue'])); + } + if ($_GET['pipe']) { + $pipe = htmlspecialchars(trim($_GET['pipe'])); + } + if ($_GET['action']) { + $action = htmlspecialchars($_GET['action']); + } +} +if ($_POST) { + if ($_POST['name']) { + $qname = htmlspecialchars(trim($_POST['name'])); + } else if ($_POST['newname']) { + $qname = htmlspecialchars(trim($_POST['newname'])); + } + if ($_POST['pipe']) { + $pipe = htmlspecialchars(trim($_POST['pipe'])); + } else { + $pipe = htmlspecialchars(trim($qname)); + } + if ($_POST['parentqueue']) { + $parentqueue = htmlspecialchars(trim($_POST['parentqueue'])); + } +} + +if ($pipe) { + $dnpipe = $dummynet_pipe_list[$pipe]; + if ($dnpipe) { + $queue =& $dnpipe->find_queue($pipe, $qname); + } else { + $addnewpipe = true; + } +} + +$dontshow = false; +$newqueue = false; +$output_form = ""; + +if ($_GET) { + switch ($action) { + case "delete": + if ($queue) { + if (is_array($config['filter']['rule'])) { + foreach ($config['filter']['rule'] as $rule) { + if ($rule['dnpipe'] == $queue->GetQname() || $rule['pdnpipe'] == $queue->GetQname()) { + $input_errors[] = gettext("This pipe/queue is referenced in filter rules, please remove references from there before deleting."); + } + } + } + if (!$input_errors) { + $queue->delete_queue(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + header("Location: firewall_shaper_vinterface.php"); + exit; + } + $output_form .= $queue->build_form(); + } else { + $input_errors[] = sprintf(gettext("No queue with name %s was found!"), $qname); + $output_form .= $dn_default_shaper_msg; + $dontshow = true; + } + break; + case "resetall": + foreach ($dummynet_pipe_list as $dn) { + $dn->delete_queue(); + } + unset($dummynet_pipe_list); + $dummynet_pipe_list = array(); + unset($config['dnshaper']['queue']); + unset($queue); + unset($pipe); + $can_add = false; + $can_enable = false; + $dontshow = true; + foreach ($config['filter']['rule'] as $key => $rule) { + if (isset($rule['dnpipe'])) { + unset($config['filter']['rule'][$key]['dnpipe']); + } + if (isset($rule['pdnpipe'])) { + unset($config['filter']['rule'][$key]['pdnpipe']); + } + } + if (write_config()) { + $retval = 0; + $retval = filter_configure(); + $savemsg = get_std_save_message($retval); + + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + } else { + $savemsg = gettext("Unable to write config.xml (Access Denied?)"); + } + $output_form = $dn_default_shaper_message; + + break; + case "add": + if ($dnpipe) { + $q = new dnqueue_class(); + $q->SetPipe($pipe); + $output_form .= ""; + } else if ($addnewpipe) { + $q = new dnpipe_class(); + $q->SetQname($pipe); + } else { + $input_errors[] = gettext("Could not create new queue/discipline!"); + } + + if ($q) { + $output_form .= $q->build_form(); + $newjavascript = $q->build_javascript(); + unset($q); + $newqueue = true; + } + break; + case "show": + if ($queue) { + $output_form .= $queue->build_form(); + } else { + $input_errors[] = gettext("Queue not found!"); + } + break; + case "enable": + if ($queue) { + $queue->SetEnabled("on"); + $output_form .= $queue->build_form(); + $queue->wconfig(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + } else { + $input_errors[] = gettext("Queue not found!"); + } + break; + case "disable": + if ($queue) { + $queue->SetEnabled(""); + $output_form .= $queue->build_form(); + $queue->wconfig(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + } else { + $input_errors[] = gettext("Queue not found!"); + } + break; + default: + $output_form .= $dn_default_shaper_msg; + $dontshow = true; + break; + } +} else if ($_POST) { + unset($input_errors); + + if ($addnewpipe) { + if (!empty($dummynet_pipe_list[$qname])) { + $input_errors[] = gettext("You cannot name a child queue with the same name as a parent limiter"); + } else { + $dnpipe =& new dnpipe_class(); + + $dnpipe->ReadConfig($_POST); + $dnpipe->validate_input($_POST, $input_errors); + if (!$input_errors) { + $number = dnpipe_find_nextnumber(); + $dnpipe->SetNumber($number); + unset($tmppath); + $tmppath[] = $dnpipe->GetQname(); + $dnpipe->SetLink($tmppath); + $dnpipe->wconfig(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + $can_enable = true; + $can_add = true; + } + + read_dummynet_config(); + $output_form .= $dnpipe->build_form(); + $newjavascript = $dnpipe->build_javascript(); + } + } else if ($parentqueue) { /* Add a new queue */ + if (!empty($dummynet_pipe_list[$qname])) { + $input_errors[] = gettext("You cannot name a child queue with the same name as a parent limiter"); + } else if ($dnpipe) { + $tmppath =& $dnpipe->GetLink(); + array_push($tmppath, $qname); + $tmp =& $dnpipe->add_queue($pipe, $_POST, $tmppath, $input_errors); + if (!$input_errors) { + array_pop($tmppath); + $tmp->wconfig(); + if (write_config()) { + $can_enable = true; + $can_add = false; + mark_subsystem_dirty('shaper'); + } + } + read_dummynet_config(); + $output_form .= $tmp->build_form(); + } else { + $input_errors[] = gettext("Could not add new queue."); + } + } else if ($_POST['apply']) { + write_config(); + + $retval = 0; + $retval = filter_configure(); + $savemsg = get_std_save_message($retval); + + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + + /* XXX: TODO Make dummynet pretty graphs */ + // enable_rrd_graphing(); + + clear_subsystem_dirty('shaper'); + + if ($queue) { + $output_form .= $queue->build_form(); + $dontshow = false; + } else { + $output_form .= $dn_default_shaper_message; + $dontshow = true; + } + } else if ($queue) { + $queue->validate_input($_POST, $input_errors); + if (!$input_errors) { + $queue->update_dn_data($_POST); + $queue->wconfig(); + if (write_config()) { + mark_subsystem_dirty('shaper'); + } + $dontshow = false; + } + read_dummynet_config(); + $output_form .= $queue->build_form(); + } else { + $output_form .= $dn_default_shaper_msg; + $dontshow = true; + } +} else { + $output_form .= $dn_default_shaper_msg; + $dontshow = true; +} + +if ($queue) { + if ($queue->GetEnabled()) { + $can_enable = true; + } else { + $can_enable = false; + } + if ($queue->CanHaveChildren()) { + $can_add = true; + } else { + $can_add = false; + } +} + +$tree = "
      "; +if (is_array($dummynet_pipe_list)) { + foreach ($dummynet_pipe_list as $tmpdn) { + $tree .= $tmpdn->build_tree(); + } +} +$tree .= "
    "; + +if (!$dontshow || $newqueue) { + +$output_form .= ""; +$output_form .= gettext("Queue Actions"); +$output_form .= ""; + +$output_form .= ""; +if ($can_add || $addnewaltq) { + $output_form .= "GetQname(); + } + $output_form .= "&action=add\">"; + $output_form .= ""; + $output_form .= ""; +} +$output_form .= "GetQname(); +} +$output_form .= "&action=delete\">"; +$output_form .= ""; +} else { + $output_form .= " value=\"" . gettext("Delete Limiter") ."\" />"; +} +$output_form .= ""; +$output_form .= ""; +$output_form .= ""; +} else { + $output_form .= ""; +} + +$output = ""; +$output .= $output_form; +$closehead = false; +include("head.inc"); +?> + + + + + + + +build_javascript(); +} else { + echo $newjavascript; +} + +include("fbegin.inc"); +?> +
    + + + + + +

    +".gettext("You must apply the changes in order for them to take effect."));?>

    + +
    + + + + +
    + +
    +
    + + 0): ?> + + + + + + + + + +
    + +

    + + " width="17" height="17" border="0" alt="add" />  + +
    +
    +
    + +
    +
    +
    +
    + + + + + diff --git a/src/usr/local/www/firewall_shaper_wizards.php b/src/usr/local/www/firewall_shaper_wizards.php new file mode 100644 index 0000000..583fdef --- /dev/null +++ b/src/usr/local/www/firewall_shaper_wizards.php @@ -0,0 +1,146 @@ + "") { + sigkillbyname('pfctl', SIGKILL); + exit; +} + +if ($_POST['apply']) { + write_config(); + + $retval = 0; + /* Setup pf rules since the user may have changed the optimization value */ + $retval = filter_configure(); + $savemsg = get_std_save_message($retval); + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + + /* reset rrd queues */ + unlink_if_exists("/var/db/rrd/*queuedrops.rrd"); + unlink_if_exists("/var/db/rrd/*queues.rrd"); + enable_rrd_graphing(); + + clear_subsystem_dirty('shaper'); +} + +$pgtitle = array(gettext("Firewall"), gettext("Traffic Shaper"), gettext("Wizards")); +$shortcut_section = "trafficshaper"; + +$wizards = array( + gettext("Multiple Lan/Wan") => "traffic_shaper_wizard_multi_all.xml", + gettext("Dedicated Links") => "traffic_shaper_wizard_dedicated.xml", +); + +$closehead = false; +include("head.inc"); +?> + + + + + + + + +
    + + +

    +".gettext("You must apply the changes in order for them to take effect."));?>

    + + + + + + +
    + +
    +
    + + + + + + $wizard): +?> + + + + + +
    + + +" .$wizard . ""; +?> +
    +
    +
    +
    + + + diff --git a/src/usr/local/www/firewall_virtual_ip.php b/src/usr/local/www/firewall_virtual_ip.php new file mode 100644 index 0000000..148477f --- /dev/null +++ b/src/usr/local/www/firewall_virtual_ip.php @@ -0,0 +1,373 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Includes code from m0n0wall which is: + Copyright (C) 2003-2005 Manuel Kasper . + All rights reserved. + + Includes code from pfSense which is: + Copyright (C) 2004-2005 Scott Ullrich . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/ifconfig + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-firewall-virtualipaddresses +##|*NAME=Firewall: Virtual IP Addresses page +##|*DESCR=Allow access to the 'Firewall: Virtual IP Addresses' page. +##|*MATCH=firewall_virtual_ip.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +if (!is_array($config['virtualip']['vip'])) { + $config['virtualip']['vip'] = array(); +} +$a_vip = &$config['virtualip']['vip']; + +if ($_POST) { + $pconfig = $_POST; + + if ($_POST['apply']) { + $check_carp = false; + if (file_exists("{$g['tmp_path']}/.firewall_virtual_ip.apply")) { + $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.firewall_virtual_ip.apply")); + foreach ($toapplylist as $vid => $ovip) { + if (!empty($ovip)) { + interface_vip_bring_down($ovip); + } + if ($a_vip[$vid]) { + switch ($a_vip[$vid]['mode']) { + case "ipalias": + interface_ipalias_configure($a_vip[$vid]); + break; + case "proxyarp": + interface_proxyarp_configure($a_vip[$vid]['interface']); + break; + case "carp": + $check_carp = true; + interface_carp_configure($a_vip[$vid]); + break; + default: + break; + } + } + } + @unlink("{$g['tmp_path']}/.firewall_virtual_ip.apply"); + } + /* Before changing check #4633 */ + if ($check_carp === true && !get_carp_status()) { + set_single_sysctl("net.inet.carp.allow", "1"); + } + + $retval = 0; + $retval |= filter_configure(); + $savemsg = get_std_save_message($retval); + + clear_subsystem_dirty('vip'); + } +} + +if ($_GET['act'] == "del") { + if ($a_vip[$_GET['id']]) { + /* make sure no inbound NAT mappings reference this entry */ + if (is_array($config['nat']['rule'])) { + foreach ($config['nat']['rule'] as $rule) { + if ($rule['destination']['address'] <> "") { + if ($rule['destination']['address'] == $a_vip[$_GET['id']]['subnet']) { + $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one NAT mapping."); + break; + } + } + } + } + + /* make sure no OpenVPN server or client references this entry */ + $openvpn_types_a = array("openvpn-server" => gettext("server"), "openvpn-client" => gettext("client")); + foreach ($openvpn_types_a as $openvpn_type => $openvpn_type_text) { + if (is_array($config['openvpn'][$openvpn_type])) { + foreach ($config['openvpn'][$openvpn_type] as $openvpn) { + if ($openvpn['ipaddr'] <> "") { + if ($openvpn['ipaddr'] == $a_vip[$_GET['id']]['subnet']) { + if (strlen($openvpn['description'])) { + $openvpn_desc = $openvpn['description']; + } else { + $openvpn_desc = $openvpn['ipaddr'] . ":" . $openvpn['local_port']; + } + $input_errors[] = sprintf(gettext("This entry cannot be deleted because it is still referenced by OpenVPN %s %s."), $openvpn_type_text, $openvpn_desc); + break; + } + } + } + } + } + + if (is_ipaddrv6($a_vip[$_GET['id']]['subnet'])) { + $is_ipv6 = true; + $subnet = gen_subnetv6($a_vip[$_GET['id']]['subnet'], $a_vip[$_GET['id']]['subnet_bits']); + $if_subnet_bits = get_interface_subnetv6($a_vip[$_GET['id']]['interface']); + $if_subnet = gen_subnetv6(get_interface_ipv6($a_vip[$_GET['id']]['interface']), $if_subnet_bits); + } else { + $is_ipv6 = false; + $subnet = gen_subnet($a_vip[$_GET['id']]['subnet'], $a_vip[$_GET['id']]['subnet_bits']); + $if_subnet_bits = get_interface_subnet($a_vip[$_GET['id']]['interface']); + $if_subnet = gen_subnet(get_interface_ip($a_vip[$_GET['id']]['interface']), $if_subnet_bits); + } + + $subnet .= "/" . $a_vip[$_GET['id']]['subnet_bits']; + $if_subnet .= "/" . $if_subnet_bits; + + if (is_array($config['gateways']['gateway_item'])) { + foreach ($config['gateways']['gateway_item'] as $gateway) { + if ($a_vip[$_GET['id']]['interface'] != $gateway['interface']) { + continue; + } + if ($is_ipv6 && $gateway['ipprotocol'] == 'inet') { + continue; + } + if (!$is_ipv6 && $gateway['ipprotocol'] == 'inet6') { + continue; + } + if (ip_in_subnet($gateway['gateway'], $if_subnet)) { + continue; + } + + if (ip_in_subnet($gateway['gateway'], $subnet)) { + $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one Gateway."); + break; + } + } + } + + if ($a_vip[$_GET['id']]['mode'] == "ipalias") { + $subnet = gen_subnet($a_vip[$_GET['id']]['subnet'], $a_vip[$_GET['id']]['subnet_bits']) . "/" . $a_vip[$_GET['id']]['subnet_bits']; + $found_if = false; + $found_carp = false; + $found_other_alias = false; + + if ($subnet == $if_subnet) { + $found_if = true; + } + + $vipiface = $a_vip[$_GET['id']]['interface']; + foreach ($a_vip as $vip_id => $vip) { + if ($vip_id == $_GET['id']) { + continue; + } + + if ($vip['interface'] == $vipiface && ip_in_subnet($vip['subnet'], $subnet)) { + if ($vip['mode'] == "carp") { + $found_carp = true; + } else if ($vip['mode'] == "ipalias") { + $found_other_alias = true; + } + } + } + + if ($found_carp === true && $found_other_alias === false && $found_if === false) { + $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by a CARP IP with the description") . " {$vip['descr']}."; + } + } else if ($a_vip[$_GET['id']]['mode'] == "carp") { + $vipiface = "{$a_vip[$_GET['id']]['interface']}_vip{$a_vip[$_GET['id']]['vhid']}"; + foreach ($a_vip as $vip) { + if ($vipiface == $vip['interface'] && $vip['mode'] == "ipalias") { + $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by an IP alias entry with the description") . " {$vip['descr']}."; + } + } + } + + if (!$input_errors) { + if (!session_id()) { + session_start(); + } + $user = getUserEntry($_SESSION['Username']); + if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) { + header("Location: firewall_virtual_ip.php"); + exit; + } + session_commit(); + + // Special case since every proxyarp vip is handled by the same daemon. + if ($a_vip[$_GET['id']]['mode'] == "proxyarp") { + $viface = $a_vip[$_GET['id']]['interface']; + unset($a_vip[$_GET['id']]); + interface_proxyarp_configure($viface); + } else { + interface_vip_bring_down($a_vip[$_GET['id']]); + unset($a_vip[$_GET['id']]); + } + if (count($config['virtualip']['vip']) == 0) { + unset($config['virtualip']['vip']); + } + write_config(); + header("Location: firewall_virtual_ip.php"); + exit; + } + } +} else if ($_GET['changes'] == "mods" && is_numericint($_GET['id'])) { + $id = $_GET['id']; +} + +$pgtitle = array(gettext("Firewall"), gettext("Virtual IP Addresses")); +include("head.inc"); + +?> + + +
    +".gettext("You must apply the changes in order for them to take effect.")); + } +?> +
    + + + + + + + + +
    + +
    +
    + + + + + + + + + $carpip) { + $interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")"; + } + $interfaces['lo0'] = "Localhost"; + $i = 0; + foreach ($a_vip as $vipent): + if ($vipent['subnet'] <> "" or $vipent['range'] <> "" or $vipent['subnet_bits'] <> "" or (isset($vipent['range']['from']) && $vipent['range']['from'] <> "")): + ?> + + + + + + + + + + + + + + + + + +
    + + + + + +
    edit
    +
    + + +   + + "; elseif ($vipent['mode'] == "carp") echo "carp"; elseif ($vipent['mode'] == "other") echo "other"; elseif ($vipent['mode'] == "ipalias") echo "ip alias";?> + +   + + + + + + +
    editdelete
    +
    + + + + + +
    edit
    +
    +

    +
    +
    + .
    +

    +
    +
    +
    +
    + + + diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php new file mode 100644 index 0000000..6021115 --- /dev/null +++ b/src/usr/local/www/firewall_virtual_ip_edit.php @@ -0,0 +1,572 @@ +. + All rights reserved. + + Includes code from m0n0wall which is: + Copyright (C) 2003-2005 Manuel Kasper . + All rights reserved. + + Includes code from pfSense which is: + Copyright (C) 2004-2005 Scott Ullrich . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/ifconfig + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-firewall-virtualipaddress-edit +##|*NAME=Firewall: Virtual IP Address: Edit page +##|*DESCR=Allow access to the 'Firewall: Virtual IP Address: Edit' page. +##|*MATCH=firewall_virtual_ip_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter.inc"); +require("shaper.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_virtual_ip.php'); +} + +if (!is_array($config['virtualip']['vip'])) { + $config['virtualip']['vip'] = array(); +} +$a_vip = &$config['virtualip']['vip']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +function return_first_two_octets($ip) { + $ip_split = explode(".", $ip); + return $ip_split[0] . "." . $ip_split[1]; +} + +function find_last_used_vhid() { + global $config, $g; + $vhid = 0; + foreach ($config['virtualip']['vip'] as $vip) { + if ($vip['vhid'] > $vhid) { + $vhid = $vip['vhid']; + } + } + return $vhid; +} + +if (isset($id) && $a_vip[$id]) { + $pconfig['mode'] = $a_vip[$id]['mode']; + $pconfig['vhid'] = $a_vip[$id]['vhid']; + $pconfig['advskew'] = $a_vip[$id]['advskew']; + $pconfig['advbase'] = $a_vip[$id]['advbase']; + $pconfig['password'] = $a_vip[$id]['password']; + $pconfig['range'] = $a_vip[$id]['range']; + $pconfig['subnet'] = $a_vip[$id]['subnet']; + $pconfig['subnet_bits'] = $a_vip[$id]['subnet_bits']; + $pconfig['noexpand'] = $a_vip[$id]['noexpand']; + $pconfig['descr'] = $a_vip[$id]['descr']; + $pconfig['type'] = $a_vip[$id]['type']; + $pconfig['interface'] = $a_vip[$id]['interface']; + $pconfig['uniqid'] = $a_vip[$id]['interface']; +} else { + $lastvhid = find_last_used_vhid(); + $lastvhid++; + $pconfig['vhid'] = $lastvhid; + $pconfig['uniqid'] = uniqid(); +} + +if ($_POST) { + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "mode"); + $reqdfieldsn = array(gettext("Type")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($_POST['subnet']) { + $_POST['subnet'] = trim($_POST['subnet']); + } + + if ($_POST['subnet']) { + if (!is_ipaddr($_POST['subnet'])) { + $input_errors[] = gettext("A valid IP address must be specified."); + } else { + if (isset($id) && isset($a_vip[$id])) { + $ignore_if = $a_vip[$id]['interface']; + $ignore_mode = $a_vip[$id]['mode']; + if (isset($a_vip[$id]['vhid'])) { + $ignore_vhid = $a_vip[$id]['vhid']; + } + } else { + $ignore_if = $_POST['interface']; + $ignore_mode = $_POST['mode']; + } + + if (!isset($ignore_vhid)) { + $ignore_vhid = $_POST['vhid']; + } + + if ($ignore_mode == 'carp') { + $ignore_if .= "_vip{$ignore_vhid}"; + } else { + $ignore_if .= "_virtualip{$id}"; + } + + if (is_ipaddr_configured($_POST['subnet'], $ignore_if)) { + $input_errors[] = gettext("This IP address is being used by another interface or VIP."); + } + + unset($ignore_if, $ignore_mode); + } + } + + $natiflist = get_configured_interface_with_descr(); + foreach ($natiflist as $natif => $natdescr) { + if ($_POST['interface'] == $natif && (empty($config['interfaces'][$natif]['ipaddr']) && empty($config['interfaces'][$natif]['ipaddrv6']))) { + $input_errors[] = gettext("The interface chosen for the VIP has no IPv4 or IPv6 address configured so it cannot be used as a parent for the VIP."); + } + } + + /* ipalias and carp should not use network or broadcast address */ + if ($_POST['mode'] == "ipalias" || $_POST['mode'] == "carp") { + if (is_ipaddrv4($_POST['subnet']) && $_POST['subnet_bits'] != "32") { + $network_addr = gen_subnet($_POST['subnet'], $_POST['subnet_bits']); + $broadcast_addr = gen_subnet_max($_POST['subnet'], $_POST['subnet_bits']); + } else if (is_ipaddrv6($_POST['subnet']) && $_POST['subnet_bits'] != "128") { + $network_addr = gen_subnetv6($_POST['subnet'], $_POST['subnet_bits']); + $broadcast_addr = gen_subnetv6_max($_POST['subnet'], $_POST['subnet_bits']); + } + + if (isset($network_addr) && $_POST['subnet'] == $network_addr) { + $input_errors[] = gettext("You cannot use the network address for this VIP"); + } else if (isset($broadcast_addr) && $_POST['subnet'] == $broadcast_addr) { + $input_errors[] = gettext("You cannot use the broadcast address for this VIP"); + } + } + + /* make sure new ip is within the subnet of a valid ip + * on one of our interfaces (wan, lan optX) + */ + switch ($_POST['mode']) { + case 'carp': + /* verify against reusage of vhids */ + $idtracker = 0; + foreach ($config['virtualip']['vip'] as $vip) { + if ($vip['vhid'] == $_POST['vhid'] && $vip['interface'] == $_POST['interface'] && $idtracker <> $id) { + $input_errors[] = sprintf(gettext("VHID %s is already in use on interface %s. Pick a unique number on this interface."), $_POST['vhid'], convert_friendly_interface_to_friendly_descr($_POST['interface'])); + } + $idtracker++; + } + if (empty($_POST['password'])) { + $input_errors[] = gettext("You must specify a CARP password that is shared between the two VHID members."); + } + + if ($_POST['interface'] == 'lo0') { + $input_errors[] = gettext("For this type of vip localhost is not allowed."); + } else if (strpos($_POST['interface'], '_vip')) { + $input_errors[] = gettext("A CARP parent interface can only be used with IP Alias type Virtual IPs."); + } + break; + case 'ipalias': + if (strstr($_POST['interface'], "_vip")) { + if (is_ipaddrv4($_POST['subnet'])) { + $parent_ip = get_interface_ip($_POST['interface']); + $parent_sn = get_interface_subnet($_POST['interface']); + $subnet = gen_subnet($parent_ip, $parent_sn); + } else if (is_ipaddrv6($_POST['subnet'])) { + $parent_ip = get_interface_ipv6($_POST['interface']); + $parent_sn = get_interface_subnetv6($_POST['interface']); + $subnet = gen_subnetv6($parent_ip, $parent_sn); + } + if (isset($parent_ip) && !ip_in_subnet($_POST['subnet'], "{$subnet}/{$parent_sn}") && + !ip_in_interface_alias_subnet(link_carp_interface_to_parent($_POST['interface']), $_POST['subnet'])) { + $cannot_find = $_POST['subnet'] . "/" . $_POST['subnet_bits'] ; + $input_errors[] = sprintf(gettext("Sorry, we could not locate an interface with a matching subnet for %s. Please add an IP alias in this subnet on this interface."), $cannot_find); + } + unset($parent_ip, $parent_sn, $subnet); + } + break; + default: + if ($_POST['interface'] == 'lo0') { + $input_errors[] = gettext("For this type of vip localhost is not allowed."); + } else if (strpos($_POST['interface'], '_vip')) { + $input_errors[] = gettext("A CARP parent interface can only be used with IP Alias type Virtual IPs."); + } + break; + } + + if (!$input_errors) { + $vipent = array(); + + $vipent['mode'] = $_POST['mode']; + $vipent['interface'] = $_POST['interface']; + + /* ProxyARP specific fields */ + if ($_POST['mode'] === "proxyarp") { + if ($_POST['type'] == "range") { + $vipent['range']['from'] = $_POST['range_from']; + $vipent['range']['to'] = $_POST['range_to']; + + } + $vipent['noexpand'] = isset($_POST['noexpand']); + } + + /* CARP specific fields */ + if ($_POST['mode'] === "carp") { + $vipent['vhid'] = $_POST['vhid']; + $vipent['vhid'] = $_POST['uinqid']; + $vipent['advskew'] = $_POST['advskew']; + $vipent['advbase'] = $_POST['advbase']; + $vipent['password'] = $_POST['password']; + } + + /* Common fields */ + $vipent['descr'] = $_POST['descr']; + if (isset($_POST['type'])) { + $vipent['type'] = $_POST['type']; + } else { + $vipent['type'] = "single"; + } + + if ($vipent['type'] == "single" || $vipent['type'] == "network") { + if (!isset($_POST['subnet_bits'])) { + $vipent['subnet_bits'] = "32"; + } else { + $vipent['subnet_bits'] = $_POST['subnet_bits']; + } + $vipent['subnet'] = $_POST['subnet']; + } + + if (!isset($id)) { + $id = count($a_vip); + } + if (file_exists("{$g['tmp_path']}/.firewall_virtual_ip.apply")) { + $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.firewall_virtual_ip.apply")); + } else { + $toapplylist = array(); + } + + $toapplylist[$id] = $a_vip[$id]; + if (!empty($a_vip[$id])) { + /* modify all virtual IP rules with this address */ + for ($i = 0; isset($config['nat']['rule'][$i]); $i++) { + if ($config['nat']['rule'][$i]['destination']['address'] == $a_vip[$id]['subnet']) { + $config['nat']['rule'][$i]['destination']['address'] = $vipent['subnet']; + } + } + } + $a_vip[$id] = $vipent; + + if (write_config()) { + mark_subsystem_dirty('vip'); + file_put_contents("{$g['tmp_path']}/.firewall_virtual_ip.apply", serialize($toapplylist)); + } + header("Location: firewall_virtual_ip.php"); + exit; + } +} + +$pgtitle = array(gettext("Firewall"), gettext("Virtual IP Address"), gettext("Edit")); +include("head.inc"); + +?> + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + /> + /> + /> + /> +
    + +
    + + + + + + + + + + + + + + + + + + */ +?> +
       + +
       + + / + + +
       + /> + Disable expansion of this entry into IPs on NAT lists (e.g. 192.168.1.0/24 expands to 256 entries.) +
    Range:   +- + +
    +
    +
    +
    + +
    +
    + Base: + + Skew: + +

    + +
    + +
    + +
      + " /> + " onclick="window.location.href=''" /> + + + + + +
    + + +
    +
       + +

        . +
    +
    +
    + + + + diff --git a/src/usr/local/www/getserviceproviders.php b/src/usr/local/www/getserviceproviders.php new file mode 100644 index 0000000..cb456aa --- /dev/null +++ b/src/usr/local/www/getserviceproviders.php @@ -0,0 +1,150 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: ajax +*/ + +##|+PRIV +##|*IDENT=page-getserviceproviders +##|*NAME=AJAX: Get Service Providers +##|*DESCR=Allow access to the 'AJAX: Service Providers' page. +##|*MATCH=getserviceproviders.php* +##|-PRIV +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); + +$serviceproviders_xml = "/usr/local/share/mobile-broadband-provider-info/serviceproviders.xml"; +$serviceproviders_contents = file_get_contents($serviceproviders_xml); +$serviceproviders_attr = xml2array($serviceproviders_contents, 1, "attr"); + +$serviceproviders = &$serviceproviders_attr['serviceproviders']['country']; + +function get_country_providers($country) { + global $serviceproviders; + foreach ($serviceproviders as $sp) { + if ($sp['attr']['code'] == strtolower($country)) { + return is_array($sp['provider'][0]) ? $sp['provider'] : array($sp['provider']); + } + } + return $provider_list; +} + +function country_list() { + global $serviceproviders; + $country_list = get_country_name("ALL"); + foreach ($serviceproviders as $sp) { + foreach ($country_list as $country) { + if (strtoupper($sp['attr']['code']) == $country['code']) { + echo $country['name'] . ":" . $country['code'] . "\n"; + } + } + } +} + +function providers_list($country) { + $serviceproviders = get_country_providers($country); + foreach ($serviceproviders as $sp) { + echo $sp['name']['value'] . "\n"; + } +} + +function provider_plan_data($country, $provider, $connection) { + header("Content-type: application/xml;"); + echo "\n"; + echo "\n"; + $serviceproviders = get_country_providers($country); + foreach ($serviceproviders as $sp) { + if (strtolower($sp['name']['value']) == strtolower($provider)) { + if (strtoupper($connection) == "CDMA") { + $conndata = $sp['cdma']; + } else { + if (!is_array($sp['gsm']['apn'][0])) { + $conndata = $sp['gsm']['apn']; + } else { + foreach ($sp['gsm']['apn'] as $apn) { + if ($apn['attr']['value'] == $connection) { + $conndata = $apn; + break; + } + } + } + } + if (is_array($conndata)) { + echo "" . $connection . "\n"; + echo "" . $conndata['username']['value'] . "\n"; + echo "" . $conndata['password']['value'] . "\n"; + + $dns_arr = is_array($conndata['dns'][0]) ? $conndata['dns'] : array($conndata['dns']); + foreach ($dns_arr as $dns) { + echo '' . $dns['value'] . "\n"; + } + } + break; + } + } + echo ""; +} + +function provider_plans_list($country, $provider) { + $serviceproviders = get_country_providers($country); + foreach ($serviceproviders as $sp) { + if (strtolower($sp['name']['value']) == strtolower($provider)) { + if (array_key_exists('gsm', $sp)) { + if (array_key_exists('attr', $sp['gsm']['apn'])) { + $name = ($sp['gsm']['apn']['name'] ? $sp['gsm']['apn']['name'] : $sp['name']['value']); + echo $name . ":" . $sp['gsm']['apn']['attr']['value']; + } else { + foreach ($sp['gsm']['apn'] as $apn_info) { + $name = ($apn_info['name']['value'] ? $apn_info['name']['value'] : $apn_info['gsm']['apn']['name']); + echo $name . ":" . $apn_info['attr']['value'] . "\n"; + } + } + } + if (array_key_exists('cdma', $sp)) { + $name = $sp['cdma']['name']['value'] ? $sp['cdma']['name']['value']:$sp['name']['value']; + echo $name . ":" . "CDMA"; + } + } + } +} + +$_GET_OR_POST = ($_SERVER['REQUEST_METHOD'] === 'POST') ? $_POST : $_GET; + +if (isset($_GET_OR_POST['country']) && !isset($_GET_OR_POST['provider'])) { + providers_list($_GET_OR_POST['country']); +} elseif (isset($_GET_OR_POST['country']) && isset($_GET_OR_POST['provider'])) { + if (isset($_GET_OR_POST['plan'])) { + provider_plan_data($_GET_OR_POST['country'], $_GET_OR_POST['provider'], $_GET_OR_POST['plan']); + } else { + provider_plans_list($_GET_OR_POST['country'], $_GET_OR_POST['provider']); + } +} else { + country_list(); +} +?> diff --git a/src/usr/local/www/getstats.php b/src/usr/local/www/getstats.php new file mode 100644 index 0000000..886114b --- /dev/null +++ b/src/usr/local/www/getstats.php @@ -0,0 +1,50 @@ + diff --git a/src/usr/local/www/graph.php b/src/usr/local/www/graph.php new file mode 100755 index 0000000..d637836 --- /dev/null +++ b/src/usr/local/www/graph.php @@ -0,0 +1,408 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: graph +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-interfacetraffic +##|*NAME=Diagnostics: Interface Traffic page +##|*DESCR=Allow access to the 'Diagnostics: Interface Traffic' page. +##|*MATCH=graph.php* +##|-PRIV + +require("globals.inc"); +require("guiconfig.inc"); + +header("Last-Modified: " . gmdate("D, j M Y H:i:s") . " GMT"); +header("Expires: " . gmdate("D, j M Y H:i:s", time()) . " GMT"); +header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP/1.1 +header("Pragma: no-cache"); // HTTP/1.0 +header("Content-type: image/svg+xml"); + +/********** HTTP GET Based Conf ***********/ +$ifnum = @$_GET["ifnum"]; // BSD / SNMP interface name / number +$ifnum = get_real_interface($ifnum); +$ifname = @$_GET["ifname"]?$_GET["ifname"]:"Interface $ifnum"; //Interface name that will be showed on top right of graph + +/********* Other conf *******/ +if (isset($config["widgets"]["trafficgraphs"]["scale_type"])) { + $scale_type = $config["widgets"]["trafficgraphs"]["scale_type"]; +} else { + $scale_type = "up"; +} + +$nb_plot=120; //NB plot in graph +if ($_GET["timeint"]) { + $time_interval = $_GET["timeint"]; //Refresh time Interval +} else { + $time_interval = 3; +} + +if ($_GET["initdelay"]) { + $init_delay = $_GET["initdelay"]; //Initial Delay +} else { + $init_delay = 3; +} + +//SVG attributes +$attribs['axis']='fill="black" stroke="black"'; +$attribs['in']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="7"'; +$attribs['out']='fill="#000000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="7"'; +$attribs['graph_in']='fill="none" stroke="#FF0000" stroke-opacity="0.8"'; +$attribs['graph_out']='fill="none" stroke="#000000" stroke-opacity="0.8"'; +$attribs['legend']='fill="black" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"'; +$attribs['graphname']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="8"'; +$attribs['grid_txt']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="6"'; +$attribs['grid']='stroke="gray" stroke-opacity="0.5"'; +$attribs['switch_unit']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4" text-decoration="underline"'; +$attribs['switch_scale']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4" text-decoration="underline"'; +$attribs['error']='fill="blue" font-family="Arial" font-size="4"'; +$attribs['collect_initial']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"'; + +//Error text if we cannot fetch data : depends on which method is used +$error_text = "Cannot get data about interface " . htmlspecialchars($ifnum); + +$height=100; //SVG internal height : do not modify +$width=200; //SVG internal width : do not modify + +$fetch_link = "ifstats.php?if=" . htmlspecialchars($ifnum); + +/* check for custom theme colors */ +if (file_exists("/usr/local/www/themes/{$g['theme']}/graph.php")) { + $themetxt = file_get_contents("/usr/local/www/themes/{$g['theme']}/graph.php"); + eval($themetxt); +} + +/********* Graph DATA **************/ +print('' . "\n");?> + + + + /> + /> + /> + /> + /> + text-anchor="end"> + text-anchor="end"> + text-anchor="end"> + > + > + > + > + text-anchor="end"> + > + > () + > + > + > + points=" "/> + text-anchor="middle"> + text-anchor="middle">... + + + diff --git a/src/usr/local/www/graph_cpu.php b/src/usr/local/www/graph_cpu.php new file mode 100644 index 0000000..80d97f1 --- /dev/null +++ b/src/usr/local/www/graph_cpu.php @@ -0,0 +1,211 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: graph +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-cpuutilization +##|*NAME=Diagnostics: CPU Utilization page +##|*DESCR=Allow access to the 'Diagnostics: CPU Utilization' page. +##|*MATCH=graph_cpu.php* +##|-PRIV + +require_once("guiconfig.inc"); + +header("Last-Modified: " . gmdate("D, j M Y H:i:s") . " GMT"); +header("Expires: " . gmdate("D, j M Y H:i:s", time()) . " GMT"); +header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP/1.1 +header("Pragma: no-cache"); // HTTP/1.0 +header("Content-type: image/svg+xml"); + +/********* Other conf *******/ + +$nb_plot = 120; // maximum number of data points to plot in the graph +$fetch_link = "stats.php?stats=cpu"; + +//SVG attributes +$attribs['axis']='fill="black" stroke="black"'; +$attribs['cpu']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="7"'; +$attribs['graph_cpu']='fill="none" stroke="#FF0000" stroke-opacity="0.8"'; +$attribs['legend']='fill="black" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"'; +$attribs['grid_txt']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="6"'; +$attribs['grid']='stroke="gray" stroke-opacity="0.5"'; +$attribs['error']='fill="blue" font-family="Arial" font-size="4"'; +$attribs['collect_initial']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"'; + +$height=100; // SVG internal height : do not modify +$width=200; // SVG internal width : do not modify + +/********* Graph DATA **************/ +print('' . "\n");?> + + + + /> + /> + points=" "/> + /> + /> + text-anchor="end">75% + text-anchor="end">50% + text-anchor="end">25% + > + text-anchor="middle"> + text-anchor="middle">... + + + diff --git a/src/usr/local/www/green_dot.jpg b/src/usr/local/www/green_dot.jpg new file mode 100755 index 0000000..9df0abf Binary files /dev/null and b/src/usr/local/www/green_dot.jpg differ diff --git a/src/usr/local/www/gui.css b/src/usr/local/www/gui.css new file mode 100755 index 0000000..d93c4d9 --- /dev/null +++ b/src/usr/local/www/gui.css @@ -0,0 +1,363 @@ +/* + pfSense_MODULE: base +*/ + +html,body { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; +} +td,th,input,select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; +} +form { + margin: 0px; +} +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +a { + text-decoration: none; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 0.9em; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #FFFFFF; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listrborder { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc new file mode 100644 index 0000000..3b36f5f --- /dev/null +++ b/src/usr/local/www/guiconfig.inc @@ -0,0 +1,1252 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: base +*/ + +/* Include authentication routines */ +/* THIS MUST BE ABOVE ALL OTHER CODE */ +if (!$nocsrf) { + function csrf_startup() { + csrf_conf('rewrite-js', '/csrf/csrf-magic.js'); + $timeout_minutes = isset($config['system']['webgui']['session_timeout']) ? $config['system']['webgui']['session_timeout'] : 240; + csrf_conf('expires', $timeout_minutes * 60); + } + require_once("csrf/csrf-magic.php"); +} + +/* make sure nothing is cached */ +if (!$omit_nocacheheaders) { + header("Expires: 0"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: no-cache, no-store, must-revalidate"); + header("Pragma: no-cache"); +} + +header("X-Frame-Options: SAMEORIGIN"); +require_once("authgui.inc"); + +/* parse the configuration and include all configuration functions */ +require_once("functions.inc"); + +/* Pull in all the gui related display classes) */ +foreach (scandir("/usr/local/www/classes/") as $file) { + if (substr($file, -4) == ".inc") { + require_once("classes/{$file}"); + } +} + +$g['theme'] = get_current_theme(); + +/* Set the default interface language */ +if ($config['system']['language'] <> "") { + $g['language'] = $config['system']['language']; +} elseif ($g['language'] == "") { + $g['language'] = 'en_US'; +} + +set_language($g['language']); + +/* used by progress bar */ +$lastseen = "-1"; + +$navlevelsep = ": "; /* navigation level separator string */ +$mandfldhtml = ""; /* display this before mandatory input fields */ +$mandfldhtmlspc = ""; /* same as above, but with spacing */ + +/* Some ajax scripts still need access to GUI */ +if (!$ignorefirmwarelock) { + if (is_subsystem_dirty('firmwarelock')) { + if (!$d_isfwfile) { + header("Location: system_firmware.php"); + exit; + } else { + return; + } + } +} + +/* Reserved table names to avoid collision */ +$reserved_table_names = array( + "bogons", + "bogonsv6", + "negate_networks", + "snort2c", + "sshlockout", + "tonatsubnets", + "virusprot", + "vpn_networks", + "webConfiguratorlockout" +); + +$firewall_rules_dscp_types = array( + "af11", + "af12", + "af13", + "af21", + "af22", + "af23", + "af31", + "af32", + "af33", + "af41", + "af42", + "af43", + "VA", + "EF", + "cs1", + "cs2", + "cs3", + "cs4", + "cs5", + "cs6", + "cs7", + "0x01", + "0x02", + "0x04"); + +$auth_server_types = array( + 'ldap' => "LDAP", + 'radius' => "Radius"); + +$ldap_urltypes = array( + 'TCP - Standard' => 389, + 'SSL - Encrypted' => 636); + +$ldap_scopes = array( + 'one' => "One Level", + 'subtree' => "Entire Subtree"); + +$ldap_protvers = array( + 2, + 3); + +$ldap_templates = array( + + 'open' => array( + 'desc' => "OpenLDAP", + 'attr_user' => "cn", + 'attr_group' => "cn", + 'attr_member' => "member"), + + 'msad' => array( + 'desc' => "Microsoft AD", + 'attr_user' => "samAccountName", + 'attr_group' => "cn", + 'attr_member' => "memberOf"), + + 'edir' => array( + 'desc' => "Novell eDirectory", + 'attr_user' => "cn", + 'attr_group' => "cn", + 'attr_member' => "uniqueMember")); + +$radius_srvcs = array( + 'both' => "Authentication and Accounting", + 'auth' => "Authentication", + 'acct' => "Accounting"); + +$netbios_nodetypes = array( + '0' => "none", + '1' => "b-node", + '2' => "p-node", + '4' => "m-node", + '8' => "h-node"); + +/* some well known ports */ +$wkports = array( + 5999 => "CVSup", + 53 => "DNS", + 21 => "FTP", + 3000 => "HBCI", + 80 => "HTTP", + 443 => "HTTPS", + 5190 => "ICQ", + 113 => "IDENT/AUTH", + 143 => "IMAP", + 993 => "IMAP/S", + 4500 => "IPsec NAT-T", + 500 => "ISAKMP", + 1701 => "L2TP", + 389 => "LDAP", + 1755 => "MMS/TCP", + 7000 => "MMS/UDP", + 445 => "MS DS", + 3389 => "MS RDP", + 1512 => "MS WINS", + 1863 => "MSN", + 119 => "NNTP", + 123 => "NTP", + 138 => "NetBIOS-DGM", + 137 => "NetBIOS-NS", + 139 => "NetBIOS-SSN", + 1194 => "OpenVPN", + 110 => "POP3", + 995 => "POP3/S", + 1723 => "PPTP", + 1812 => "RADIUS", + 1813 => "RADIUS accounting", + 5004 => "RTP", + 5060 => "SIP", + 25 => "SMTP", + 465 => "SMTP/S", + 161 => "SNMP", + 162 => "SNMP-Trap", + 22 => "SSH", + 3478 => "STUN", + 587 => "SUBMISSION", + 3544 => "Teredo", + 23 => "Telnet", + 69 => "TFTP", + 5900 => "VNC"); + +/* TCP flags */ +$tcpflags = array("fin", "syn", "rst", "psh", "ack", "urg", "ece", "cwr"); + +$specialnets = array("(self)" => "This Firewall", "pptp" => "PPTP clients", "pppoe" => "PPPoE clients", "l2tp" => "L2TP clients"); + +$spiflist = get_configured_interface_with_descr(false, true); +foreach ($spiflist as $ifgui => $ifdesc) { + $specialnets[$ifgui] = $ifdesc . " net"; + $specialnets[$ifgui . 'ip'] = $ifdesc . " address"; +} + +$medias = array( + "auto" => "autoselect", + "100full" => "100BASE-TX full-duplex", + "100half" => "100BASE-TX half-duplex", + "10full" => "10BASE-T full-duplex", + "10half" => "10BASE-T half-duplex"); + +$wlan_modes = array( + "bss" => "Infrastructure (BSS)", + "adhoc" => "Ad-hoc (IBSS)", + "hostap" => "Access Point"); + +function do_input_validation($postdata, $reqdfields, $reqdfieldsn, &$input_errors) { + + /* check for bad control characters */ + foreach ($postdata as $pn => $pd) { + if (is_string($pd) && preg_match("/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/", $pd)) { + $input_errors[] = sprintf(gettext("The field %s contains invalid characters."), $pn); + } + } + + for ($i = 0; $i < count($reqdfields); $i++) { + if ($_POST[$reqdfields[$i]] == "" && $_REQUEST[$reqdfields[$i]] == "") { + $input_errors[] = sprintf(gettext("The field %s is required."), $reqdfieldsn[$i]); + } + } +} + +function print_input_errors($input_errors) { + global $g; + + print << + + + + + +
    + errors + +EOF; + echo "

    " . gettext("The following input errors were detected:") . "

    \n
      "; + foreach ($input_errors as $ierr) { + echo "
    • " . htmlspecialchars($ierr) . "
    • "; + } + + print << +
    + +  
    +EOF2; + +} + +function verify_gzip_file($fname) { + $returnvar = mwexec("/usr/bin/gzip -t " . escapeshellarg($fname)); + if ($returnvar != 0) { + return 0; + } else { + return 1; + } +} + +function print_info_box_np($msg, $name = "apply", $value = "", $showapply = false) { + global $g, $nifty_redbox, $nifty_blackbox, $nifty_background; + + if (empty($value)) { + $value = gettext("Apply changes"); + } + + // Set the Nifty background color if one is not set already (defaults to white) + if ($nifty_background == "") { + $nifty_background = "#FFF"; + } + + if (stristr($msg, gettext("apply")) != false || stristr($msg, gettext("save")) != false || stristr($msg, gettext("create")) != false || $showapply) { + $savebutton = ""; + $savebutton .= ""; + if ($_POST['if']) { + $savebutton .= ""; + } + $savebutton .= ""; + } + $nifty_redbox = "#990000"; + $nifty_blackbox = "#000000"; + + $themename = $g['theme']; + + if (file_exists("/usr/local/www/themes/{$themename}/tabcontrols.php")) { + $toeval = file_get_contents("/usr/local/www/themes/{$themename}/tabcontrols.php"); + eval($toeval); + } + + if (file_exists("/usr/local/www/themes/{$themename}/infobox.php")) { + $toeval = file_get_contents("/usr/local/www/themes/{$themename}/infobox.php"); + eval($toeval); + } + + if (!$savebutton) { + $savebutton = ""; + } + + echo << + + +
    + + + + + {$savebutton} + +
    +    exclamation + + {$msg} +
    +
    +
    +

     

    +
    + + + + +EOFnp; + +} + +function print_info_box_np_undo($msg, $name = "apply", $value = "Apply changes", $undo) { + global $g; + + if (stristr($msg, "apply") != false || stristr($msg, "save") != false || stristr($msg, "create") != false) { + $savebutton = ""; + $savebutton .= ""; + $savebutton .= ""; + $savebutton .= ""; + if ($_POST['if']) { + $savebutton .= ""; + } + } + $nifty_redbox = "#990000"; + $nifty_blackbox = "#000000"; + + $themename = $g['theme']; + + if (file_exists("/usr/local/www/themes/{$themename}/tabcontrols.php")) { + $toeval = file_get_contents("/usr/local/www/themes/{$themename}/tabcontrols.php"); + eval($toeval); + } + + if (file_exists("/usr/local/www/themes/{$themename}/infobox.php")) { + $toeval = file_get_contents("/usr/local/www/themes/{$themename}/infobox.php"); + eval($toeval); + } + + + if (!$savebutton) { + $savebutton = ""; + } + + echo << + + +
    + + + + + {$savebutton} + {$undobutton} + +
    +    exclamation + + {$msg} +
    +
    +
    +

     

    +
    + + + + +EOFnp; + +} + +function print_info_box($msg) { + print_info_box_np($msg); +} + +function get_std_save_message($ok) { + global $d_sysrebootreqd_path; + $filter_related = false; + $filter_pages = array("nat", "filter"); + $to_return = gettext("The changes have been applied successfully."); + foreach ($filter_pages as $fp) { + if (stristr($_SERVER['SCRIPT_FILENAME'], $fp)) { + $filter_related = true; + } + } + if ($filter_related) { + $to_return .= "
    " . gettext("You can also monitor the filter reload progress."); + } + return $to_return; +} + +function pprint_address($adr) { + global $specialnets; + + if (isset($adr['any'])) { + $padr = "*"; + } else if ($adr['network']) { + $padr = $specialnets[$adr['network']]; + } else { + $padr = $adr['address']; + } + + if (isset($adr['not'])) { + $padr = "! " . $padr; + } + + return $padr; +} + +function pprint_port($port) { + global $wkports; + + $pport = ""; + + if (!$port) { + return "*"; + } else { + $srcport = explode("-", $port); + if ((!$srcport[1]) || ($srcport[0] == $srcport[1])) { + $pport = $srcport[0]; + if ($wkports[$srcport[0]]) { + $pport .= " (" . $wkports[$srcport[0]] . ")"; + } + } else { + $pport .= $srcport[0] . " - " . $srcport[1]; + } + } + + return $pport; +} + +function firewall_check_for_advanced_options(&$item) { + $item_set = ""; + if ($item['os']) { + $item_set .= "os {$item['os']} "; + } + if ($item['dscp']) { + $item_set .= "dscp {$item['dscp']} "; + } + if ($item['max']) { + $item_set .= "max {$item['max']} "; + } + if ($item['max-src-nodes']) { + $item_set .= "max-src-nodes {$item['max-src-nodes']} "; + } + if ($item['max-src-conn']) { + $item_set .= "max-src-conn {$item['max-src-conn']} "; + } + if ($item['max-src-states']) { + $item_set .= "max-src-states {$item['max-src-states']} "; + } + if (isset($item['nopfsync'])) { + $item_set .= "nopfsync "; + } + if ($item['statetype'] != "keep state" && $item['statetype'] != "") { + $item_set .= "statetype {$item['statetype']} "; + } + if ($item['statetimeout']) { + $item_set .= "statetimeout {$item['statetimeout']} "; + } + if (isset($item['nosync'])) { + $item_set .= "no XMLRPC Sync "; + } + if ($item['max-src-conn-rate']) { + $item_set .= "max-src-conn-rate {$item['max-src-conn-rate']} "; + } + if ($item['max-src-conn-rates']) { + $item_set .= "max-src-conn-rates {$item['max-src-conn-rates']} "; + } + if ($item['vlanprio']) { + $item_set .= "vlanprio {$item['vlanprio']} "; + } + if ($item['vlanprioset']) { + $item_set .= "vlanprioset {$item['vlanprioset']} "; + } + if ($item['gateway']) { + $item_set .= "gateway {$item['gateway']} "; + } + if ($item['dnpipe']) { + $item_set .= "limiter {$item['dnpipe']} "; + } + if ($item['pdnpipe']) { + $item_set .= "limiter {$item['pdnpipe']} "; + } + if ($item['ackqueue']) { + $item_set .= "ackqueue {$item['ackqueue']} "; + } + if ($item['defaultqueue']) { + $item_set .= "defaultqueue {$item['defaultqueue']} "; + } + if ($item['l7container']) { + $item_set .= "layer7 {$item['l7container']} "; + } + if ($item['tag']) { + $item_set .= "tag {$item['tag']} "; + } + if ($item['tagged']) { + $item_set .= "tagged {$item['tagged']} "; + } + if (isset($item['allowopts'])) { + $item_set .= "allowopts "; + } + if (isset($item['disablereplyto'])) { + $item_set .= "disable reply-to "; + } + if ($item['tcpflags_any'] || $item['tcpflags1'] || $item['tcpflags2']) { + $item_set .= "tcpflags set"; + } + + return $item_set; +} + +function gentitle($title) { + global $navlevelsep; + if (!is_array($title)) { + return $title; + } else { + return join($navlevelsep, $title); + } +} + +function genhtmltitle($title) { + global $config; + return gentitle($title); +} + +/* update the changedesc and changecount(er) variables */ +function update_changedesc($update) { + global $changedesc; + global $changecount; + + $changedesc .= " {$update}"; + $changecount++; +} + +function clear_log_file($logfile = "/var/log/system.log", $restart_syslogd = true) { + global $config, $g; + if ($restart_syslogd) { + exec("/usr/bin/killall syslogd"); + } + if (isset($config['system']['disablesyslogclog'])) { + unlink($logfile); + touch($logfile); + } else { + $log_size = isset($config['syslog']['logfilesize']) ? $config['syslog']['logfilesize'] : "511488"; + if (isset($config['system']['usefifolog'])) { + exec("/usr/sbin/fifolog_create -s {$log_size} " . escapeshellarg($logfile)); + } else { + exec("/usr/local/sbin/clog -i -s {$log_size} " . escapeshellarg($logfile)); + } + } + if ($restart_syslogd) { + system_syslogd_start(); + } +} + +function clear_all_log_files() { + global $g; + exec("/usr/bin/killall syslogd"); + + $log_files = array("system", "filter", "dhcpd", "vpn", "pptps", "poes", "l2tps", "openvpn", "portalauth", "ipsec", "ppp", "relayd", "wireless", "lighttpd", "ntpd", "gateways", "resolver", "routing"); + foreach ($log_files as $lfile) { + clear_log_file("{$g['varlog_path']}/{$lfile}.log", false); + } + + system_syslogd_start(); + killbyname("dhcpd"); + services_dhcpd_configure(); + return; +} + +function dump_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert = "") { + global $g, $config; + $sor = isset($config['syslog']['reverse']) ? "-r" : ""; + $logarr = ""; + $grepline = " "; + if (is_array($grepfor)) { + $grepline .= " | /usr/bin/egrep " . escapeshellarg(implode("|", $grepfor)); + } + if (is_array($grepinvert)) { + $grepline .= " | /usr/bin/egrep -v " . escapeshellarg(implode("|", $grepinvert)); + } + if (is_dir($logfile)) { + $logarr = array("File $logfile is a directory."); + } elseif (file_exists($logfile) && filesize($logfile) == 0) { + $logarr = array("Log file started."); + } else { + if ($config['system']['disablesyslogclog']) { + exec("cat " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr); + } else { + if (isset($config['system']['usefifolog'])) { + exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr); + } else { + exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . "{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr); + } + } + } + foreach ($logarr as $logent) { + $logent = preg_split("/\s+/", $logent, 6); + echo "\n"; + if ($withorig) { + if (isset($config['system']['usefifolog'])) { + $entry_date_time = htmlspecialchars(date("F j, Y, g:i a", "" . $logent[1] . "")); + $entry_text = htmlspecialchars($logent[5]); + } else { + $entry_date_time = htmlspecialchars(join(" ", array_slice($logent, 0, 3))); + $entry_text = ($logent[3] == $config['system']['hostname']) ? "" : $logent[3] . " "; + $entry_text .= htmlspecialchars($logent[4] . " " . $logent[5]); + } + echo "{$entry_date_time}\n"; + echo "{$entry_text}\n"; + } else { + echo "" . htmlspecialchars($logent[5]) . "\n"; + } + echo "\n"; + } +} + +function return_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert = "", $grepreverse = false) { + global $g, $config; + $sor = (isset($config['syslog']['reverse']) || $grepreverse) ? "-r" : ""; + $logarr = ""; + $grepline = " "; + if (is_array($grepfor)) { + $grepline .= " | /usr/bin/egrep " . escapeshellarg(implode("|", $grepfor)); + } + if (is_array($grepinvert)) { + $grepline .= " | /usr/bin/egrep -v " . escapeshellarg(implode("|", $grepinvert)); + } + if ($config['system']['disablesyslogclog']) { + exec("cat " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr); + } else { + if (isset($config['system']['usefifolog'])) { + exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr); + } else { + exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . "{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr); + } + } + return($logarr); +} + +/* Check if variable has changed, update and log if it has + * returns true if var changed + * varname = variable name in plain text + * orig = original value + * new = new value + */ +function update_if_changed($varname, & $orig, $new) { + if (is_array($orig) && is_array($new)) { + $a_diff = array_diff($orig, $new); + foreach ($a_diff as $diff) { + update_changedesc("removed {$varname}: \"{$diff}\""); + } + $a_diff = array_diff($new, $orig); + foreach ($a_diff as $diff) { + update_changedesc("added {$varname}: \"{$diff}\""); + } + $orig = $new; + return true; + + } else { + if ($orig != $new) { + update_changedesc("{$varname}: \"{$orig}\" -> \"{$new}\""); + $orig = $new; + return true; + } + } + return false; +} + +function address_to_pconfig($adr, &$padr, &$pmask, &$pnot, &$pbeginport, &$pendport) { + if (isset($adr['any'])) { + $padr = "any"; + } else if ($adr['network']) { + $padr = $adr['network']; + } else if ($adr['address']) { + list($padr, $pmask) = explode("/", $adr['address']); + if (!$pmask) { + if (is_ipaddrv6($padr)) { + $pmask = 128; + } else { + $pmask = 32; + } + } + } + + if (isset($adr['not'])) { + $pnot = 1; + } else { + $pnot = 0; + } + + if ($adr['port']) { + list($pbeginport, $pendport) = explode("-", $adr['port']); + if (!$pendport) { + $pendport = $pbeginport; + } + } else if (!is_alias($pbeginport) && !is_alias($pendport)) { + $pbeginport = "any"; + $pendport = "any"; + } +} + +function pconfig_to_address(&$adr, $padr, $pmask, $pnot = false, $pbeginport = 0, $pendport = 0) { + $adr = array(); + + if ($padr == "any") { + $adr['any'] = true; + } else if (is_specialnet($padr)) { + $adr['network'] = $padr; + } else { + $adr['address'] = $padr; + if (is_ipaddrv6($padr)) { + if ($pmask != 128) { + $adr['address'] .= "/" . $pmask; + } + } else { + if ($pmask != 32) { + $adr['address'] .= "/" . $pmask; + } + } + } + + if ($pnot) { + $adr['not'] = true; + } else { + unset($adr['not']); + } + + if (($pbeginport != 0) && ($pbeginport != "any")) { + if ($pbeginport != $pendport) { + $adr['port'] = $pbeginport . "-" . $pendport; + } else { + $adr['port'] = $pbeginport; + } + } + + if (is_alias($pbeginport)) { + $adr['port'] = $pbeginport; + } +} + +function is_specialnet($net) { + global $specialsrcdst; + + if (!$net) { + return false; + } + if (in_array($net, $specialsrcdst)) { + return true; + } else { + return false; + } +} + +//function to create widget tabs when called +function display_widget_tabs(& $tab_array) { + echo "
    "; + $tabscounter = 0; + foreach ($tab_array as $ta) { + $dashpos = strpos($ta[2], '-'); + $tabname = $ta[2] . "-tab"; + $tabclass = substr($ta[2], 0, $dashpos); + $tabclass = $tabclass . "-class"; + if ($ta[1] == true) { + $tabActive = "table-cell"; + $tabNonActive = "none"; + } else { + $tabActive = "none"; + $tabNonActive = "table-cell"; + } + echo "
    "; + echo "   {$ta[0]}"; + echo "   "; + echo "
    "; + + echo "
    "; + echo "   {$ta[0]}"; + echo "   "; + echo "
    "; + } + + echo ""; + echo "
    "; +} + + +// Return inline javascript file or CSS to minimize +// request count going back to server. +function outputJavaScriptFileInline($javascript) { + if (file_exists($javascript)) { + echo "\n\n"; + } else { + echo "\n\n\n\n"; + } +} + + + +function outputCSSPrintFileInline($css) { + if (file_exists($css)) { + echo "\n\n"; + } else { + echo "\n\n\n\n"; + } +} + + +function outputCSSFileInline($css) { + if (file_exists($css)) { + echo "\n\n"; + } else { + echo "\n\n\n\n"; + } +} + +$rfc2616 = array( + 100 => "100 Continue", + 101 => "101 Switching Protocols", + 200 => "200 OK", + 201 => "201 Created", + 202 => "202 Accepted", + 203 => "203 Non-Authoritative Information", + 204 => "204 No Content", + 205 => "205 Reset Content", + 206 => "206 Partial Content", + 300 => "300 Multiple Choices", + 301 => "301 Moved Permanently", + 302 => "302 Found", + 303 => "303 See Other", + 304 => "304 Not Modified", + 305 => "305 Use Proxy", + 306 => "306 (Unused)", + 307 => "307 Temporary Redirect", + 400 => "400 Bad Request", + 401 => "401 Unauthorized", + 402 => "402 Payment Required", + 403 => "403 Forbidden", + 404 => "404 Not Found", + 405 => "405 Method Not Allowed", + 406 => "406 Not Acceptable", + 407 => "407 Proxy Authentication Required", + 408 => "408 Request Timeout", + 409 => "409 Conflict", + 410 => "410 Gone", + 411 => "411 Length Required", + 412 => "412 Precondition Failed", + 413 => "413 Request Entity Too Large", + 414 => "414 Request-URI Too Long", + 415 => "415 Unsupported Media Type", + 416 => "416 Requested Range Not Satisfiable", + 417 => "417 Expectation Failed", + 500 => "500 Internal Server Error", + 501 => "501 Not Implemented", + 502 => "502 Bad Gateway", + 503 => "503 Service Unavailable", + 504 => "504 Gateway Timeout", + 505 => "505 HTTP Version Not Supported" +); + +function is_rfc2616_code($code) { + global $rfc2616; + if (isset($rfc2616[$code])) { + return true; + } else { + return false; + } +} + +function print_rfc2616_select($tag, $current) { + global $rfc2616; + + /* Default to 200 OK if not set */ + if ($current == "") { + $current = 200; + } + + echo "\n"; +} + +// Useful debugging function, much cleaner than print_r +function echo_array($array, $return_me = false) { + if (is_array($array) == false) { + $return = "The provided variable is not an array."; + } else { + foreach ($array as $name=>$value) { + if (is_array($value)) { + $return .= ""; + $return .= "['$name'] {
    \n"; + $return .= echo_array($value, true); + $return .= "
    }"; + $return .= "\n\n"; + } else { + if (is_string($value)) { + $value = "\"$value\""; + } + $return .= "['$name'] = $value\n\n"; + } + } + } + if ($return_me == true) { + return $return; + } else { + echo "
    ".$return."
    "; + } +} + +/****f* pfsense-utils/display_top_tabs + * NAME + * display_top_tabs - display tabs with rounded edges + * INPUTS + * $text - array of tabs + * RESULT + * null + ******/ +function display_top_tabs(& $tab_array, $no_drop_down = false) { + global $config; + global $g; + global $tab_array_indent; + global $tab_array_space; + global $tab_array_char_limit; + + /* does the user have access to this tab? + * master user has access to everything. + * if the user does not have access, simply + * unset the tab item. + */ + + /* empty string code */ + if ($tab_array_indent == '') { + $tab_array_indent = 0; + } + + if ($tab_array_space == '') { + $tab_array_space = 1; + } + + if ($tab_array_char_limit == '') { + $tab_array_char_limit = 92; + } + + foreach ($tab_array as $tab_id => $ta) { + if (!isAllowedPage($ta[2])) { + unset ($tab_array[$tab_id]); + } + } + + $tab_active_bg = "#EEEEEE"; + $tab_inactive_bg = "#777777"; + $nifty_tabs_corners = "#FFF"; + $font_color = "white"; + + /* if tabcontrols.php exist for a theme, allow it to be overridden */ + $themename = $config['theme']; + $filename = "/usr/local/www/themes/{$themename}/tabcontrols.php"; + if (file_exists($filename)) { + $eval_code = file_get_contents($filename); + eval($eval_code); + } + + $tabcharcount = 0; + foreach ($tab_array as $ta) { + $tabcharcount = $tabcharcount + strlen($ta[0]); + } + + if ($no_drop_down == true) { + $tabcharcount = 0; + unset($tab_array_char_limit); + } + + // If the character count of the tab names is > 670 + // then show a select item dropdown menubox. + if ($tabcharcount > $tab_array_char_limit) { + echo gettext("Currently viewing: "); + echo "\n

     

    "; + echo ""; + } else { + echo "
    \n"; + echo "\n"; + echo "
      \n"; + $tabscounter = 0; + foreach ($tab_array as $ta) { + if ($ta[1] == true) { + echo "
    • {$ta[0]}
    • \n"; + } else { + echo "
    • {$ta[0]}
    • \n"; + } + $tabscounter++; + } + echo "
    \n
    \n"; + } +} + +function add_package_tabs($pkgname, &$tab_array) { + global $config, $g; + + $pkg = get_pkg_data($pkgname); + + if (!isset($pkg['configurationfile']) || !file_exists('/usr/local/pkg/' . $pkg['configurationfile'])) { + return; + } + + $pkg_config = parse_xml_config_pkg('/usr/local/pkg/' . $pkg['configurationfile'], "packagegui"); + + if (!isset($pkg_config['tabs']['tab'])) { + return; + } + + foreach ($pkg_config['tabs']['tab'] as $tab) { + $tab_entry = array(); + if ($tab['name']) { + $tab_entry[] = $tab['name']; + $tab_entry[] = false; + $tab_entry[] = $tab['url']; + $tab_array[] = $tab_entry; + } + } +} + +function alias_info_popup($alias_id) { + global $config; + $maxlength = 60; + $close_title="title='".gettext('move mouse out of this alias to hide')."'"; + if (is_array($config['aliases']['alias'][$alias_id])) { + $alias_name = $config['aliases']['alias'][$alias_id]; + $alias_objects_with_details = ""; + if ($alias_name['url']) { + // TODO: Change it when pf supports tables with ports + if ($alias_name['type'] == "urltable") { + exec("/sbin/pfctl -t {$alias_name['name']} -T show | wc -l", $total_entries); + $counter = preg_replace("/\D/", "", $total_entries[0]); + exec("/sbin/pfctl -t {$alias_name['name']} -T show | head -10002", $alias_addresses); + } else { + $urlfn = alias_expand_urltable($alias_name['name']); + $alias_addresses = explode("\n", file_get_contents($urlfn)); + $counter = count($alias_addresses); + } + $alias_objects_with_details .= ""; + $x = 0; + foreach ($alias_addresses as $alias_ports_address) { + switch ($x) { + case 0: + $x++; + $alias_objects_with_details .= ""; + break; + case 1: + $x++; + $alias_objects_with_details .= ""; + break; + default: + $x = 0; + $alias_objects_with_details .= ""; + break; + } + } + for ($y = $x; $y <= $x; $y++) { + $alias_objects_with_details .= ""; + } + if ($x > 0) { + $alias_objects_with_details .= ""; + } + if ($counter > 10002) { + $alias_objects_with_details .= ""; + } + } else { + $alias_addresses = explode (" ", $alias_name['address']); + $alias_details = explode ("||", $alias_name['detail']); + $counter = 0; + foreach ($alias_addresses as $alias_ports_address) { + $alias_objects_with_details .= ""; + $alias_detail_default = strpos ($alias_details[$counter], "Entry added"); + if ($alias_details[$counter] != "" && $alias_detail_default === False) { + $alias_objects_with_details .=""; + } else { + $alias_objects_with_details .=""; + } + $alias_objects_with_details .= ""; + $counter++; + } + } + $alias_objects_with_details .= "
    {$alias_name['url']}
    {$alias_ports_address}{$alias_ports_address}{$alias_ports_address}
     
    ". gettext("listing only first 10k items") . "
    {$alias_addresses[$counter]}{$alias_details[$counter]} 
    "; + } + $alias_descr_substr = $alias_name['descr']; + if ($strlength >= $maxlength) { + $alias_descr_substr = substr($alias_descr_substr, 0, $maxlength) . "..."; + } + $item_text = ($counter > 1 ? "items" : "item"); + $alias_caption = "{$alias_descr_substr} - {$counter} {$item_text}  edit "; + $strlength = strlen ($alias_caption); + print "

    {$alias_caption}

    " . $alias_objects_with_details; +} + +function rule_popup($src, $srcport, $dst, $dstport) { + global $config, $g; + $aliases_array = array(); + if ($config['aliases']['alias'] <> "" and is_array($config['aliases']['alias'])) { + $descriptions = array (); + foreach ($config['aliases']['alias'] as $alias_id=>$alias_name) { + $loading_image="\'loader\' " .gettext("loading...").""; + switch ($alias_name['type']) { + case "port": + $width="250"; + break; + case "urltable": + $width="500"; + break; + default: + $width="350"; + break; + } + $span_begin = ""; + $span_end = ""; + if ($alias_name['name'] == $src) { + $descriptions['src'] = $span_begin; + $descriptions['src_end'] = $span_end; + } + if ($alias_name['name'] == $srcport) { + $descriptions['srcport'] = $span_begin; + $descriptions['srcport_end'] = $span_end; + } + if ($alias_name['name'] == $dst) { + $descriptions['dst'] = $span_begin; + $descriptions['dst_end'] = $span_end; + } + if ($alias_name['name'] == $dstport) { + $descriptions['dstport'] = $span_begin; + $descriptions['dstport_end'] = $span_end; + } + } + return $descriptions; + } +} + +$timezone = $config['system']['timezone']; +if (!$timezone) { + $timezone = "Etc/UTC"; +} + +date_default_timezone_set($timezone); + +?> diff --git a/src/usr/local/www/halt.php b/src/usr/local/www/halt.php new file mode 100755 index 0000000..ab4fe99 --- /dev/null +++ b/src/usr/local/www/halt.php @@ -0,0 +1,77 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: header +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-haltsystem +##|*NAME=Diagnostics: Halt system page +##|*DESCR=Allow access to the 'Diagnostics: Halt system' page. +##|*MATCH=halt.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require("captiveportal.inc"); + +if ($_POST['Submit'] == " " . gettext("No") . " ") { + header("Location: index.php"); + exit; +} + +$pgtitle = array(gettext("Diagnostics"), gettext("Halt system")); +include('head.inc'); +?> + + + + +
    +
    +
    + +
    +

    +

    + " /> + " /> +

    +
    + + + + diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc new file mode 100755 index 0000000..d8b8867 --- /dev/null +++ b/src/usr/local/www/head.inc @@ -0,0 +1,120 @@ + + + + + <?php echo($tabtitle); ?> + + + + "; + else: + echo ""; + endif; + ?> + + + "; ?> + + + + + + + + + + + + + + + + + + +\n"; +if ($_GET['enablefirebuglite']) { + echo "\t\n"; + echo "\t\n"; +} +echo "\t\n"; +echo "\t\n"; +echo "\t\n"; +echo "\t\n"; +if (file_exists("{$g['www_path']}/javascript/global.js")) { + echo "\t\n"; +} +/* + * Find all javascript files that need to be included + * for this page ... from the arrays ... :) + * Coded by: Erik Kristensen + */ + +$dir = trim(basename($_SERVER["SCRIPT_FILENAME"], '.php')); +$path = "{$g['www_path']}/javascript/" . $dir . "/"; +if (is_dir($path)) { + if ($dh = opendir($path)) { + while (($file = readdir($dh)) !== false) { + if (is_dir($file)) { + continue; + } + echo "\t\n"; + } + closedir($dh); + } +} + +if (!isset($closehead)) { + echo ""; +} + +/* If this page is being remotely managed then do not allow the loading of the contents. */ +if ($config['remote_managed_pages']['item']) { + foreach ($config['remote_managed_pages']['item'] as $rmp) { + if ($rmp == $_SERVER['SCRIPT_NAME']) { + include("fbegin.inc"); + print_info_box_np("This page is currently being managed by a remote machine."); + include("fend.inc"); + exit; + } + } +} + +?> diff --git a/src/usr/local/www/headjs.php b/src/usr/local/www/headjs.php new file mode 100644 index 0000000..5e4148f --- /dev/null +++ b/src/usr/local/www/headjs.php @@ -0,0 +1,186 @@ +loader<\/div>\"; + jQuery('#submit').before(to_insert); + } + } + + function submit_form(e) { + // debugging helper + //alert(Form.serialize($('iform'))); + + if (jQuery('#inputerrors')) { + jQuery('#inputerrors').html('
    Loading...<\/i><\/b><\/center>'); + } + + /* dsh: Introduced because pkg_edit tries to set some hidden fields + * if executing submit's onclick event. The click gets deleted + * by Ajax. Hence using onkeydown instead. + */ + if (jQuery('#submit').prop('keydown')) { + jQuery('#submit').keydown(); + jQuery('#submit').css('visibility','hidden'); + } + if (jQuery('#cancelbutton')) { + jQuery('#cancelbutton').css('visibility','hidden'); + } + jQuery('#loading').css('visibility','visible'); + // submit the form using Ajax + } + + function formSubmitted(resp) { + var responseText = resp.responseText; + + // debugging helper + // alert(responseText); + + if (responseText.indexOf('html') > 0) { + /* somehow we have been fed an html page! */ + //alert('Somehow we have been fed an html page! Forwarding to /.'); + document.location.href = '/'; + } + + eval(responseText); + } + + /* this function will be called if an HTTP error will be triggered */ + function formFailure(resp) { + showajaxmessage(resp.responseText); + if (jQuery('#submit')) { + jQuery('#submit').css('visibility','visible'); + } + if (jQuery('#cancelbutton')) { + jQuery('#cancelbutton').css('visibility','visible'); + } + if (jQuery('#loading')) { + jQuery('#loading').css('visibility','hidden'); + } + } + + function showajaxmessage(message) { + var message_html; + + if (message == '') { + NiftyCheck(); + Rounded(\"div#redbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\"); + Rounded(\"td#blackbox\",\"all\",\"#FFF\",\"#000000\",\"smooth\"); + + if (jQuery('#submit')) { + jQuery('#submit').css('visibility','visible'); + } + if (jQuery('#cancelbutton')) { + jQuery('#cancelbutton').css('visibility','visible'); + } + if (jQuery('#loading')) { + jQuery('#loading').css('visibility','hidden'); + } + + return; + } + + message_html = '\n"; +} + +function fixup_string($string) { + global $config; + // fixup #1: $myurl -> http[s]://ip_address:port/ + $https = ""; + $port = $config['system']['webguiport']; + if ($port <> "443" and $port <> "80") { + $urlport = ":" . $port; + } else { + $urlport = ""; + } + + if ($config['system']['webgui']['protocol'] == "https") { + $https = "s"; + } + $myurl = "http" . $https . "://" . getenv("HTTP_HOST") . $urlport; + $newstring = str_replace("\$myurl", $myurl, $string); + $string = $newstring; + // fixup #2: $wanip + $curwanip = get_interface_ip(); + $newstring = str_replace("\$wanip", $curwanip, $string); + $string = $newstring; + // fixup #3: $lanip + $lancfg = $config['interfaces']['lan']; + $lanip = $lancfg['ipaddr']; + $newstring = str_replace("\$lanip", $lanip, $string); + $string = $newstring; + // fixup #4: fix'r'up here. + return $newstring; +} + +/* + * Parse templates if they are defined + */ +function parse_package_templates() { + global $pkg, $config; + $rows = 0; + if ($pkg['templates']['template'] <> "") { + foreach ($pkg['templates']['template'] as $pkg_template_row) { + $filename = $pkg_template_row['filename']; + $template_text = $pkg_template_row['templatecontents']; + $firstfield = ""; + /* calculate total row helpers count and */ + /* change fields defined as fieldname_fieldvalue to their value */ + foreach ($pkg['fields']['field'] as $fields) { + switch ($fields['type']) { + case "rowhelper": + // save rowhelper items. + $row_helper_total_rows = 0; + $row_helper_data = ""; + foreach ($fields['rowhelper']['rowhelperfield'] as $rowhelperfield) { + foreach ($_POST as $key => $value) { + if (preg_match("/^{$rowhelperfield['fieldname']}(\d+)$/", $key, $matches)) { + $row_helper_total_rows++; + $row_helper_data .= $value; + $sep = ""; + ereg($rowhelperfield['fieldname'] . "_fieldvalue\[(.*)\]", $template_text, $sep); + foreach ($sep as $se) { + $separator = $se; + } + if ($separator <> "") { + $row_helper_data = ereg_replace(" ", $separator, $row_helper_data); + $template_text = ereg_replace("\[{$separator}\]", "", $template_text); + } + $template_text = str_replace($rowhelperfield['fieldname'] . "_fieldvalue", $row_helper_data, $template_text); + } + } + } + break; + default: + $fieldname = $fields['fieldname']; + $fieldvalue = $_POST[$fieldname]; + $template_text = str_replace($fieldname . "_fieldvalue", $fieldvalue, $template_text); + } + } + /* replace $domain_total_rows with total rows */ + $template_text = str_replace("$domain_total_rows", $row_helper_total_rows, $template_text); + + /* replace cr's */ + $template_text = str_replace("\\n", "\n", $template_text); + + /* write out new template file */ + $fout = fopen($filename, "w"); + fwrite($fout, $template_text); + fclose($fout); + } + } +} + +/* Return html div fields */ +function display_advanced_field($fieldname) { + $div = "
    \n"; + $div .= " - " . gettext("Show advanced option") ."
    \n"; + $div .= "
    '; + message_html += '
    '; + message_html += ' + for (var i=0; i5' : ' ▴'; + this.appendChild(sortrevind); + return; + } + if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { + // if we're already sorted by this column in reverse, just + // re-reverse the table, which is quicker + sorttable.reverse(this.sorttable_tbody, sortableMultirow); + this.className = this.className.replace('sorttable_sorted_reverse', + 'sorttable_sorted'); + this.removeChild(document.getElementById('sorttable_sortrevind')); + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + return; + } + + // remove sorttable_sorted classes + theadrow = this.parentNode; + forEach(theadrow.childNodes, function(cell) { + if (cell.nodeType == 1) { // an element + cell.className = cell.className.replace('sorttable_sorted_reverse',''); + cell.className = cell.className.replace('sorttable_sorted',''); + } + }); + sortfwdind = document.getElementById('sorttable_sortfwdind'); + if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } + sortrevind = document.getElementById('sorttable_sortrevind'); + if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } + + this.className += ' sorttable_sorted'; + sortfwdind = document.createElement('span'); + sortfwdind.id = "sorttable_sortfwdind"; + sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; + this.appendChild(sortfwdind); + + // build an array to sort. This is a Schwartzian transform thing, + // i.e., we "decorate" each row with the actual sort key, + // sort based on the sort keys, and then put the rows back in order + // which is a lot faster because you only do getInnerText once per row + row_array = []; + col = this.sorttable_columnindex; + rows = this.sorttable_tbody.rows; + for (var j=0; j 12) { + // definitely dd/mm + return sorttable.sort_ddmm; + } else if (second > 12) { + return sorttable.sort_mmdd; + } else { + // looks like a date, but we can't tell which, so assume + // that it's dd/mm (English imperialism!) and keep looking + sortfn = sorttable.sort_ddmm; + } + } + } + } + return sortfn; + }, + + getInnerText: function(node) { + // gets the text we want to use for sorting for a cell. + // strips leading and trailing whitespace. + // this is *not* a generic getInnerText function; it's special to sorttable. + // for example, you can override the cell text with a customkey attribute. + // it also gets .value for fields. + + hasInputs = (typeof node.getElementsByTagName == 'function') && + node.getElementsByTagName('input').length; + + if (node.getAttribute("sorttable_customkey") != null) { + return node.getAttribute("sorttable_customkey"); + } + else if (typeof node.textContent != 'undefined' && !hasInputs) { + return node.textContent.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.innerText != 'undefined' && !hasInputs) { + return node.innerText.replace(/^\s+|\s+$/g, ''); + } + else if (typeof node.text != 'undefined' && !hasInputs) { + return node.text.replace(/^\s+|\s+$/g, ''); + } + else { + switch (node.nodeType) { + case 3: + if (node.nodeName.toLowerCase() == 'input') { + return node.value.replace(/^\s+|\s+$/g, ''); + } + case 4: + return node.nodeValue.replace(/^\s+|\s+$/g, ''); + break; + case 1: + case 11: + var innerText = ''; + for (var i = 0; i < node.childNodes.length; i++) { + innerText += sorttable.getInnerText(node.childNodes[i]); + } + return innerText.replace(/^\s+|\s+$/g, ''); + break; + default: + return ''; + } + } + }, + + reverse: function(tbody, sortableMultirow) { + // reverse the rows in a tbody + newrows = []; + for (var i=0; i=0; i-=sortableMultirow) { + for(var j=sortableMultirow-1;j>=0;j--) + { + tbody.appendChild(newrows[i-j]); + } + } + delete newrows; + }, + + /* sort functions + each sort function takes two parameters, a and b + you are comparing a[0] and b[0] */ + sort_numeric: function(a,b) { + aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); + if (isNaN(aa)) aa = 0; + bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); + if (isNaN(bb)) bb = 0; + return aa-bb; + }, + sort_alpha: function(a,b) { + if (a[0]==b[0]) return 0; + if (a[0] b2match) return 1; + if (a2match < b2match) return -1; + } + if (a[0] == b[0]) return 0; + if (a[0] < b[0]) return -1; + return 1; + }, + sort_ipaddr: function(a,b) { + aip = ip2ulong(a[0]); + bip = ip2ulong(b[0]); + if (aip && bip) + { + if (aip == bip) return 0; + if (aip < bip) return -1; + return 1; + } else { + if (aip !== false || bip !== false) + return aip === false ? -1 : 1; + else + { + return sorttable.sortWithNumber(a,b); + } + } + }, + + shaker_sort: function(list, comp_func) { + // A stable sort function to allow multi-level sorting of data + // see: http://en.wikipedia.org/wiki/Cocktail_sort + // thanks to Joseph Nahmias + var b = 0; + var t = list.length - 1; + var swap = true; + + while(swap) { + swap = false; + for(var i = b; i < t; ++i) { + if ( comp_func(list[i], list[i+1]) > 0 ) { + var q = list[i]; list[i] = list[i+1]; list[i+1] = q; + swap = true; + } + } // for + t--; + + if (!swap) break; + + for(var i = t; i > b; --i) { + if ( comp_func(list[i], list[i-1]) < 0 ) { + var q = list[i]; list[i] = list[i-1]; list[i-1] = q; + swap = true; + } + } // for + b++; + + } // while(swap) + } +}; + +/* ****************************************************************** + Supporting functions: bundled here to avoid depending on a library + ****************************************************************** */ + +function ip2ulong(ip) { + ip += ""; + var ulip = false; + var octets = []; + ipportmatch = ip.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:[0-9]{1,5}\b/);// IP:port + if (ipportmatch) { + ipportmatch += ""; + ipport = ipportmatch.split(':'); + octets = ipport[0].split('.'); + for (i=0; i < 4; i++) { + ulip += octets[i] * Math.pow(256, (5-i)); + } + ulip += parseInt(ipport[1]); + } else { + ipmatch = ip.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/);// IP only + if (ipmatch) { + ipmatch+=""; + octets = ipmatch.split('.'); + for (i=0; i < 4; i++) { + ulip += octets[i] * Math.pow(256, (5-i)); + } + } + } + return ulip; +} + +// Dean Edwards/Matthias Miller/John Resig + +/* for Mozilla/Opera9 */ +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", sorttable.init, false); +} + +/* for Safari */ +if (/WebKit/i.test(navigator.userAgent)) { // sniff + var _timer = setInterval(function() { + if (/loaded|complete/.test(document.readyState)) { + sorttable.init(); // call the onload handler + } + }, 10); +} + +/* for other browsers */ +window.onload = sorttable.init; + +// written by Dean Edwards, 2005 +// with input from Tino Zijdel, Matthias Miller, Diego Perini + +// http://dean.edwards.name/weblog/2005/10/add-event/ + +function dean_addEvent(element, type, handler) { + if (element.addEventListener) { + element.addEventListener(type, handler, false); + } else { + // assign each event handler a unique ID + if (!handler.$$guid) handler.$$guid = dean_addEvent.guid++; + // create a hash table of event types for the element + if (!element.events) element.events = {}; + // create a hash table of event handlers for each element/event pair + var handlers = element.events[type]; + if (!handlers) { + handlers = element.events[type] = {}; + // store the existing event handler (if there is one) + if (element["on" + type]) { + handlers[0] = element["on" + type]; + } + } + // store the event handler in the hash table + handlers[handler.$$guid] = handler; + // assign a global event handler to do all the work + element["on" + type] = handleEvent; + } +}; +// a counter used to create unique IDs +dean_addEvent.guid = 1; + +function removeEvent(element, type, handler) { + if (element.removeEventListener) { + element.removeEventListener(type, handler, false); + } else { + // delete the event handler from the hash table + if (element.events && element.events[type]) { + delete element.events[type][handler.$$guid]; + } + } +}; + +function handleEvent(event) { + var returnValue = true; + // grab the event object (IE uses a global event object) + event = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event); + // get a reference to the hash table of event handlers + var handlers = this.events[event.type]; + // execute each event handler + for (var i in handlers) { + this.$$handleEvent = handlers[i]; + if (this.$$handleEvent(event) === false) { + returnValue = false; + } + } + return returnValue; +}; + +function fixEvent(event) { + // add W3C standard event methods + event.preventDefault = fixEvent.preventDefault; + event.stopPropagation = fixEvent.stopPropagation; + return event; +}; +fixEvent.preventDefault = function() { + this.returnValue = false; +}; +fixEvent.stopPropagation = function() { + this.cancelBubble = true; +}; + +// Dean's forEach: http://dean.edwards.name/base/forEach.js +/* + forEach, version 1.0 + Copyright 2006, Dean Edwards + License: http://www.opensource.org/licenses/mit-license.php +*/ + +// array-like enumeration +if (!Array.forEach) { // mozilla already supports this + Array.forEach = function(array, block, context) { + for (var i = 0; i < array.length; i++) { + block.call(context, array[i], i, array); + } + }; +} + +// generic enumeration +Function.prototype.forEach = function(object, block, context) { + for (var key in object) { + if (typeof this.prototype[key] == "undefined") { + block.call(context, object[key], key, object); + } + } +}; + +// character enumeration +String.forEach = function(string, block, context) { + Array.forEach(string.split(""), function(chr, index) { + block.call(context, chr, index, string); + }); +}; + +// globally resolve forEach enumeration +var forEach = function(object, block, context) { + if (object) { + var resolve = Object; // default + if (object instanceof Function) { + // functions have a "length" property + resolve = Function; + } else if (object.forEach instanceof Function) { + // the object implements a custom forEach method so use that + object.forEach(block, context); + return; + } else if (typeof object == "string") { + // the object is a string + resolve = String; + } else if (typeof object.length == "number") { + // the object is array-like + resolve = Array; + } + resolve.forEach(object, block, context); + } +}; + diff --git a/src/usr/local/www/javascript/suggestions.js b/src/usr/local/www/javascript/suggestions.js new file mode 100644 index 0000000..682a352 --- /dev/null +++ b/src/usr/local/www/javascript/suggestions.js @@ -0,0 +1,33 @@ + +/** + * Provides suggestions for state names (USA). + * @class + * @scope public + */ +function StateSuggestions(text) { + this.states = text; +} + +/** + * Request suggestions for the given autosuggest control. + * @scope protected + * @param oAutoSuggestControl The autosuggest control to provide suggestions for. + */ +StateSuggestions.prototype.requestSuggestions = function (oAutoSuggestControl /*:AutoSuggestControl*/, + bTypeAhead /*:boolean*/) { + var aSuggestions = []; + var sTextboxValue = oAutoSuggestControl.textbox.value; + + if (sTextboxValue.length > 0){ + + //search for matching states + for (var i=0; i < this.states.length; i++) { + if (this.states[i].toLowerCase().indexOf(sTextboxValue.toLowerCase()) == 0) { + aSuggestions.push(this.states[i]); + } + } + } + + //provide suggestions to the control + oAutoSuggestControl.autosuggest(aSuggestions, bTypeAhead); +}; diff --git a/src/usr/local/www/javascript/ticker.js b/src/usr/local/www/javascript/ticker.js new file mode 100644 index 0000000..defb1d8 --- /dev/null +++ b/src/usr/local/www/javascript/ticker.js @@ -0,0 +1,73 @@ +/* $Id$ */ +/* + ticker.js + Copyright (C) 2012 Marcello Coutinho + Copyright (C) 2012 Carlos Cesario - carloscesario@gmail.com + All rights reserved. + + originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + pfSense_MODULE: utils + +*/ +function notice_action(action,msgid) { + jQuery.ajax({ + type: 'post', + cache: false, + url: 'index.php', + data: {closenotice: msgid}, + success: function(response) { + jQuery('#menu_messages').html(response); + } + }); +} + +function pulsateText(elem) { + jQuery(elem).effect("pulsate", { times:12 }, 500); + jQuery(elem).effect("pulsate", { times:6 }, 1500); + jQuery(elem).effect("pulsate", { times:3 }, 2500); +} + +jQuery(document).ready(function() { + pulsateText('#marquee-text'); + jQuery('#marquee-text a').hover(function () { + jQuery(this).css('cursor','pointer'); + }); +}); + +function alias_popup(alias_id,theme,loading) { + domTT_update('ttalias_'+alias_id,""+loading+""); + jQuery.ajax({ + type: 'post', + cache: false, + url: "/index.php", + data: {aliasid:alias_id, act:'alias_info_popup'}, + success: function(response) { + //alert('
    '+response.match(/

    .*<\/table>/i)+'
    '); + domTT_update('ttalias_'+alias_id,'
    '+response.match(/

    .*<\/table>/i)+'
    '); + } + }); +} \ No newline at end of file diff --git a/src/usr/local/www/javascript/wizard/autosuggest.js b/src/usr/local/www/javascript/wizard/autosuggest.js new file mode 100644 index 0000000..d9b5ac0 --- /dev/null +++ b/src/usr/local/www/javascript/wizard/autosuggest.js @@ -0,0 +1,337 @@ + +/** + * An autosuggest textbox control. + * @class + * @scope public + */ +function AutoSuggestControl(oTextbox /*:HTMLInputElement*/, + oProvider /*:SuggestionProvider*/) { + + /** + * The currently selected suggestions. + * @scope private + */ + this.cur /*:int*/ = -1; + + /** + * The dropdown list layer. + * @scope private + */ + this.layer = null; + + /** + * Suggestion provider for the autosuggest feature. + * @scope private. + */ + this.provider /*:SuggestionProvider*/ = oProvider; + + /** + * The textbox to capture. + * @scope private + */ + this.textbox /*:HTMLInputElement*/ = oTextbox; + + //initialize the control + this.init(); + +} + +/** + * Autosuggests one or more suggestions for what the user has typed. + * If no suggestions are passed in, then no autosuggest occurs. + * @scope private + * @param aSuggestions An array of suggestion strings. + * @param bTypeAhead If the control should provide a type ahead suggestion. + */ +AutoSuggestControl.prototype.autosuggest = function (aSuggestions /*:Array*/, + bTypeAhead /*:boolean*/) { + + //make sure there's at least one suggestion + if (aSuggestions.length > 0) { + if (bTypeAhead) { + this.typeAhead(aSuggestions[0]); + } + + this.showSuggestions(aSuggestions); + } else { + this.hideSuggestions(); + } +}; + +/** + * Creates the dropdown layer to display multiple suggestions. + * @scope private + */ +AutoSuggestControl.prototype.createDropDown = function () { + + var oThis = this; + + //create the layer and assign styles + this.layer = document.createElement("div"); + this.layer.className = "suggestions"; + this.layer.style.visibility = "hidden"; + this.layer.style.width = this.textbox.offsetWidth; + + //when the user clicks on the a suggestion, get the text (innerHTML) + //and place it into a textbox + this.layer.onmousedown = + this.layer.onmouseup = + this.layer.onmouseover = function (oEvent) { + oEvent = oEvent || window.event; + oTarget = oEvent.target || oEvent.srcElement; + + if (oEvent.type == "mousedown") { + oThis.textbox.value = oTarget.firstChild.nodeValue; + oThis.hideSuggestions(); + } else if (oEvent.type == "mouseover") { + oThis.highlightSuggestion(oTarget); + } else { + oThis.textbox.focus(); + } + }; + + + document.body.appendChild(this.layer); +}; + +/** + * Gets the left coordinate of the textbox. + * @scope private + * @return The left coordinate of the textbox in pixels. + */ +AutoSuggestControl.prototype.getLeft = function () /*:int*/ { + + var oNode = this.textbox; + var iLeft = 0; + + while(oNode.tagName != "BODY") { + iLeft += oNode.offsetLeft; + oNode = oNode.offsetParent; + } + + return iLeft; +}; + +/** + * Gets the top coordinate of the textbox. + * @scope private + * @return The top coordinate of the textbox in pixels. + */ +AutoSuggestControl.prototype.getTop = function () /*:int*/ { + + var oNode = this.textbox; + var iTop = 0; + + while(oNode.tagName != "BODY") { + iTop += oNode.offsetTop; + oNode = oNode.offsetParent; + } + + return iTop; +}; + +/** + * Handles three keydown events. + * @scope private + * @param oEvent The event object for the keydown event. + */ +AutoSuggestControl.prototype.handleKeyDown = function (oEvent /*:Event*/) { + + switch(oEvent.keyCode) { + case 38: //up arrow + this.previousSuggestion(); + break; + case 40: //down arrow + this.nextSuggestion(); + break; + case 13: //enter + this.hideSuggestions(); + break; + } + +}; + +/** + * Handles keyup events. + * @scope private + * @param oEvent The event object for the keyup event. + */ +AutoSuggestControl.prototype.handleKeyUp = function (oEvent /*:Event*/) { + + var iKeyCode = oEvent.keyCode; + + //for backspace (8) and delete (46), shows suggestions without typeahead + if (iKeyCode == 8 || iKeyCode == 46) { + this.provider.requestSuggestions(this, false); + + //make sure not to interfere with non-character keys + } else if (iKeyCode < 32 || (iKeyCode >= 33 && iKeyCode < 46) || (iKeyCode >= 112 && iKeyCode <= 123)) { + //ignore + } else { + //request suggestions from the suggestion provider with typeahead + this.provider.requestSuggestions(this, true); + } +}; + +/** + * Hides the suggestion dropdown. + * @scope private + */ +AutoSuggestControl.prototype.hideSuggestions = function () { + this.layer.style.visibility = "hidden"; +}; + +/** + * Highlights the given node in the suggestions dropdown. + * @scope private + * @param oSuggestionNode The node representing a suggestion in the dropdown. + */ +AutoSuggestControl.prototype.highlightSuggestion = function (oSuggestionNode) { + + for (var i=0; i < this.layer.childNodes.length; i++) { + var oNode = this.layer.childNodes[i]; + if (oNode == oSuggestionNode) { + oNode.className = "current"; + } else if (oNode.className == "current") { + oNode.className = ""; + } + } +}; + +/** + * Initializes the textbox with event handlers for + * auto suggest functionality. + * @scope private + */ +AutoSuggestControl.prototype.init = function () { + + //save a reference to this object + var oThis = this; + + //assign the onkeyup event handler + this.textbox.onkeyup = function (oEvent) { + + //check for the proper location of the event object + if (!oEvent) { + oEvent = window.event; + } + + //call the handleKeyUp() method with the event object + oThis.handleKeyUp(oEvent); + }; + + //assign onkeydown event handler + this.textbox.onkeydown = function (oEvent) { + + //check for the proper location of the event object + if (!oEvent) { + oEvent = window.event; + } + + //call the handleKeyDown() method with the event object + oThis.handleKeyDown(oEvent); + }; + + //assign onblur event handler (hides suggestions) + this.textbox.onblur = function () { + oThis.hideSuggestions(); + }; + + //create the suggestions dropdown + this.createDropDown(); +}; + +/** + * Highlights the next suggestion in the dropdown and + * places the suggestion into the textbox. + * @scope private + */ +AutoSuggestControl.prototype.nextSuggestion = function () { + var cSuggestionNodes = this.layer.childNodes; + + if (cSuggestionNodes.length > 0 && this.cur < cSuggestionNodes.length-1) { + var oNode = cSuggestionNodes[++this.cur]; + this.highlightSuggestion(oNode); + this.textbox.value = oNode.firstChild.nodeValue; + } +}; + +/** + * Highlights the previous suggestion in the dropdown and + * places the suggestion into the textbox. + * @scope private + */ +AutoSuggestControl.prototype.previousSuggestion = function () { + var cSuggestionNodes = this.layer.childNodes; + + if (cSuggestionNodes.length > 0 && this.cur > 0) { + var oNode = cSuggestionNodes[--this.cur]; + this.highlightSuggestion(oNode); + this.textbox.value = oNode.firstChild.nodeValue; + } +}; + +/** + * Selects a range of text in the textbox. + * @scope public + * @param iStart The start index (base 0) of the selection. + * @param iLength The number of characters to select. + */ +AutoSuggestControl.prototype.selectRange = function (iStart /*:int*/, iLength /*:int*/) { + + //use text ranges for Internet Explorer + if (this.textbox.createTextRange) { + var oRange = this.textbox.createTextRange(); + oRange.moveStart("character", iStart); + oRange.moveEnd("character", iLength - this.textbox.value.length); + oRange.select(); + + //use setSelectionRange() for Mozilla + } else if (this.textbox.setSelectionRange) { + this.textbox.setSelectionRange(iStart, iLength); + } + + //set focus back to the textbox + this.textbox.focus(); +}; + +/** + * Builds the suggestion layer contents, moves it into position, + * and displays the layer. + * @scope private + * @param aSuggestions An array of suggestions for the control. + */ +AutoSuggestControl.prototype.showSuggestions = function (aSuggestions /*:Array*/) { + + var oDiv = null; + this.layer.innerHTML = ""; //clear contents of the layer + + for (var i=0; i < aSuggestions.length; i++) { + oDiv = document.createElement("div"); + oDiv.appendChild(document.createTextNode(aSuggestions[i])); + this.layer.appendChild(oDiv); + } + + this.layer.style.left = this.getLeft() + "px"; + this.layer.style.top = (this.getTop()+this.textbox.offsetHeight) + "px"; + this.layer.style.width = this.textbox.offsetWidth + "px"; + this.layer.style.visibility = "visible"; + +}; + +/** + * Inserts a suggestion into the textbox, highlighting the + * suggested part of the text. + * @scope private + * @param sSuggestion The suggestion for the textbox. + */ +AutoSuggestControl.prototype.typeAhead = function (sSuggestion /*:String*/) { + + //check for support of typeahead functionality + if (this.textbox.createTextRange || this.textbox.setSelectionRange){ + var iLen = this.textbox.value.length; + this.textbox.value = sSuggestion; + this.selectRange(iLen, sSuggestion.length); + } +}; + diff --git a/src/usr/local/www/javascript/wizard/disablekeys.js b/src/usr/local/www/javascript/wizard/disablekeys.js new file mode 100644 index 0000000..5d6c87a --- /dev/null +++ b/src/usr/local/www/javascript/wizard/disablekeys.js @@ -0,0 +1,6 @@ +function kH(e) { + var pK = document.all? window.event.keyCode:e.which; + return pK != 13; +} +document.onkeypress = kH; +if (document.layers) document.captureEvents(Event.KEYPRESS); \ No newline at end of file diff --git a/src/usr/local/www/javascript/wizard/suggestions.js b/src/usr/local/www/javascript/wizard/suggestions.js new file mode 100644 index 0000000..4d1e127 --- /dev/null +++ b/src/usr/local/www/javascript/wizard/suggestions.js @@ -0,0 +1,33 @@ + +/** + * Provides suggestions for state names (USA). + * @class + * @scope public + */ +function StateSuggestions(text) { + this.states = text; +} + +/** + * Request suggestions for the given autosuggest control. + * @scope protected + * @param oAutoSuggestControl The autosuggest control to provide suggestions for. + */ +StateSuggestions.prototype.requestSuggestions = function (oAutoSuggestControl /*:AutoSuggestControl*/, + bTypeAhead /*:boolean*/) { + var aSuggestions = []; + var sTextboxValue = oAutoSuggestControl.textbox.value; + + if (sTextboxValue.length > 0){ + + //search for matching states + for (var i=0; i < this.states.length; i++) { + if (this.states[i].toLowerCase().indexOf(sTextboxValue.toLowerCase()) == 0) { + aSuggestions.push(this.states[i]); + } + } + } + + //provide suggestions to the control + oAutoSuggestControl.autosuggest(aSuggestions, bTypeAhead); +}; diff --git a/src/usr/local/www/license.php b/src/usr/local/www/license.php new file mode 100644 index 0000000..2247d6a --- /dev/null +++ b/src/usr/local/www/license.php @@ -0,0 +1,133 @@ + + + + +

    + +

    ©
    + .

    + +

    © + (mk@neon1.net).
    + .

    +


    + :
    +
    +
    + .
    +
    +
    +
    +
    +
    + "
    +
    +
    +
    +
    +
    +
    +
    +
    +
    .

    +
    +


    + .

    +

    FreeBSD (http://www.freebsd.org)
    + ©.
    +
    + http://www.php.net.
    + © .
    +
    + (http://www.lighttpd.net)
    + © +
    +
    + (http://www.isc.org/products/DHCP)
    + ©
    + ©
    +
    + (http://www.openbsd.org)
    +
    + (http://www.dellroad.org/mpd)
    + © 2003-2004, Archie L. Cobbs, Michael Bretterklieber, Alexander Motin
    +
    +
    + (http://software.wheelhouse.org/syslogd/)
    + © 2001 Jeff Wheelhouse (jdw@wwwi.com)
    +
    + (http://www.thekelleys.org.uk)
    + © 2000-2012 Simon Kelley.
    +
    + (http://ipsec-tools.sourceforge.net/)
    + ©
    +
    + (http://www.hpcf.cam.ac.uk/export)
    + ©
    +
    + (http://www.ece.ucdavis.edu/ucd-snmp)
    + ©
    + © .
    + ©
    + ©
    +
    + (http://choparp.sourceforge.net)
    + © 1997 Takamichi Tateoka (tree@mma.club.uec.ac.jp)
    + © 2002 Thomas Quinot (thomas@cuivre.fr.eu.org)
    +
    + (http://www.mavetju.org/programming/php.php)
    +
    +
    +
    + (http://ahh.sourceforge.net/wol)
    + © 2000,2001,2002,2003,2004 Thomas Krennwallner <krennwallner@aon.at> +
    + (http://openvpn.net/) + +

    + + + diff --git a/src/usr/local/www/load_balancer_monitor.php b/src/usr/local/www/load_balancer_monitor.php new file mode 100644 index 0000000..87884e5 --- /dev/null +++ b/src/usr/local/www/load_balancer_monitor.php @@ -0,0 +1,138 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-services-loadbalancer-monitor +##|*NAME=Services: Load Balancer: Monitors page +##|*DESCR=Allow access to the 'Services: Load Balancer: Monitors' page. +##|*MATCH=load_balancer_monitor.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("util.inc"); + +if (!is_array($config['load_balancer']['monitor_type'])) { + $config['load_balancer']['monitor_type'] = array(); +} +$a_monitor = &$config['load_balancer']['monitor_type']; + +if ($_POST) { + $pconfig = $_POST; + + if ($_POST['apply']) { + $retval = 0; + $retval |= filter_configure(); + $retval |= relayd_configure(); + + $savemsg = get_std_save_message($retval); + clear_subsystem_dirty('loadbalancer'); + } +} + +if ($_GET['act'] == "del") { + if (array_key_exists($_GET['id'], $a_monitor)) { + /* make sure no pools reference this entry */ + if (is_array($config['load_balancer']['lbpool'])) { + foreach ($config['load_balancer']['lbpool'] as $pool) { + if ($pool['monitor'] == $a_monitor[$_GET['id']]['name']) { + $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one pool."); + break; + } + } + } + + if (!$input_errors) { + unset($a_monitor[$_GET['id']]); + write_config(); + mark_subsystem_dirty('loadbalancer'); + header("Location: load_balancer_monitor.php"); + exit; + } + } +} + +$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Monitor")); +$shortcut_section = "relayd"; + +include("head.inc"); + +?> + + +
    + + +
    +" . gettext("You must apply the changes in order for them to take effect."));?>
    + +

    '; + message_html += '\"exclamation\"'; + message_html += '<\/td>'; + message_html += '' + message + '<\/b><\/font><\/td>'; + + if (message.indexOf('apply') > 0) { + message_html += ''; + message_html += ''; + message_html += '<\/td>'; + } + + message_html += '<\/tr><\/table><\/div><\/td><\/table>
    '; + jQuery('#inputerrors').html(message_html); + + NiftyCheck(); + Rounded(\"div#redbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\"); + Rounded(\"td#blackbox\",\"all\",\"#FFF\",\"#000000\",\"smooth\"); + + if (jQuery('#submit')) { + jQuery('#submit').css('visibility','visible'); + } + if (jQuery('#cancelbutton')) { + jQuery('#cancelbutton').css('visibility','visible'); + } + if (jQuery('#loading')) { + jQuery('#loading').css('visibility','hidden'); + } + if (jQuery('#inputerrors')) { + window.scrollTo(0, 0); + } + } + "; + + return $headjs; +} + +?> diff --git a/src/usr/local/www/help.php b/src/usr/local/www/help.php new file mode 100644 index 0000000..8cee1ab --- /dev/null +++ b/src/usr/local/www/help.php @@ -0,0 +1,377 @@ + + * + */ + +require_once("guiconfig.inc"); + +/* Define hash of jumpto url maps */ + +/* Links to categories could probably be more specific. */ +$helppages = array( + /* These pages are confirmed to work and have usable content */ + 'index.php' => 'https://doc.pfsense.org/index.php/Dashboard', + 'license.php' => 'https://www.pfsense.org/about-pfsense/#legal', + 'miniupnpd.xml' => 'https://doc.pfsense.org/index.php/What_are_UPnP_and_NAT-PMP', + 'status_upnp.php' => 'https://doc.pfsense.org/index.php/What_are_UPnP_and_NAT-PMP', + 'firewall_virtual_ip.php' => 'https://doc.pfsense.org/index.php/What_are_Virtual_IP_Addresses', + 'firewall_virtual_ip_edit.php' => 'https://doc.pfsense.org/index.php/What_are_Virtual_IP_Addresses', + 'firewall_aliases.php' => 'https://doc.pfsense.org/index.php/Aliases', + 'firewall_aliases_edit.php' => 'https://doc.pfsense.org/index.php/Aliases', + 'firewall_aliases_import.php' => 'https://doc.pfsense.org/index.php/Aliases', + 'firewall_nat_out.php' => 'https://doc.pfsense.org/index.php/Outbound_NAT', + 'firewall_nat_out_edit.php' => 'https://doc.pfsense.org/index.php/Outbound_NAT', + 'firewall_rules.php' => 'https://doc.pfsense.org/index.php/Firewall_Rule_Basics', + 'firewall_rules_edit.php' => 'https://doc.pfsense.org/index.php/Firewall_Rule_Basics', + 'firewall_schedule.php' => 'https://doc.pfsense.org/index.php/Firewall_Rule_Schedules', + 'firewall_schedule_edit.php' => 'https://doc.pfsense.org/index.php/Firewall_Rule_Schedules', + 'interfaces_vlan.php' => 'https://doc.pfsense.org/index.php/VLAN_Trunking', + 'interfaces_vlan_edit.php' => 'https://doc.pfsense.org/index.php/VLAN_Trunking', + 'diag_routes.php' => 'https://doc.pfsense.org/index.php/Viewing_Routes', + 'diag_packet_capture.php' => 'https://doc.pfsense.org/index.php/Sniffers,_Packet_Capture', + 'diag_system_pftop.php' => 'https://doc.pfsense.org/index.php/How_can_I_monitor_bandwidth_usage#pftop', + 'status_rrd_graph.php' => 'https://doc.pfsense.org/index.php/RRD_Graphs', + 'status_rrd_graph_img.php' => 'https://doc.pfsense.org/index.php/RRD_Graphs', + 'status_rrd_graph_settings.php' => 'https://doc.pfsense.org/index.php/RRD_Graphs', + 'firewall_nat.php' => 'https://doc.pfsense.org/index.php/How_can_I_forward_ports_with_pfSense', + 'firewall_nat_edit.php' => 'https://doc.pfsense.org/index.php/How_can_I_forward_ports_with_pfSense', + 'diag_arp.php' => 'https://doc.pfsense.org/index.php/ARP_Table', + 'diag_backup.php' => 'https://doc.pfsense.org/index.php/Configuration_Backup_and_Restore', + 'diag_confbak.php' => 'https://doc.pfsense.org/index.php/Configuration_History', + 'diag_defaults.php' => 'https://doc.pfsense.org/index.php/Factory_Defaults', + 'firewall_shaper.php' => 'https://doc.pfsense.org/index.php/Traffic_Shaping_Guide', + 'firewall_shaper_layer7.php' => 'https://doc.pfsense.org/index.php/Layer_7', + 'firewall_shaper_queues.php' => 'https://doc.pfsense.org/index.php/Traffic_Shaping_Guide', + 'firewall_shaper_vinterface.php' => 'https://doc.pfsense.org/index.php/Limiters', + 'firewall_shaper_wizards.php' => 'https://doc.pfsense.org/index.php/Traffic_Shaping_Guide', + 'status_queues.php' => 'https://doc.pfsense.org/index.php/Traffic_Shaping_Guide', + 'status_dhcp_leases.php' => 'https://doc.pfsense.org/index.php/DHCP_Leases', + 'diag_dns.php' => 'https://doc.pfsense.org/index.php/DNS_Lookup', + 'diag_dump_states.php' => 'https://doc.pfsense.org/index.php/Show_States', + 'diag_resetstate.php' => 'https://doc.pfsense.org/index.php/Reset_States', + 'diag_logs.php' => 'https://doc.pfsense.org/index.php/System_Logs', + 'diag_logs_auth.php' => 'https://doc.pfsense.org/index.php/Captive_Portal_Authentication_Logs', + 'diag_logs_dhcp.php' => 'https://doc.pfsense.org/index.php/DHCP_Logs', + 'diag_logs_filter.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs', + 'diag_logs_filter_dynamic.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs', + 'diag_logs_filter_summary.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs', + 'diag_logs_ntpd.php' => 'https://doc.pfsense.org/index.php/NTP_Logs', + 'diag_logs_ppp.php' => 'https://doc.pfsense.org/index.php/PPP_Logs', + 'diag_logs_relayd.php' => 'https://doc.pfsense.org/index.php/Load_Balancer_Logs', + 'diag_logs_settings.php' => 'https://doc.pfsense.org/index.php/Log_Settings', + 'diag_logs_vpn.php' => 'https://doc.pfsense.org/index.php/PPTP_VPN_Logs', + 'diag_logs_ipsec.php' => 'https://doc.pfsense.org/index.php/IPsec_Logs', + 'diag_logs_openvpn.php' => 'https://doc.pfsense.org/index.php/OpenVPN_Logs', + 'diag_nanobsd.php' => 'https://doc.pfsense.org/index.php/NanoBSD_Diagnostics', + 'diag_patterns.php' => 'https://doc.pfsense.org/index.php/Layer7_Pattern_Diagnostics', + 'diag_ping.php' => 'https://doc.pfsense.org/index.php/Ping_Host', + 'diag_pkglogs.php' => 'https://doc.pfsense.org/index.php/Package_Logs', + 'diag_tables.php' => 'https://doc.pfsense.org/index.php/Tables', + 'diag_system_activity.php' => 'https://doc.pfsense.org/index.php/System_Activity', + 'diag_traceroute.php' => 'https://doc.pfsense.org/index.php/Traceroute', + 'easyrule.php' => 'https://doc.pfsense.org/index.php/Easy_Rule', + 'edit.php' => 'https://doc.pfsense.org/index.php/Edit_File', + 'exec.php' => 'https://doc.pfsense.org/index.php/Execute_Command', + 'firewall_nat_1to1.php' => 'https://doc.pfsense.org/index.php/1:1_NAT', + 'firewall_nat_1to1_edit.php' => 'https://doc.pfsense.org/index.php/1:1_NAT', + 'halt.php' => 'https://doc.pfsense.org/index.php/Halt_System', + 'reboot.php' => 'https://doc.pfsense.org/index.php/Reboot_System', + 'status_filter_reload.php' => 'https://doc.pfsense.org/index.php/Filter_Reload_Status', + 'status_gateway_groups.php' => 'https://doc.pfsense.org/index.php/Gateway_Status', + 'status_gateways.php' => 'https://doc.pfsense.org/index.php/Gateway_Status', + 'status_graph.php' => 'https://doc.pfsense.org/index.php/Traffic_Graph', + 'status_graph_cpu.php' => 'https://doc.pfsense.org/index.php/CPU_Load', + 'status_interfaces.php' => 'https://doc.pfsense.org/index.php/Interface_Status', + 'status_services.php' => 'https://doc.pfsense.org/index.php/Services_Status', + 'status_wireless.php' => 'https://doc.pfsense.org/index.php/Wireless_Status', + 'pkg_mgr.php' => 'https://doc.pfsense.org/index.php/Package_Manager', + 'pkg_mgr_install.php' => 'https://doc.pfsense.org/index.php/Package_Manager', + 'pkg_mgr_installed.php' => 'https://doc.pfsense.org/index.php/Package_Manager', + 'pkg_mgr_settings.php' => 'https://doc.pfsense.org/index.php/Package_Manager_Settings', + 'interfaces.php' => 'https://doc.pfsense.org/index.php/Interface_Settings', + 'interfaces_assign.php' => 'https://doc.pfsense.org/index.php/Assign_Interfaces', + 'interfaces_bridge.php' => 'https://doc.pfsense.org/index.php/Interface_Bridges', + 'interfaces_bridge_edit.php' => 'https://doc.pfsense.org/index.php/Interface_Bridges', + 'interfaces_gif.php' => 'https://doc.pfsense.org/index.php/GIF_Interfaces', + 'interfaces_gif_edit.php' => 'https://doc.pfsense.org/index.php/GIF_Interfaces', + 'interfaces_gre.php' => 'https://doc.pfsense.org/index.php/GRE_Interfaces', + 'interfaces_gre_edit.php' => 'https://doc.pfsense.org/index.php/GRE_Interfaces', + 'interfaces_groups.php' => 'https://doc.pfsense.org/index.php/Interface_Groups', + 'interfaces_groups_edit.php' => 'https://doc.pfsense.org/index.php/Interface_Groups', + 'interfaces_lagg.php' => 'https://doc.pfsense.org/index.php/LAGG_Interfaces', + 'interfaces_lagg_edit.php' => 'https://doc.pfsense.org/index.php/LAGG_Interfaces', + 'interfaces_ppps.php' => 'https://doc.pfsense.org/index.php/PPP_Interfaces', + 'interfaces_ppps_edit.php' => 'https://doc.pfsense.org/index.php/PPP_Interfaces', + 'interfaces_qinq.php' => 'https://doc.pfsense.org/index.php/QinQ_Interfaces', + 'interfaces_qinq_edit.php' => 'https://doc.pfsense.org/index.php/QinQ_Interfaces', + 'services_dyndns.php' => 'https://doc.pfsense.org/index.php/Dynamic_DNS', + 'services_dyndns_edit.php' => 'https://doc.pfsense.org/index.php/Dynamic_DNS', + 'services_rfc2136.php' => 'https://doc.pfsense.org/index.php/Dynamic_DNS', + 'services_rfc2136_edit.php' => 'https://doc.pfsense.org/index.php/Dynamic_DNS', + 'services_dhcp.php' => 'https://doc.pfsense.org/index.php/DHCP_Server', + 'services_dhcp_edit.php' => 'https://doc.pfsense.org/index.php/DHCP_Server', + 'services_dhcp_relay.php' => 'https://doc.pfsense.org/index.php/DHCP_Relay', + 'services_dnsmasq.php' => 'https://doc.pfsense.org/index.php/DNS_Forwarder', + 'services_dnsmasq_domainoverride_edit.php' => 'https://doc.pfsense.org/index.php/DNS_Forwarder', + 'services_dnsmasq_edit.php' => 'https://doc.pfsense.org/index.php/DNS_Forwarder', + 'services_igmpproxy.php' => 'https://doc.pfsense.org/index.php/IGMP_Proxy', + 'services_igmpproxy_edit.php' => 'https://doc.pfsense.org/index.php/IGMP_Proxy', + 'services_snmp.php' => 'https://doc.pfsense.org/index.php/SNMP_Daemon', + 'services_wol.php' => 'https://doc.pfsense.org/index.php/Wake_on_LAN', + 'services_wol_edit.php' => 'https://doc.pfsense.org/index.php/Wake_on_LAN', + 'system.php' => 'https://doc.pfsense.org/index.php/General_Setup', + 'system_advanced_admin.php' => 'https://doc.pfsense.org/index.php/Advanced_Setup', + 'system_advanced_firewall.php' => 'https://doc.pfsense.org/index.php/Advanced_Setup#Firewall.2FNAT', + 'system_advanced_misc.php' => 'https://doc.pfsense.org/index.php/Advanced_Setup#Miscellaneous', + 'system_advanced_network.php' => 'https://doc.pfsense.org/index.php/Advanced_Setup#Firewall.2FNAT', + 'system_advanced_notifications.php' => 'https://doc.pfsense.org/index.php/Advanced_Setup#Notifications', + 'system_advanced_sysctl.php' => 'https://doc.pfsense.org/index.php/Advanced_Setup#System_Tunables', + 'system_firmware.php' => 'https://doc.pfsense.org/index.php/Firmware_Updates', + 'system_firmware_auto.php' => 'https://doc.pfsense.org/index.php/Firmware_Updates', + 'system_firmware_check.php' => 'https://doc.pfsense.org/index.php/Firmware_Updates', + 'system_firmware_settings.php' => 'https://doc.pfsense.org/index.php/Firmware_Updates', + 'system_gateway_groups.php' => 'https://doc.pfsense.org/index.php/Gateway_Settings', + 'system_gateway_groups_edit.php' => 'https://doc.pfsense.org/index.php/Gateway_Settings', + 'system_gateways.php' => 'https://doc.pfsense.org/index.php/Gateway_Settings', + 'system_gateways_edit.php' => 'https://doc.pfsense.org/index.php/Gateway_Settings', + 'system_routes.php' => 'https://doc.pfsense.org/index.php/Static_Routes', + 'system_routes_edit.php' => 'https://doc.pfsense.org/index.php/Static_Routes', + 'system_authservers.php' => 'https://doc.pfsense.org/index.php/User_Authentication_Servers', + 'system_groupmanager.php' => 'https://doc.pfsense.org/index.php/Group_Manager', + 'system_groupmanager_addprivs.php' => 'https://doc.pfsense.org/index.php/Group_Manager', + 'system_usermanager.php' => 'https://doc.pfsense.org/index.php/User_Manager', + 'system_usermanager_addprivs.php' => 'https://doc.pfsense.org/index.php/User_Manager', + 'system_usermanager_settings.php' => 'https://doc.pfsense.org/index.php/User_Manager', + 'system_usermanager_settings_ldapacpicker.php' => 'https://doc.pfsense.org/index.php/User_Manager', + 'system_usermanager_settings_test.php' => 'https://doc.pfsense.org/index.php/User_Manager', + 'system_usermanager_passwordmg.php' => 'https://doc.pfsense.org/index.php/User_Manager', + 'system_camanager.php' => 'https://doc.pfsense.org/index.php/Certificate_Management', + 'system_certmanager.php' => 'https://doc.pfsense.org/index.php/Certificate_Management', + 'vpn_l2tp.php' => 'https://doc.pfsense.org/index.php/L2TP_VPN_Settings', + 'vpn_l2tp_users.php' => 'https://doc.pfsense.org/index.php/L2TP_VPN_Settings', + 'vpn_l2tp_users_edit.php' => 'https://doc.pfsense.org/index.php/L2TP_VPN_Settings', + 'vpn_pppoe.php' => 'https://doc.pfsense.org/index.php/PPPoE_Server_Settings', + 'vpn_pppoe_edit.php' => 'https://doc.pfsense.org/index.php/PPPoE_Server_Settings', + 'vpn_pptp.php' => 'https://doc.pfsense.org/index.php/PPTP_VPN_Settings', + 'vpn_pptp_users.php' => 'https://doc.pfsense.org/index.php/PPTP_VPN_Settings', + 'vpn_pptp_users_edit.php' => 'https://doc.pfsense.org/index.php/PPTP_VPN_Settings', + 'diag_ipsec.php' => 'https://doc.pfsense.org/index.php/IPsec_Status', + 'diag_ipsec_sad.php' => 'https://doc.pfsense.org/index.php/IPsec_Status', + 'diag_ipsec_spd.php' => 'https://doc.pfsense.org/index.php/IPsec_Status', + 'vpn_ipsec.php' => 'https://doc.pfsense.org/index.php/IPsec_Tunnels', + 'vpn_ipsec_mobile.php' => 'https://doc.pfsense.org/index.php/IPsec_Mobile_Clients', + 'diag_ipsec_leases.php' => 'https://doc.pfsense.org/index.php/IPsec_Mobile_Clients', + 'vpn_ipsec_phase1.php' => 'https://doc.pfsense.org/index.php/IPsec_Tunnels', + 'vpn_ipsec_phase2.php' => 'https://doc.pfsense.org/index.php/IPsec_Tunnels', + 'vpn_ipsec_keys.php' => 'https://doc.pfsense.org/index.php/IPsec_Tunnels', + 'vpn_ipsec_keys_edit.php' => 'https://doc.pfsense.org/index.php/IPsec_Tunnels', + 'vpn_ipsec_settings.php' => 'https://doc.pfsense.org/index.php/Advanced_IPsec_Settings', + 'services_captiveportal.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'services_captiveportal_filemanager.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'services_captiveportal_ip.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'services_captiveportal_ip_edit.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'services_captiveportal_mac.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'services_captiveportal_mac_edit.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'services_captiveportal_hostname.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'services_captiveportal_hostname_edit.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'status_captiveportal.php' => 'https://doc.pfsense.org/index.php/Captive_Portal_Status', + 'status_captiveportal_test.php' => 'https://doc.pfsense.org/index.php/Captive_Portal_Status', + 'services_captiveportal_vouchers.php' => 'https://doc.pfsense.org/index.php/Captive_Portal_Vouchers', + 'services_captiveportal_vouchers_edit.php' => 'https://doc.pfsense.org/index.php/Captive_Portal_Vouchers', + 'status_captiveportal_voucher_rolls.php' => 'https://doc.pfsense.org/index.php/Captive_Portal_Vouchers', + 'status_captiveportal_vouchers.php' => 'https://doc.pfsense.org/index.php/Captive_Portal_Vouchers', + 'status_openvpn.php' => 'https://doc.pfsense.org/index.php/OpenVPN_Status', + 'vpn_openvpn_client.php' => 'https://doc.pfsense.org/index.php/OpenVPN_Settings', + 'vpn_openvpn_csc.php' => 'https://doc.pfsense.org/index.php/OpenVPN_Settings', + 'vpn_openvpn_server.php' => 'https://doc.pfsense.org/index.php/OpenVPN_Settings', + 'openvpn-client-export.xml' => 'https://doc.pfsense.org/index.php/OpenVPN_Client_Exporter', /* Package */ + 'vpn_openvpn_export.php' => 'https://doc.pfsense.org/index.php/OpenVPN_Client_Exporter', /* Package */ + 'diag_authentication.php' => 'https://doc.pfsense.org/index.php/User_Authentication_Servers', + 'diag_limiter_info.php' => 'https://doc.pfsense.org/index.php/Limiters', + 'diag_pf_info.php' => 'https://doc.pfsense.org/index.php/Packet_Filter_Information', + 'diag_smart.php' => 'https://doc.pfsense.org/index.php/SMART_Status', + 'diag_states_summary.php' => 'https://doc.pfsense.org/index.php/States_Summary', + 'interfaces_wireless.php' => 'https://doc.pfsense.org/index.php/Wireless_Interfaces', + 'interfaces_wireless_edit.php' => 'https://doc.pfsense.org/index.php/Wireless_Interfaces', + 'system_crlmanager.php' => 'https://doc.pfsense.org/index.php/Certificate_Management', + 'crash_reporter.php' => 'https://doc.pfsense.org/index.php/Unexpected_Reboot_Troubleshooting', + 'diag_dump_states_sources.php' => 'https://doc.pfsense.org/index.php/Show_Source_Tracking', + 'diag_logs_gateways.php' => 'https://doc.pfsense.org/index.php/Gateway_Logs', + 'diag_logs_resolver.php' => 'https://doc.pfsense.org/index.php/Resolver_Logs', + 'diag_logs_routing.php' => 'https://doc.pfsense.org/index.php/Routing_Logs', + 'diag_logs_wireless.php' => 'https://doc.pfsense.org/index.php/Wireless_Logs', + 'diag_ndp.php' => 'https://doc.pfsense.org/index.php/NDP_Table', + 'diag_sockets.php' => 'https://doc.pfsense.org/index.php/Diag_Sockets', + 'diag_testport.php' => 'https://doc.pfsense.org/index.php/Test_Port', + 'firewall_nat_npt.php' => 'https://doc.pfsense.org/index.php/NPt', + 'firewall_nat_npt_edit.php' => 'https://doc.pfsense.org/index.php/NPt', + 'services_captiveportal_zones.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'services_captiveportal_zones_edit.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'status_captiveportal_expire.php' => 'https://doc.pfsense.org/index.php/Captive_Portal', + 'services_ntpd.php' => 'https://doc.pfsense.org/index.php/NTP_Server', + 'status_ntpd.php' => 'https://doc.pfsense.org/index.php/NTP_Server', + 'services_ntpd_gps.php' => 'https://doc.pfsense.org/index.php/NTP_Server', + 'services_ntpd_pps.php' => 'https://doc.pfsense.org/index.php/NTP_Server', + 'system_firmware_restorefullbackup.php' => 'https://doc.pfsense.org/index.php/Full_Backup', + 'load_balancer_monitor.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing', + 'load_balancer_monitor_edit.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing', + 'load_balancer_pool.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing#Set_up_Load_Balancing_Pool', + 'load_balancer_pool_edit.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing#Set_up_Load_Balancing_Pool', + 'load_balancer_virtual_server.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing#Set_up_Virtual_Server', + 'load_balancer_virtual_server_edit.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing#Set_up_Virtual_Server', + 'load_balancer_setting.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing#Advanced_Settings', + 'status_lb_pool.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing_Status', + 'status_lb_vs.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing_Status', + 'services_dhcpv6_relay.php' => 'https://doc.pfsense.org/index.php/DHCP_Relay', + 'status_dhcpv6_leases.php' => 'https://doc.pfsense.org/index.php/DHCPv6_Leases', + 'services_dhcpv6.php' => 'https://doc.pfsense.org/index.php/DHCPv6_Server', + 'services_dhcpv6_edit.php' => 'https://doc.pfsense.org/index.php/DHCPv6_Server', + 'services_router_advertisements.php' => 'https://doc.pfsense.org/index.php/Router_Advertisements', + 'carp_status.php' => 'https://doc.pfsense.org/index.php/CARP_Status', + 'system_hasync.php' => 'https://doc.pfsense.org/index.php/High_Availability', + 'services_unbound.php' => 'https://doc.pfsense.org/index.php/Unbound_DNS_Resolver', + 'services_unbound_advanced.php' => 'https://doc.pfsense.org/index.php/Unbound_DNS_Resolver#Advanced_Settings_Tab', + 'services_unbound_acls.php' => 'https://doc.pfsense.org/index.php/Unbound_DNS_Resolver#Access_Lists_Tab', + 'services_unbound_domainoverride_edit.php' => 'https://doc.pfsense.org/index.php/Unbound_DNS_Resolver', + 'services_unbound_host_edit.php' => 'https://doc.pfsense.org/index.php/Unbound_DNS_Resolver', + 'diag_gmirror.php' => 'https://doc.pfsense.org/index.php/Create_a_Software_RAID1_%28gmirror%29', + + /* From here down are packages. Not checking these as strictly, + any information is better than nothing. */ + 'olsrd.xml' => 'https://doc.pfsense.org/index.php/OLSR_Daemon', + 'routed.xml' => 'https://doc.pfsense.org/index.php/Routing_Information_Protocol_(RIP)', # RIP + 'autoconfigbackup.xml' => 'https://doc.pfsense.org/index.php/AutoConfigBackup', + 'phpservice.xml' => 'https://doc.pfsense.org/index.php/PHPService', + 'anyterm.xml' => 'https://doc.pfsense.org/index.php/AnyTerm_package', + 'avahi.xml' => 'https://doc.pfsense.org/index.php/Avahi_package', + 'squid.xml' => 'https://doc.pfsense.org/index.php/Category:Squid', + 'squid_auth.xml' => 'https://doc.pfsense.org/index.php/Category:Squid', + 'squid_cache.xml' => 'https://doc.pfsense.org/index.php/Category:Squid', + 'squid_extauth.xml' => 'https://doc.pfsense.org/index.php/Category:Squid', + 'squid_nac.xml' => 'https://doc.pfsense.org/index.php/Category:Squid', + 'squid_ng.xml' => 'https://doc.pfsense.org/index.php/Category:Squid', + 'squid_traffic.xml' => 'https://doc.pfsense.org/index.php/Category:Squid', + 'squid_upstream.xml' => 'https://doc.pfsense.org/index.php/Category:Squid', + 'squid_users.xml' => 'https://doc.pfsense.org/index.php/Category:Squid', + 'squidGuard.xml' => 'https://doc.pfsense.org/index.php/SquidGuard_package', + 'squidguard.xml' => 'https://doc.pfsense.org/index.php/SquidGuard_package', + 'squidguard_acl.xml' => 'https://doc.pfsense.org/index.php/SquidGuard_package', + 'squidguard_default.xml' => 'https://doc.pfsense.org/index.php/SquidGuard_package', + 'squidguard_dest.xml' => 'https://doc.pfsense.org/index.php/SquidGuard_package', + 'squidguard_log.xml' => 'https://doc.pfsense.org/index.php/SquidGuard_package', + 'squidguard_rewr.xml' => 'https://doc.pfsense.org/index.php/SquidGuard_package', + 'squidguard_time.xml' => 'https://doc.pfsense.org/index.php/SquidGuard_package', + 'bandwidthd.xml' => 'https://doc.pfsense.org/index.php/How_can_I_monitor_bandwidth_usage', + 'pfflowd.xml' => 'https://doc.pfsense.org/index.php/How_can_I_monitor_bandwidth_usage', + 'darkstat.xml' => 'https://doc.pfsense.org/index.php/How_can_I_monitor_bandwidth_usage', + 'rate.xml' => 'https://doc.pfsense.org/index.php/How_can_I_monitor_bandwidth_usage', + 'ntop.xml' => 'https://doc.pfsense.org/index.php/How_can_I_monitor_bandwidth_usage', + 'ntopng.xml' => 'https://doc.pfsense.org/index.php/How_can_I_monitor_bandwidth_usage', + 'vnstat.xml' => 'https://doc.pfsense.org/index.php/How_can_I_monitor_bandwidth_usage', + 'widentd.xml' => 'https://doc.pfsense.org/index.php/Widentd_package', + 'tinydns.xml' => 'https://doc.pfsense.org/index.php/Tinydns_package', + 'tinydns_domains.xml' => 'https://doc.pfsense.org/index.php/Tinydns_package', + 'tinydns_sync.xml' => 'https://doc.pfsense.org/index.php/Tinydns_package', + 'blinkled.xml' => 'https://doc.pfsense.org/index.php/BlinkLED_Package', + 'havp.xml' => 'https://doc.pfsense.org/index.php/HAVP_Package_for_HTTP_Anti-Virus_Scanning', + 'havp_avset.xml' => 'https://doc.pfsense.org/index.php/HAVP_Package_for_HTTP_Anti-Virus_Scanning', + 'havp_blacklist.xml' => 'https://doc.pfsense.org/index.php/HAVP_Package_for_HTTP_Anti-Virus_Scanning', + 'havp_fscan.xml' => 'https://doc.pfsense.org/index.php/HAVP_Package_for_HTTP_Anti-Virus_Scanning', + 'havp_trans_exclude.xml' => 'https://doc.pfsense.org/index.php/HAVP_Package_for_HTTP_Anti-Virus_Scanning', + 'havp_whitelist.xml' => 'https://doc.pfsense.org/index.php/HAVP_Package_for_HTTP_Anti-Virus_Scanning', + 'snort.xml' => 'https://doc.pfsense.org/index.php/Setup_Snort_Package', + 'snort/snort_interfaces.php' => 'https://doc.pfsense.org/index.php/Snort_interfaces', + 'snort/snort_interfaces_global.php' => 'https://doc.pfsense.org/index.php/Snort_interfaces_global', + 'snort/snort_download_updates.php' => 'https://doc.pfsense.org/index.php/Snort_updates', + 'snort/snort_alerts.php' => 'https://doc.pfsense.org/index.php/Snort_alerts', + 'snort/snort_blocked.php' => 'https://doc.pfsense.org/index.php/Snort_blocked_hosts', + 'snort/snort_passlist.php' => 'https://doc.pfsense.org/index.php/Snort_passlist', + 'snort/snort_passlist_edit.php' => 'https://doc.pfsense.org/index.php/Snort_passlist', + 'snort/snort_interfaces_suppress.php' => 'https://doc.pfsense.org/index.php/Snort_suppress_list', + 'snort/snort_interfaces_suppress_edit.php' => 'https://doc.pfsense.org/index.php/Snort_suppress_list', + 'snort/snort_interfaces_edit.php' => 'https://doc.pfsense.org/index.php/Snort_interfaces_edit', + 'snort/snort_rulesets.php' => 'https://doc.pfsense.org/index.php/Snort_rulesets', + 'snort/snort_rules.php' => 'https://doc.pfsense.org/index.php/Snort_rules', + 'snort/snort_define_servers.php' => 'https://doc.pfsense.org/index.php/Snort_define_servers', + 'snort/snort_preprocessors.php' => 'https://doc.pfsense.org/index.php/Snort_preprocessors', + 'snort/snort_barnyard.php' => 'https://doc.pfsense.org/index.php/Snort_barnyard2', + 'snort/snort_ip_reputation.php' => 'https://doc.pfsense.org/index.php/Snort_ip_reputation_preprocessor', + 'snort/snort_ip_list_mgmt.php' => 'https://doc.pfsense.org/index.php/Snort_ip_list_mgmt', + 'snort/snort_sync.xml' => 'https://doc.pfsense.org/index.php/Snort_sync', + 'stunnel.xml' => 'https://doc.pfsense.org/index.php/Stunnel_package', + 'stunnel_certs.xml' => 'https://doc.pfsense.org/index.php/Stunnel_package', + 'openbgpd.xml' => 'https://doc.pfsense.org/index.php/OpenBGPD_package', + 'openbgpd_groups.xml' => 'https://doc.pfsense.org/index.php/OpenBGPD_package', + 'openbgpd_neighbors.xml' => 'https://doc.pfsense.org/index.php/OpenBGPD_package', + 'iperf.xml' => 'https://doc.pfsense.org/index.php/Iperf_package', + 'iperfserver.xml' => 'https://doc.pfsense.org/index.php/Iperf_package', + 'jail_template.xml' => 'https://doc.pfsense.org/index.php/PfJailctl_package', + 'jailctl.xml' => 'https://doc.pfsense.org/index.php/PfJailctl_package', + 'jailctl.xml' => 'https://doc.pfsense.org/index.php/PfJailctl_package', + 'jailctl_defaults.xml' => 'https://doc.pfsense.org/index.php/PfJailctl_package', + 'jailctl_settings.xml' => 'https://doc.pfsense.org/index.php/PfJailctl_package', + 'siproxd.xml' => 'https://doc.pfsense.org/index.php/Siproxd_package', + 'siproxdusers.xml' => 'https://doc.pfsense.org/index.php/Siproxd_package', + 'open-vm-tools.xml' => 'https://doc.pfsense.org/index.php/Open_VM_Tools_package', + 'arping.xml' => 'https://doc.pfsense.org/index.php/Arping_package', + 'unbound.xml' => 'https://doc.pfsense.org/index.php/Unbound_package', + 'nut.xml' => 'https://doc.pfsense.org/index.php/Nut_package', + +); + +$pagename = ""; +/* Check for parameter "page". */ +if ($_GET && isset($_GET['page'])) { + $pagename = $_GET['page']; +} + +/* If "page" is not found, check referring URL */ +if (empty($pagename)) { + /* Attempt to parse out filename */ + $uri_split = ""; + preg_match("/\/(.*)\?(.*)/", $_SERVER["HTTP_REFERER"], $uri_split); + + /* If there was no match, there were no parameters, just grab the filename + Otherwise, use the matched filename from above. */ + if (empty($uri_split[0])) { + $pagename = ltrim(parse_url($_SERVER["HTTP_REFERER"], PHP_URL_PATH), '/'); + } else { + $pagename = $uri_split[1]; + } + + /* If the page name is still empty, the user must have requested / (index.php) */ + if (empty($pagename)) { + $pagename = "index.php"; + } + + /* If the filename is pkg_edit.php or wizard.php, reparse looking + for the .xml filename */ + if (($pagename == "pkg.php") || ($pagename == "pkg_edit.php") || ($pagename == "wizard.php")) { + $param_split = explode('&', $uri_split[2]); + foreach ($param_split as $param) { + if (substr($param, 0, 4) == "xml=") { + $xmlfile = explode('=', $param); + $pagename = $xmlfile[1]; + } + } + } +} + +/* Using the derived page name, attempt to find in the URL mapping hash */ +if (array_key_exists($pagename, $helppages)) { + $helppage = $helppages[$pagename]; +} + +/* If we haven't determined a proper page, use a generic help page + stating that a given page does not have help yet. */ + +if (empty($helppage)) { + $helppage = 'https://doc.pfsense.org/index.php/No_Help_Found'; +} + +/* Redirect to help page. */ +header("Location: {$helppage}"); + +?> diff --git a/src/usr/local/www/ifstats.php b/src/usr/local/www/ifstats.php new file mode 100644 index 0000000..68cc6d8 --- /dev/null +++ b/src/usr/local/www/ifstats.php @@ -0,0 +1,66 @@ + diff --git a/src/usr/local/www/includes/functions.inc.php b/src/usr/local/www/includes/functions.inc.php new file mode 100644 index 0000000..2c48543 --- /dev/null +++ b/src/usr/local/www/includes/functions.inc.php @@ -0,0 +1,407 @@ + $gw) { + if (!$isfirst) { + $data .= ","; + } + $isfirst = false; + $data .= $gw['name'] . ","; + + $monitor_address = ""; + $monitor_address_disp = ""; + if ($display_type == "monitor_ip" || $display_type == "both_ip") { + $monitor_address = $gw['monitor']; + if ($monitor_address != "" && $display_type == "both_ip") { + $monitor_address_disp = " (" . $monitor_address . ")"; + } else { + $monitor_address_disp = $monitor_address; + } + } + + if ($gateways_status[$gname]) { + if ($display_type == "gw_ip" || $display_type == "both_ip" || ($display_type == "monitor_ip" && $monitor_address == "")) { + $if_gw = lookup_gateway_ip_by_name($gname); + } else { + $if_gw = ""; + } + if ($monitor_address == $if_gw) { + $monitor_address_disp = ""; + } + + $data .= "" . $if_gw . $monitor_address_disp . ","; + $gws = $gateways_status[$gname]; + switch (strtolower($gws['status'])) { + case "none": + $online = "Online"; + $bgcolor = "#90EE90"; // lightgreen + break; + case "down": + $online = "Offline"; + $bgcolor = "#F08080"; // lightcoral + break; + case "delay": + $online = "Latency"; + $bgcolor = "#F0E68C"; // khaki + break; + case "loss": + $online = "Packetloss"; + $bgcolor = "#F0E68C"; // khaki + break; + default: + $online = "Pending"; + break; + } + } else { + if ($display_type == "gw_ip" || $display_type == "both_ip" || ($display_type == "monitor_ip" && $monitor_address == "")) { + $if_gw = "~"; + } else { + $if_gw = ""; + } + $data .= $if_gw . $monitor_address_disp . ","; + $gws['delay'] = "~"; + $gws['loss'] = "~"; + $online = "Unknown"; + $bgcolor = "#ADD8E6"; // lightblue + } + $data .= ($online == "Pending") ? "{$online},{$online}," : "{$gws['delay']},{$gws['loss']},"; + $data .= "{$online}^{$bgcolor}"; + } + return $data; +} + +function get_uptime() { + $uptime = get_uptime_sec(); + + if (intval($uptime) == 0) { + return; + } + + $updays = (int)($uptime / 86400); + $uptime %= 86400; + $uphours = (int)($uptime / 3600); + $uptime %= 3600; + $upmins = (int)($uptime / 60); + $uptime %= 60; + $upsecs = (int)($uptime); + + $uptimestr = ""; + if ($updays > 1) { + $uptimestr .= "$updays Days "; + } else if ($updays > 0) { + $uptimestr .= "1 Day "; + } + + if ($uphours > 1) { + $hours = "s"; + } + + if ($upmins > 1) { + $minutes = "s"; + } + + if ($upmins > 1) { + $seconds = "s"; + } + + $uptimestr .= sprintf("%02d Hour$hours %02d Minute$minutes %02d Second$seconds", $uphours, $upmins, $upsecs); + return $uptimestr; +} + +/* Calculates non-idle CPU time and returns as a percentage */ +function cpu_usage() { + $duration = 1; + $diff = array('user', 'nice', 'sys', 'intr', 'idle'); + $cpuTicks = array_combine($diff, explode(" ", get_single_sysctl('kern.cp_time'))); + sleep($duration); + $cpuTicks2 = array_combine($diff, explode(" ", get_single_sysctl('kern.cp_time'))); + + $totalStart = array_sum($cpuTicks); + $totalEnd = array_sum($cpuTicks2); + + // Something wrapped ?!?! + if ($totalEnd <= $totalStart) { + return 0; + } + + // Calculate total cycles used + $totalUsed = ($totalEnd - $totalStart) - ($cpuTicks2['idle'] - $cpuTicks['idle']); + + // Calculate the percentage used + $cpuUsage = floor(100 * ($totalUsed / ($totalEnd - $totalStart))); + + return $cpuUsage; +} + +function get_pfstate($percent=false) { + global $config; + $matches = ""; + if (isset($config['system']['maximumstates']) and $config['system']['maximumstates'] > 0) { + $maxstates="{$config['system']['maximumstates']}"; + } else { + $maxstates=pfsense_default_state_size(); + } + $curentries = `/sbin/pfctl -si |grep current`; + if (preg_match("/([0-9]+)/", $curentries, $matches)) { + $curentries = $matches[1]; + } + if (!is_numeric($curentries)) { + $curentries = 0; + } + if ($percent) { + if (intval($maxstates) > 0) { + return round(($curentries / $maxstates) * 100, 0); + } else { + return "NA"; + } + } else { + return $curentries . "/" . $maxstates; + } +} + +function has_temp() { + /* no known temp monitors available at present */ + + /* should only reach here if there is no hardware monitor */ + return false; +} + +function get_hwtype() { + return; +} + +function get_mbuf($percent=false) { + $mbufs_output=trim(`/usr/bin/netstat -mb | /usr/bin/grep "mbuf clusters in use" | /usr/bin/awk '{ print $1 }'`); + list($mbufs_current, $mbufs_cache, $mbufs_total, $mbufs_max) = explode("/", $mbufs_output); + if ($percent) { + if ($mbufs_max > 0) { + return round(($mbufs_total / $mbufs_max) * 100, 0); + } else { + return "NA"; + } + } else { + return "{$mbufs_total}/{$mbufs_max}"; + } +} + +function get_temp() { + $temp_out = get_single_sysctl("dev.cpu.0.temperature"); + if ($temp_out == "") { + $temp_out = get_single_sysctl("hw.acpi.thermal.tz0.temperature"); + } + + // Remove 'C' from the end + return rtrim($temp_out, 'C'); +} + +/* Get mounted filesystems and usage. Do not display entries for virtual filesystems (e.g. devfs, nullfs, unionfs) */ +function get_mounted_filesystems() { + $mout = ""; + $filesystems = array(); + exec("/bin/df -Tht ufs,zfs,cd9660 | /usr/bin/awk '{print $1, $2, $3, $6, $7;}'", $mout); + + /* Get rid of the header */ + array_shift($mout); + foreach ($mout as $fs) { + $f = array(); + list($f['device'], $f['type'], $f['total_size'], $f['percent_used'], $f['mountpoint']) = explode(' ', $fs); + + /* We dont' want the trailing % sign. */ + $f['percent_used'] = trim($f['percent_used'], '%'); + + $filesystems[] = $f; + } + return $filesystems; +} + +function disk_usage($slice = '/') { + $dfout = ""; + exec("/bin/df -h {$slice} | /usr/bin/tail -n 1 | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d '%' -f 1", $dfout); + $diskusage = trim($dfout[0]); + + return $diskusage; +} + +function swap_usage() { + exec("/usr/sbin/swapinfo", $swap_info); + $swap_used = ""; + foreach ($swap_info as $line) { + if (preg_match('/(\d+)%$/', $line, $matches)) { + $swap_used = $matches[1]; + break; + } + } + + return $swap_used; +} + +function mem_usage() { + $totalMem = get_single_sysctl("vm.stats.vm.v_page_count"); + if ($totalMem > 0) { + $inactiveMem = get_single_sysctl("vm.stats.vm.v_inactive_count"); + $cachedMem = get_single_sysctl("vm.stats.vm.v_cache_count"); + $freeMem = get_single_sysctl("vm.stats.vm.v_free_count"); + $usedMem = $totalMem - ($inactiveMem + $cachedMem + $freeMem); + $memUsage = round(($usedMem * 100) / $totalMem, 0); + } else { + $memUsage = "NA"; + } + + return $memUsage; +} + +function update_date_time() { + $datetime = date("D M j G:i:s T Y"); + return $datetime; +} + +function get_cpufreq() { + $cpufreqs = ""; + $out = ""; + $cpufreqs = explode(" ", get_single_sysctl('dev.cpu.0.freq_levels')); + $maxfreq = explode("/", $cpufreqs[0]); + $maxfreq = $maxfreq[0]; + $curfreq = ""; + $curfreq = get_single_sysctl('dev.cpu.0.freq'); + if (($curfreq > 0) && ($curfreq != $maxfreq)) { + $out = "Current: {$curfreq} MHz, Max: {$maxfreq} MHz"; + } + return $out; +} + +function get_cpu_count($show_detail = false) { + $cpucount = get_single_sysctl('kern.smp.cpus'); + + if ($show_detail) { + $cpudetail = ""; + exec("/usr/bin/grep 'SMP.*package.*core' /var/log/dmesg.boot | /usr/bin/cut -f2- -d' '", $cpudetail); + $cpucount = $cpudetail[0]; + } + return $cpucount; +} + +function get_load_average() { + $load_average = ""; + exec("/usr/bin/uptime | /usr/bin/sed 's/^.*: //'", $load_average); + return $load_average[0]; +} + +function get_interfacestats() { + global $config; + //build interface list for widget use + $ifdescrs = get_configured_interface_list(); + + $array_in_packets = array(); + $array_out_packets = array(); + $array_in_bytes = array(); + $array_out_bytes = array(); + $array_in_errors = array(); + $array_out_errors = array(); + $array_collisions = array(); + $array_interrupt = array(); + $new_data = ""; + + //build data arrays + foreach ($ifdescrs as $ifdescr => $ifname) { + $ifinfo = get_interface_info($ifdescr); + $new_data .= "{$ifinfo['inpkts']},"; + $new_data .= "{$ifinfo['outpkts']},"; + $new_data .= format_bytes($ifinfo['inbytes']) . ","; + $new_data .= format_bytes($ifinfo['outbytes']) . ","; + if (isset($ifinfo['inerrs'])) { + $new_data .= "{$ifinfo['inerrs']},"; + $new_data .= "{$ifinfo['outerrs']},"; + } else { + $new_data .= "0,"; + $new_data .= "0,"; + } + if (isset($ifinfo['collisions'])) { + $new_data .= htmlspecialchars($ifinfo['collisions']) . ","; + } else { + $new_data .= "0,"; + } + }//end for + + return $new_data; +} + +function get_interfacestatus() { + $data = ""; + global $config; + + //build interface list for widget use + $ifdescrs = get_configured_interface_with_descr(); + + foreach ($ifdescrs as $ifdescr => $ifname) { + $ifinfo = get_interface_info($ifdescr); + $data .= $ifname . "^"; + if ($ifinfo['status'] == "up" || $ifinfo['status'] == "associated") { + $data .= "up"; + } else if ($ifinfo['status'] == "no carrier") { + $data .= "down"; + } else if ($ifinfo['status'] == "down") { + $data .= "block"; + } + $data .= "^"; + if ($ifinfo['ipaddr']) { + $data .= "" . htmlspecialchars($ifinfo['ipaddr']) . ""; + } + $data .= "^"; + if ($ifinfo['ipaddrv6']) { + $data .= "" . htmlspecialchars($ifinfo['ipaddrv6']) . ""; + } + $data .= "^"; + if ($ifinfo['status'] != "down") { + $data .= htmlspecialchars($ifinfo['media']); + } + + $data .= "~"; + + } + return $data; +} + +?> diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php new file mode 100644 index 0000000..ba39623 --- /dev/null +++ b/src/usr/local/www/index.php @@ -0,0 +1,799 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + oR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/ifconfig + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-system-login/logout +##|*NAME=System: Login / Logout page / Dashboard +##|*DESCR=Allow access to the 'System: Login / Logout' page and Dashboard. +##|*MATCH=index.php* +##|-PRIV + +// Turn on buffering to speed up rendering +ini_set('output_buffering', 'true'); + +// Start buffering with a cache size of 100000 +ob_start(null, "1000"); + + +## Load Essential Includes +require_once('guiconfig.inc'); +require_once('functions.inc'); +require_once('notices.inc'); +require_once("pkg-utils.inc"); + +if (isset($_REQUEST['closenotice'])) { + close_notice($_REQUEST['closenotice']); + echo get_menu_messages(); + exit; +} +if ($_REQUEST['act'] == 'alias_info_popup' && !preg_match("/\D/", $_REQUEST['aliasid'])) { + alias_info_popup($_REQUEST['aliasid']); + exit; +} + +if ($g['disablecrashreporter'] != true) { + // Check to see if we have a crash report + $x = 0; + if (file_exists("/tmp/PHP_errors.log")) { + $total = `/usr/bin/grep -vi warning /tmp/PHP_errors.log | /usr/bin/wc -l | /usr/bin/awk '{ print $1 }'`; + if ($total > 0) { + $x++; + } + } + $crash = glob("/var/crash/*"); + $skip_files = array(".", "..", "minfree", ""); + if (is_array($crash)) { + foreach ($crash as $c) { + if (!in_array(basename($c), $skip_files)) { + $x++; + } + } + if ($x > 0) { + $savemsg = "{$g['product_name']} has detected a crash report or programming bug. Click here for more information."; + } + } +} + +##build list of widgets +$directory = "/usr/local/www/widgets/widgets/"; +$dirhandle = opendir($directory); +$filename = ""; +$widgetnames = array(); +$widgetfiles = array(); +$widgetlist = array(); + +while (false !== ($filename = readdir($dirhandle))) { + $periodpos = strpos($filename, "."); + /* Ignore files not ending in .php */ + if (substr($filename, -4, 4) != ".php") { + continue; + } + $widgetname = substr($filename, 0, $periodpos); + $widgetnames[] = $widgetname; + if ($widgetname != "system_information") { + $widgetfiles[] = $filename; + } +} + +##sort widgets alphabetically +sort($widgetfiles); + +##insert the system information widget as first, so as to be displayed first +array_unshift($widgetfiles, "system_information.widget.php"); + +##if no config entry found, initialize config entry +if (!is_array($config['widgets'])) { + $config['widgets'] = array(); +} + +if ($_POST && $_POST['submit']) { + $config['widgets']['sequence'] = $_POST['sequence']; + + foreach ($widgetnames as $widget) { + if ($_POST[$widget . '-config']) { + $config['widgets'][$widget . '-config'] = $_POST[$widget . '-config']; + } + } + + write_config(gettext("Widget configuration has been changed.")); + header("Location: index.php"); + exit; +} + +## Load Functions Files +require_once('includes/functions.inc.php'); + +## Check to see if we have a swap space, +## if true, display, if false, hide it ... +if (file_exists("/usr/sbin/swapinfo")) { + $swapinfo = `/usr/sbin/swapinfo`; + if (stristr($swapinfo, '%') == true) { + $showswap=true; + } +} + +## User recently restored his config. +## If packages are installed lets resync +if (file_exists('/conf/needs_package_sync')) { + if ($config['installedpackages'] <> '' && is_array($config['installedpackages']['package'])) { + if ($g['platform'] == "pfSense" || $g['platform'] == "nanobsd") { + ## If the user has logged into webGUI quickly while the system is booting then do not redirect them to + ## the package reinstall page. That is about to be done by the boot script anyway. + ## The code in fbegin.inc will put up a notice to the user. + if (!platform_booting()) { + header('Location: pkg_mgr_install.php?mode=reinstallall'); + exit; + } + } + } else { + conf_mount_rw(); + @unlink('/conf/needs_package_sync'); + conf_mount_ro(); + } +} + +## If it is the first time webConfigurator has been +## accessed since initial install show this stuff. +if (file_exists('/conf/trigger_initial_wizard')) { + $lang_code = system_get_language_code(); + $lang_codeset = system_get_language_codeset(); + echo << + + + {$g['product_name']}.localdomain - {$g['product_name']} first time setup + + + + + +EOF; + + echo "\n"; + + if (file_exists("/usr/local/www/themes/{$g['theme']}/wizard.css")) { + echo "\n"; + } else { + echo ""; + } + + echo "
    \n"; + echo "
    \n"; + echo "\"logo\"

    \n"; + echo "

    \n"; + echo sprintf(gettext("Welcome to %s!\n"), $g['product_name']) . "

    "; + echo gettext("One moment while we start the initial setup wizard.") . "

    \n"; + echo gettext("Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.") . "

    \n"; + echo sprintf(gettext("To bypass the wizard, click on the %s logo on the initial page."), $g['product_name']) . "\n"; + echo "

    \n"; + echo "\n"; + echo "\n"; + exit; +} + + +## Find out whether there's hardware encryption or not +unset($hwcrypto); +$fd = @fopen("{$g['varlog_path']}/dmesg.boot", "r"); +if ($fd) { + while (!feof($fd)) { + $dmesgl = fgets($fd); + if (preg_match("/^hifn.: (.*?),/", $dmesgl, $matches) or + preg_match("/.*(VIA Padlock)/", $dmesgl, $matches) or + preg_match("/^safe.: (\w.*)/", $dmesgl, $matches) or + preg_match("/^ubsec.: (.*?),/", $dmesgl, $matches) or + preg_match("/^padlock.: <(.*?)>,/", $dmesgl, $matches) or + preg_match("/^glxsb.: (.*?),/", $dmesgl, $matches) or + preg_match("/^aesni.: <(.*?)>/", $dmesgl, $matches)) { + $hwcrypto = $matches[1]; + break; + } + } + fclose($fd); +} + +##build widget saved list information +if ($config['widgets'] && $config['widgets']['sequence'] != "") { + $pconfig['sequence'] = $config['widgets']['sequence']; + + $widgetlist = $pconfig['sequence']; + $colpos = array(); + $savedwidgetfiles = array(); + $widgetname = ""; + $widgetlist = explode(",", $widgetlist); + + ##read the widget position and display information + foreach ($widgetlist as $widget) { + $dashpos = strpos($widget, "-"); + $widgetname = substr($widget, 0, $dashpos); + $colposition = strpos($widget, ":"); + $displayposition = strrpos($widget, ":"); + $colpos[] = substr($widget, $colposition + 1, $displayposition - $colposition - 1); + $displayarray[] = substr($widget, $displayposition + 1); + $savedwidgetfiles[] = $widgetname . ".widget.php"; + } + + ##add widgets that may not be in the saved configuration, in case they are to be displayed later + foreach ($widgetfiles as $defaultwidgets) { + if (!in_array($defaultwidgets, $savedwidgetfiles)) { + $savedwidgetfiles[] = $defaultwidgets; + } + } + + ##find custom configurations of a particular widget and load its info to $pconfig + foreach ($widgetnames as $widget) { + if ($config['widgets'][$widget . '-config']) { + $pconfig[$widget . '-config'] = $config['widgets'][$widget . '-config']; + } + } + + $widgetlist = $savedwidgetfiles; +} else { + // no saved widget sequence found, build default list. + $widgetlist = $widgetfiles; +} + +##build list of php include files +$phpincludefiles = array(); +$directory = "/usr/local/www/widgets/include/"; +$dirhandle = opendir($directory); +$filename = ""; +while (false !== ($filename = readdir($dirhandle))) { + $phpincludefiles[] = $filename; +} +foreach ($phpincludefiles as $includename) { + if (!stristr($includename, ".inc")) { + continue; + } + include($directory . $includename); +} + +##begin AJAX +$jscriptstr = << +// + +EOD; + + +## Set Page Title and Include Header +$pgtitle = array(gettext("Status: Dashboard")); +include("head.inc"); + +?> + + + + + +\"big

    "; +} + +/* Print package server mismatch warning. See https://redmine.pfsense.org/issues/484 */ +if (!verify_all_package_servers()) { + print_info_box(package_server_mismatch_message()); +} + +if ($savemsg) { + print_info_box($savemsg); +} + +pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard"); + +?> + + + + + + + <?=gettext(" style="cursor: pointer;" onmouseup="domTT_activate(this, event, 'content', document.getElementById('content1'), 'type', 'velcro', 'delay', 0, 'fade', 'both', 'fadeMax', 100, 'styleClass', 'niceTitle');" /> + + <?=gettext(" style="cursor: help;" onmouseup="hideAllWidgets();domTT_activate(this, event, 'content', document.getElementById('welcome-container'), 'type', 'sticky', 'closeLink', '', 'delay', 0, 'fade', 'both', 'fadeMax', 100, 'styleClass', 'niceTitle');" /> + +    + " /> +
    + +
    + +
    + +
    +
    + = $halftotal && $printed == false) { + $printed = true; + ?> +
    +
    + +
    +
    + + + +
    +
    + +
    +
    + + + + + + + + + +
    +
    + +
    open
    +
    minimize
    +
    close
    +
    +
    +
    + +
    +
    + <?=gettext(..." /> +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + + + + +\n"; + } +?> + + + diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php new file mode 100644 index 0000000..760d386 --- /dev/null +++ b/src/usr/local/www/interfaces.php @@ -0,0 +1,3882 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/sbin/arp + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-interfaces +##|*NAME=Interfaces: WAN page +##|*DESCR=Allow access to the 'Interfaces' page. +##|*MATCH=interfaces.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("ipsec.inc"); +require_once("functions.inc"); +require_once("captiveportal.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("rrd.inc"); +require_once("vpn.inc"); +require_once("xmlparse_attr.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/interfaces.php'); +} + +// Get configured interface list +$ifdescrs = get_configured_interface_with_descr(false, true); + +$if = "wan"; +if ($_REQUEST['if']) { + $if = $_REQUEST['if']; +} + +if (empty($ifdescrs[$if])) { + header("Location: interfaces.php"); + exit; +} + +define("CRON_MONTHLY_PATTERN", "0 0 1 * *"); +define("CRON_WEEKLY_PATTERN", "0 0 * * 0"); +define("CRON_DAILY_PATTERN", "0 0 * * *"); +define("CRON_HOURLY_PATTERN", "0 * * * *"); + +if (!is_array($pconfig)) { + $pconfig = array(); +} + +if (!is_array($config['ppps'])) { + $config['ppps'] = array(); +} +if (!is_array($config['ppps']['ppp'])) { + $config['ppps']['ppp'] = array(); +} +$a_ppps = &$config['ppps']['ppp']; + +function remove_bad_chars($string) { + return preg_replace('/[^a-z_0-9]/i', '', $string); +} + +if (!is_array($config['gateways']['gateway_item'])) { + $config['gateways']['gateway_item'] = array(); +} +$a_gateways = &$config['gateways']['gateway_item']; + +$wancfg = &$config['interfaces'][$if]; +$old_wancfg = $wancfg; +$old_wancfg['realif'] = get_real_interface($if); +$old_ppps = $a_ppps; +// Populate page descr if it does not exist. +if ($if == "wan" && !$wancfg['descr']) { + $wancfg['descr'] = "WAN"; +} else if ($if == "lan" && !$wancfg['descr']) { + $wancfg['descr'] = "LAN"; +} + +/* NOTE: The code here is used to set the $pppid for the curious */ +foreach ($a_ppps as $pppid => $ppp) { + if ($wancfg['if'] == $ppp['if']) { + break; + } +} + +$type_disabled = (substr($wancfg['if'], 0, 3) == 'gre') ? 'disabled="disabled"' : ''; + +if ($wancfg['if'] == $a_ppps[$pppid]['if']) { + $pconfig['pppid'] = $pppid; + $pconfig['ptpid'] = $a_ppps[$pppid]['ptpid']; + $pconfig['port'] = $a_ppps[$pppid]['ports']; + if ($a_ppps[$pppid]['type'] == "ppp") { + $pconfig['ppp_username'] = $a_ppps[$pppid]['username']; + $pconfig['ppp_password'] = base64_decode($a_ppps[$pppid]['password']); + + $pconfig['phone'] = $a_ppps[$pppid]['phone']; + $pconfig['apn'] = $a_ppps[$pppid]['apn']; + } else if ($a_ppps[$pppid]['type'] == "pppoe") { + $pconfig['pppoe_username'] = $a_ppps[$pppid]['username']; + $pconfig['pppoe_password'] = base64_decode($a_ppps[$pppid]['password']); + $pconfig['provider'] = $a_ppps[$pppid]['provider']; + $pconfig['pppoe_dialondemand'] = isset($a_ppps[$pppid]['ondemand']); + $pconfig['pppoe_idletimeout'] = $a_ppps[$pppid]['idletimeout']; + + /* ================================================ */ + /* = force a connection reset at a specific time? = */ + /* ================================================ */ + + if (isset($a_ppps[$pppid]['pppoe-reset-type'])) { + $pconfig['pppoe-reset-type'] = $a_ppps[$pppid]['pppoe-reset-type']; + $itemhash = getMPDCRONSettings($a_ppps[$pppid]['if']); + if ($itemhash) { + $cronitem = $itemhash['ITEM']; + } + if (isset($cronitem)) { + $resetTime = "{$cronitem['minute']} {$cronitem['hour']} {$cronitem['mday']} {$cronitem['month']} {$cronitem['wday']}"; + } else { + $resetTime = NULL; + } + //log_error("ResetTime:".$resetTime); + if ($a_ppps[$pppid]['pppoe-reset-type'] == "custom") { + if ($cronitem) { + $pconfig['pppoe_pr_custom'] = true; + $pconfig['pppoe_resetminute'] = $cronitem['minute']; + $pconfig['pppoe_resethour'] = $cronitem['hour']; + if ($cronitem['mday'] <> "*" && $cronitem['month'] <> "*") { + $pconfig['pppoe_resetdate'] = "{$cronitem['month']}/{$cronitem['mday']}/" . date("Y"); + } + } + } else if ($a_ppps[$pppid]['pppoe-reset-type'] == "preset") { + $pconfig['pppoe_pr_preset'] = true; + switch ($resetTime) { + case CRON_MONTHLY_PATTERN: + $pconfig['pppoe_monthly'] = true; + break; + case CRON_WEEKLY_PATTERN: + $pconfig['pppoe_weekly'] = true; + break; + case CRON_DAILY_PATTERN: + $pconfig['pppoe_daily'] = true; + break; + case CRON_HOURLY_PATTERN: + $pconfig['pppoe_hourly'] = true; + break; + } + } + } // End force pppoe reset at specific time + // End if type == pppoe + } else if ($a_ppps[$pppid]['type'] == "pptp" || $a_ppps[$pppid]['type'] == "l2tp") { + $pconfig['pptp_username'] = $a_ppps[$pppid]['username']; + $pconfig['pptp_password'] = base64_decode($a_ppps[$pppid]['password']); + $pconfig['pptp_local'] = explode(",", $a_ppps[$pppid]['localip']); + $pconfig['pptp_subnet'] = explode(",", $a_ppps[$pppid]['subnet']); + $pconfig['pptp_remote'] = explode(",", $a_ppps[$pppid]['gateway']); + $pconfig['pptp_dialondemand'] = isset($a_ppps[$pppid]['ondemand']); + $pconfig['pptp_idletimeout'] = $a_ppps[$pppid]['timeout']; + } +} else { + $pconfig['ptpid'] = interfaces_ptpid_next(); + $pppid = count($a_ppps); +} +$pconfig['dhcphostname'] = $wancfg['dhcphostname']; +$pconfig['alias-address'] = $wancfg['alias-address']; +$pconfig['alias-subnet'] = $wancfg['alias-subnet']; +$pconfig['dhcprejectfrom'] = $wancfg['dhcprejectfrom']; + +$pconfig['adv_dhcp_pt_timeout'] = $wancfg['adv_dhcp_pt_timeout']; +$pconfig['adv_dhcp_pt_retry'] = $wancfg['adv_dhcp_pt_retry']; +$pconfig['adv_dhcp_pt_select_timeout'] = $wancfg['adv_dhcp_pt_select_timeout']; +$pconfig['adv_dhcp_pt_reboot'] = $wancfg['adv_dhcp_pt_reboot']; +$pconfig['adv_dhcp_pt_backoff_cutoff'] = $wancfg['adv_dhcp_pt_backoff_cutoff']; +$pconfig['adv_dhcp_pt_initial_interval'] = $wancfg['adv_dhcp_pt_initial_interval']; + +$pconfig['adv_dhcp_pt_values'] = $wancfg['adv_dhcp_pt_values']; + +$pconfig['adv_dhcp_send_options'] = $wancfg['adv_dhcp_send_options']; +$pconfig['adv_dhcp_request_options'] = $wancfg['adv_dhcp_request_options']; +$pconfig['adv_dhcp_required_options'] = $wancfg['adv_dhcp_required_options']; +$pconfig['adv_dhcp_option_modifiers'] = $wancfg['adv_dhcp_option_modifiers']; + +$pconfig['adv_dhcp_config_advanced'] = $wancfg['adv_dhcp_config_advanced']; +$pconfig['adv_dhcp_config_file_override'] = $wancfg['adv_dhcp_config_file_override']; +$pconfig['adv_dhcp_config_file_override_path'] = $wancfg['adv_dhcp_config_file_override_path']; + +$pconfig['adv_dhcp6_interface_statement_send_options'] = $wancfg['adv_dhcp6_interface_statement_send_options']; +$pconfig['adv_dhcp6_interface_statement_request_options'] = $wancfg['adv_dhcp6_interface_statement_request_options']; +$pconfig['adv_dhcp6_interface_statement_information_only_enable'] = $wancfg['adv_dhcp6_interface_statement_information_only_enable']; +$pconfig['adv_dhcp6_interface_statement_script'] = $wancfg['adv_dhcp6_interface_statement_script']; + +$pconfig['adv_dhcp6_id_assoc_statement_address_enable'] = $wancfg['adv_dhcp6_id_assoc_statement_address_enable']; +$pconfig['adv_dhcp6_id_assoc_statement_address'] = $wancfg['adv_dhcp6_id_assoc_statement_address']; +$pconfig['adv_dhcp6_id_assoc_statement_address_id'] = $wancfg['adv_dhcp6_id_assoc_statement_address_id']; +$pconfig['adv_dhcp6_id_assoc_statement_address_pltime'] = $wancfg['adv_dhcp6_id_assoc_statement_address_pltime']; +$pconfig['adv_dhcp6_id_assoc_statement_address_vltime'] = $wancfg['adv_dhcp6_id_assoc_statement_address_vltime']; + +$pconfig['adv_dhcp6_id_assoc_statement_prefix_enable'] = $wancfg['adv_dhcp6_id_assoc_statement_prefix_enable']; +$pconfig['adv_dhcp6_id_assoc_statement_prefix'] = $wancfg['adv_dhcp6_id_assoc_statement_prefix']; +$pconfig['adv_dhcp6_id_assoc_statement_prefix_id'] = $wancfg['adv_dhcp6_id_assoc_statement_prefix_id']; +$pconfig['adv_dhcp6_id_assoc_statement_prefix_pltime'] = $wancfg['adv_dhcp6_id_assoc_statement_prefix_pltime']; +$pconfig['adv_dhcp6_id_assoc_statement_prefix_vltime'] = $wancfg['adv_dhcp6_id_assoc_statement_prefix_vltime']; + +$pconfig['adv_dhcp6_prefix_interface_statement_sla_id'] = $wancfg['adv_dhcp6_prefix_interface_statement_sla_id']; +$pconfig['adv_dhcp6_prefix_interface_statement_sla_len'] = $wancfg['adv_dhcp6_prefix_interface_statement_sla_len']; + +$pconfig['adv_dhcp6_authentication_statement_authname'] = $wancfg['adv_dhcp6_authentication_statement_authname']; +$pconfig['adv_dhcp6_authentication_statement_protocol'] = $wancfg['adv_dhcp6_authentication_statement_protocol']; +$pconfig['adv_dhcp6_authentication_statement_algorithm'] = $wancfg['adv_dhcp6_authentication_statement_algorithm']; +$pconfig['adv_dhcp6_authentication_statement_rdm'] = $wancfg['adv_dhcp6_authentication_statement_rdm']; + +$pconfig['adv_dhcp6_key_info_statement_keyname'] = $wancfg['adv_dhcp6_key_info_statement_keyname']; +$pconfig['adv_dhcp6_key_info_statement_realm'] = $wancfg['adv_dhcp6_key_info_statement_realm']; +$pconfig['adv_dhcp6_key_info_statement_keyid'] = $wancfg['adv_dhcp6_key_info_statement_keyid']; +$pconfig['adv_dhcp6_key_info_statement_secret'] = $wancfg['adv_dhcp6_key_info_statement_secret']; +$pconfig['adv_dhcp6_key_info_statement_expire'] = $wancfg['adv_dhcp6_key_info_statement_expire']; + +$pconfig['adv_dhcp6_config_advanced'] = $wancfg['adv_dhcp6_config_advanced']; +$pconfig['adv_dhcp6_config_file_override'] = $wancfg['adv_dhcp6_config_file_override']; +$pconfig['adv_dhcp6_config_file_override_path'] = $wancfg['adv_dhcp6_config_file_override_path']; + +$pconfig['dhcp_plus'] = isset($wancfg['dhcp_plus']); +$pconfig['descr'] = remove_bad_chars($wancfg['descr']); +$pconfig['enable'] = isset($wancfg['enable']); + +if (is_array($config['aliases']['alias'])) { + foreach ($config['aliases']['alias'] as $alias) { + if ($alias['name'] == $wancfg['descr']) { + $input_errors[] = sprintf(gettext("Sorry, an alias with the name %s already exists."), $wancfg['descr']); + } + } +} + +switch ($wancfg['ipaddr']) { + case "dhcp": + $pconfig['type'] = "dhcp"; + break; + case "pppoe": + case "pptp": + case "l2tp": + case "ppp": + $pconfig['type'] = $wancfg['ipaddr']; + break; + default: + if (is_ipaddrv4($wancfg['ipaddr'])) { + $pconfig['type'] = "staticv4"; + $pconfig['ipaddr'] = $wancfg['ipaddr']; + $pconfig['subnet'] = $wancfg['subnet']; + $pconfig['gateway'] = $wancfg['gateway']; + } else { + $pconfig['type'] = "none"; + } + break; +} + +switch ($wancfg['ipaddrv6']) { + case "slaac": + $pconfig['type6'] = "slaac"; + break; + case "dhcp6": + $pconfig['dhcp6-duid'] = $wancfg['dhcp6-duid']; + if (!isset($wancfg['dhcp6-ia-pd-len'])) { + $wancfg['dhcp6-ia-pd-len'] = "none"; + } + $pconfig['dhcp6-ia-pd-len'] = $wancfg['dhcp6-ia-pd-len']; + $pconfig['dhcp6-ia-pd-send-hint'] = isset($wancfg['dhcp6-ia-pd-send-hint']); + $pconfig['type6'] = "dhcp6"; + $pconfig['dhcp6prefixonly'] = isset($wancfg['dhcp6prefixonly']); + $pconfig['dhcp6usev4iface'] = isset($wancfg['dhcp6usev4iface']); + break; + case "6to4": + $pconfig['type6'] = "6to4"; + break; + case "track6": + $pconfig['type6'] = "track6"; + $pconfig['track6-interface'] = $wancfg['track6-interface']; + if ($wancfg['track6-prefix-id'] == "") { + $pconfig['track6-prefix-id'] = 0; + } else { + $pconfig['track6-prefix-id'] = $wancfg['track6-prefix-id']; + } + $pconfig['track6-prefix-id--hex'] = sprintf("%x", $pconfig['track6-prefix-id']); + break; + case "6rd": + $pconfig['prefix-6rd'] = $wancfg['prefix-6rd']; + if ($wancfg['prefix-6rd-v4plen'] == "") { + $wancfg['prefix-6rd-v4plen'] = "0"; + } + $pconfig['prefix-6rd-v4plen'] = $wancfg['prefix-6rd-v4plen']; + $pconfig['type6'] = "6rd"; + $pconfig['gateway-6rd'] = $wancfg['gateway-6rd']; + break; + default: + if (is_ipaddrv6($wancfg['ipaddrv6'])) { + $pconfig['type6'] = "staticv6"; + $pconfig['ipaddrv6'] = $wancfg['ipaddrv6']; + $pconfig['subnetv6'] = $wancfg['subnetv6']; + $pconfig['gatewayv6'] = $wancfg['gatewayv6']; + } else { + $pconfig['type6'] = "none"; + } + break; +} + +// print_r($pconfig); + +$pconfig['blockpriv'] = isset($wancfg['blockpriv']); +$pconfig['blockbogons'] = isset($wancfg['blockbogons']); +$pconfig['spoofmac'] = $wancfg['spoofmac']; +$pconfig['mtu'] = $wancfg['mtu']; +$pconfig['mss'] = $wancfg['mss']; + +/* Wireless interface? */ +if (isset($wancfg['wireless'])) { + /* Sync first to be sure it displays the actual settings that will be used */ + interface_sync_wireless_clones($wancfg, false); + /* Get wireless modes */ + $wlanif = get_real_interface($if); + if (!does_interface_exist($wlanif)) { + interface_wireless_clone($wlanif, $wancfg); + } + $wlanbaseif = interface_get_wireless_base($wancfg['if']); + preg_match("/^(.*?)([0-9]*)$/", $wlanbaseif, $wlanbaseif_split); + $wl_modes = get_wireless_modes($if); + $wl_chaninfo = get_wireless_channel_info($if); + $wl_sysctl_prefix = 'dev.' . $wlanbaseif_split[1] . '.' . $wlanbaseif_split[2]; + $wl_sysctl = get_sysctl( + array( + "{$wl_sysctl_prefix}.diversity", + "{$wl_sysctl_prefix}.txantenna", + "{$wl_sysctl_prefix}.rxantenna", + "{$wl_sysctl_prefix}.slottime", + "{$wl_sysctl_prefix}.acktimeout", + "{$wl_sysctl_prefix}.ctstimeout")); + $wl_regdomain_xml_attr = array(); + $wl_regdomain_xml = parse_xml_regdomain($wl_regdomain_xml_attr); + $wl_regdomains = &$wl_regdomain_xml['regulatory-domains']['rd']; + $wl_regdomains_attr = &$wl_regdomain_xml_attr['regulatory-domains']['rd']; + $wl_countries = &$wl_regdomain_xml['country-codes']['country']; + $wl_countries_attr = &$wl_regdomain_xml_attr['country-codes']['country']; + $pconfig['persistcommonwireless'] = isset($config['wireless']['interfaces'][$wlanbaseif]); + $pconfig['standard'] = $wancfg['wireless']['standard']; + $pconfig['mode'] = $wancfg['wireless']['mode']; + $pconfig['protmode'] = $wancfg['wireless']['protmode']; + $pconfig['ssid'] = $wancfg['wireless']['ssid']; + $pconfig['channel'] = $wancfg['wireless']['channel']; + $pconfig['txpower'] = $wancfg['wireless']['txpower']; + $pconfig['diversity'] = $wancfg['wireless']['diversity']; + $pconfig['txantenna'] = $wancfg['wireless']['txantenna']; + $pconfig['rxantenna'] = $wancfg['wireless']['rxantenna']; + $pconfig['distance'] = $wancfg['wireless']['distance']; + $pconfig['regdomain'] = $wancfg['wireless']['regdomain']; + $pconfig['regcountry'] = $wancfg['wireless']['regcountry']; + $pconfig['reglocation'] = $wancfg['wireless']['reglocation']; + $pconfig['wme_enable'] = isset($wancfg['wireless']['wme']['enable']); + if (isset($wancfg['wireless']['puren']['enable'])) { + $pconfig['puremode'] = '11n'; + } else if (isset($wancfg['wireless']['pureg']['enable'])) { + $pconfig['puremode'] = '11g'; + } else { + $pconfig['puremode'] = 'any'; + } + $pconfig['apbridge_enable'] = isset($wancfg['wireless']['apbridge']['enable']); + $pconfig['authmode'] = $wancfg['wireless']['authmode']; + $pconfig['hidessid_enable'] = isset($wancfg['wireless']['hidessid']['enable']); + $pconfig['auth_server_addr'] = $wancfg['wireless']['auth_server_addr']; + $pconfig['auth_server_port'] = $wancfg['wireless']['auth_server_port']; + $pconfig['auth_server_shared_secret'] = $wancfg['wireless']['auth_server_shared_secret']; + $pconfig['auth_server_addr2'] = $wancfg['wireless']['auth_server_addr2']; + $pconfig['auth_server_port2'] = $wancfg['wireless']['auth_server_port2']; + $pconfig['auth_server_shared_secret2'] = $wancfg['wireless']['auth_server_shared_secret2']; + if (is_array($wancfg['wireless']['wpa'])) { + $pconfig['debug_mode'] = $wancfg['wireless']['wpa']['debug_mode']; + $pconfig['macaddr_acl'] = $wancfg['wireless']['wpa']['macaddr_acl']; + $pconfig['mac_acl_enable'] = isset($wancfg['wireless']['wpa']['mac_acl_enable']); + $pconfig['auth_algs'] = $wancfg['wireless']['wpa']['auth_algs']; + $pconfig['wpa_mode'] = $wancfg['wireless']['wpa']['wpa_mode']; + $pconfig['wpa_key_mgmt'] = $wancfg['wireless']['wpa']['wpa_key_mgmt']; + $pconfig['wpa_pairwise'] = $wancfg['wireless']['wpa']['wpa_pairwise']; + $pconfig['wpa_group_rekey'] = $wancfg['wireless']['wpa']['wpa_group_rekey']; + $pconfig['wpa_gmk_rekey'] = $wancfg['wireless']['wpa']['wpa_gmk_rekey']; + $pconfig['wpa_strict_rekey'] = isset($wancfg['wireless']['wpa']['wpa_strict_rekey']); + $pconfig['passphrase'] = $wancfg['wireless']['wpa']['passphrase']; + $pconfig['ieee8021x'] = isset($wancfg['wireless']['wpa']['ieee8021x']['enable']); + $pconfig['rsn_preauth'] = isset($wancfg['wireless']['wpa']['rsn_preauth']); + $pconfig['ext_wpa_sw'] = $wancfg['wireless']['wpa']['ext_wpa_sw']; + $pconfig['wpa_enable'] = isset($wancfg['wireless']['wpa']['enable']); + } + $pconfig['wep_enable'] = isset($wancfg['wireless']['wep']['enable']); + $pconfig['mac_acl'] = $wancfg['wireless']['mac_acl']; + if (is_array($wancfg['wireless']['wep']) && is_array($wancfg['wireless']['wep']['key'])) { + $i = 1; + foreach ($wancfg['wireless']['wep']['key'] as $wepkey) { + $pconfig['key' . $i] = $wepkey['value']; + if (isset($wepkey['txkey'])) { + $pconfig['txkey'] = $i; + } + $i++; + } + if (!isset($wepkey['txkey'])) { + $pconfig['txkey'] = 1; + } + } +} + +if ($_POST['apply']) { + unset($input_errors); + if (!is_subsystem_dirty('interfaces')) { + $input_errors[] = gettext("You have already applied your settings!"); + } else { + unlink_if_exists("{$g['tmp_path']}/config.cache"); + clear_subsystem_dirty('interfaces'); + + if (file_exists("{$g['tmp_path']}/.interfaces.apply")) { + $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.interfaces.apply")); + foreach ($toapplylist as $ifapply => $ifcfgo) { + if (isset($config['interfaces'][$ifapply]['enable'])) { + interface_bring_down($ifapply, false, $ifcfgo); + interface_configure($ifapply, true); + } else { + interface_bring_down($ifapply, true, $ifcfgo); + if (isset($config['dhcpd'][$ifapply]['enable']) || + isset($config['dhcpdv6'][$ifapply]['enable'])) { + services_dhcpd_configure(); + } + } + } + } + /* restart snmp so that it binds to correct address */ + services_snmpd_configure(); + + /* sync filter configuration */ + setup_gateways_monitor(); + + clear_subsystem_dirty('interfaces'); + + filter_configure(); + + enable_rrd_graphing(); + + if (is_subsystem_dirty('staticroutes') && (system_routing_configure() == 0)) { + clear_subsystem_dirty('staticroutes'); + } + } + @unlink("{$g['tmp_path']}/.interfaces.apply"); + header("Location: interfaces.php?if={$if}"); + exit; +} else if ($_POST && $_POST['enable'] != "yes") { + unset($wancfg['enable']); + if (isset($wancfg['wireless'])) { + interface_sync_wireless_clones($wancfg, false); + } + write_config("Interface {$_POST['descr']}({$if}) is now disabled."); + mark_subsystem_dirty('interfaces'); + if (file_exists("{$g['tmp_path']}/.interfaces.apply")) { + $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.interfaces.apply")); + } else { + $toapplylist = array(); + } + $toapplylist[$if]['ifcfg'] = $wancfg; + $toapplylist[$if]['ppps'] = $a_ppps; + /* we need to be able remove IP aliases for IPv6 */ + file_put_contents("{$g['tmp_path']}/.interfaces.apply", serialize($toapplylist)); + header("Location: interfaces.php?if={$if}"); + exit; +} else if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + if (is_numeric("0x" . $_POST['track6-prefix-id--hex'])) { + $pconfig['track6-prefix-id'] = intval($_POST['track6-prefix-id--hex'], 16); + } else { + $pconfig['track6-prefix-id'] = 0; + } + conf_mount_rw(); + + /* filter out spaces from descriptions */ + $_POST['descr'] = remove_bad_chars($_POST['descr']); + + /* okay first of all, cause we are just hiding the PPPoE HTML + * fields related to PPPoE resets, we are going to unset $_POST + * vars, if the reset feature should not be used. Otherwise the + * data validation procedure below, may trigger a false error + * message. + */ + if (empty($_POST['pppoe-reset-type'])) { + unset($_POST['pppoe_pr_type']); + unset($_POST['pppoe_resethour']); + unset($_POST['pppoe_resetminute']); + unset($_POST['pppoe_resetdate']); + unset($_POST['pppoe_pr_preset_val']); + } + /* description unique? */ + foreach ($ifdescrs as $ifent => $ifdescr) { + if ($if != $ifent && $ifdescr == $_POST['descr']) { + $input_errors[] = gettext("An interface with the specified description already exists."); + break; + } + } + if (is_numeric($_POST['descr'])) { + $input_errors[] = gettext("The interface description cannot contain only numbers."); + } + /* input validation */ + if (isset($config['dhcpd']) && isset($config['dhcpd'][$if]['enable']) && (!preg_match("/^staticv4/", $_POST['type']))) { + $input_errors[] = gettext("The DHCP Server is active on this interface and it can be used only with a static IP configuration. Please disable the DHCP Server service on this interface first, then change the interface configuration."); + } + if (isset($config['dhcpdv6']) && isset($config['dhcpdv6'][$if]['enable']) && (!preg_match("/^staticv6/", $_POST['type6']))) { + $input_errors[] = gettext("The DHCP6 Server is active on this interface and it can be used only with a static IPv6 configuration. Please disable the DHCPv6 Server service on this interface first, then change the interface configuration."); + } + + switch (strtolower($_POST['type'])) { + case "staticv4": + $reqdfields = explode(" ", "ipaddr subnet gateway"); + $reqdfieldsn = array(gettext("IPv4 address"), gettext("Subnet bit count"), gettext("Gateway")); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + break; + case "none": + if (is_array($config['virtualip']['vip'])) { + foreach ($config['virtualip']['vip'] as $vip) { + if (is_ipaddrv4($vip['subnet']) && $vip['interface'] == $if) { + $input_errors[] = gettext("This interface is referenced by IPv4 VIPs. Please delete those before setting the interface to 'none' configuration."); + } + } + } + break; + case "ppp": + $reqdfields = explode(" ", "port phone"); + $reqdfieldsn = array(gettext("Modem Port"), gettext("Phone Number")); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + break; + case "pppoe": + if ($_POST['pppoe_dialondemand']) { + $reqdfields = explode(" ", "pppoe_username pppoe_password pppoe_dialondemand pppoe_idletimeout"); + $reqdfieldsn = array(gettext("PPPoE username"), gettext("PPPoE password"), gettext("Dial on demand"), gettext("Idle timeout value")); + } else { + $reqdfields = explode(" ", "pppoe_username pppoe_password"); + $reqdfieldsn = array(gettext("PPPoE username"), gettext("PPPoE password")); + } + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + break; + case "pptp": + if ($_POST['pptp_dialondemand']) { + $reqdfields = explode(" ", "pptp_username pptp_password pptp_local pptp_subnet pptp_remote pptp_dialondemand pptp_idletimeout"); + $reqdfieldsn = array(gettext("PPTP username"), gettext("PPTP password"), gettext("PPTP local IP address"), gettext("PPTP subnet"), gettext("PPTP remote IP address"), gettext("Dial on demand"), gettext("Idle timeout value")); + } else { + $reqdfields = explode(" ", "pptp_username pptp_password pptp_local pptp_subnet pptp_remote"); + $reqdfieldsn = array(gettext("PPTP username"), gettext("PPTP password"), gettext("PPTP local IP address"), gettext("PPTP subnet"), gettext("PPTP remote IP address")); + } + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + break; + case "l2tp": + if ($_POST['pptp_dialondemand']) { + $reqdfields = explode(" ", "pptp_username pptp_password pptp_remote pptp_dialondemand pptp_idletimeout"); + $reqdfieldsn = array(gettext("L2TP username"), gettext("L2TP password"), gettext("L2TP remote IP address"), gettext("Dial on demand"), gettext("Idle timeout value")); + } else { + $reqdfields = explode(" ", "pptp_username pptp_password pptp_remote"); + $reqdfieldsn = array(gettext("L2TP username"), gettext("L2TP password"), gettext("L2TP remote IP address")); + } + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + break; + } + switch (strtolower($_POST['type6'])) { + case "staticv6": + $reqdfields = explode(" ", "ipaddrv6 subnetv6 gatewayv6"); + $reqdfieldsn = array(gettext("IPv6 address"), gettext("Subnet bit count"), gettext("Gateway")); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + break; + case "none": + if (is_array($config['virtualip']['vip'])) { + foreach ($config['virtualip']['vip'] as $vip) { + if (is_ipaddrv6($vip['subnet']) && $vip['interface'] == $if) { + $input_errors[] = gettext("This interface is referenced by IPv6 VIPs. Please delete those before setting the interface to 'none' configuration."); + } + } + } + break; + case "dhcp6": + if (in_array($wancfg['ipaddrv6'], array())) { + $input_errors[] = sprintf(gettext("You have to reassign the interface to be able to configure as %s."), $_POST['type6']); + } + if ($_POST['dhcp6-ia-pd-send-hint'] && strtolower($_POST['dhcp6-ia-pd-len']) == 'none') { + $input_errors[] = gettext('DHCPv6 Prefix Delegation size must be provided when Send IPv6 prefix hint flag is checked'); + } + break; + case "6rd": + foreach ($ifdescrs as $ifent => $ifdescr) { + if ($if != $ifent && ($config[interfaces][$ifent]['ipaddrv6'] == $_POST['type6'])) { + if ($config[interfaces][$ifent]['prefix-6rd'] == $_POST['prefix-6rd']) { + $input_errors[] = gettext("You can only have one interface configured in 6rd with same prefix."); + break; + } + } + } + if (in_array($wancfg['ipaddrv6'], array())) { + $input_errors[] = sprintf(gettext("You have to reassign the interface to be able to configure as %s."), $_POST['type6']); + } + break; + case "6to4": + foreach ($ifdescrs as $ifent => $ifdescr) { + if ($if != $ifent && ($config[interfaces][$ifent]['ipaddrv6'] == $_POST['type6'])) { + $input_errors[] = sprintf(gettext("You can only have one interface configured as 6to4."), $_POST['type6']); + break; + } + } + if (in_array($wancfg['ipaddrv6'], array())) { + $input_errors[] = sprintf(gettext("You have to reassign the interface to be able to configure as %s."), $_POST['type6']); + } + break; + case "track6": + /* needs to check if $track6-prefix-id is used on another interface */ + if (in_array($wancfg['ipaddrv6'], array())) { + $input_errors[] = sprintf(gettext("You have to reassign the interface to be able to configure as %s."), $_POST['type6']); + } + + if ($_POST['track6-prefix-id--hex'] != "" && !is_numeric("0x" . $_POST['track6-prefix-id--hex'])) { + $input_errors[] = gettext("You must enter a valid hexadecimal number for the IPv6 prefix ID."); + } else { + $track6_prefix_id = intval($_POST['track6-prefix-id--hex'], 16); + if ($track6_prefix_id < 0 || $track6_prefix_id > $_POST['ipv6-num-prefix-ids-' . $_POST['track6-interface']]) { + $input_errors[] = gettext("You specified an IPv6 prefix ID that is out of range.") . + " ({$_POST['track6-interface']}) - (0) - (" . sprintf('%x', $_POST['ipv6-num-prefix-ids-' . $_POST['track6-interface']]) . ")"; + } else { + foreach ($ifdescrs as $ifent => $ifdescr) { + if ($if == $ifent) { + continue; + } + if ($config['interfaces'][$ifent]['ipaddrv6'] == 'track6' && + $config['interfaces'][$ifent]['track6-interface'] == $_POST['track6-interface'] && + $config['interfaces'][$ifent]['track6-prefix-id'] == $track6_prefix_id) { + $input_errors[] = sprintf(gettext("This track6 prefix ID is already being used in %s."), $ifdescr); + } + } + } + } + break; + } + + /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */ + $staticroutes = get_staticroutes(true); + $_POST['spoofmac'] = strtolower(str_replace("-", ":", $_POST['spoofmac'])); + if ($_POST['ipaddr']) { + if (!is_ipaddrv4($_POST['ipaddr'])) { + $input_errors[] = gettext("A valid IPv4 address must be specified."); + } else { + $where_ipaddr_configured = where_is_ipaddr_configured($_POST['ipaddr'], $if, true, true, $_POST['subnet']); + if (count($where_ipaddr_configured)) { + $subnet_conflict_text = sprintf(gettext("IPv4 address %s is being used by or overlaps with:"), $_POST['ipaddr'] . "/" . $_POST['subnet']); + foreach ($where_ipaddr_configured as $subnet_conflict) { + $subnet_conflict_text .= " " . convert_friendly_interface_to_friendly_descr($subnet_conflict['if']) . " (" . $subnet_conflict['ip_or_subnet'] . ")"; + } + $input_errors[] = $subnet_conflict_text; + } + + /* Do not accept network or broadcast address, except if subnet is 31 or 32 */ + if ($_POST['subnet'] < 31) { + if ($_POST['ipaddr'] == gen_subnet($_POST['ipaddr'], $_POST['subnet'])) { + $input_errors[] = gettext("This IPv4 address is the network address and cannot be used"); + } else if ($_POST['ipaddr'] == gen_subnet_max($_POST['ipaddr'], $_POST['subnet'])) { + $input_errors[] = gettext("This IPv4 address is the broadcast address and cannot be used"); + } + } + + foreach ($staticroutes as $route_subnet) { + list($network, $subnet) = explode("/", $route_subnet); + if ($_POST['subnet'] == $subnet && $network == gen_subnet($_POST['ipaddr'], $_POST['subnet'])) { + $input_errors[] = gettext("This IPv4 address conflicts with a Static Route."); + break; + } + unset($network, $subnet); + } + } + } + if ($_POST['ipaddrv6']) { + if (!is_ipaddrv6($_POST['ipaddrv6'])) { + $input_errors[] = gettext("A valid IPv6 address must be specified."); + } else { + $where_ipaddr_configured = where_is_ipaddr_configured($_POST['ipaddrv6'], $if, true, true, $_POST['subnetv6']); + if (count($where_ipaddr_configured)) { + $subnet_conflict_text = sprintf(gettext("IPv6 address %s is being used by or overlaps with:"), $_POST['ipaddrv6'] . "/" . $_POST['subnetv6']); + foreach ($where_ipaddr_configured as $subnet_conflict) { + $subnet_conflict_text .= " " . convert_friendly_interface_to_friendly_descr($subnet_conflict['if']) . " (" . $subnet_conflict['ip_or_subnet'] . ")"; + } + $input_errors[] = $subnet_conflict_text; + } + + foreach ($staticroutes as $route_subnet) { + list($network, $subnet) = explode("/", $route_subnet); + if ($_POST['subnetv6'] == $subnet && $network == gen_subnetv6($_POST['ipaddrv6'], $_POST['subnetv6'])) { + $input_errors[] = gettext("This IPv6 address conflicts with a Static Route."); + break; + } + unset($network, $subnet); + } + } + } + if (($_POST['subnet'] && !is_numeric($_POST['subnet']))) { + $input_errors[] = gettext("A valid subnet bit count must be specified."); + } + if (($_POST['subnetv6'] && !is_numeric($_POST['subnetv6']))) { + $input_errors[] = gettext("A valid subnet bit count must be specified."); + } + if (($_POST['alias-address'] && !is_ipaddrv4($_POST['alias-address']))) { + $input_errors[] = gettext("A valid alias IP address must be specified."); + } + if (($_POST['alias-subnet'] && !is_numeric($_POST['alias-subnet']))) { + $input_errors[] = gettext("A valid alias subnet bit count must be specified."); + } + if ($_POST['dhcprejectfrom'] && !is_ipaddrv4($_POST['dhcprejectfrom'])) { + $input_errors[] = gettext("A valid alias IP address must be specified to reject DHCP Leases from."); + } + if (($_POST['gateway'] != "none") || ($_POST['gatewayv6'] != "none")) { + $match = false; + foreach ($a_gateways as $gateway) { + if (in_array($_POST['gateway'], $gateway)) { + $match = true; + } + } + foreach ($a_gateways as $gateway) { + if (in_array($_POST['gatewayv6'], $gateway)) { + $match = true; + } + } + if (!$match) { + $input_errors[] = gettext("A valid gateway must be specified."); + } + } + if (($_POST['provider'] && !is_domain($_POST['provider']))) { + $input_errors[] = gettext("The service name contains invalid characters."); + } + if (($_POST['pppoe_idletimeout'] != "") && !is_numericint($_POST['pppoe_idletimeout'])) { + $input_errors[] = gettext("The idle timeout value must be an integer."); + } + if ($_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) && + $_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23) { + $input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23)."); + } + if ($_POST['pppoe_resetminute'] <> "" && !is_numericint($_POST['pppoe_resetminute']) && + $_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <=59) { + $input_errors[] = gettext("A valid PPPoE reset minute must be specified (0-59)."); + } + if ($_POST['pppoe_resetdate'] <> "" && !is_numeric(str_replace("/", "", $_POST['pppoe_resetdate']))) { + $input_errors[] = gettext("A valid PPPoE reset date must be specified (mm/dd/yyyy)."); + } + if (($_POST['pptp_local'] && !is_ipaddrv4($_POST['pptp_local']))) { + $input_errors[] = gettext("A valid PPTP local IP address must be specified."); + } + if (($_POST['pptp_subnet'] && !is_numeric($_POST['pptp_subnet']))) { + $input_errors[] = gettext("A valid PPTP subnet bit count must be specified."); + } + if (($_POST['pptp_remote'] && !is_ipaddrv4($_POST['pptp_remote']) && !is_hostname($_POST['gateway'][$iface]))) { + $input_errors[] = gettext("A valid PPTP remote IP address must be specified."); + } + if (($_POST['pptp_idletimeout'] != "") && !is_numericint($_POST['pptp_idletimeout'])) { + $input_errors[] = gettext("The idle timeout value must be an integer."); + } + if (($_POST['spoofmac'] && !is_macaddr($_POST['spoofmac']))) { + $input_errors[] = gettext("A valid MAC address must be specified."); + } + if ($_POST['mtu']) { + if (!is_numericint($_POST['mtu'])) { + $input_errors[] = "MTU must be an integer."; + } + if (substr($wancfg['if'], 0, 3) == 'gif') { + $min_mtu = 1280; + $max_mtu = 8192; + } else { + $min_mtu = 576; + $max_mtu = 9000; + } + + if ($_POST['mtu'] < $min_mtu || $_POST['mtu'] > $max_mtu) { + $input_errors[] = sprintf(gettext("The MTU must be between %d and %d bytes."), $min_mtu, $max_mtu); + } + + unset($min_mtu, $max_mtu); + + if (stristr($wancfg['if'], "_vlan")) { + $realhwif_array = get_parent_interface($wancfg['if']); + // Need code to handle MLPPP if we ever use $realhwif for MLPPP handling + $parent_realhwif = $realhwif_array[0]; + $parent_if = convert_real_interface_to_friendly_interface_name($parent_realhwif); + if (!empty($parent_if) && !empty($config['interfaces'][$parent_if]['mtu'])) { + if ($_POST['mtu'] > intval($config['interfaces'][$parent_if]['mtu'])) { + $input_errors[] = gettext("The MTU of a VLAN cannot be greater than that of its parent interface."); + } + } + } else { + foreach ($config['interfaces'] as $idx => $ifdata) { + if (($idx == $if) || !preg_match('/_vlan[0-9]/', $ifdata['if'])) { + continue; + } + + $realhwif_array = get_parent_interface($ifdata['if']); + // Need code to handle MLPPP if we ever use $realhwif for MLPPP handling + $parent_realhwif = $realhwif_array[0]; + + if ($parent_realhwif != $wancfg['if']) { + continue; + } + + if (isset($ifdata['mtu']) && $ifdata['mtu'] > $_POST['mtu']) { + $input_errors[] = sprintf(gettext("Interface %s (VLAN) has MTU set to a larger value"), $ifdata['descr']); + } + } + } + } + if ($_POST['mss'] <> '') { + if (!is_numericint($_POST['mss']) || ($_POST['mss'] < 576 || $_POST['mss'] > 65535)) { + $input_errors[] = gettext("The MSS must be an integer between 576 and 65535 bytes."); + } + } + /* Wireless interface? */ + if (isset($wancfg['wireless'])) { + $reqdfields = array("mode"); + $reqdfieldsn = array(gettext("Mode")); + if ($_POST['mode'] == 'hostap') { + $reqdfields[] = "ssid"; + $reqdfieldsn[] = gettext("SSID"); + if (isset($_POST['channel']) && $_POST['channel'] == "0") { + // auto channel with hostap is broken, prevent this for now. + $input_errors[] = gettext("A specific channel, not auto, must be selected for Access Point mode."); + } + } + if (stristr($_POST['standard'], '11n')) { + if (!($_POST['wme_enable'])) { + $input_errors[] = gettext("802.11n standards require enabling WME."); + } + } + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + check_wireless_mode(); + if (isset($_POST['wpa_group_rekey']) && (!is_numericint($_POST['wpa_group_rekey']) || $_POST['wpa_group_rekey'] < 1 || $_POST['wpa_group_rekey'] > 9999)) { + $input_errors[] = gettext("Key Rotation must be an integer between 1 and 9999."); + } + if (isset($_POST['wpa_gmk_rekey']) && (!is_numericint($_POST['wpa_gmk_rekey']) || $_POST['wpa_gmk_rekey'] < 1 || $_POST['wpa_gmk_rekey'] > 9999)) { + $input_errors[] = gettext("Master Key Regeneration must be an integer between 1 and 9999."); + } + if (isset($_POST['wpa_group_rekey']) && isset($_POST['wpa_gmk_rekey'])) { + if ($_POST['wpa_group_rekey'] > $_POST['wpa_gmk_rekey']) { + $input_errors[] = gettext("Master Key Regeneration must be greater than Key Rotation."); + } + } + if (!empty($_POST['auth_server_addr'])) { + if (!is_domain($_POST['auth_server_addr']) && !is_ipaddr($_POST['auth_server_addr'])) { + $input_errors[] = gettext("802.1X Authentication Server must be an IP or hostname."); + } + } + if (!empty($_POST['auth_server_addr2'])) { + if (!is_domain($_POST['auth_server_addr2']) && !is_ipaddr($_POST['auth_server_addr2'])) { + $input_errors[] = gettext("Secondary 802.1X Authentication Server must be an IP or hostname."); + } + } + if (!empty($_POST['auth_server_port'])) { + if (!is_port($_POST['auth_server_port'])) { + $input_errors[] = gettext("802.1X Authentication Server Port must be a valid port number (1-65535)."); + } + } + if (!empty($_POST['auth_server_port2'])) { + if (!is_port($_POST['auth_server_port2'])) { + $input_errors[] = gettext("Secondary 802.1X Authentication Server Port must be a valid port number (1-65535)."); + } + } + if (isset($_POST['channel']) && !is_numericint($_POST['channel'])) { + if (!is_numericint($_POST['channel'])) { + $input_errors[] = gettext("Invalid channel specified."); + } else { + if ($_POST['channel'] > 255 || $_POST['channel'] < 0) { + $input_errors[] = gettext("Channel must be between 0-255."); + } + } + } + if (!empty($_POST['distance']) && !is_numericint($_POST['distance'])) { + $input_errors[] = gettext("Distance must be an integer."); + } + if (isset($_POST['standard']) && (stristr($_POST['standard'], '11na') || stristr($_POST['standard'], '11a'))) { + if ($_POST['channel'] != 0 && $_POST['channel'] < 15) { + $input_errors[] = gettext("Channel selected is not valid for 802.11a or 802.11na."); + } + } + if (isset($_POST['standard']) && ($_POST['standard'] == "11b" || $_POST['standard'] == "11g")) { + if ($_POST['channel'] > 14) { + $input_errors[] = gettext("Channel selected is not valid for 802.11b or 802.11g."); + } + } + if (!empty($_POST['protmode']) && !in_array($_POST['protmode'], array("off", "cts", "rtscts"))) { + $input_errors[] = gettext("Invalid option chosen for OFDM Protection Mode"); + } + /* loop through keys and enforce size */ + for ($i = 1; $i <= 4; $i++) { + if ($_POST['key' . $i]) { + /* 64 bit */ + if (strlen($_POST['key' . $i]) == 5) { + continue; + } + if (strlen($_POST['key' . $i]) == 10) { + /* hex key */ + if (stristr($_POST['key' . $i], "0x") == false) { + $_POST['key' . $i] = "0x" . $_POST['key' . $i]; + } + continue; + } + if (strlen($_POST['key' . $i]) == 12) { + /* hex key */ + if (stristr($_POST['key' . $i], "0x") == false) { + $_POST['key' . $i] = "0x" . $_POST['key' . $i]; + } + continue; + } + /* 128 bit */ + if (strlen($_POST['key' . $i]) == 13) { + continue; + } + if (strlen($_POST['key' . $i]) == 26) { + /* hex key */ + if (stristr($_POST['key' . $i], "0x") == false) { + $_POST['key' . $i] = "0x" . $_POST['key' . $i]; + } + continue; + } + if (strlen($_POST['key' . $i]) == 28) { + continue; + } + $input_errors[] = gettext("Invalid WEP key. Enter a valid 40, 64, 104 or 128 bit WEP key."); + break; + } + } + + if ($_POST['passphrase']) { + $passlen = strlen($_POST['passphrase']); + if ($passlen < 8 || $passlen > 63) { + $input_errors[] = gettext("The WPA passphrase must be between 8 and 63 characters long."); + } + } + if ($_POST['wpa_enable'] == "yes") { + if (empty($_POST['passphrase']) && stristr($_POST['wpa_key_mgmt'], "WPA-PSK")) { + $input_errors[] = gettext("A WPA Passphrase must be specified when WPA PSK is enabled."); + } + } + } + if (!$input_errors) { + if ($wancfg['ipaddr'] != $_POST['type']) { + if (in_array($wancfg['ipaddr'], array("ppp", "pppoe", "pptp", "l2tp"))) { + $wancfg['if'] = $a_ppps[$pppid]['ports']; + unset($a_ppps[$pppid]); + } else if ($wancfg['ipaddr'] == "dhcp") { + kill_dhclient_process($wancfg['if']); + } + if ($wancfg['ipaddrv6'] == "dhcp6") { + $pid = find_dhcp6c_process($wancfg['if']); + if ($pid) { + posix_kill($pid, SIGTERM); + } + } + } + $ppp = array(); + if ($wancfg['ipaddr'] != "ppp") { + unset($wancfg['ipaddr']); + } + if ($wancfg['ipaddrv6'] != "ppp") { + unset($wancfg['ipaddrv6']); + } + unset($wancfg['subnet']); + unset($wancfg['gateway']); + unset($wancfg['subnetv6']); + unset($wancfg['gatewayv6']); + unset($wancfg['dhcphostname']); + unset($wancfg['dhcprejectfrom']); + unset($wancfg['dhcp6-duid']); + unset($wancfg['dhcp6-ia-pd-len']); + unset($wancfg['dhcp6-ia-pd-send-hint']); + unset($wancfg['dhcp6prefixonly']); + unset($wancfg['dhcp6usev4iface']); + unset($wancfg['track6-interface']); + unset($wancfg['track6-prefix-id']); + unset($wancfg['prefix-6rd']); + unset($wancfg['prefix-6rd-v4plen']); + unset($wancfg['gateway-6rd']); + + unset($wancfg['adv_dhcp_pt_timeout']); + unset($wancfg['adv_dhcp_pt_retry']); + unset($wancfg['adv_dhcp_pt_select_timeout']); + unset($wancfg['adv_dhcp_pt_reboot']); + unset($wancfg['adv_dhcp_pt_backoff_cutoff']); + unset($wancfg['adv_dhcp_pt_initial_interval']); + + unset($wancfg['adv_dhcp_pt_values']); + + unset($wancfg['adv_dhcp_send_options']); + unset($wancfg['adv_dhcp_request_options']); + unset($wancfg['adv_dhcp_required_options']); + unset($wancfg['adv_dhcp_option_modifiers']); + + unset($wancfg['adv_dhcp_config_advanced']); + unset($wancfg['adv_dhcp_config_file_override']); + unset($wancfg['adv_dhcp_config_file_override_path']); + + unset($wancfg['adv_dhcp6_interface_statement_send_options']); + unset($wancfg['adv_dhcp6_interface_statement_request_options']); + unset($wancfg['adv_dhcp6_interface_statement_information_only_enable']); + unset($wancfg['adv_dhcp6_interface_statement_script']); + + unset($wancfg['adv_dhcp6_id_assoc_statement_address_enable']); + unset($wancfg['adv_dhcp6_id_assoc_statement_address']); + unset($wancfg['adv_dhcp6_id_assoc_statement_address_id']); + unset($wancfg['adv_dhcp6_id_assoc_statement_address_pltime']); + unset($wancfg['adv_dhcp6_id_assoc_statement_address_vltime']); + + unset($wancfg['adv_dhcp6_id_assoc_statement_prefix_enable']); + unset($wancfg['adv_dhcp6_id_assoc_statement_prefix']); + unset($wancfg['adv_dhcp6_id_assoc_statement_prefix_id']); + unset($wancfg['adv_dhcp6_id_assoc_statement_prefix_pltime']); + unset($wancfg['adv_dhcp6_id_assoc_statement_prefix_vltime']); + + unset($wancfg['adv_dhcp6_prefix_interface_statement_sla_id']); + unset($wancfg['adv_dhcp6_prefix_interface_statement_sla_len']); + + unset($wancfg['adv_dhcp6_authentication_statement_authname']); + unset($wancfg['adv_dhcp6_authentication_statement_protocol']); + unset($wancfg['adv_dhcp6_authentication_statement_algorithm']); + unset($wancfg['adv_dhcp6_authentication_statement_rdm']); + + unset($wancfg['adv_dhcp6_key_info_statement_keyname']); + unset($wancfg['adv_dhcp6_key_info_statement_realm']); + unset($wancfg['adv_dhcp6_key_info_statement_keyid']); + unset($wancfg['adv_dhcp6_key_info_statement_secret']); + unset($wancfg['adv_dhcp6_key_info_statement_expire']); + + unset($wancfg['adv_dhcp6_config_advanced']); + unset($wancfg['adv_dhcp6_config_file_override']); + unset($wancfg['adv_dhcp6_config_file_override_path']); + + unset($wancfg['pppoe_password']); + unset($wancfg['pptp_username']); + unset($wancfg['pptp_password']); + unset($wancfg['provider']); + unset($wancfg['ondemand']); + unset($wancfg['timeout']); + if (empty($wancfg['pppoe']['pppoe-reset-type'])) { + unset($wancfg['pppoe']['pppoe-reset-type']); + } + unset($wancfg['local']); + + unset($wancfg['remote']); + if (is_array($a_ppps[$pppid]) && in_array($wancfg['ipaddr'], array("ppp", "pppoe", "pptp", "l2tp"))) { + if ($wancfg['ipaddr'] != 'ppp') { + unset($a_ppps[$pppid]['apn']); + unset($a_ppps[$pppid]['phone']); + unset($a_ppps[$pppid]['provider']); + unset($a_ppps[$pppid]['ondemand']); + } + if (in_array($wancfg['ipaddr'], array("pppoe", "pptp", "l2tp"))) { + unset($a_ppps[$pppid]['localip']); + unset($a_ppps[$pppid]['subnet']); + unset($a_ppps[$pppid]['gateway']); + } + if ($wancfg['ipaddr'] != 'pppoe') { + unset($a_ppps[$pppid]['pppoe-reset-type']); + } + if ($wancfg['type'] != $_POST['type']) { + unset($a_ppps[$pppid]['idletimeout']); + } + } + + $wancfg['descr'] = remove_bad_chars($_POST['descr']); + $wancfg['enable'] = $_POST['enable'] == "yes" ? true : false; + + /* let return_gateways_array() do the magic on dynamic interfaces for us */ + switch ($_POST['type']) { + case "staticv4": + $wancfg['ipaddr'] = $_POST['ipaddr']; + $wancfg['subnet'] = $_POST['subnet']; + if ($_POST['gateway'] != "none") { + $wancfg['gateway'] = $_POST['gateway']; + } + break; + case "dhcp": + $wancfg['ipaddr'] = "dhcp"; + $wancfg['dhcphostname'] = $_POST['dhcphostname']; + $wancfg['alias-address'] = $_POST['alias-address']; + $wancfg['alias-subnet'] = $_POST['alias-subnet']; + $wancfg['dhcprejectfrom'] = $_POST['dhcprejectfrom']; + + $wancfg['adv_dhcp_pt_timeout'] = $_POST['adv_dhcp_pt_timeout']; + $wancfg['adv_dhcp_pt_retry'] = $_POST['adv_dhcp_pt_retry']; + $wancfg['adv_dhcp_pt_select_timeout'] = $_POST['adv_dhcp_pt_select_timeout']; + $wancfg['adv_dhcp_pt_reboot'] = $_POST['adv_dhcp_pt_reboot']; + $wancfg['adv_dhcp_pt_backoff_cutoff'] = $_POST['adv_dhcp_pt_backoff_cutoff']; + $wancfg['adv_dhcp_pt_initial_interval'] = $_POST['adv_dhcp_pt_initial_interval']; + + $wancfg['adv_dhcp_pt_values'] = $_POST['adv_dhcp_pt_values']; + + $wancfg['adv_dhcp_send_options'] = $_POST['adv_dhcp_send_options']; + $wancfg['adv_dhcp_request_options'] = $_POST['adv_dhcp_request_options']; + $wancfg['adv_dhcp_required_options'] = $_POST['adv_dhcp_required_options']; + $wancfg['adv_dhcp_option_modifiers'] = $_POST['adv_dhcp_option_modifiers']; + + $wancfg['adv_dhcp_config_advanced'] = $_POST['adv_dhcp_config_advanced']; + $wancfg['adv_dhcp_config_file_override'] = $_POST['adv_dhcp_config_file_override']; + $wancfg['adv_dhcp_config_file_override_path'] = $_POST['adv_dhcp_config_file_override_path']; + + $wancfg['dhcp_plus'] = $_POST['dhcp_plus'] == "yes" ? true : false; + if ($gateway_item) { + $a_gateways[] = $gateway_item; + } + break; + case "ppp": + $a_ppps[$pppid]['ptpid'] = $_POST['ptpid']; + $a_ppps[$pppid]['type'] = $_POST['type']; + $a_ppps[$pppid]['if'] = $_POST['type'].$_POST['ptpid']; + $a_ppps[$pppid]['ports'] = $_POST['port']; + $a_ppps[$pppid]['username'] = $_POST['ppp_username']; + $a_ppps[$pppid]['password'] = base64_encode($_POST['ppp_password']); + $a_ppps[$pppid]['phone'] = $_POST['phone']; + $a_ppps[$pppid]['apn'] = $_POST['apn']; + $wancfg['if'] = $_POST['type'] . $_POST['ptpid']; + $wancfg['ipaddr'] = $_POST['type']; + break; + + case "pppoe": + $a_ppps[$pppid]['ptpid'] = $_POST['ptpid']; + $a_ppps[$pppid]['type'] = $_POST['type']; + $a_ppps[$pppid]['if'] = $_POST['type'].$_POST['ptpid']; + if (isset($_POST['ppp_port'])) { + $a_ppps[$pppid]['ports'] = $_POST['ppp_port']; + } else { + $a_ppps[$pppid]['ports'] = $wancfg['if']; + } + $a_ppps[$pppid]['username'] = $_POST['pppoe_username']; + $a_ppps[$pppid]['password'] = base64_encode($_POST['pppoe_password']); + if (!empty($_POST['provider'])) { + $a_ppps[$pppid]['provider'] = $_POST['provider']; + } else { + $a_ppps[$pppid]['provider'] = true; + } + $a_ppps[$pppid]['ondemand'] = $_POST['pppoe_dialondemand'] ? true : false; + if (!empty($_POST['pppoe_idletimeout'])) { + $a_ppps[$pppid]['idletimeout'] = $_POST['pppoe_idletimeout']; + } else { + unset($a_ppps[$pppid]['idletimeout']); + } + + if (!empty($_POST['pppoe-reset-type'])) { + $a_ppps[$pppid]['pppoe-reset-type'] = $_POST['pppoe-reset-type']; + } else { + unset($a_ppps[$pppid]['pppoe-reset-type']); + } + $wancfg['if'] = $_POST['type'].$_POST['ptpid']; + $wancfg['ipaddr'] = $_POST['type']; + if ($gateway_item) { + $a_gateways[] = $gateway_item; + } + + break; + case "pptp": + case "l2tp": + $a_ppps[$pppid]['ptpid'] = $_POST['ptpid']; + $a_ppps[$pppid]['type'] = $_POST['type']; + $a_ppps[$pppid]['if'] = $_POST['type'].$_POST['ptpid']; + if (isset($_POST['ppp_port'])) { + $a_ppps[$pppid]['ports'] = $_POST['ppp_port']; + } else { + $a_ppps[$pppid]['ports'] = $wancfg['if']; + } + $a_ppps[$pppid]['username'] = $_POST['pptp_username']; + $a_ppps[$pppid]['password'] = base64_encode($_POST['pptp_password']); + $a_ppps[$pppid]['localip'] = $_POST['pptp_local']; + $a_ppps[$pppid]['subnet'] = $_POST['pptp_subnet']; + $a_ppps[$pppid]['gateway'] = $_POST['pptp_remote']; + $a_ppps[$pppid]['ondemand'] = $_POST['pptp_dialondemand'] ? true : false; + if (!empty($_POST['pptp_idletimeout'])) { + $a_ppps[$pppid]['idletimeout'] = $_POST['pptp_idletimeout']; + } else { + unset($a_ppps[$pppid]['idletimeout']); + } + $wancfg['if'] = $_POST['type'].$_POST['ptpid']; + $wancfg['ipaddr'] = $_POST['type']; + if ($gateway_item) { + $a_gateways[] = $gateway_item; + } + break; + case "none": + break; + } + switch ($_POST['type6']) { + case "staticv6": + $wancfg['ipaddrv6'] = $_POST['ipaddrv6']; + $wancfg['subnetv6'] = $_POST['subnetv6']; + if ($_POST['gatewayv6'] != "none") { + $wancfg['gatewayv6'] = $_POST['gatewayv6']; + } + break; + case "slaac": + $wancfg['ipaddrv6'] = "slaac"; + break; + case "dhcp6": + $wancfg['ipaddrv6'] = "dhcp6"; + $wancfg['dhcp6-duid'] = $_POST['dhcp6-duid']; + $wancfg['dhcp6-ia-pd-len'] = $_POST['dhcp6-ia-pd-len']; + if ($_POST['dhcp6-ia-pd-send-hint'] == "yes") { + $wancfg['dhcp6-ia-pd-send-hint'] = true; + } + if ($_POST['dhcp6prefixonly'] == "yes") { + $wancfg['dhcp6prefixonly'] = true; + } + if ($_POST['dhcp6usev4iface'] == "yes") { + $wancfg['dhcp6usev4iface'] = true; + } + + if (!empty($_POST['adv_dhcp6_interface_statement_send_options'])) { + $wancfg['adv_dhcp6_interface_statement_send_options'] = $_POST['adv_dhcp6_interface_statement_send_options']; + } + if (!empty($_POST['adv_dhcp6_interface_statement_request_options'])) { + $wancfg['adv_dhcp6_interface_statement_request_options'] = $_POST['adv_dhcp6_interface_statement_request_options']; + } + if (isset($_POST['adv_dhcp6_interface_statement_information_only_enable'])) { + $wancfg['adv_dhcp6_interface_statement_information_only_enable'] = $_POST['adv_dhcp6_interface_statement_information_only_enable']; + } + if (!empty($_POST['adv_dhcp6_interface_statement_script'])) { + $wancfg['adv_dhcp6_interface_statement_script'] = $_POST['adv_dhcp6_interface_statement_script']; + } + + if (isset($_POST['adv_dhcp6_id_assoc_statement_address_enable'])) { + $wancfg['adv_dhcp6_id_assoc_statement_address_enable'] = $_POST['adv_dhcp6_id_assoc_statement_address_enable']; + } + if (!empty($_POST['adv_dhcp6_id_assoc_statement_address'])) { + $wancfg['adv_dhcp6_id_assoc_statement_address'] = $_POST['adv_dhcp6_id_assoc_statement_address']; + } + if (is_numericint($_POST['adv_dhcp6_id_assoc_statement_address_id'])) { + $wancfg['adv_dhcp6_id_assoc_statement_address_id'] = $_POST['adv_dhcp6_id_assoc_statement_address_id']; + } + if (!empty($_POST['adv_dhcp6_id_assoc_statement_address_pltime'])) { + $wancfg['adv_dhcp6_id_assoc_statement_address_pltime'] = $_POST['adv_dhcp6_id_assoc_statement_address_pltime']; + } + if (!empty($_POST['adv_dhcp6_id_assoc_statement_address_vltime'])) { + $wancfg['adv_dhcp6_id_assoc_statement_address_vltime'] = $_POST['adv_dhcp6_id_assoc_statement_address_vltime']; + } + + if (isset($_POST['adv_dhcp6_id_assoc_statement_prefix_enable'])) { + $wancfg['adv_dhcp6_id_assoc_statement_prefix_enable'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_enable']; + } + if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix'])) { + $wancfg['adv_dhcp6_id_assoc_statement_prefix'] = $_POST['adv_dhcp6_id_assoc_statement_prefix']; + } + if (is_numericint($_POST['adv_dhcp6_id_assoc_statement_prefix_id'])) { + $wancfg['adv_dhcp6_id_assoc_statement_prefix_id'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_id']; + } + if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix_pltime'])) { + $wancfg['adv_dhcp6_id_assoc_statement_prefix_pltime'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_pltime']; + } + if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix_vltime'])) { + $wancfg['adv_dhcp6_id_assoc_statement_prefix_vltime'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_vltime']; + } + + if (is_numericint($_POST['adv_dhcp6_prefix_interface_statement_sla_id'])) { + $wancfg['adv_dhcp6_prefix_interface_statement_sla_id'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_id']; + } + if (is_numericint($_POST['adv_dhcp6_prefix_interface_statement_sla_len'])) { + $wancfg['adv_dhcp6_prefix_interface_statement_sla_len'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_len']; + } + + if (!empty($_POST['adv_dhcp6_authentication_statement_authname'])) { + $wancfg['adv_dhcp6_authentication_statement_authname'] = $_POST['adv_dhcp6_authentication_statement_authname']; + } + if (!empty($_POST['adv_dhcp6_authentication_statement_protocol'])) { + $wancfg['adv_dhcp6_authentication_statement_protocol'] = $_POST['adv_dhcp6_authentication_statement_protocol']; + } + if (!empty($_POST['adv_dhcp6_authentication_statement_algorithm'])) { + $wancfg['adv_dhcp6_authentication_statement_algorithm'] = $_POST['adv_dhcp6_authentication_statement_algorithm']; + } + if (!empty($_POST['adv_dhcp6_authentication_statement_rdm'])) { + $wancfg['adv_dhcp6_authentication_statement_rdm'] = $_POST['adv_dhcp6_authentication_statement_rdm']; + } + + if (!empty($_POST['adv_dhcp6_key_info_statement_keyname'])) { + $wancfg['adv_dhcp6_key_info_statement_keyname'] = $_POST['adv_dhcp6_key_info_statement_keyname']; + } + if (!empty($_POST['adv_dhcp6_key_info_statement_realm'])) { + $wancfg['adv_dhcp6_key_info_statement_realm'] = $_POST['adv_dhcp6_key_info_statement_realm']; + } + if (!empty($_POST['adv_dhcp6_key_info_statement_keyid'])) { + $wancfg['adv_dhcp6_key_info_statement_keyid'] = $_POST['adv_dhcp6_key_info_statement_keyid']; + } + if (!empty($_POST['adv_dhcp6_key_info_statement_secret'])) { + $wancfg['adv_dhcp6_key_info_statement_secret'] = $_POST['adv_dhcp6_key_info_statement_secret']; + } + if (!empty($_POST['adv_dhcp6_key_info_statement_expire'])) { + $wancfg['adv_dhcp6_key_info_statement_expire'] = $_POST['adv_dhcp6_key_info_statement_expire']; + } + + if (!empty($_POST['adv_dhcp6_config_advanced'])) { + $wancfg['adv_dhcp6_config_advanced'] = $_POST['adv_dhcp6_config_advanced']; + } + if (!empty($_POST['adv_dhcp6_config_file_override'])) { + $wancfg['adv_dhcp6_config_file_override'] = $_POST['adv_dhcp6_config_file_override']; + } + if (!empty($_POST['adv_dhcp6_config_file_override_path'])) { + $wancfg['adv_dhcp6_config_file_override_path'] = $_POST['adv_dhcp6_config_file_override_path']; + } + + if ($gateway_item) { + $a_gateways[] = $gateway_item; + } + break; + case "6rd": + $wancfg['ipaddrv6'] = "6rd"; + $wancfg['prefix-6rd'] = $_POST['prefix-6rd']; + $wancfg['prefix-6rd-v4plen'] = $_POST['prefix-6rd-v4plen']; + $wancfg['gateway-6rd'] = $_POST['gateway-6rd']; + if ($gateway_item) { + $a_gateways[] = $gateway_item; + } + break; + case "6to4": + $wancfg['ipaddrv6'] = "6to4"; + break; + case "track6": + $wancfg['ipaddrv6'] = "track6"; + $wancfg['track6-interface'] = $_POST['track6-interface']; + if ($_POST['track6-prefix-id--hex'] === "") { + $wancfg['track6-prefix-id'] = 0; + } else if (is_numeric("0x" . $_POST['track6-prefix-id--hex'])) { + $wancfg['track6-prefix-id'] = intval($_POST['track6-prefix-id--hex'], 16); + } else { + $wancfg['track6-prefix-id'] = 0; + } + break; + case "none": + break; + } + handle_pppoe_reset($_POST); + + if ($_POST['blockpriv'] == "yes") { + $wancfg['blockpriv'] = true; + } else { + unset($wancfg['blockpriv']); + } + if ($_POST['blockbogons'] == "yes") { + $wancfg['blockbogons'] = true; + } else { + unset($wancfg['blockbogons']); + } + $wancfg['spoofmac'] = $_POST['spoofmac']; + if (empty($_POST['mtu'])) { + unset($wancfg['mtu']); + } else { + $wancfg['mtu'] = $_POST['mtu']; + } + if (empty($_POST['mss'])) { + unset($wancfg['mss']); + } else { + $wancfg['mss'] = $_POST['mss']; + } + if (empty($_POST['mediaopt'])) { + unset($wancfg['media']); + unset($wancfg['mediaopt']); + } else { + $mediaopts = explode(' ', $_POST['mediaopt']); + if ($mediaopts[0] != '') { + $wancfg['media'] = $mediaopts[0]; + } + if ($mediaopts[1] != '') { + $wancfg['mediaopt'] = $mediaopts[1]; + } else { + unset($wancfg['mediaopt']); + } + } + if (isset($wancfg['wireless'])) { + handle_wireless_post(); + } + + conf_mount_ro(); + write_config(); + + if (file_exists("{$g['tmp_path']}/.interfaces.apply")) { + $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.interfaces.apply")); + } else { + $toapplylist = array(); + } + $toapplylist[$if]['ifcfg'] = $old_wancfg; + $toapplylist[$if]['ppps'] = $old_ppps; + file_put_contents("{$g['tmp_path']}/.interfaces.apply", serialize($toapplylist)); + + mark_subsystem_dirty('interfaces'); + + /* regenerate cron settings/crontab file */ + configure_cron(); + + header("Location: interfaces.php?if={$if}"); + exit; + } + +} // end if ($_POST) + +function handle_wireless_post() { + global $_POST, $config, $g, $wancfg, $if, $wl_countries_attr, $wlanbaseif; + if (!is_array($wancfg['wireless'])) { + $wancfg['wireless'] = array(); + } + $wancfg['wireless']['standard'] = $_POST['standard']; + $wancfg['wireless']['mode'] = $_POST['mode']; + $wancfg['wireless']['protmode'] = $_POST['protmode']; + $wancfg['wireless']['ssid'] = $_POST['ssid']; + $wancfg['wireless']['channel'] = $_POST['channel']; + $wancfg['wireless']['authmode'] = $_POST['authmode']; + $wancfg['wireless']['txpower'] = $_POST['txpower']; + $wancfg['wireless']['distance'] = $_POST['distance']; + $wancfg['wireless']['regdomain'] = $_POST['regdomain']; + $wancfg['wireless']['regcountry'] = $_POST['regcountry']; + $wancfg['wireless']['reglocation'] = $_POST['reglocation']; + if (!empty($wancfg['wireless']['regdomain']) && !empty($wancfg['wireless']['regcountry'])) { + foreach ($wl_countries_attr as $wl_country) { + if ($wancfg['wireless']['regcountry'] == $wl_country['ID']) { + $wancfg['wireless']['regdomain'] = $wl_country['rd'][0]['REF']; + break; + } + } + } + if (!is_array($wancfg['wireless']['wpa'])) { + $wancfg['wireless']['wpa'] = array(); + } + $wancfg['wireless']['wpa']['macaddr_acl'] = $_POST['macaddr_acl']; + $wancfg['wireless']['wpa']['auth_algs'] = $_POST['auth_algs']; + $wancfg['wireless']['wpa']['wpa_mode'] = $_POST['wpa_mode']; + $wancfg['wireless']['wpa']['wpa_key_mgmt'] = $_POST['wpa_key_mgmt']; + $wancfg['wireless']['wpa']['wpa_pairwise'] = $_POST['wpa_pairwise']; + $wancfg['wireless']['wpa']['wpa_group_rekey'] = $_POST['wpa_group_rekey']; + $wancfg['wireless']['wpa']['wpa_gmk_rekey'] = $_POST['wpa_gmk_rekey']; + $wancfg['wireless']['wpa']['passphrase'] = $_POST['passphrase']; + $wancfg['wireless']['wpa']['ext_wpa_sw'] = $_POST['ext_wpa_sw']; + $wancfg['wireless']['auth_server_addr'] = $_POST['auth_server_addr']; + $wancfg['wireless']['auth_server_port'] = $_POST['auth_server_port']; + $wancfg['wireless']['auth_server_shared_secret'] = $_POST['auth_server_shared_secret']; + $wancfg['wireless']['auth_server_addr2'] = $_POST['auth_server_addr2']; + $wancfg['wireless']['auth_server_port2'] = $_POST['auth_server_port2']; + $wancfg['wireless']['auth_server_shared_secret2'] = $_POST['auth_server_shared_secret2']; + + if ($_POST['persistcommonwireless'] == "yes") { + if (!is_array($config['wireless'])) { + $config['wireless'] = array(); + } + if (!is_array($config['wireless']['interfaces'])) { + $config['wireless']['interfaces'] = array(); + } + if (!is_array($config['wireless']['interfaces'][$wlanbaseif])) { + $config['wireless']['interfaces'][$wlanbaseif] = array(); + } + } else if (isset($config['wireless']['interfaces'][$wlanbaseif])) { + unset($config['wireless']['interfaces'][$wlanbaseif]); + } + if (isset($_POST['diversity']) && is_numeric($_POST['diversity'])) { + $wancfg['wireless']['diversity'] = $_POST['diversity']; + } else if (isset($wancfg['wireless']['diversity'])) { + unset($wancfg['wireless']['diversity']); + } + if (isset($_POST['txantenna']) && is_numeric($_POST['txantenna'])) { + $wancfg['wireless']['txantenna'] = $_POST['txantenna']; + } else if (isset($wancfg['wireless']['txantenna'])) { + unset($wancfg['wireless']['txantenna']); + } + if (isset($_POST['rxantenna']) && is_numeric($_POST['rxantenna'])) { + $wancfg['wireless']['rxantenna'] = $_POST['rxantenna']; + } else if (isset($wancfg['wireless']['rxantenna'])) { + unset($wancfg['wireless']['rxantenna']); + } + if ($_POST['hidessid_enable'] == "yes") { + $wancfg['wireless']['hidessid']['enable'] = true; + } else if (isset($wancfg['wireless']['hidessid']['enable'])) { + unset($wancfg['wireless']['hidessid']['enable']); + } + if ($_POST['mac_acl_enable'] == "yes") { + $wancfg['wireless']['wpa']['mac_acl_enable'] = true; + } else if (isset($wancfg['wireless']['wpa']['mac_acl_enable'])) { + unset($wancfg['wireless']['wpa']['mac_acl_enable']); + } + if ($_POST['rsn_preauth'] == "yes") { + $wancfg['wireless']['wpa']['rsn_preauth'] = true; + } else { + unset($wancfg['wireless']['wpa']['rsn_preauth']); + } + if ($_POST['ieee8021x'] == "yes") { + $wancfg['wireless']['wpa']['ieee8021x']['enable'] = true; + } else if (isset($wancfg['wireless']['wpa']['ieee8021x']['enable'])) { + unset($wancfg['wireless']['wpa']['ieee8021x']['enable']); + } + if ($_POST['wpa_strict_rekey'] == "yes") { + $wancfg['wireless']['wpa']['wpa_strict_rekey'] = true; + } else if (isset($wancfg['wireless']['wpa']['wpa_strict_rekey'])) { + unset($wancfg['wireless']['wpa']['wpa_strict_rekey']); + } + if ($_POST['debug_mode'] == "yes") { + $wancfg['wireless']['wpa']['debug_mode'] = true; + } else if (isset($wancfg['wireless']['wpa']['debug_mode'])) { + sunset($wancfg['wireless']['wpa']['debug_mode']); + } + if ($_POST['wpa_enable'] == "yes") { + $wancfg['wireless']['wpa']['enable'] = $_POST['wpa_enable'] = true; + } else if (isset($wancfg['wireless']['wpa']['enable'])) { + unset($wancfg['wireless']['wpa']['enable']); + } + if ($_POST['wep_enable'] == "yes") { + if (!is_array($wancfg['wireless']['wep'])) { + $wancfg['wireless']['wep'] = array(); + } + $wancfg['wireless']['wep']['enable'] = $_POST['wep_enable'] = true; + } else if (isset($wancfg['wireless']['wep'])) { + unset($wancfg['wireless']['wep']); + } + if ($_POST['wme_enable'] == "yes") { + if (!is_array($wancfg['wireless']['wme'])) { + $wancfg['wireless']['wme'] = array(); + } + $wancfg['wireless']['wme']['enable'] = $_POST['wme_enable'] = true; + } else if (isset($wancfg['wireless']['wme']['enable'])) { + unset($wancfg['wireless']['wme']['enable']); + } + if ($_POST['puremode'] == "11g") { + if (!is_array($wancfg['wireless']['pureg'])) { + $wancfg['wireless']['pureg'] = array(); + } + $wancfg['wireless']['pureg']['enable'] = true; + } else if ($_POST['puremode'] == "11n") { + if (!is_array($wancfg['wireless']['puren'])) { + $wancfg['wireless']['puren'] = array(); + } + $wancfg['wireless']['puren']['enable'] = true; + } else { + if (isset($wancfg['wireless']['pureg'])) { + unset($wancfg['wireless']['pureg']); + } + if (isset($wancfg['wireless']['puren'])) { + unset($wancfg['wireless']['puren']); + } + } + if ($_POST['apbridge_enable'] == "yes") { + if (!is_array($wancfg['wireless']['apbridge'])) { + $wancfg['wireless']['apbridge'] = array(); + } + $wancfg['wireless']['apbridge']['enable'] = $_POST['apbridge_enable'] = true; + } else if (isset($wancfg['wireless']['apbridge']['enable'])) { + unset($wancfg['wireless']['apbridge']['enable']); + } + if ($_POST['standard'] == "11g Turbo" || $_POST['standard'] == "11a Turbo") { + if (!is_array($wancfg['wireless']['turbo'])) { + $wancfg['wireless']['turbo'] = array(); + } + $wancfg['wireless']['turbo']['enable'] = true; + } else if (isset($wancfg['wireless']['turbo']['enable'])) { + unset($wancfg['wireless']['turbo']['enable']); + } + $wancfg['wireless']['wep']['key'] = array(); + for ($i = 1; $i <= 4; $i++) { + if ($_POST['key' . $i]) { + $newkey = array(); + $newkey['value'] = $_POST['key' . $i]; + if ($_POST['txkey'] == $i) { + $newkey['txkey'] = true; + } + $wancfg['wireless']['wep']['key'][] = $newkey; + } + } + interface_sync_wireless_clones($wancfg, true); +} + +function check_wireless_mode() { + global $_POST, $config, $g, $wlan_modes, $wancfg, $if, $wlanif, $wlanbaseif, $old_wireless_mode, $input_errors; + + if ($wancfg['wireless']['mode'] == $_POST['mode']) { + return; + } + + if (does_interface_exist(interface_get_wireless_clone($wlanbaseif))) { + $clone_count = 1; + } else { + $clone_count = 0; + } + if (isset($config['wireless']['clone']) && is_array($config['wireless']['clone'])) { + foreach ($config['wireless']['clone'] as $clone) { + if ($clone['if'] == $wlanbaseif) { + $clone_count++; + } + } + } + if ($clone_count > 1) { + $old_wireless_mode = $wancfg['wireless']['mode']; + $wancfg['wireless']['mode'] = $_POST['mode']; + if (!interface_wireless_clone("{$wlanif}_", $wancfg)) { + $input_errors[] = sprintf(gettext("Unable to change mode to %s. You may already have the maximum number of wireless clones supported in this mode."), $wlan_modes[$wancfg['wireless']['mode']]); + } else { + mwexec("/sbin/ifconfig " . escapeshellarg($wlanif) . "_ destroy"); + } + $wancfg['wireless']['mode'] = $old_wireless_mode; + } +} + +// Find all possible media options for the interface +$mediaopts_list = array(); +$intrealname = $config['interfaces'][$if]['if']; +exec("/sbin/ifconfig -m $intrealname | grep \"media \"", $mediaopts); +foreach ($mediaopts as $mediaopt) { + preg_match("/media (.*)/", $mediaopt, $matches); + if (preg_match("/(.*) mediaopt (.*)/", $matches[1], $matches1)) { + // there is media + mediaopt like "media 1000baseT mediaopt full-duplex" + array_push($mediaopts_list, $matches1[1] . " " . $matches1[2]); + } else { + // there is only media like "media 1000baseT" + array_push($mediaopts_list, $matches[1]); + } +} + +$pgtitle = array(gettext("Interfaces"), $pconfig['descr']); +$shortcut_section = "interfaces"; + +$closehead = false; +include("head.inc"); +$types4 = array("none" => gettext("None"), "staticv4" => gettext("Static IPv4"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP"), "l2tp" => gettext("L2TP")); +$types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"), "dhcp6" => gettext("DHCP6"), "slaac" => gettext("SLAAC"), "6rd" => gettext("6rd Tunnel"), "6to4" => gettext("6to4 Tunnel"), "track6" => gettext("Track Interface")); + +?> + + + + + + + + + + +
    + +

    +

    " . gettext("You must apply the changes in order for them to take effect.") . "

    " . gettext("Don't forget to adjust the DHCP Server range if needed after applying."));?>


    + + + + + + +
    +
    + + + + + + + + +
    + onclick="show_allcfg(this);" /> + +
    + + + + + + + +
    +   + +
    + " /> + " onclick="window.location.href=''" /> + + + + + + +
    +
    +
    +
    + + + + diff --git a/src/usr/local/www/interfaces_assign.php b/src/usr/local/www/interfaces_assign.php new file mode 100644 index 0000000..03fe582 --- /dev/null +++ b/src/usr/local/www/interfaces_assign.php @@ -0,0 +1,597 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /bin/rm + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-interfaces-assignnetworkports +##|*NAME=Interfaces: Assign network ports page +##|*DESCR=Allow access to the 'Interfaces: Assign network ports' page. +##|*MATCH=interfaces_assign.php* +##|-PRIV + +$pgtitle = array(gettext("Interfaces"), gettext("Assign network ports")); +$shortcut_section = "interfaces"; + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("ipsec.inc"); +require("vpn.inc"); +require("captiveportal.inc"); +require_once("rrd.inc"); + +function interface_assign_description($portinfo, $portname) { + global $ovpn_descrs; + if ($portinfo['isvlan']) { + $descr = sprintf(gettext('VLAN %1$s on %2$s'), $portinfo['tag'], $portinfo['if']); + if ($portinfo['descr']) { + $descr .= " (" . $portinfo['descr'] . ")"; + } + } elseif ($portinfo['iswlclone']) { + $descr = $portinfo['cloneif']; + if ($portinfo['descr']) { + $descr .= " (" . $portinfo['descr'] . ")"; + } + } elseif ($portinfo['isppp']) { + $descr = $portinfo['descr']; + } elseif ($portinfo['isbridge']) { + $descr = strtoupper($portinfo['bridgeif']); + if ($portinfo['descr']) { + $descr .= " (" . $portinfo['descr'] . ")"; + } + } elseif ($portinfo['isgre']) { + $descr = "GRE {$portinfo['remote-addr']}"; + if ($portinfo['descr']) { + $descr .= " (" . $portinfo['descr'] . ")"; + } + } elseif ($portinfo['isgif']) { + $descr = "GIF {$portinfo['remote-addr']}"; + if ($portinfo['descr']) { + $descr .= " (" . $portinfo['descr'] . ")"; + } + } elseif ($portinfo['islagg']) { + $descr = strtoupper($portinfo['laggif']); + if ($portinfo['descr']) { + $descr .= " (" . $portinfo['descr'] . ")"; + } + } elseif ($portinfo['isqinq']) { + $descr = $portinfo['descr']; + } elseif (substr($portname, 0, 4) == 'ovpn') { + $descr = $portname . " (" . $ovpn_descrs[substr($portname, 5)] . ")"; + } else { + $descr = $portname . " (" . $portinfo['mac'] . ")"; + } + + return htmlspecialchars($descr); +} + +/* + In this file, "port" refers to the physical port name, + while "interface" refers to LAN, WAN, or OPTn. +*/ + +/* get list without VLAN interfaces */ +$portlist = get_interface_list(); + +/* add wireless clone interfaces */ +if (is_array($config['wireless']['clone']) && count($config['wireless']['clone'])) { + foreach ($config['wireless']['clone'] as $clone) { + $portlist[$clone['cloneif']] = $clone; + $portlist[$clone['cloneif']]['iswlclone'] = true; + } +} + +/* add VLAN interfaces */ +if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) { + foreach ($config['vlans']['vlan'] as $vlan) { + $portlist[$vlan['vlanif']] = $vlan; + $portlist[$vlan['vlanif']]['isvlan'] = true; + } +} + +/* add Bridge interfaces */ +if (is_array($config['bridges']['bridged']) && count($config['bridges']['bridged'])) { + foreach ($config['bridges']['bridged'] as $bridge) { + $portlist[$bridge['bridgeif']] = $bridge; + $portlist[$bridge['bridgeif']]['isbridge'] = true; + } +} + +/* add GIF interfaces */ +if (is_array($config['gifs']['gif']) && count($config['gifs']['gif'])) { + foreach ($config['gifs']['gif'] as $gif) { + $portlist[$gif['gifif']] = $gif; + $portlist[$gif['gifif']]['isgif'] = true; + } +} + +/* add GRE interfaces */ +if (is_array($config['gres']['gre']) && count($config['gres']['gre'])) { + foreach ($config['gres']['gre'] as $gre) { + $portlist[$gre['greif']] = $gre; + $portlist[$gre['greif']]['isgre'] = true; + } +} + +/* add LAGG interfaces */ +if (is_array($config['laggs']['lagg']) && count($config['laggs']['lagg'])) { + foreach ($config['laggs']['lagg'] as $lagg) { + $portlist[$lagg['laggif']] = $lagg; + $portlist[$lagg['laggif']]['islagg'] = true; + /* LAGG members cannot be assigned */ + $lagifs = explode(',', $lagg['members']); + foreach ($lagifs as $lagif) { + if (isset($portlist[$lagif])) { + unset($portlist[$lagif]); + } + } + } +} + +/* add QinQ interfaces */ +if (is_array($config['qinqs']['qinqentry']) && count($config['qinqs']['qinqentry'])) { + foreach ($config['qinqs']['qinqentry'] as $qinq) { + $portlist["vlan{$qinq['tag']}"]['descr'] = "VLAN {$qinq['tag']}"; + $portlist["vlan{$qinq['tag']}"]['isqinq'] = true; + /* QinQ members */ + $qinqifs = explode(' ', $qinq['members']); + foreach ($qinqifs as $qinqif) { + $portlist["vlan{$qinq['tag']}_{$qinqif}"]['descr'] = "QinQ {$qinqif}"; + $portlist["vlan{$qinq['tag']}_{$qinqif}"]['isqinq'] = true; + } + } +} + +/* add PPP interfaces */ +if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) { + foreach ($config['ppps']['ppp'] as $pppid => $ppp) { + $portname = $ppp['if']; + $portlist[$portname] = $ppp; + $portlist[$portname]['isppp'] = true; + $ports_base = basename($ppp['ports']); + if (isset($ppp['descr'])) { + $portlist[$portname]['descr'] = strtoupper($ppp['if']). "({$ports_base}) - {$ppp['descr']}"; + } else if (isset($ppp['username'])) { + $portlist[$portname]['descr'] = strtoupper($ppp['if']). "({$ports_base}) - {$ppp['username']}"; + } else { + $portlist[$portname]['descr'] = strtoupper($ppp['if']). "({$ports_base})"; + } + } +} + +$ovpn_descrs = array(); +if (is_array($config['openvpn'])) { + if (is_array($config['openvpn']['openvpn-server'])) { + foreach ($config['openvpn']['openvpn-server'] as $s) { + $ovpn_descrs[$s['vpnid']] = $s['description']; + } + } + if (is_array($config['openvpn']['openvpn-client'])) { + foreach ($config['openvpn']['openvpn-client'] as $c) { + $ovpn_descrs[$c['vpnid']] = $c['description']; + } + } +} + +if (isset($_POST['add_x']) && isset($_POST['if_add'])) { + /* Be sure this port is not being used */ + $portused = false; + foreach ($config['interfaces'] as $ifname => $ifdata) { + if ($ifdata['if'] == $_POST['if_add']) { + $portused = true; + break; + } + } + + if ($portused === false) { + /* find next free optional interface number */ + if (!$config['interfaces']['lan']) { + $newifname = gettext("lan"); + $descr = gettext("LAN"); + } else { + for ($i = 1; $i <= count($config['interfaces']); $i++) { + if (!$config['interfaces']["opt{$i}"]) { + break; + } + } + $newifname = 'opt' . $i; + $descr = "OPT" . $i; + } + + $config['interfaces'][$newifname] = array(); + $config['interfaces'][$newifname]['descr'] = $descr; + $config['interfaces'][$newifname]['if'] = $_POST['if_add']; + if (preg_match($g['wireless_regex'], $_POST['if_add'])) { + $config['interfaces'][$newifname]['wireless'] = array(); + interface_sync_wireless_clones($config['interfaces'][$newifname], false); + } + + uksort($config['interfaces'], "compare_interface_friendly_names"); + + /* XXX: Do not remove this. */ + unlink_if_exists("{$g['tmp_path']}/config.cache"); + + write_config(); + + $savemsg = gettext("Interface has been added."); + } + +} else if (isset($_POST['apply'])) { + if (file_exists("/var/run/interface_mismatch_reboot_needed")) { + system_reboot(); + $rebootingnow = true; + } else { + write_config(); + + $retval = filter_configure(); + $savemsg = get_std_save_message($retval); + + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + } + +} else if (isset($_POST['Submit'])) { + + unset($input_errors); + + /* input validation */ + + /* Build a list of the port names so we can see how the interfaces map */ + $portifmap = array(); + foreach ($portlist as $portname => $portinfo) { + $portifmap[$portname] = array(); + } + + /* Go through the list of ports selected by the user, + build a list of port-to-interface mappings in portifmap */ + foreach ($_POST as $ifname => $ifport) { + if (($ifname == 'lan') || ($ifname == 'wan') || (substr($ifname, 0, 3) == 'opt')) { + $portifmap[$ifport][] = strtoupper($ifname); + } + } + + /* Deliver error message for any port with more than one assignment */ + foreach ($portifmap as $portname => $ifnames) { + if (count($ifnames) > 1) { + $errstr = sprintf(gettext('Port %1$s '. + ' was assigned to %2$s' . + ' interfaces:'), $portname, count($ifnames)); + + foreach ($portifmap[$portname] as $ifn) { + $errstr .= " " . convert_friendly_interface_to_friendly_descr(strtolower($ifn)) . " (" . $ifn . ")"; + } + + $input_errors[] = $errstr; + } else if (count($ifnames) == 1 && preg_match('/^bridge[0-9]/', $portname) && is_array($config['bridges']['bridged']) && count($config['bridges']['bridged'])) { + foreach ($config['bridges']['bridged'] as $bridge) { + if ($bridge['bridgeif'] != $portname) { + continue; + } + + $members = explode(",", strtoupper($bridge['members'])); + foreach ($members as $member) { + if ($member == $ifnames[0]) { + $input_errors[] = sprintf(gettext("You cannot set port %s to interface %s because this interface is a member of %s."), $portname, $member, $portname); + break; + } + } + } + } + } + + if (is_array($config['vlans']['vlan'])) { + foreach ($config['vlans']['vlan'] as $vlan) { + if (does_interface_exist($vlan['if']) == false) { + $input_errors[] = "Vlan parent interface {$vlan['if']} does not exist anymore so vlan id {$vlan['tag']} cannot be created please fix the issue before continuing."; + } + } + } + + if (!$input_errors) { + /* No errors detected, so update the config */ + foreach ($_POST as $ifname => $ifport) { + + if (($ifname == 'lan') || ($ifname == 'wan') || (substr($ifname, 0, 3) == 'opt')) { + + if (!is_array($ifport)) { + $reloadif = false; + if (!empty($config['interfaces'][$ifname]['if']) && $config['interfaces'][$ifname]['if'] <> $ifport) { + interface_bring_down($ifname); + /* Mark this to be reconfigured in any case. */ + $reloadif = true; + } + $config['interfaces'][$ifname]['if'] = $ifport; + if (isset($portlist[$ifport]['isppp'])) { + $config['interfaces'][$ifname]['ipaddr'] = $portlist[$ifport]['type']; + } + + if (substr($ifport, 0, 3) == 'gre' || substr($ifport, 0, 3) == 'gif') { + unset($config['interfaces'][$ifname]['ipaddr']); + unset($config['interfaces'][$ifname]['subnet']); + unset($config['interfaces'][$ifname]['ipaddrv6']); + unset($config['interfaces'][$ifname]['subnetv6']); + } + + /* check for wireless interfaces, set or clear ['wireless'] */ + if (preg_match($g['wireless_regex'], $ifport)) { + if (!is_array($config['interfaces'][$ifname]['wireless'])) { + $config['interfaces'][$ifname]['wireless'] = array(); + } + } else { + unset($config['interfaces'][$ifname]['wireless']); + } + + /* make sure there is a descr for all interfaces */ + if (!isset($config['interfaces'][$ifname]['descr'])) { + $config['interfaces'][$ifname]['descr'] = strtoupper($ifname); + } + + if ($reloadif == true) { + if (preg_match($g['wireless_regex'], $ifport)) { + interface_sync_wireless_clones($config['interfaces'][$ifname], false); + } + /* Reload all for the interface. */ + interface_configure($ifname, true); + } + } + } + } + + write_config(); + + enable_rrd_graphing(); + } +} else { + /* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */ + unset($delbtn); + foreach ($_POST as $pn => $pd) { + if (preg_match("/del_(.+)_x/", $pn, $matches)) { + $delbtn = $matches[1]; + } + } + + if (isset($delbtn)) { + $id = $delbtn; + + if (link_interface_to_group($id)) { + $input_errors[] = gettext("The interface is part of a group. Please remove it from the group to continue"); + } else if (link_interface_to_bridge($id)) { + $input_errors[] = gettext("The interface is part of a bridge. Please remove it from the bridge to continue"); + } else if (link_interface_to_gre($id)) { + $input_errors[] = gettext("The interface is part of a gre tunnel. Please delete the tunnel to continue"); + } else if (link_interface_to_gif($id)) { + $input_errors[] = gettext("The interface is part of a gif tunnel. Please delete the tunnel to continue"); + } else { + unset($config['interfaces'][$id]['enable']); + $realid = get_real_interface($id); + interface_bring_down($id); /* down the interface */ + + unset($config['interfaces'][$id]); /* delete the specified OPTn or LAN*/ + + if (is_array($config['dhcpd']) && is_array($config['dhcpd'][$id])) { + unset($config['dhcpd'][$id]); + services_dhcpd_configure(); + } + + if (count($config['filter']['rule']) > 0) { + foreach ($config['filter']['rule'] as $x => $rule) { + if ($rule['interface'] == $id) { + unset($config['filter']['rule'][$x]); + } + } + } + if (is_array($config['nat']['rule']) && count($config['nat']['rule']) > 0) { + foreach ($config['nat']['rule'] as $x => $rule) { + if ($rule['interface'] == $id) { + unset($config['nat']['rule'][$x]['interface']); + } + } + } + + write_config(); + + /* If we are in firewall/routing mode (not single interface) + * then ensure that we are not running DHCP on the wan which + * will make a lot of ISP's unhappy. + */ + if ($config['interfaces']['lan'] && $config['dhcpd']['wan']) { + unset($config['dhcpd']['wan']); + } + + link_interface_to_vlans($realid, "update"); + + $savemsg = gettext("Interface has been deleted."); + } + } +} + +/* Create a list of unused ports */ +$unused_portlist = array(); +foreach ($portlist as $portname => $portinfo) { + $portused = false; + foreach ($config['interfaces'] as $ifname => $ifdata) { + if ($ifdata['if'] == $portname) { + $portused = true; + break; + } + } + if ($portused === false) { + $unused_portlist[$portname] = $portinfo; + } +} + +include("head.inc"); + +if (file_exists("/var/run/interface_mismatch_reboot_needed")) { + if ($_POST) { + if ($rebootingnow) { + $savemsg = gettext("The system is now rebooting. Please wait."); + } else { + $savemsg = gettext("Reboot is needed. Please apply the settings in order to reboot."); + } + } else { + $savemsg = gettext("Interface mismatch detected. Please resolve the mismatch and click 'Apply changes'. The firewall will reboot afterwards."); + } +} +?> + + + + +
    + +\n"; + print_info_box_np(gettext("The interface configuration has been changed.
    You must apply the changes in order for them to take effect.")); + echo "

    \n"; +} elseif ($savemsg) { + print_info_box($savemsg); +} + +pfSense_handle_custom_code("/usr/local/pkg/interfaces_assign/pre_input_errors"); +if ($input_errors) { + print_input_errors($input_errors); +} +?> + + + + +
    + +
    +
    + + + + + + + $iface): + if ($iface['descr']) { + $ifdescr = $iface['descr']; + } else { + $ifdescr = strtoupper($ifname); + } +?> + + + + + + + + + + + + +
     
    + + + + " + type="image" style="height:17;width:17;border:0" + onclick="return confirm('')" /> + +
    + + + + + " /> +
    +
    +
    + +
      +
    • +
    +
    +
    + + + diff --git a/src/usr/local/www/interfaces_bridge.php b/src/usr/local/www/interfaces_bridge.php new file mode 100644 index 0000000..b7e557f --- /dev/null +++ b/src/usr/local/www/interfaces_bridge.php @@ -0,0 +1,179 @@ + + + + + + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + 0 && $j < count($members)) { + echo ", "; + } + } + ?> + +   + edit +  ')">delete +
      add

    +
    +
    +

    +
     
    +
    +
    + + + diff --git a/src/usr/local/www/interfaces_bridge_edit.php b/src/usr/local/www/interfaces_bridge_edit.php new file mode 100644 index 0000000..1787ca1 --- /dev/null +++ b/src/usr/local/www/interfaces_bridge_edit.php @@ -0,0 +1,708 @@ + $bdescr) { + if (substr(get_real_interface($bif), 0, 3) == "gre") { + unset($ifacelist[$bif]); + } +} + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_bridges[$id]) { + $pconfig['enablestp'] = isset($a_bridges[$id]['enablestp']); + $pconfig['descr'] = $a_bridges[$id]['descr']; + $pconfig['bridgeif'] = $a_bridges[$id]['bridgeif']; + $pconfig['members'] = $a_bridges[$id]['members']; + $pconfig['maxaddr'] = $a_bridges[$id]['maxaddr']; + $pconfig['timeout'] = $a_bridges[$id]['timeout']; + if ($a_bridges[$id]['static']) { + $pconfig['static'] = $a_bridges[$id]['static']; + } + if ($a_bridges[$id]['private']) { + $pconfig['private'] = $a_bridges[$id]['private']; + } + if (isset($a_bridges[$id]['stp'])) { + $pconfig['stp'] = $a_bridges[$id]['stp']; + } + $pconfig['maxage'] = $a_bridges[$id]['maxage']; + $pconfig['fwdelay'] = $a_bridges[$id]['fwdelay']; + $pconfig['hellotime'] = $a_bridges[$id]['hellotime']; + $pconfig['priority'] = $a_bridges[$id]['priority']; + $pconfig['proto'] = $a_bridges[$id]['proto']; + $pconfig['holdcnt'] = $a_bridges[$id]['holdcnt']; + if (!empty($a_bridges[$id]['ifpriority'])) { + $pconfig['ifpriority'] = explode(",", $a_bridges[$id]['ifpriority']); + $ifpriority = array(); + foreach ($pconfig['ifpriority'] as $cfg) { + list ($key, $value) = explode(":", $cfg); + $embprioritycfg[$key] = $value; + foreach ($embprioritycfg as $key => $value) { + $ifpriority[$key] = $value; + } + } + $pconfig['ifpriority'] = $ifpriority; + } + if (!empty($a_bridges[$id]['ifpathcost'])) { + $pconfig['ifpathcost'] = explode(",", $a_bridges[$id]['ifpathcost']); + $ifpathcost = array(); + foreach ($pconfig['ifpathcost'] as $cfg) { + list ($key, $value) = explode(":", $cfg); + $embpathcfg[$key] = $value; + foreach ($embpathcfg as $key => $value) { + $ifpathcost[$key] = $value; + } + } + $pconfig['ifpathcost'] = $ifpathcost; + } + $pconfig['span'] = $a_bridges[$id]['span']; + if (isset($a_bridges[$id]['edge'])) { + $pconfig['edge'] = $a_bridges[$id]['edge']; + } + if (isset($a_bridges[$id]['autoedge'])) { + $pconfig['autoedge'] = $a_bridges[$id]['autoedge']; + } + if (isset($a_bridges[$id]['ptp'])) { + $pconfig['ptp'] = $a_bridges[$id]['ptp']; + } + if (isset($a_bridges[$id]['autoptp'])) { + $pconfig['autoptp'] = $a_bridges[$id]['autoptp']; + } +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "members"); + $reqdfieldsn = array(gettext("Member Interfaces")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($_POST['maxage'] && !is_numeric($_POST['maxage'])) { + $input_errors[] = gettext("Maxage needs to be an integer between 6 and 40."); + } + if ($_POST['maxaddr'] && !is_numeric($_POST['maxaddr'])) { + $input_errors[] = gettext("Maxaddr needs to be an integer."); + } + if ($_POST['timeout'] && !is_numeric($_POST['timeout'])) { + $input_errors[] = gettext("Timeout needs to be an integer."); + } + if ($_POST['fwdelay'] && !is_numeric($_POST['fwdelay'])) { + $input_errors[] = gettext("Forward Delay needs to be an integer between 4 and 30."); + } + if ($_POST['hellotime'] && !is_numeric($_POST['hellotime'])) { + $input_errors[] = gettext("Hello time for STP needs to be an integer between 1 and 2."); + } + if ($_POST['priority'] && !is_numeric($_POST['priority'])) { + $input_errors[] = gettext("Priority for STP needs to be an integer between 0 and 61440."); + } + if ($_POST['holdcnt'] && !is_numeric($_POST['holdcnt'])) { + $input_errors[] = gettext("Transmit Hold Count for STP needs to be an integer between 1 and 10."); + } + foreach ($ifacelist as $ifn => $ifdescr) { + if ($_POST[$ifn] <> "" && !is_numeric($_POST[$ifn])) { + $input_errors[] = "{$ifdescr} " . gettext("interface priority for STP needs to be an integer between 0 and 240."); + } + } + $i = 0; + foreach ($ifacelist as $ifn => $ifdescr) { + if ($_POST["{$ifn}{$i}"] <> "" && !is_numeric($_POST["{$ifn}{$i}"])) { + $input_errors[] = "{$ifdescr} " . gettext("interface path cost for STP needs to be an integer between 1 and 200000000."); + } + $i++; + } + + if (!is_array($_POST['members']) || count($_POST['members']) < 1) { + $input_errors[] = gettext("You must select at least one member interface for a bridge."); + } + + if (is_array($_POST['members'])) { + foreach ($_POST['members'] as $ifmembers) { + if (empty($config['interfaces'][$ifmembers])) { + $input_errors[] = gettext("A member interface passed does not exist in configuration"); + } + if (is_array($config['interfaces'][$ifmembers]['wireless']) && + $config['interfaces'][$ifmembers]['wireless']['mode'] != "hostap") { + $input_errors[] = gettext("Bridging a wireless interface is only possible in hostap mode."); + } + if ($_POST['span'] != "none" && $_POST['span'] == $ifmembers) { + $input_errors[] = gettext("Span interface cannot be part of the bridge. Remove the span interface from bridge members to continue."); + } + } + } + + if (!$input_errors) { + $bridge = array(); + $bridge['members'] = implode(',', $_POST['members']); + $bridge['enablestp'] = $_POST['enablestp'] ? true : false; + $bridge['descr'] = $_POST['descr']; + $bridge['maxaddr'] = $_POST['maxaddr']; + $bridge['timeout'] = $_POST['timeout']; + if ($_POST['static']) { + $bridge['static'] = implode(',', $_POST['static']); + } + if ($_POST['private']) { + $bridge['private'] = implode(',', $_POST['private']); + } + if (isset($_POST['stp'])) { + $bridge['stp'] = implode(',', $_POST['stp']); + } + $bridge['maxage'] = $_POST['maxage']; + $bridge['fwdelay'] = $_POST['fwdelay']; + $bridge['hellotime'] = $_POST['hellotime']; + $bridge['priority'] = $_POST['priority']; + $bridge['proto'] = $_POST['proto']; + $bridge['holdcnt'] = $_POST['holdcnt']; + $i = 0; + $ifpriority = ""; + $ifpathcost = ""; + foreach ($ifacelist as $ifn => $ifdescr) { + if ($_POST[$ifn] <> "") { + if ($i > 0) { + $ifpriority .= ","; + } + $ifpriority .= $ifn.":".$_POST[$ifn]; + } + if ($_POST["{$ifn}0"] <> "") { + if ($i > 0) { + $ifpathcost .= ","; + } + $ifpathcost .= $ifn.":".$_POST["{$ifn}0"]; + } + $i++; + } + $bridge['ifpriority'] = $ifpriority; + $bridge['ifpathcost'] = $ifpathcost; + + if ($_POST['span'] != "none") { + $bridge['span'] = $_POST['span']; + } else { + unset($bridge['span']); + } + if (isset($_POST['edge'])) { + $bridge['edge'] = implode(',', $_POST['edge']); + } + if (isset($_POST['autoedge'])) { + $bridge['autoedge'] = implode(',', $_POST['autoedge']); + } + if (isset($_POST['ptp'])) { + $bridge['ptp'] = implode(',', $_POST['ptp']); + } + if (isset($_POST['autoptp'])) { + $bridge['autoptp'] = implode(',', $_POST['autoptp']); + } + + $bridge['bridgeif'] = $_POST['bridgeif']; + interface_bridge_configure($bridge); + if ($bridge['bridgeif'] == "" || !stristr($bridge['bridgeif'], "bridge")) { + $input_errors[] = gettext("Error occurred creating interface, please retry."); + } else { + if (isset($id) && $a_bridges[$id]) { + $a_bridges[$id] = $bridge; + } else { + $a_bridges[] = $bridge; + } + + write_config(); + + $confif = convert_real_interface_to_friendly_interface_name($bridge['bridgeif']); + if ($confif <> "") { + interface_configure($confif); + } + + header("Location: interfaces_bridge.php"); + exit; + } + } +} + +$pgtitle = array(gettext("Interfaces"), gettext("Bridge"), gettext("Edit")); +$shortcut_section = "interfaces"; +include("head.inc"); + +?> + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    +

    " />

    +
      + + " /> + " onclick="window.location.href=''" /> + + + + +
    +
    + + + diff --git a/src/usr/local/www/interfaces_gif.php b/src/usr/local/www/interfaces_gif.php new file mode 100644 index 0000000..0730090 --- /dev/null +++ b/src/usr/local/www/interfaces_gif.php @@ -0,0 +1,162 @@ + + + + + + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +   + edit +  ')">delete +
      add

    +
    +
    + +

    +

    +
     
    +
    +
    + + + diff --git a/src/usr/local/www/interfaces_gif_edit.php b/src/usr/local/www/interfaces_gif_edit.php new file mode 100644 index 0000000..2870c79 --- /dev/null +++ b/src/usr/local/www/interfaces_gif_edit.php @@ -0,0 +1,272 @@ + "") { + interface_configure($confif); + } + + header("Location: interfaces_gif.php"); + exit; + } + } +} + +$pgtitle = array(gettext("Interfaces"), gettext("GIF"), gettext("Edit")); +$shortcut_section = "interfaces"; +include("head.inc"); + +?> + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + +
    + +
    + + + +
    + +
    + + + +
    + + +
    + + + +
    + /> +
    + + + +
    + /> +
    + + + +
    + +
    + + + +
      + + " /> + " onclick="window.location.href=''" /> + + + + +
    +
    + + + diff --git a/src/usr/local/www/interfaces_gre.php b/src/usr/local/www/interfaces_gre.php new file mode 100644 index 0000000..3431987 --- /dev/null +++ b/src/usr/local/www/interfaces_gre.php @@ -0,0 +1,158 @@ + + + + + + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +   + edit +  ')">delete +
      add
    +


    +
    +
    +
    + + + diff --git a/src/usr/local/www/interfaces_gre_edit.php b/src/usr/local/www/interfaces_gre_edit.php new file mode 100644 index 0000000..a6cde04 --- /dev/null +++ b/src/usr/local/www/interfaces_gre_edit.php @@ -0,0 +1,262 @@ + "") { + interface_configure($confif); + } + + header("Location: interfaces_gre.php"); + exit; + } + } +} + +$pgtitle = array(gettext("Interfaces"), gettext("GRE"), gettext("Edit")); +$shortcut_section = "interfaces"; +include("head.inc"); + +?> + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    + +
    + + +
    + +
    + /> +
    + +
    + /> +
    + + + +
    + /> +
    + +
    + +
    +
      + + " /> + " onclick="window.location.href=''" /> + + + + +
    +
    + + + diff --git a/src/usr/local/www/interfaces_groups.php b/src/usr/local/www/interfaces_groups.php new file mode 100644 index 0000000..6342bcf --- /dev/null +++ b/src/usr/local/www/interfaces_groups.php @@ -0,0 +1,171 @@ + + + + + + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +   + + + + + + +
    " alt="edit" />')">" alt="delete" />
    +
    + + + + + +
     " alt="add" />
    +
    +


    +
    +
    +
    + + + diff --git a/src/usr/local/www/interfaces_groups_edit.php b/src/usr/local/www/interfaces_groups_edit.php new file mode 100644 index 0000000..22b8567 --- /dev/null +++ b/src/usr/local/www/interfaces_groups_edit.php @@ -0,0 +1,378 @@ + $gdescr) { + if ($gdescr == $_POST['ifname'] || $gif == $_POST['ifname']) { + $input_errors[] = "The specified group name is already used by an interface. Please choose another name."; + } + } + $members = ""; + $isfirst = 0; + /* item is a normal ifgroupentry type */ + for ($x = 0; $x < 9999; $x++) { + if ($_POST["members{$x}"] <> "") { + if ($isfirst > 0) { + $members .= " "; + } + $members .= $_POST["members{$x}"]; + $isfirst++; + } + } + + if (!$input_errors) { + $ifgroupentry = array(); + $ifgroupentry['members'] = $members; + $ifgroupentry['descr'] = $_POST['descr']; + + if (isset($id) && $a_ifgroups[$id] && $_POST['ifname'] != $a_ifgroups[$id]['ifname']) { + if (!empty($config['filter']) && is_array($config['filter']['rule'])) { + foreach ($config['filter']['rule'] as $ridx => $rule) { + if (isset($rule['floating'])) { + $rule_ifs = explode(",", $rule['interface']); + $rule_changed = false; + foreach ($rule_ifs as $rule_if_id => $rule_if) { + if ($rule_if == $a_ifgroups[$id]['ifname']) { + $rule_ifs[$rule_if_id] = $_POST['ifname']; + $rule_changed = true; + } + } + if ($rule_changed) { + $config['filter']['rule'][$ridx]['interface'] = implode(",", $rule_ifs); + } + } else { + if ($rule['interface'] == $a_ifgroups[$id]['ifname']) { + $config['filter']['rule'][$ridx]['interface'] = $_POST['ifname']; + } + } + } + } + if (!empty($config['nat']) && is_array($config['nat']['rule'])) { + foreach ($config['nat']['rule'] as $ridx => $rule) { + if ($rule['interface'] == $a_ifgroups[$id]['ifname']) { + $config['nat']['rule'][$ridx]['interface'] = $_POST['ifname']; + } + } + } + $omembers = explode(" ", $a_ifgroups[$id]['members']); + if (count($omembers) > 0) { + foreach ($omembers as $ifs) { + $realif = get_real_interface($ifs); + if ($realif) { + mwexec("/sbin/ifconfig {$realif} -group " . $a_ifgroups[$id]['ifname']); + } + } + } + $ifgroupentry['ifname'] = $_POST['ifname']; + $a_ifgroups[$id] = $ifgroupentry; + } else if (isset($id) && $a_ifgroups[$id]) { + $omembers = explode(" ", $a_ifgroups[$id]['members']); + $nmembers = explode(" ", $members); + $delmembers = array_diff($omembers, $nmembers); + if (count($delmembers) > 0) { + foreach ($delmembers as $ifs) { + $realif = get_real_interface($ifs); + if ($realif) { + mwexec("/sbin/ifconfig {$realif} -group " . $a_ifgroups[$id]['ifname']); + } + } + } + $ifgroupentry['ifname'] = $_POST['ifname']; + $a_ifgroups[$id] = $ifgroupentry; + } else { + $ifgroupentry['ifname'] = $_POST['ifname']; + $a_ifgroups[] = $ifgroupentry; + } + + write_config(); + + interface_group_setup($ifgroupentry); + + header("Location: interfaces_groups.php"); + exit; + } else { + $pconfig['descr'] = $_POST['descr']; + $pconfig['members'] = $members; + } +} + +include("head.inc"); + +?> + +"> + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + + + +
    + + + + + + "") { + $item = explode(" ", $members); + foreach ($item as $ww) { + $members = $item[$counter]; + $tracker = $counter; +?> + + + + + + +
    +
    +
    + + + remove +
    + + " /> + +

    + + + +
      + " /> + " /> + + + +
    +
    + + + + + + diff --git a/src/usr/local/www/interfaces_lagg.php b/src/usr/local/www/interfaces_lagg.php new file mode 100644 index 0000000..32b2a21 --- /dev/null +++ b/src/usr/local/www/interfaces_lagg.php @@ -0,0 +1,169 @@ + + + + + + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +   + edit +  delete
      add
    +

    + +
    +
    + +

    +
     
    +
    +
    + + + diff --git a/src/usr/local/www/interfaces_lagg_edit.php b/src/usr/local/www/interfaces_lagg_edit.php new file mode 100644 index 0000000..d548160 --- /dev/null +++ b/src/usr/local/www/interfaces_lagg_edit.php @@ -0,0 +1,278 @@ + "") { + interface_configure($confif); + } + + header("Location: interfaces_lagg.php"); + exit; + } + } +} + +$pgtitle = array(gettext("Interfaces"), gettext("LAGG"), gettext("Edit")); +$shortcut_section = "interfaces"; +include("head.inc"); + +?> + + + + +
    + + + + + + + + + + + + + + + + + + + + +
    + +
    + . +
    + +
    +
      +
    • +
      + +
    • +
    • +
      + +
    • +
    • +
      + +
    • +
    • +
      + . +
    • +
    • +
      + . +
    • +
    • +
      + . +
    • +
    +
    + +
    + . +
      + + " /> + " onclick="window.location.href=''" /> + + + + +
    +
    + + + diff --git a/src/usr/local/www/interfaces_ppps.php b/src/usr/local/www/interfaces_ppps.php new file mode 100644 index 0000000..85b5181 --- /dev/null +++ b/src/usr/local/www/interfaces_ppps.php @@ -0,0 +1,159 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/ifconfig + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-interfaces-ppps +##|*NAME=Interfaces: ppps page +##|*DESCR=Allow access to the 'Interfaces: ppps' page. +##|*MATCH=interfaces_ppps.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); + +function ppp_inuse($num) { + global $config, $g; + $iflist = get_configured_interface_list(false, true); + if (!is_array($config['ppps']['ppp'])) { + return false; + } + + foreach ($iflist as $if) { + if ($config['interfaces'][$if]['if'] == $config['ppps']['ppp'][$num]['if']) { + return true; + } + } + return false; +} + +if ($_GET['act'] == "del") { + /* check if still in use */ + if (ppp_inuse($_GET['id'])) { + $input_errors[] = gettext("This point-to-point link cannot be deleted because it is still being used as an interface."); + } elseif (is_array($config['ppps']['ppp']) && is_array($config['ppps']['ppp'][$_GET['id']])) { + + unset($config['ppps']['ppp'][$_GET['id']]['pppoe-reset-type']); + handle_pppoe_reset($config['ppps']['ppp'][$_GET['id']]); + unset($config['ppps']['ppp'][$_GET['id']]); + write_config(); + header("Location: interfaces_ppps.php"); + exit; + } +} + +if (!is_array($config['ppps']['ppp'])) { + $config['ppps']['ppp'] = array(); +} +$a_ppps = $config['ppps']['ppp']; + +$pgtitle = gettext("Interfaces: PPPs"); +$shortcut_section = "interfaces"; +include("head.inc"); + +?> + + + + + + + + + +
    + +
    +
    + + + + + + + + $ppp): +?> + + + + + + + + + + + +
    + + + $port) { + if ($port != get_real_interface($port) && $ppp['type'] != "ppp") { + $portlist[$portid] = convert_friendly_interface_to_friendly_descr($port); + } + } + echo htmlspecialchars(implode(",", $portlist)); +?> + +   + edit +  ')">remove +
      add
    +
    +
    + + + diff --git a/src/usr/local/www/interfaces_ppps_edit.php b/src/usr/local/www/interfaces_ppps_edit.php new file mode 100644 index 0000000..2a7eaf9 --- /dev/null +++ b/src/usr/local/www/interfaces_ppps_edit.php @@ -0,0 +1,903 @@ +. + All rights reserved. + Copyright (C) 2010 Gabriel B. . + All rights reserved. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-interfaces-ppps-edit +##|*NAME=Interfaces: PPPs: Edit page +##|*DESCR=Allow access to the 'Interfaces: PPPs: Edit' page. +##|*MATCH=interfaces_ppps_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/interfaces_ppps.php'); +} + +define("CRON_MONTHLY_PATTERN", "0 0 1 * *"); +define("CRON_WEEKLY_PATTERN", "0 0 * * 0"); +define("CRON_DAILY_PATTERN", "0 0 * * *"); +define("CRON_HOURLY_PATTERN", "0 * * * *"); + +if (!is_array($config['ppps']['ppp'])) { + $config['ppps']['ppp'] = array(); +} + +$a_ppps = &$config['ppps']['ppp']; + +$iflist = get_configured_interface_with_descr(); +$portlist = get_interface_list(); +$portlist = array_merge($portlist, $iflist); + +if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) { + foreach ($config['vlans']['vlan'] as $vlan) { + $portlist[$vlan['vlanif']] = $vlan; + } +} + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_ppps[$id]) { + $pconfig['ptpid'] = $a_ppps[$id]['ptpid']; + $pconfig['type'] = $a_ppps[$id]['type']; + //$pconfig['if'] = $a_ppps[$id]['if']; + $pconfig['interfaces'] = $a_ppps[$id]['ports']; + $pconfig['username'] = $a_ppps[$id]['username']; + $pconfig['password'] = base64_decode($a_ppps[$id]['password']); + if (isset($a_ppps[$id]['ondemand'])) { + $pconfig['ondemand'] = true; + } + $pconfig['idletimeout'] = $a_ppps[$id]['idletimeout']; + $pconfig['uptime'] = $a_ppps[$id]['uptime']; + $pconfig['descr'] = $a_ppps[$id]['descr']; + $pconfig['bandwidth'] = explode(",", $a_ppps[$id]['bandwidth']); + $pconfig['mtu'] = explode(",", $a_ppps[$id]['mtu']); + $pconfig['mru'] = explode(",", $a_ppps[$id]['mru']); + $pconfig['mrru'] = explode(",", $a_ppps[$id]['mrru']); + if (isset($a_ppps[$id]['shortseq'])) { + $pconfig['shortseq'] = true; + } + if (isset($a_ppps[$id]['acfcomp'])) { + $pconfig['acfcomp'] = true; + } + if (isset($a_ppps[$id]['protocomp'])) { + $pconfig['protocomp'] = true; + } + if (isset($a_ppps[$id]['vjcomp'])) { + $pconfig['vjcomp'] = true; + } + if (isset($a_ppps[$id]['tcpmssfix'])) { + $pconfig['tcpmssfix'] = true; + } + switch ($a_ppps[$id]['type']) { + case "ppp": + $pconfig['initstr'] = base64_decode($a_ppps[$id]['initstr']); + $pconfig['simpin'] = $a_ppps[$id]['simpin']; + $pconfig['pin-wait'] = $a_ppps[$id]['pin-wait']; + $pconfig['apn'] = $a_ppps[$id]['apn']; + $pconfig['apnum'] = $a_ppps[$id]['apnum']; + $pconfig['phone'] = $a_ppps[$id]['phone']; + $pconfig['connect-timeout'] = $a_ppps[$id]['connect-timeout']; + $pconfig['localip'] = explode(",", $a_ppps[$id]['localip']); + $pconfig['gateway'] = explode(",", $a_ppps[$id]['gateway']); + break; + case "l2tp": + case "pptp": + $pconfig['localip'] = explode(",", $a_ppps[$id]['localip']); + $pconfig['subnet'] = explode(",", $a_ppps[$id]['subnet']); + $pconfig['gateway'] = explode(",", $a_ppps[$id]['gateway']); + case "pppoe": + $pconfig['provider'] = $a_ppps[$id]['provider']; + if (isset($a_ppps[$id]['provider']) and empty($a_ppps[$id]['provider'])) { + $pconfig['null_service'] = true; + } + /* ================================================ */ + /* = force a connection reset at a specific time? = */ + /* ================================================ */ + + if (isset($a_ppps[$id]['pppoe-reset-type'])) { + $pconfig['pppoe-reset-type'] = $a_ppps[$id]['pppoe-reset-type']; + $itemhash = getMPDCRONSettings($a_ppps[$id]['if']); + $cronitem = $itemhash['ITEM']; + if (isset($cronitem)) { + $resetTime = "{$cronitem['minute']} {$cronitem['hour']} {$cronitem['mday']} {$cronitem['month']} {$cronitem['wday']}"; + } else { + $resetTime = NULL; + } + + if ($a_ppps[$id]['pppoe-reset-type'] == "custom") { + $resetTime_a = explode(" ", $resetTime); + $pconfig['pppoe_pr_custom'] = true; + $pconfig['pppoe_resetminute'] = $resetTime_a[0]; + $pconfig['pppoe_resethour'] = $resetTime_a[1]; + /* just initialize $pconfig['pppoe_resetdate'] if the + * corresponding item contains appropriate numeric values. + */ + if ($resetTime_a[2] <> "*" && $resetTime_a[3] <> "*") { + $pconfig['pppoe_resetdate'] = "{$resetTime_a[3]}/{$resetTime_a[2]}/" . date("Y"); + } + } else if ($a_ppps[$id]['pppoe-reset-type'] == "preset") { + $pconfig['pppoe_pr_preset'] = true; + switch ($resetTime) { + case CRON_MONTHLY_PATTERN: + $pconfig['pppoe_monthly'] = true; + break; + case CRON_WEEKLY_PATTERN: + $pconfig['pppoe_weekly'] = true; + break; + case CRON_DAILY_PATTERN: + $pconfig['pppoe_daily'] = true; + break; + case CRON_HOURLY_PATTERN: + $pconfig['pppoe_hourly'] = true; + break; + } + } + } + break; + } + +} else { + $pconfig['ptpid'] = interfaces_ptpid_next(); +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* okay first of all, cause we are just hiding the PPPoE HTML + * fields related to PPPoE resets, we are going to unset $_POST + * vars, if the reset feature should not be used. Otherwise the + * data validation procedure below, may trigger a false error + * message. + */ + if (empty($_POST['pppoe-reset-type'])) { + unset($_POST['pppoe_resethour']); + unset($_POST['pppoe_resetminute']); + unset($_POST['pppoe_resetdate']); + unset($_POST['pppoe_pr_preset_val']); + } + + /* input validation */ + switch ($_POST['type']) { + case "ppp": + $reqdfields = explode(" ", "interfaces phone"); + $reqdfieldsn = array(gettext("Link Interface(s)"), gettext("Phone Number")); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + break; + case "pppoe": + if ($_POST['ondemand']) { + $reqdfields = explode(" ", "interfaces username passwordfld ondemand idletimeout"); + $reqdfieldsn = array(gettext("Link Interface(s)"), gettext("Username"), gettext("Password"), gettext("Dial on demand"), gettext("Idle timeout value")); + } else { + $reqdfields = explode(" ", "interfaces username passwordfld"); + $reqdfieldsn = array(gettext("Link Interface(s)"), gettext("Username"), gettext("Password")); + } + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + break; + case "l2tp": + case "pptp": + if ($_POST['ondemand']) { + $reqdfields = explode(" ", "interfaces username passwordfld localip subnet gateway ondemand idletimeout"); + $reqdfieldsn = array(gettext("Link Interface(s)"), gettext("Username"), gettext("Password"), gettext("Local IP address"), gettext("Subnet"), gettext("Remote IP address"), gettext("Dial on demand"), gettext("Idle timeout value")); + } else { + $reqdfields = explode(" ", "interfaces username passwordfld localip subnet gateway"); + $reqdfieldsn = array(gettext("Link Interface(s)"), gettext("Username"), gettext("Password"), gettext("Local IP address"), gettext("Subnet"), gettext("Remote IP address")); + } + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + break; + default: + $input_errors[] = gettext("Please choose a Link Type."); + break; + } + if ($_POST['type'] == "ppp" && count($_POST['interfaces']) > 1) { + $input_errors[] = gettext("Multilink connections (MLPPP) using the PPP link type is not currently supported. Please select only one Link Interface."); + } + if ($_POST['provider'] && !is_domain($_POST['provider'])) { + $input_errors[] = gettext("The Service name contains invalid characters."); + } + if ($_POST['provider'] && $_POST['null_service']) { + $input_errors[] = gettext("Do not specify both a Service name and a NULL Service name."); + } + if (($_POST['idletimeout'] != "") && !is_numericint($_POST['idletimeout'])) { + $input_errors[] = gettext("The idle timeout value must be an integer."); + } + if ($_POST['pppoe-reset-type'] == "custom" && $_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) && + $_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23) { + $input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23)."); + } + if ($_POST['pppoe-reset-type'] == "custom" && $_POST['pppoe_resetminute'] <> "" && !is_numericint($_POST['pppoe_resetminute']) && + $_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <=59) { + $input_errors[] = gettext("A valid PPPoE reset minute must be specified (0-59)."); + } + if ($_POST['pppoe-reset-type'] == "custom" && $_POST['pppoe_resetdate'] <> "" && !is_numeric(str_replace("/", "", $_POST['pppoe_resetdate']))) { + $input_errors[] = gettext("A valid PPPoE reset date must be specified (mm/dd/yyyy)."); + } + if ($_POST['pppoe-reset-type'] == "custom" && $_POST['pppoe_resetdate'] <> "" && is_numeric(str_replace("/", "", $_POST['pppoe_resetdate']))) { + $date_nums = explode("/", $_POST['pppoe_resetdate']); + if ($date_nums[0] < 1 || $date_nums[0] > 12) { + $input_errors[] = gettext("A valid PPPoE reset month must be specified (1-12) in the Custom PPPoE Periodic reset fields."); + } + if ($date_nums[1] < 1 || $date_nums[1] > 31) { + $input_errors[] = gettext("A valid PPPoE reset day of month must be specified (1-31) in the Custom PPPoE Periodic reset fields. No checks are done on valid # of days per month"); + } + if ($date_nums[2] < date("Y")) { + $input_errors[] = gettext("A valid PPPoE reset year must be specified. Don't select a year in the past!"); + } + } + + if (is_array($_POST['interfaces'])) { + foreach ($_POST['interfaces'] as $iface) { + if ($_POST['localip'][$iface] && !is_ipaddr($_POST['localip'][$iface])) { + $input_errors[] = sprintf(gettext("A valid local IP address must be specified for %s."), $iface); + } + if ($_POST['gateway'][$iface] && !is_ipaddr($_POST['gateway'][$iface]) && !is_hostname($_POST['gateway'][$iface])) { + $input_errors[] = sprintf(gettext("A valid gateway IP address OR hostname must be specified for %s."), $iface); + } + if ($_POST['bandwidth'][$iface] && !is_numericint($_POST['bandwidth'][$iface])) { + $input_errors[] = sprintf(gettext("The bandwidth value for %s must be an integer."), $iface); + } + if ($_POST['mtu'][$iface] && ($_POST['mtu'][$iface] < 576)) { + $input_errors[] = sprintf(gettext("The MTU for %s must be greater than 576 bytes."), $iface); + } + if ($_POST['mru'][$iface] && ($_POST['mru'][$iface] < 576)) { + $input_errors[] = sprintf(gettext("The MRU for %s must be greater than 576 bytes."), $iface); + } + } + } + +/* + foreach ($a_ppps as $ppp) { + if (isset($id) && ($a_ppps[$id]) && ($a_ppps[$id] === $ppp)) { + continue; + } + + if ($ppp['serialport'] == $_POST['serialport']) { + $input_errors[] = "Serial port is in use"; + break; + } + } +*/ + + if (!$input_errors) { + $ppp = array(); + $ppp['ptpid'] = $_POST['ptpid']; + $ppp['type'] = $_POST['type']; + $ppp['if'] = $ppp['type'].$ppp['ptpid']; + $ppp['ports'] = implode(',', $_POST['interfaces']); + $ppp['username'] = $_POST['username']; + $ppp['password'] = base64_encode($_POST['passwordfld']); + $ppp['ondemand'] = $_POST['ondemand'] ? true : false; + if (!empty($_POST['idletimeout'])) { + $ppp['idletimeout'] = $_POST['idletimeout']; + } else { + unset($ppp['idletimeout']); + } + $ppp['uptime'] = $_POST['uptime'] ? true : false; + if (!empty($_POST['descr'])) { + $ppp['descr'] = $_POST['descr']; + } else { + unset($ppp['descr']); + } + + // Loop through fields associated with an individual link/port and make an array of the data + $port_fields = array("localip", "gateway", "subnet", "bandwidth", "mtu", "mru", "mrru"); + foreach ($_POST['interfaces'] as $iface) { + foreach ($port_fields as $field_label) { + if (isset($_POST[$field_label][$iface])) { + $port_data[$field_label][] = $_POST[$field_label][$iface]; + } + } + } + + switch ($_POST['type']) { + case "ppp": + if (!empty($_POST['initstr'])) { + $ppp['initstr'] = base64_encode($_POST['initstr']); + } else { + unset($ppp['initstr']); + } + if (!empty($_POST['simpin'])) { + $ppp['simpin'] = $_POST['simpin']; + $ppp['pin-wait'] = $_POST['pin-wait']; + } else { + unset($ppp['simpin']); + unset($ppp['pin-wait']); + } + + if (!empty($_POST['apn'])) { + $ppp['apn'] = $_POST['apn']; + $ppp['apnum'] = $_POST['apnum']; + } else { + unset($ppp['apn']); + unset($ppp['apnum']); + } + $ppp['phone'] = $_POST['phone']; + $ppp['localip'] = implode(',', $port_data['localip']); + $ppp['gateway'] = implode(',', $port_data['gateway']); + if (!empty($_POST['connect-timeout'])) { + $ppp['connect-timeout'] = $_POST['connect-timeout']; + } else { + unset($ppp['connect-timeout']); + } + break; + case "pppoe": + if (!empty($_POST['provider'])) { + $ppp['provider'] = $_POST['provider']; + } else { + unset($ppp['provider']); + $ppp['provider'] = $_POST['null_service'] ? true : false; + } + if (!empty($_POST['pppoe-reset-type'])) { + $ppp['pppoe-reset-type'] = $_POST['pppoe-reset-type']; + } else { + unset($ppp['pppoe-reset-type']); + } + + break; + case "pptp": + case "l2tp": + $ppp['localip'] = implode(',', $port_data['localip']); + $ppp['subnet'] = implode(',', $port_data['subnet']); + $ppp['gateway'] = implode(',', $port_data['gateway']); + break; + default: + break; + + } + + $ppp['shortseq'] = $_POST['shortseq'] ? true : false; + $ppp['acfcomp'] = $_POST['acfcomp'] ? true : false; + $ppp['protocomp'] = $_POST['protocomp'] ? true : false; + $ppp['vjcomp'] = $_POST['vjcomp'] ? true : false; + $ppp['tcpmssfix'] = $_POST['tcpmssfix'] ? true : false; + $ppp['bandwidth'] = implode(',', $port_data['bandwidth']); + if (is_array($port_data['mtu'])) { + $ppp['mtu'] = implode(',', $port_data['mtu']); + } + if (is_array($port_data['mru'])) { + $ppp['mru'] = implode(',', $port_data['mru']); + } + if (is_array($port_data['mrru'])) { + $ppp['mrru'] = implode(',', $port_data['mrru']); + } + + /* handle_pppoe_reset is called here because if user changes Link Type from PPPoE to another type we + must be able to clear the config data in the section of config.xml if it exists + */ + handle_pppoe_reset($_POST); + + if (isset($id) && $a_ppps[$id]) { + $a_ppps[$id] = $ppp; + } else { + $a_ppps[] = $ppp; + } + + write_config(); + configure_cron(); + + foreach ($iflist as $pppif => $ifdescr) { + if ($config['interfaces'][$pppif]['if'] == $ppp['if']) { + interface_ppps_configure($pppif); + } + } + header("Location: interfaces_ppps.php"); + exit; + } +} // end if ($_POST) + +$closehead = false; +$pgtitle = array(gettext("Interfaces"), gettext("PPPs"), gettext("Edit")); +$shortcut_section = "interfaces"; +include("head.inc"); + +$types = array("select" => gettext("Select"), "ppp" => "PPP", "pppoe" => "PPPoE", "pptp" => "PPTP", "l2tp" => "L2TP"/*, "tcp" => "TCP", "udp" => "UDP"*/); + +?> + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
      +

    " />

    +
      + " /> + " onclick="window.location.href=''" /> + + + + + +
    +
    + + + diff --git a/src/usr/local/www/interfaces_qinq.php b/src/usr/local/www/interfaces_qinq.php new file mode 100644 index 0000000..dac5801 --- /dev/null +++ b/src/usr/local/www/interfaces_qinq.php @@ -0,0 +1,181 @@ + 0) { + foreach ($delmembers as $tag) { + mwexec("/usr/sbin/ngctl shutdown {$qinq['vlanif']}h{$tag}:"); + } + } + mwexec("/usr/sbin/ngctl shutdown {$qinq['vlanif']}qinq:"); + mwexec("/usr/sbin/ngctl shutdown {$qinq['vlanif']}:"); + mwexec("/sbin/ifconfig {$qinq['vlanif']} destroy"); + unset($a_qinqs[$id]); + + write_config(); + + header("Location: interfaces_qinq.php"); + exit; + } +} + +$pgtitle = array(gettext("Interfaces"), gettext("QinQ")); +$shortcut_section = "interfaces"; +include("head.inc"); + +?> + + + + + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + 20) { + echo substr(htmlspecialchars($qinq['members']), 0, 20) . "..."; + } else { + echo htmlspecialchars($qinq['members']); + } + ?> + +   + edit +  ')">remove +
      add
    +

    + +
    +
    + +

    +
     
    +
    +
    + + + diff --git a/src/usr/local/www/interfaces_qinq_edit.php b/src/usr/local/www/interfaces_qinq_edit.php new file mode 100644 index 0000000..93048a9 --- /dev/null +++ b/src/usr/local/www/interfaces_qinq_edit.php @@ -0,0 +1,444 @@ + "") { + $member = explode("-", $_POST["members{$x}"]); + if (count($member) > 1) { + if (preg_match("/([^0-9])+/", $member[0], $match) || + preg_match("/([^0-9])+/", $member[1], $match)) { + $input_errors[] = gettext("Tags can contain only numbers or a range in format #-#."); + } + + for ($i = $member[0]; $i <= $member[1]; $i++) { + if ($isfirst > 0) { + $members .= " "; + } + $members .= $i; + $isfirst++; + } + } else { + if (preg_match("/([^0-9])+/", $_POST["members{$x}"], $match)) { + $input_errors[] = gettext("Tags can contain only numbers or a range in format #-#."); + } + + if ($isfirst > 0) { + $members .= " "; + } + $members .= $_POST["members{$x}"]; + $isfirst++; + } + } + } + + if (!$input_errors) { + $qinqentry['members'] = $members; + $qinqentry['descr'] = $_POST['descr']; + $qinqentry['vlanif'] = "{$_POST['if']}_{$_POST['tag']}"; + $nmembers = explode(" ", $members); + + if (isset($id) && $a_qinqs[$id]) { + $omembers = explode(" ", $a_qinqs[$id]['members']); + $delmembers = array_diff($omembers, $nmembers); + $addmembers = array_diff($nmembers, $omembers); + + if ((count($delmembers) > 0) || (count($addmembers) > 0)) { + $fd = fopen("{$g['tmp_path']}/netgraphcmd", "w"); + foreach ($delmembers as $tag) { + fwrite($fd, "shutdown {$qinqentry['vlanif']}h{$tag}:\n"); + fwrite($fd, "msg {$qinqentry['vlanif']}qinq: delfilter \\\"{$qinqentry['vlanif']}{$tag}\\\"\n"); + } + + foreach ($addmembers as $member) { + $qinq = array(); + $qinq['if'] = $qinqentry['vlanif']; + $qinq['tag'] = $member; + $macaddr = get_interface_mac($qinqentry['vlanif']); + interface_qinq2_configure($qinq, $fd, $macaddr); + } + + fclose($fd); + mwexec("/usr/sbin/ngctl -f {$g['tmp_path']}/netgraphcmd"); + } + $a_qinqs[$id] = $qinqentry; + } else { + interface_qinq_configure($qinqentry); + $a_qinqs[] = $qinqentry; + } + if ($_POST['autogroup'] == "yes") { + if (!is_array($config['ifgroups']['ifgroupentry'])) { + $config['ifgroups']['ifgroupentry'] = array(); + } + foreach ($config['ifgroups']['ifgroupentry'] as $gid => $group) { + if ($group['ifname'] == "QinQ") { + $found = true; + break; + } + } + $additions = ""; + foreach ($nmembers as $qtag) { + $additions .= "{$qinqentry['vlanif']}_{$qtag} "; + } + $additions .= "{$qinqentry['vlanif']}"; + if ($found == true) { + $config['ifgroups']['ifgroupentry'][$gid]['members'] .= " {$additions}"; + } else { + $gentry = array(); + $gentry['ifname'] = "QinQ"; + $gentry['members'] = "{$additions}"; + $gentry['descr'] = gettext("QinQ VLANs group"); + $config['ifgroups']['ifgroupentry'][] = $gentry; + } + } + + write_config(); + + header("Location: interfaces_qinq.php"); + exit; + } else { + $pconfig['descr'] = $_POST['descr']; + $pconfig['tag'] = $_POST['tag']; + $pconfig['members'] = $members; + } +} + +include("head.inc"); + +?> + +"> + + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + + + +
    + +
    + /> + Auto assign interface so it can be configured with ip etc... +
    + /> + Auto enable interface so it can be used on filter rules. +
    + /> + Allows to keep clients mtu unchanged(1500).
    NOTE: if you are using jumbo frames this option is not needed and may produce incorrect results!
    + +
    + /> + +
    + +
    + + + +
    + + + +
    + + + + + + + "") { + $item = explode(" ", $members); + foreach ($item as $ww) { + $member = $item[$counter]; +?> + + + + + + +
    + + + remove +
    + + " /> + +
      + " /> + " /> + + + +
    +
    + + + + + + diff --git a/src/usr/local/www/interfaces_vlan.php b/src/usr/local/www/interfaces_vlan.php new file mode 100644 index 0000000..20453b4 --- /dev/null +++ b/src/usr/local/www/interfaces_vlan.php @@ -0,0 +1,165 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/ifconfig + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-interfaces-vlan +##|*NAME=Interfaces: VLAN page +##|*DESCR=Allow access to the 'Interfaces: VLAN' page. +##|*MATCH=interfaces_vlan.php* +##|-PRIV + +require("guiconfig.inc"); + +if (!is_array($config['vlans']['vlan'])) { + $config['vlans']['vlan'] = array(); +} + +$a_vlans = &$config['vlans']['vlan'] ; + +function vlan_inuse($num) { + global $config, $a_vlans; + + $iflist = get_configured_interface_list(false, true); + foreach ($iflist as $if) { + if ($config['interfaces'][$if]['if'] == $a_vlans[$num]['vlanif']) { + return true; + } + } + + return false; +} + +if ($_GET['act'] == "del") { + if (!isset($_GET['id'])) { + $input_errors[] = gettext("Wrong parameters supplied"); + } else if (empty($a_vlans[$_GET['id']])) { + $input_errors[] = gettext("Wrong index supplied"); + /* check if still in use */ + } else if (vlan_inuse($_GET['id'])) { + $input_errors[] = gettext("This VLAN cannot be deleted because it is still being used as an interface."); + } else { + if (does_interface_exist($a_vlans[$_GET['id']]['vlanif'])) { + pfSense_interface_destroy($a_vlans[$_GET['id']]['vlanif']); + } + unset($a_vlans[$_GET['id']]); + + write_config(); + + header("Location: interfaces_vlan.php"); + exit; + } +} + + +$pgtitle = array(gettext("Interfaces"), gettext("VLAN")); +$shortcut_section = "interfaces"; +include("head.inc"); + +?> + + + + + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +   + edit +  ')">delete +
      add

    + +
    +
    +

    +
     
    +
    +
    + + + diff --git a/src/usr/local/www/interfaces_vlan_edit.php b/src/usr/local/www/interfaces_vlan_edit.php new file mode 100644 index 0000000..dd9f1a7 --- /dev/null +++ b/src/usr/local/www/interfaces_vlan_edit.php @@ -0,0 +1,236 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-interfaces-vlan-edit +##|*NAME=Interfaces: VLAN: Edit page +##|*DESCR=Allow access to the 'Interfaces: VLAN: Edit' page. +##|*MATCH=interfaces_vlan_edit.php* +##|-PRIV + +require("guiconfig.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/interfaces_vlan.php'); +} + +if (!is_array($config['vlans']['vlan'])) { + $config['vlans']['vlan'] = array(); +} + +$a_vlans = &$config['vlans']['vlan']; + +$portlist = get_interface_list(); + +/* add LAGG interfaces */ +if (is_array($config['laggs']['lagg']) && count($config['laggs']['lagg'])) { + foreach ($config['laggs']['lagg'] as $lagg) { + $portlist[$lagg['laggif']] = $lagg; + } +} + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_vlans[$id]) { + $pconfig['if'] = $a_vlans[$id]['if']; + $pconfig['vlanif'] = $a_vlans[$id]['vlanif']; + $pconfig['tag'] = $a_vlans[$id]['tag']; + $pconfig['descr'] = $a_vlans[$id]['descr']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "if tag"); + $reqdfieldsn = array(gettext("Parent interface"), gettext("VLAN tag")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (isset($_POST['tag']) && (!is_numericint($_POST['tag']) || ($_POST['tag'] < '1') || ($_POST['tag'] > '4094'))) { + $input_errors[] = gettext("The VLAN tag must be an integer between 1 and 4094."); + } + + if (!does_interface_exist($_POST['if'])) { + $input_errors[] = gettext("Interface supplied as parent is invalid"); + } + + if (isset($id)) { + if ($_POST['tag'] && $_POST['tag'] != $a_vlans[$id]['tag']) { + if (!empty($a_vlans[$id]['vlanif']) && convert_real_interface_to_friendly_interface_name($a_vlans[$id]['vlanif']) != NULL) { + $input_errors[] = gettext("Interface is assigned and you cannot change the VLAN tag while assigned."); + } + } + } + foreach ($a_vlans as $vlan) { + if (isset($id) && ($a_vlans[$id]) && ($a_vlans[$id] === $vlan)) { + continue; + } + + if (($vlan['if'] == $_POST['if']) && ($vlan['tag'] == $_POST['tag'])) { + $input_errors[] = sprintf(gettext("A VLAN with the tag %s is already defined on this interface."), $vlan['tag']); + break; + } + } + if (is_array($config['qinqs']['qinqentry'])) { + foreach ($config['qinqs']['qinqentry'] as $qinq) { + if ($qinq['tag'] == $_POST['tag'] && $qinq['if'] == $_POST['if']) { + $input_errors[] = gettext("A QinQ VLAN exists with this tag please remove it to use this tag with."); + } + } + } + + if (!$input_errors) { + if (isset($id) && $a_vlans[$id]) { + if (($a_vlans[$id]['if'] != $_POST['if']) || ($a_vlans[$id]['tag'] != $_POST['tag'])) { + if (!empty($a_vlans[$id]['vlanif'])) { + $confif = convert_real_interface_to_friendly_interface_name($vlan['vlanif']); + // Destroy previous vlan + pfSense_interface_destroy($a_vlans[$id]['vlanif']); + } else { + pfSense_interface_destroy("{$a_vlans[$id]['if']}_vlan{$a_vlans[$id]['tag']}"); + $confif = convert_real_interface_to_friendly_interface_name("{$a_vlans[$id]['if']}_vlan{$a_vlans[$id]['tag']}"); + } + if ($confif <> "") { + $config['interfaces'][$confif]['if'] = "{$_POST['if']}_vlan{$_POST['tag']}"; + } + } + } + $vlan = array(); + $vlan['if'] = $_POST['if']; + $vlan['tag'] = $_POST['tag']; + $vlan['descr'] = $_POST['descr']; + $vlan['vlanif'] = "{$_POST['if']}_vlan{$_POST['tag']}"; + + $vlan['vlanif'] = interface_vlan_configure($vlan); + if ($vlan['vlanif'] == "" || !stristr($vlan['vlanif'], "vlan")) { + $input_errors[] = gettext("Error occurred creating interface, please retry."); + } else { + if (isset($id) && $a_vlans[$id]) { + $a_vlans[$id] = $vlan; + } else { + $a_vlans[] = $vlan; + } + + write_config(); + + if ($confif <> "") { + interface_configure($confif); + } + + header("Location: interfaces_vlan.php"); + exit; + } + } +} + +$pgtitle = array(gettext("Interfaces"), gettext("VLAN"), gettext("Edit")); +$shortcut_section = "interfaces"; +include("head.inc"); + +?> + + + + +
    + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    + +
    + +
      + + " /> + " onclick="window.location.href=''" /> + + + + +
    +
    + + + diff --git a/src/usr/local/www/interfaces_wireless.php b/src/usr/local/www/interfaces_wireless.php new file mode 100644 index 0000000..86fc077 --- /dev/null +++ b/src/usr/local/www/interfaces_wireless.php @@ -0,0 +1,160 @@ + + + + + + + + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +   + edit +  ')">delete +
      edit

    + + :
    +
    +

    +
     
    +
    +
    + + + diff --git a/src/usr/local/www/interfaces_wireless_edit.php b/src/usr/local/www/interfaces_wireless_edit.php new file mode 100644 index 0000000..6ccce5c --- /dev/null +++ b/src/usr/local/www/interfaces_wireless_edit.php @@ -0,0 +1,230 @@ + + + + + +
    + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
      + + " /> + " onclick="window.location.href=''" /> + + + + +
    +
    + + + diff --git a/src/usr/local/www/javascript/autosuggest.js b/src/usr/local/www/javascript/autosuggest.js new file mode 100644 index 0000000..d9b5ac0 --- /dev/null +++ b/src/usr/local/www/javascript/autosuggest.js @@ -0,0 +1,337 @@ + +/** + * An autosuggest textbox control. + * @class + * @scope public + */ +function AutoSuggestControl(oTextbox /*:HTMLInputElement*/, + oProvider /*:SuggestionProvider*/) { + + /** + * The currently selected suggestions. + * @scope private + */ + this.cur /*:int*/ = -1; + + /** + * The dropdown list layer. + * @scope private + */ + this.layer = null; + + /** + * Suggestion provider for the autosuggest feature. + * @scope private. + */ + this.provider /*:SuggestionProvider*/ = oProvider; + + /** + * The textbox to capture. + * @scope private + */ + this.textbox /*:HTMLInputElement*/ = oTextbox; + + //initialize the control + this.init(); + +} + +/** + * Autosuggests one or more suggestions for what the user has typed. + * If no suggestions are passed in, then no autosuggest occurs. + * @scope private + * @param aSuggestions An array of suggestion strings. + * @param bTypeAhead If the control should provide a type ahead suggestion. + */ +AutoSuggestControl.prototype.autosuggest = function (aSuggestions /*:Array*/, + bTypeAhead /*:boolean*/) { + + //make sure there's at least one suggestion + if (aSuggestions.length > 0) { + if (bTypeAhead) { + this.typeAhead(aSuggestions[0]); + } + + this.showSuggestions(aSuggestions); + } else { + this.hideSuggestions(); + } +}; + +/** + * Creates the dropdown layer to display multiple suggestions. + * @scope private + */ +AutoSuggestControl.prototype.createDropDown = function () { + + var oThis = this; + + //create the layer and assign styles + this.layer = document.createElement("div"); + this.layer.className = "suggestions"; + this.layer.style.visibility = "hidden"; + this.layer.style.width = this.textbox.offsetWidth; + + //when the user clicks on the a suggestion, get the text (innerHTML) + //and place it into a textbox + this.layer.onmousedown = + this.layer.onmouseup = + this.layer.onmouseover = function (oEvent) { + oEvent = oEvent || window.event; + oTarget = oEvent.target || oEvent.srcElement; + + if (oEvent.type == "mousedown") { + oThis.textbox.value = oTarget.firstChild.nodeValue; + oThis.hideSuggestions(); + } else if (oEvent.type == "mouseover") { + oThis.highlightSuggestion(oTarget); + } else { + oThis.textbox.focus(); + } + }; + + + document.body.appendChild(this.layer); +}; + +/** + * Gets the left coordinate of the textbox. + * @scope private + * @return The left coordinate of the textbox in pixels. + */ +AutoSuggestControl.prototype.getLeft = function () /*:int*/ { + + var oNode = this.textbox; + var iLeft = 0; + + while(oNode.tagName != "BODY") { + iLeft += oNode.offsetLeft; + oNode = oNode.offsetParent; + } + + return iLeft; +}; + +/** + * Gets the top coordinate of the textbox. + * @scope private + * @return The top coordinate of the textbox in pixels. + */ +AutoSuggestControl.prototype.getTop = function () /*:int*/ { + + var oNode = this.textbox; + var iTop = 0; + + while(oNode.tagName != "BODY") { + iTop += oNode.offsetTop; + oNode = oNode.offsetParent; + } + + return iTop; +}; + +/** + * Handles three keydown events. + * @scope private + * @param oEvent The event object for the keydown event. + */ +AutoSuggestControl.prototype.handleKeyDown = function (oEvent /*:Event*/) { + + switch(oEvent.keyCode) { + case 38: //up arrow + this.previousSuggestion(); + break; + case 40: //down arrow + this.nextSuggestion(); + break; + case 13: //enter + this.hideSuggestions(); + break; + } + +}; + +/** + * Handles keyup events. + * @scope private + * @param oEvent The event object for the keyup event. + */ +AutoSuggestControl.prototype.handleKeyUp = function (oEvent /*:Event*/) { + + var iKeyCode = oEvent.keyCode; + + //for backspace (8) and delete (46), shows suggestions without typeahead + if (iKeyCode == 8 || iKeyCode == 46) { + this.provider.requestSuggestions(this, false); + + //make sure not to interfere with non-character keys + } else if (iKeyCode < 32 || (iKeyCode >= 33 && iKeyCode < 46) || (iKeyCode >= 112 && iKeyCode <= 123)) { + //ignore + } else { + //request suggestions from the suggestion provider with typeahead + this.provider.requestSuggestions(this, true); + } +}; + +/** + * Hides the suggestion dropdown. + * @scope private + */ +AutoSuggestControl.prototype.hideSuggestions = function () { + this.layer.style.visibility = "hidden"; +}; + +/** + * Highlights the given node in the suggestions dropdown. + * @scope private + * @param oSuggestionNode The node representing a suggestion in the dropdown. + */ +AutoSuggestControl.prototype.highlightSuggestion = function (oSuggestionNode) { + + for (var i=0; i < this.layer.childNodes.length; i++) { + var oNode = this.layer.childNodes[i]; + if (oNode == oSuggestionNode) { + oNode.className = "current"; + } else if (oNode.className == "current") { + oNode.className = ""; + } + } +}; + +/** + * Initializes the textbox with event handlers for + * auto suggest functionality. + * @scope private + */ +AutoSuggestControl.prototype.init = function () { + + //save a reference to this object + var oThis = this; + + //assign the onkeyup event handler + this.textbox.onkeyup = function (oEvent) { + + //check for the proper location of the event object + if (!oEvent) { + oEvent = window.event; + } + + //call the handleKeyUp() method with the event object + oThis.handleKeyUp(oEvent); + }; + + //assign onkeydown event handler + this.textbox.onkeydown = function (oEvent) { + + //check for the proper location of the event object + if (!oEvent) { + oEvent = window.event; + } + + //call the handleKeyDown() method with the event object + oThis.handleKeyDown(oEvent); + }; + + //assign onblur event handler (hides suggestions) + this.textbox.onblur = function () { + oThis.hideSuggestions(); + }; + + //create the suggestions dropdown + this.createDropDown(); +}; + +/** + * Highlights the next suggestion in the dropdown and + * places the suggestion into the textbox. + * @scope private + */ +AutoSuggestControl.prototype.nextSuggestion = function () { + var cSuggestionNodes = this.layer.childNodes; + + if (cSuggestionNodes.length > 0 && this.cur < cSuggestionNodes.length-1) { + var oNode = cSuggestionNodes[++this.cur]; + this.highlightSuggestion(oNode); + this.textbox.value = oNode.firstChild.nodeValue; + } +}; + +/** + * Highlights the previous suggestion in the dropdown and + * places the suggestion into the textbox. + * @scope private + */ +AutoSuggestControl.prototype.previousSuggestion = function () { + var cSuggestionNodes = this.layer.childNodes; + + if (cSuggestionNodes.length > 0 && this.cur > 0) { + var oNode = cSuggestionNodes[--this.cur]; + this.highlightSuggestion(oNode); + this.textbox.value = oNode.firstChild.nodeValue; + } +}; + +/** + * Selects a range of text in the textbox. + * @scope public + * @param iStart The start index (base 0) of the selection. + * @param iLength The number of characters to select. + */ +AutoSuggestControl.prototype.selectRange = function (iStart /*:int*/, iLength /*:int*/) { + + //use text ranges for Internet Explorer + if (this.textbox.createTextRange) { + var oRange = this.textbox.createTextRange(); + oRange.moveStart("character", iStart); + oRange.moveEnd("character", iLength - this.textbox.value.length); + oRange.select(); + + //use setSelectionRange() for Mozilla + } else if (this.textbox.setSelectionRange) { + this.textbox.setSelectionRange(iStart, iLength); + } + + //set focus back to the textbox + this.textbox.focus(); +}; + +/** + * Builds the suggestion layer contents, moves it into position, + * and displays the layer. + * @scope private + * @param aSuggestions An array of suggestions for the control. + */ +AutoSuggestControl.prototype.showSuggestions = function (aSuggestions /*:Array*/) { + + var oDiv = null; + this.layer.innerHTML = ""; //clear contents of the layer + + for (var i=0; i < aSuggestions.length; i++) { + oDiv = document.createElement("div"); + oDiv.appendChild(document.createTextNode(aSuggestions[i])); + this.layer.appendChild(oDiv); + } + + this.layer.style.left = this.getLeft() + "px"; + this.layer.style.top = (this.getTop()+this.textbox.offsetHeight) + "px"; + this.layer.style.width = this.textbox.offsetWidth + "px"; + this.layer.style.visibility = "visible"; + +}; + +/** + * Inserts a suggestion into the textbox, highlighting the + * suggested part of the text. + * @scope private + * @param sSuggestion The suggestion for the textbox. + */ +AutoSuggestControl.prototype.typeAhead = function (sSuggestion /*:String*/) { + + //check for support of typeahead functionality + if (this.textbox.createTextRange || this.textbox.setSelectionRange){ + var iLen = this.textbox.value.length; + this.textbox.value = sSuggestion; + this.selectRange(iLen, sSuggestion.length); + } +}; + diff --git a/src/usr/local/www/javascript/base64.js b/src/usr/local/www/javascript/base64.js new file mode 100644 index 0000000..48d5f33 --- /dev/null +++ b/src/usr/local/www/javascript/base64.js @@ -0,0 +1,142 @@ +/** + * + * Base64 encode / decode + * http://www.webtoolkit.info/ + * http://www.webtoolkit.info/licence + **/ + +var Base64 = { + + // private property + _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", + + // public method for encoding + encode : function (input) { + var output = ""; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0; + + input = Base64._utf8_encode(input); + + while (i < input.length) { + + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + + output = output + + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); + + } + + return output; + }, + + // public method for decoding + decode : function (input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + + while (i < input.length) { + + enc1 = this._keyStr.indexOf(input.charAt(i++)); + enc2 = this._keyStr.indexOf(input.charAt(i++)); + enc3 = this._keyStr.indexOf(input.charAt(i++)); + enc4 = this._keyStr.indexOf(input.charAt(i++)); + + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + + output = output + String.fromCharCode(chr1); + + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + + } + + output = Base64._utf8_decode(output); + + return output; + + }, + + // private method for UTF-8 encoding + _utf8_encode : function (string) { + string = string.replace(/\r\n/g,"\n"); + var utftext = ""; + + for (var n = 0; n < string.length; n++) { + + var c = string.charCodeAt(n); + + if (c < 128) { + utftext += String.fromCharCode(c); + } + else if((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } + else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + + return utftext; + }, + + // private method for UTF-8 decoding + _utf8_decode : function (utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + } + +}; \ No newline at end of file diff --git a/src/usr/local/www/javascript/carp_status/carp_status.js b/src/usr/local/www/javascript/carp_status/carp_status.js new file mode 100644 index 0000000..c14201d --- /dev/null +++ b/src/usr/local/www/javascript/carp_status/carp_status.js @@ -0,0 +1,5 @@ + +window.onLoad = function () { + NiftyCheck(); + Rounded("div#mainlevel","all","#FFF","#eeeeee","smooth"); +}; diff --git a/src/usr/local/www/javascript/chosen/chosen-sprite.png b/src/usr/local/www/javascript/chosen/chosen-sprite.png new file mode 100644 index 0000000..6ec9bbf Binary files /dev/null and b/src/usr/local/www/javascript/chosen/chosen-sprite.png differ diff --git a/src/usr/local/www/javascript/chosen/chosen.css b/src/usr/local/www/javascript/chosen/chosen.css new file mode 100644 index 0000000..d2b1eb4 --- /dev/null +++ b/src/usr/local/www/javascript/chosen/chosen.css @@ -0,0 +1,317 @@ +div.chzn-container { + font-size: 13px; + position: relative; +} + +div.chzn-container input { + background: #fff; + background: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); + background: -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); + background: -o-linear-gradient(bottom, white 85%, #eeeeee 99%); + border: 1px solid #aaa; + font-family: sans-serif; + font-size: 1em; + margin: 0px; + padding: 4px 5px; + outline: none; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -o-border-radius: 3px; + -ms-border-radius: 3px; + -khtml-border-radius: 3px; + border-radius: 3px; +} +div.chzn-container textarea:focus { + border-color: #058cf5; + -moz-box-shadow: 0px 0px 3px #aaa; + -webkit-box-shadow: 0px 0px 3px #aaa; + box-shadow: 0px 0px 3px #aaa; +} + + +div.chzn-container div.chzn-drop { + background: #FFF; + border: 1px solid #aaa; + border-width: 0 1px 1px; + left: 0; + position: absolute; + top: 29px; + -webkit-box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15); + box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15); + z-index: 20; +} +div.chzn-container-single div.chzn-drop { + -moz-border-radius: 0 0 4px 4px; + -webkit-border-radius: 0 0 4px 4px; + -o-border-radius: 0 0 4px 4px; + -ms-border-radius: 0 0 4px 4px; + -khtml-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + + +/* SINGLE */ +div.chzn-container a.chzn-single { + background: #FFF; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white)); + background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%); + background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 50%); + border: 1px solid #aaa; + display: block; + overflow: hidden; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + -ms-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + height: 25px; + color: #444; + line-height: 26px; + padding: 0px 0px 0px 8px; + position: relative; + text-decoration: none; + z-index: 19; + white-space: nowrap; +} +div.chzn-container a.chzn-single span { + display: block; + margin-right: 26px; + overflow: hidden; + text-overflow: ellipsis; +} +div.chzn-container a.chzn-single div { + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + -o-border-top-right-radius: 4px; + -ms-border-top-right-radius: 4px; + -khtml-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + -o-border-bottom-right-radius: 4px; + -ms-border-bottom-right-radius: 4px; + -khtml-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + background: #ccc; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee)); + background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%); + background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%); + border-left: 1px solid #aaa; + display: block; + height: 100%; + position: absolute; + right: 0; + top: 0; + width: 18px; +} +div.chzn-container a.chzn-single div b { + background: url('chosen-sprite.png') no-repeat 0 1px; + display: block; + width: 100%; + height: 100%; +} +div.chzn-container div.chzn-search { + padding: 3px 4px; + margin: 0px; + white-space: nowrap; +} +div.chzn-container div.chzn-search input { + background: url('chosen-sprite.png') no-repeat 97% -35px, #ffffff; + background: url('chosen-sprite.png') no-repeat 97% -35px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); + background: url('chosen-sprite.png') no-repeat 97% -35px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); + background: url('chosen-sprite.png') no-repeat 97% -35px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%); + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + -o-border-radius: 0px; + -ms-border-radius: 0px; + -khtml-border-radius: 0px; + border-radius: 0px; + margin: 1px 0; + outline: 0; +} + + +/* Multi */ +div.chzn-container ul.chzn-choices { + background: #fff; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); + background-image: -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); + background-image: -o-linear-gradient(bottom, white 85%, #eeeeee 99%); + margin: 0; + cursor: text; + border: 1px solid #aaa; + overflow: hidden; + height: auto !important; + height: 1%; + padding: 0; + position: relative; +} +div.chzn-container ul.chzn-choices:focus { + border-color: #058cf5; + -moz-box-shadow: 0px 0px 5px #999; + -webkit-box-shadow: 0px 0px 5px #999; + box-shadow: 0px 0px 5px #999; +} +div.chzn-container ul.chzn-choices li { + float: left; + list-style-type: none; + margin: 0px; +} +div.chzn-container ul.chzn-choices li.search-field { + margin: 0px; + white-space: nowrap; + padding: 0px; +} +div.chzn-container ul.chzn-choices li.search-field input { + color: #666; + background: transparent !important; + border: 0px !important; + padding: 5px; + margin: 1px 0; + outline: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +div.chzn-container ul.chzn-choices li.search-field input.default { + color: #999; +} +div.chzn-container ul.chzn-choices li.search-choice { + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: #e4e4e4; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #e4e4e4), color-stop(0.7, #eeeeee)); + background-image: -moz-linear-gradient(center bottom, #e4e4e4 0%, #eeeeee 70%); + background-image: -o-linear-gradient(bottom, #e4e4e4 0%, #eeeeee 70%); + color: #333; + border: 1px solid #b4b4b4; + line-height: 13px; + padding: 3px 19px 3px 6px; + position: relative; + margin: 3px 0px 3px 5px; +} +div.chzn-container ul.chzn-choices li.search-choice span { + cursor: default; +} +div.chzn-container ul.chzn-choices li.search-choice.search-choice-focus { + background: #d4d4d4; +} +div.chzn-container ul.chzn-choices li.search-choice a.search-choice-close { + position: absolute; + right: 5px; + top: 6px; + display: block; + width: 8px; + height: 9px; + font-size: 1px; + background: url(chosen-sprite.png) right top no-repeat; +} +div.chzn-container ul.chzn-choices li.search-choice a.search-choice-close:hover { + background-position: right -9px; +} +div.chzn-container ul.chzn-choices li.search-choice.search-choice-focus a.search-choice-close { + background-position: right -9px; +} + + +/* Results */ +div.chzn-container ul.chzn-results { + margin: 0 4px 4px 0; + max-height: 190px; + padding: 0 0 0 4px; + position: relative; + overflow-x: hidden; + overflow-y: auto; + z-index: 20; +} +div.chzn-container-multi ul.chzn-results { + margin: -1px 0 0; + padding: 0; +} +div.chzn-container-multi ul.chzn-results li { + border-left: 0px !important; + border-right: 0px !important; +} +div.chzn-container ul.chzn-results li { + line-height: 80%; + padding: 7px 7px 8px; + z-index: 22; + margin: 0; + list-style-type: none; +} +div.chzn-container ul.chzn-results li.active-result { + cursor: pointer; +} +div.chzn-container ul.chzn-results li em { + font-style: normal; + background: #FEFFDC; +} +div.chzn-container ul.chzn-results li.highlighted { + background: #3875d7; + color: #fff; +} +div.chzn-container ul.chzn-results li.highlighted em { + background: transparent; +} +div.chzn-container ul.chzn-results li.no-results { + background: #F4F4F4; +} +div.chzn-container ul.chzn-results li.group-result { + cursor: default; + color: #999; + font-weight: bold; +} +div.chzn-container ul.chzn-results li.group-option { + padding-left: 20px; +} + +div.chzn-container-multi div.chzn-drop li.result-selected { + display: none; +} + + + +/* Active */ +div.chzn-container-active a.chzn-single { + -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3); + box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3); + border: 1px solid #5897fb; +} +div.chzn-container-active a.chzn-single-with-drop { + border: 1px solid #aaa; + border-width: 1px 1px 1px; + -moz-box-shadow: 0px 1px 0px #FFF inset; + -webkit-box-shadow: 0px 1px 0px #FFF inset; + box-shadow: 0px 1px 0px #FFF inset; + background: #EEE; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee)); + background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%); + background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%); + -webkit-border-bottom-left-radius: 0px; + -webkit-border-bottom-right-radius: 0px; + -moz-border-radius-bottomleft: 0px; + -moz-border-radius-bottomright: 0px; + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; +} +div.chzn-container-active a.chzn-single-with-drop div { + background: transparent; + border-left: none; +} +div.chzn-container-active a.chzn-single-with-drop div b { + background-position: -18px 1px; +} +div.chzn-container-active ul.chzn-choices { + z-index: 21; + -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3); + box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3); + border: 1px solid #5897fb; +} +div.chzn-container-active ul.chzn-choices input { + color: #111 !important; +} diff --git a/src/usr/local/www/javascript/chosen/chosen.jquery.js b/src/usr/local/www/javascript/chosen/chosen.jquery.js new file mode 100644 index 0000000..21e822a --- /dev/null +++ b/src/usr/local/www/javascript/chosen/chosen.jquery.js @@ -0,0 +1,755 @@ +(function() { + /* + Chosen, a Select Box Enhancer for jQuery and Protoype + by Patrick Filler for Harvest, http://getharvest.com + + Available for use under the MIT License, http://en.wikipedia.org/wiki/MIT_License + + Copyright (c) 2011 by Harvest + */ var $, Chosen, SelectParser, get_side_border_padding, root; + var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + root = typeof exports !== "undefined" && exports !== null ? exports : this; + $ = jQuery; + $.fn.extend({ + chosen: function(data, options) { + return $(this).each(function(input_field) { + if (!($(this)).hasClass("chzn-done")) { + return new Chosen(this, data, options); + } + }); + } + }); + Chosen = (function() { + function Chosen(elmn) { + this.set_default_values(); + this.form_field = elmn; + this.form_field_jq = $(this.form_field); + this.is_multiple = this.form_field.multiple; + this.default_text_default = this.form_field.multiple ? "Select Some Options" : "Select an Option"; + this.set_up_html(); + this.register_observers(); + this.form_field_jq.addClass("chzn-done"); + } + Chosen.prototype.set_default_values = function() { + this.click_test_action = __bind(function(evt) { + return this.test_active_click(evt); + }, this); + this.active_field = false; + this.mouse_on_container = false; + this.results_showing = false; + this.result_highlighted = null; + this.result_single_selected = null; + return this.choices = 0; + }; + Chosen.prototype.set_up_html = function() { + var container_div, dd_top, dd_width, sf_width; + this.container_id = this.form_field.id + "_chzn"; + this.f_width = this.form_field_jq.width(); + this.default_text = this.form_field_jq.attr('title') ? this.form_field_jq.attr('title') : this.default_text_default; + container_div = $("
    ", { + id: this.container_id, + "class": 'chzn-container', + style: 'width: ' + this.f_width + 'px;' + }); + if (this.is_multiple) { + container_div.html('
      '); + } else { + container_div.html('' + this.default_text + '
        '); + } + this.form_field_jq.hide().after(container_div); + this.container = $('#' + this.container_id); + this.container.addClass("chzn-container-" + (this.is_multiple ? "multi" : "single")); + this.dropdown = this.container.find('div.chzn-drop').first(); + dd_top = this.container.height(); + dd_width = this.f_width - get_side_border_padding(this.dropdown); + this.dropdown.css({ + "width": dd_width + "px", + "top": dd_top + "px" + }); + this.search_field = this.container.find('input').first(); + this.search_results = this.container.find('ul.chzn-results').first(); + this.search_field_scale(); + this.search_no_results = this.container.find('li.no-results').first(); + if (this.is_multiple) { + this.search_choices = this.container.find('ul.chzn-choices').first(); + this.search_container = this.container.find('li.search-field').first(); + } else { + this.search_container = this.container.find('div.chzn-search').first(); + this.selected_item = this.container.find('.chzn-single').first(); + sf_width = dd_width - get_side_border_padding(this.search_container) - get_side_border_padding(this.search_field); + this.search_field.css({ + "width": sf_width + "px" + }); + } + this.results_build(); + return this.set_tab_index(); + }; + Chosen.prototype.register_observers = function() { + this.container.click(__bind(function(evt) { + return this.container_click(evt); + }, this)); + this.container.mouseenter(__bind(function(evt) { + return this.mouse_enter(evt); + }, this)); + this.container.mouseleave(__bind(function(evt) { + return this.mouse_leave(evt); + }, this)); + this.search_results.click(__bind(function(evt) { + return this.search_results_click(evt); + }, this)); + this.search_results.mouseover(__bind(function(evt) { + return this.search_results_mouseover(evt); + }, this)); + this.search_results.mouseout(__bind(function(evt) { + return this.search_results_mouseout(evt); + }, this)); + this.form_field_jq.bind("liszt:updated", __bind(function(evt) { + return this.results_update_field(evt); + }, this)); + this.search_field.blur(__bind(function(evt) { + return this.input_blur(evt); + }, this)); + this.search_field.keyup(__bind(function(evt) { + return this.keyup_checker(evt); + }, this)); + this.search_field.keydown(__bind(function(evt) { + return this.keydown_checker(evt); + }, this)); + if (this.is_multiple) { + this.search_choices.click(__bind(function(evt) { + return this.choices_click(evt); + }, this)); + return this.search_field.focus(__bind(function(evt) { + return this.input_focus(evt); + }, this)); + } else { + return this.selected_item.focus(__bind(function(evt) { + return this.activate_field(evt); + }, this)); + } + }; + Chosen.prototype.container_click = function(evt) { + if (evt && evt.type === "click") { + evt.stopPropagation(); + } + if (!this.pending_destroy_click) { + if (!this.active_field) { + if (this.is_multiple) { + this.search_field.val(""); + } + $(document).click(this.click_test_action); + this.results_show(); + } else if (!this.is_multiple && evt && ($(evt.target) === this.selected_item || $(evt.target).parents("a.chzn-single").length)) { + evt.preventDefault(); + this.results_toggle(); + } + return this.activate_field(); + } else { + return this.pending_destroy_click = false; + } + }; + Chosen.prototype.mouse_enter = function() { + return this.mouse_on_container = true; + }; + Chosen.prototype.mouse_leave = function() { + return this.mouse_on_container = false; + }; + Chosen.prototype.input_focus = function(evt) { + if (!this.active_field) { + return setTimeout((__bind(function() { + return this.container_click(); + }, this)), 50); + } + }; + Chosen.prototype.input_blur = function(evt) { + if (!this.mouse_on_container) { + this.active_field = false; + return setTimeout((__bind(function() { + return this.blur_test(); + }, this)), 100); + } + }; + Chosen.prototype.blur_test = function(evt) { + if (!this.active_field && this.container.hasClass("chzn-container-active")) { + return this.close_field(); + } + }; + Chosen.prototype.close_field = function() { + $(document).unbind("click", this.click_test_action); + if (!this.is_multiple) { + this.selected_item.attr("tabindex", this.search_field.attr("tabindex")); + this.search_field.attr("tabindex", -1); + } + this.active_field = false; + this.results_hide(); + this.container.removeClass("chzn-container-active"); + this.winnow_results_clear(); + this.clear_backstroke(); + this.show_search_field_default(); + return this.search_field_scale(); + }; + Chosen.prototype.activate_field = function() { + if (!this.is_multiple && !this.active_field) { + this.search_field.attr("tabindex", this.selected_item.attr("tabindex")); + this.selected_item.attr("tabindex", -1); + } + this.container.addClass("chzn-container-active"); + this.active_field = true; + this.search_field.val(this.search_field.val()); + return this.search_field.focus(); + }; + Chosen.prototype.test_active_click = function(evt) { + if ($(evt.target).parents('#' + this.container.id).length) { + return this.active_field = true; + } else { + return this.close_field(); + } + }; + Chosen.prototype.results_build = function() { + var content, data, startTime, _i, _len, _ref; + startTime = new Date(); + this.parsing = true; + this.results_data = SelectParser.select_to_array(this.form_field); + if (this.is_multiple && this.choices > 0) { + this.search_choices.find("li.search-choice").remove(); + this.choices = 0; + } else if (!this.is_multiple) { + this.selected_item.find("span").text(this.default_text); + } + content = ''; + _ref = this.results_data; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + data = _ref[_i]; + if (data.group) { + content += this.result_add_group(data); + } else if (!data.empty) { + content += this.result_add_option(data); + if (data.selected && this.is_multiple) { + this.choice_build(data); + } else if (data.selected && !this.is_multiple) { + this.selected_item.find("span").text(data.text); + } + } + } + this.show_search_field_default(); + this.search_field_scale(); + this.search_results.html(content); + return this.parsing = false; + }; + Chosen.prototype.result_add_group = function(group) { + if (!group.disabled) { + group.dom_id = this.form_field.id + "chzn_g_" + group.array_index; + return '
      • ' + $("
        ").text(group.label).html() + '
      • '; + } else { + return ""; + } + }; + Chosen.prototype.result_add_option = function(option) { + var classes; + if (!option.disabled) { + option.dom_id = this.form_field.id + "chzn_o_" + option.array_index; + classes = option.selected && this.is_multiple ? [] : ["active-result"]; + if (option.selected) { + classes.push("result-selected"); + } + if (option.group_array_index != null) { + classes.push("group-option"); + } + return '
      • ' + $("
        ").text(option.text).html() + '
      • '; + } else { + return ""; + } + }; + Chosen.prototype.results_update_field = function() { + this.result_clear_highlight(); + this.result_single_selected = null; + return this.results_build(); + }; + Chosen.prototype.result_do_highlight = function(el) { + var high_bottom, high_top, maxHeight, visible_bottom, visible_top; + if (el.length) { + this.result_clear_highlight(); + this.result_highlight = el; + this.result_highlight.addClass("highlighted"); + maxHeight = parseInt(this.search_results.css("maxHeight"), 10); + visible_top = this.search_results.scrollTop(); + visible_bottom = maxHeight + visible_top; + high_top = this.result_highlight.position().top + this.search_results.scrollTop(); + high_bottom = high_top + this.result_highlight.outerHeight(); + if (high_bottom >= visible_bottom) { + return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0); + } else if (high_top < visible_top) { + return this.search_results.scrollTop(high_top); + } + } + }; + Chosen.prototype.result_clear_highlight = function() { + if (this.result_highlight) { + this.result_highlight.removeClass("highlighted"); + } + return this.result_highlight = null; + }; + Chosen.prototype.results_toggle = function() { + if (this.results_showing) { + return this.results_hide(); + } else { + return this.results_show(); + } + }; + Chosen.prototype.results_show = function() { + var dd_top; + if (!this.is_multiple) { + this.selected_item.addClass("chzn-single-with-drop"); + if (this.result_single_selected) { + this.result_do_highlight(this.result_single_selected); + } + } + dd_top = this.is_multiple ? this.container.height() : this.container.height() - 1; + this.dropdown.css({ + "top": dd_top + "px", + "left": 0 + }); + this.results_showing = true; + this.search_field.focus(); + this.search_field.val(this.search_field.val()); + return this.winnow_results(); + }; + Chosen.prototype.results_hide = function() { + if (!this.is_multiple) { + this.selected_item.removeClass("chzn-single-with-drop"); + } + this.result_clear_highlight(); + this.dropdown.css({ + "left": "-9000px" + }); + return this.results_showing = false; + }; + Chosen.prototype.set_tab_index = function(el) { + var ti; + if (this.form_field_jq.attr("tabindex")) { + ti = this.form_field_jq.attr("tabindex"); + this.form_field_jq.attr("tabindex", -1); + if (this.is_multiple) { + return this.search_field.attr("tabindex", ti); + } else { + this.selected_item.attr("tabindex", ti); + return this.search_field.attr("tabindex", -1); + } + } + }; + Chosen.prototype.show_search_field_default = function() { + if (this.is_multiple && this.choices < 1 && !this.active_field) { + this.search_field.val(this.default_text); + return this.search_field.addClass("default"); + } else { + this.search_field.val(""); + return this.search_field.removeClass("default"); + } + }; + Chosen.prototype.search_results_click = function(evt) { + var target; + target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first(); + if (target.length) { + this.result_highlight = target; + return this.result_select(); + } + }; + Chosen.prototype.search_results_mouseover = function(evt) { + var target; + target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first(); + if (target) { + return this.result_do_highlight(target); + } + }; + Chosen.prototype.search_results_mouseout = function(evt) { + if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) { + return this.result_clear_highlight(); + } + }; + Chosen.prototype.choices_click = function(evt) { + evt.preventDefault(); + if (this.active_field && !($(evt.target).hasClass("search-choice" || $(evt.target).parents('.search-choice').first)) && !this.results_showing) { + return this.results_show(); + } + }; + Chosen.prototype.choice_build = function(item) { + var choice_id, link; + choice_id = this.form_field.id + "_chzn_c_" + item.array_index; + this.choices += 1; + this.search_container.before('
      • ' + item.text + '
      • '); + link = $('#' + choice_id).find("a").first(); + return link.click(__bind(function(evt) { + return this.choice_destroy_link_click(evt); + }, this)); + }; + Chosen.prototype.choice_destroy_link_click = function(evt) { + evt.preventDefault(); + this.pending_destroy_click = true; + return this.choice_destroy($(evt.target)); + }; + Chosen.prototype.choice_destroy = function(link) { + this.choices -= 1; + this.show_search_field_default(); + if (this.is_multiple && this.choices > 0 && this.search_field.val().length < 1) { + this.results_hide(); + } + this.result_deselect(link.attr("rel")); + return link.parents('li').first().remove(); + }; + Chosen.prototype.result_select = function() { + var high, high_id, item, position; + if (this.result_highlight) { + high = this.result_highlight; + high_id = high.attr("id"); + this.result_clear_highlight(); + high.addClass("result-selected"); + if (this.is_multiple) { + this.result_deactivate(high); + } else { + this.result_single_selected = high; + } + position = high_id.substr(high_id.lastIndexOf("_") + 1); + item = this.results_data[position]; + item.selected = true; + this.form_field.options[item.options_index].selected = true; + if (this.is_multiple) { + this.choice_build(item); + } else { + this.selected_item.find("span").first().text(item.text); + } + this.results_hide(); + this.search_field.val(""); + this.form_field_jq.trigger("change"); + return this.search_field_scale(); + } + }; + Chosen.prototype.result_activate = function(el) { + return el.addClass("active-result").show(); + }; + Chosen.prototype.result_deactivate = function(el) { + return el.removeClass("active-result").hide(); + }; + Chosen.prototype.result_deselect = function(pos) { + var result, result_data; + result_data = this.results_data[pos]; + result_data.selected = false; + this.form_field.options[result_data.options_index].selected = false; + result = $("#" + this.form_field.id + "chzn_o_" + pos); + result.removeClass("result-selected").addClass("active-result").show(); + this.result_clear_highlight(); + this.winnow_results(); + this.form_field_jq.trigger("change"); + return this.search_field_scale(); + }; + Chosen.prototype.results_search = function(evt) { + if (this.results_showing) { + return this.winnow_results(); + } else { + return this.results_show(); + } + }; + Chosen.prototype.winnow_results = function() { + var found, option, part, parts, regex, result_id, results, searchText, startTime, startpos, text, zregex, _i, _j, _len, _len2, _ref; + startTime = new Date(); + this.no_results_clear(); + results = 0; + searchText = this.search_field.val() === this.default_text ? "" : $.trim(this.search_field.val()); + regex = new RegExp('^' + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i'); + zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i'); + _ref = this.results_data; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + option = _ref[_i]; + if (!option.disabled && !option.empty) { + if (option.group) { + $('#' + option.dom_id).hide(); + } else if (!(this.is_multiple && option.selected)) { + found = false; + result_id = option.dom_id; + if (regex.test(option.text)) { + found = true; + results += 1; + } else if (option.text.indexOf(" ") >= 0 || option.text.indexOf("[") === 0) { + parts = option.text.replace(/\[|\]/g, "").split(" "); + if (parts.length) { + for (_j = 0, _len2 = parts.length; _j < _len2; _j++) { + part = parts[_j]; + if (regex.test(part)) { + found = true; + results += 1; + } + } + } + } + if (found) { + if (searchText.length) { + startpos = option.text.search(zregex); + text = option.text.substr(0, startpos + searchText.length) + '' + option.text.substr(startpos + searchText.length); + text = text.substr(0, startpos) + '' + text.substr(startpos); + } else { + text = option.text; + } + if ($("#" + result_id).html !== text) { + $("#" + result_id).html(text); + } + this.result_activate($("#" + result_id)); + if (option.group_array_index != null) { + $("#" + this.results_data[option.group_array_index].dom_id).show(); + } + } else { + if (this.result_highlight && result_id === this.result_highlight.attr('id')) { + this.result_clear_highlight(); + } + this.result_deactivate($("#" + result_id)); + } + } + } + } + if (results < 1 && searchText.length) { + return this.no_results(searchText); + } else { + return this.winnow_results_set_highlight(); + } + }; + Chosen.prototype.winnow_results_clear = function() { + var li, lis, _i, _len, _results; + this.search_field.val(""); + lis = this.search_results.find("li"); + _results = []; + for (_i = 0, _len = lis.length; _i < _len; _i++) { + li = lis[_i]; + li = $(li); + _results.push(li.hasClass("group-result") ? li.show() : !this.is_multiple || !li.hasClass("result-selected") ? this.result_activate(li) : void 0); + } + return _results; + }; + Chosen.prototype.winnow_results_set_highlight = function() { + var do_high; + if (!this.result_highlight) { + do_high = this.search_results.find(".active-result").first(); + if (do_high) { + return this.result_do_highlight(do_high); + } + } + }; + Chosen.prototype.no_results = function(terms) { + var no_results_html; + no_results_html = $('
      • No results match ""
      • '); + no_results_html.find("span").first().text(terms); + return this.search_results.append(no_results_html); + }; + Chosen.prototype.no_results_clear = function() { + return this.search_results.find(".no-results").remove(); + }; + Chosen.prototype.keydown_arrow = function() { + var first_active, next_sib; + if (!this.result_highlight) { + first_active = this.search_results.find("li.active-result").first(); + if (first_active) { + this.result_do_highlight($(first_active)); + } + } else if (this.results_showing) { + next_sib = this.result_highlight.nextAll("li.active-result").first(); + if (next_sib) { + this.result_do_highlight(next_sib); + } + } + if (!this.results_showing) { + return this.results_show(); + } + }; + Chosen.prototype.keyup_arrow = function() { + var prev_sibs; + if (!this.results_showing && !this.is_multiple) { + return this.results_show(); + } else if (this.result_highlight) { + prev_sibs = this.result_highlight.prevAll("li.active-result"); + if (prev_sibs.length) { + return this.result_do_highlight(prev_sibs.first()); + } else { + if (this.choices > 0) { + this.results_hide(); + } + return this.result_clear_highlight(); + } + } + }; + Chosen.prototype.keydown_backstroke = function() { + if (this.pending_backstroke) { + this.choice_destroy(this.pending_backstroke.find("a").first()); + return this.clear_backstroke(); + } else { + this.pending_backstroke = this.search_container.siblings("li.search-choice").last(); + return this.pending_backstroke.addClass("search-choice-focus"); + } + }; + Chosen.prototype.clear_backstroke = function() { + if (this.pending_backstroke) { + this.pending_backstroke.removeClass("search-choice-focus"); + } + return this.pending_backstroke = null; + }; + Chosen.prototype.keyup_checker = function(evt) { + var stroke, _ref; + stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; + this.search_field_scale(); + switch (stroke) { + case 8: + if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) { + return this.keydown_backstroke(); + } else if (!this.pending_backstroke) { + this.result_clear_highlight(); + return this.results_search(); + } + break; + case 13: + evt.preventDefault(); + if (this.results_showing) { + return this.result_select(); + } + break; + case 27: + if (this.results_showing) { + return this.results_hide(); + } + break; + case 9: + case 38: + case 40: + case 16: + break; + default: + return this.results_search(); + } + }; + Chosen.prototype.keydown_checker = function(evt) { + var stroke, _ref; + stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; + this.search_field_scale(); + if (stroke !== 8 && this.pending_backstroke) { + this.clear_backstroke(); + } + switch (stroke) { + case 8: + this.backstroke_length = this.search_field.val().length; + break; + case 9: + this.mouse_on_container = false; + break; + case 13: + evt.preventDefault(); + break; + case 38: + evt.preventDefault(); + this.keyup_arrow(); + break; + case 40: + this.keydown_arrow(); + break; + } + }; + Chosen.prototype.search_field_scale = function() { + var dd_top, div, h, style, style_block, styles, w, _i, _len; + if (this.is_multiple) { + h = 0; + w = 0; + style_block = "position:absolute; left: -1000px; top: -1000px; display:none;"; + styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing']; + for (_i = 0, _len = styles.length; _i < _len; _i++) { + style = styles[_i]; + style_block += style + ":" + this.search_field.css(style) + ";"; + } + div = $('
        ', { + 'style': style_block + }); + div.text(this.search_field.val()); + $('body').append(div); + w = div.width() + 25; + div.remove(); + if (w > this.f_width - 10) { + w = this.f_width - 10; + } + this.search_field.css({ + 'width': w + 'px' + }); + dd_top = this.container.height(); + return this.dropdown.css({ + "top": dd_top + "px" + }); + } + }; + return Chosen; + })(); + get_side_border_padding = function(elmt) { + var side_border_padding; + return side_border_padding = elmt.outerWidth() - elmt.width(); + }; + root.get_side_border_padding = get_side_border_padding; + SelectParser = (function() { + function SelectParser() { + this.options_index = 0; + this.parsed = []; + } + SelectParser.prototype.add_node = function(child) { + if (child.nodeName === "OPTGROUP") { + return this.add_group(child); + } else { + return this.add_option(child); + } + }; + SelectParser.prototype.add_group = function(group) { + var group_position, option, _i, _len, _ref, _results; + group_position = this.parsed.length; + this.parsed.push({ + array_index: group_position, + group: true, + label: group.label, + children: 0, + disabled: group.disabled + }); + _ref = group.childNodes; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + option = _ref[_i]; + _results.push(this.add_option(option, group_position, group.disabled)); + } + return _results; + }; + SelectParser.prototype.add_option = function(option, group_position, group_disabled) { + if (option.nodeName === "OPTION") { + if (option.text !== "") { + if (group_position != null) { + this.parsed[group_position].children += 1; + } + this.parsed.push({ + array_index: this.parsed.length, + options_index: this.options_index, + value: option.value, + text: option.text, + selected: option.selected, + disabled: group_disabled === true ? group_disabled : option.disabled, + group_array_index: group_position + }); + } else { + this.parsed.push({ + array_index: this.parsed.length, + options_index: this.options_index, + empty: true + }); + } + return this.options_index += 1; + } + }; + return SelectParser; + })(); + SelectParser.select_to_array = function(select) { + var child, parser, _i, _len, _ref; + parser = new SelectParser(); + _ref = select.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + parser.add_node(child); + } + return parser.parsed; + }; + root.SelectParser = SelectParser; +}).call(this); diff --git a/src/usr/local/www/javascript/chosen/chosen.jquery.min.js b/src/usr/local/www/javascript/chosen/chosen.jquery.min.js new file mode 100644 index 0000000..ae69f22 --- /dev/null +++ b/src/usr/local/www/javascript/chosen/chosen.jquery.min.js @@ -0,0 +1,9 @@ +/* +Chosen, a Select Box Enhancer for jQuery and Protoype +by Patrick Filler for Harvest, http://getharvest.com + +Available for use under the MIT License, http://en.wikipedia.org/wiki/MIT_License + +Copyright (c) 2011 by Harvest +*/ +(function(){var $,Chosen,SelectParser,get_side_border_padding,root;var __bind=function(fn,me){return function(){return fn.apply(me,arguments);};};root=typeof exports!=="undefined"&&exports!==null?exports:this;$=jQuery;$.fn.extend({chosen:function(data,options){return $(this).each(function(input_field){if(!($(this)).hasClass("chzn-done")){return new Chosen(this,data,options);}});}});Chosen=(function(){function Chosen(elmn){this.set_default_values();this.form_field=elmn;this.form_field_jq=$(this.form_field);this.is_multiple=this.form_field.multiple;this.default_text_default=this.form_field.multiple?"Select Some Options":"Select an Option";this.set_up_html();this.register_observers();this.form_field_jq.addClass("chzn-done");}Chosen.prototype.set_default_values=function(){this.click_test_action=__bind(function(evt){return this.test_active_click(evt);},this);this.active_field=false;this.mouse_on_container=false;this.results_showing=false;this.result_highlighted=null;this.result_single_selected=null;return this.choices=0;};Chosen.prototype.set_up_html=function(){var container_div,dd_top,dd_width,sf_width;this.container_id=this.form_field.id+"_chzn";this.f_width=this.form_field_jq.width();this.default_text=this.form_field_jq.attr("title")?this.form_field_jq.attr("title"):this.default_text_default;container_div=$("
        ",{id:this.container_id,"class":"chzn-container",style:"width: "+this.f_width+"px;"});if(this.is_multiple){container_div.html('
          ');}else{container_div.html(''+this.default_text+'
            ');}this.form_field_jq.hide().after(container_div);this.container=$("#"+this.container_id);this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single"));this.dropdown=this.container.find("div.chzn-drop").first();dd_top=this.container.height();dd_width=this.f_width-get_side_border_padding(this.dropdown);this.dropdown.css({width:dd_width+"px",top:dd_top+"px"});this.search_field=this.container.find("input").first();this.search_results=this.container.find("ul.chzn-results").first();this.search_field_scale();this.search_no_results=this.container.find("li.no-results").first();if(this.is_multiple){this.search_choices=this.container.find("ul.chzn-choices").first();this.search_container=this.container.find("li.search-field").first();}else{this.search_container=this.container.find("div.chzn-search").first();this.selected_item=this.container.find(".chzn-single").first();sf_width=dd_width-get_side_border_padding(this.search_container)-get_side_border_padding(this.search_field);this.search_field.css({width:sf_width+"px"});}this.results_build();return this.set_tab_index();};Chosen.prototype.register_observers=function(){this.container.click(__bind(function(evt){return this.container_click(evt);},this));this.container.mouseenter(__bind(function(evt){return this.mouse_enter(evt);},this));this.container.mouseleave(__bind(function(evt){return this.mouse_leave(evt);},this));this.search_results.click(__bind(function(evt){return this.search_results_click(evt);},this));this.search_results.mouseover(__bind(function(evt){return this.search_results_mouseover(evt);},this));this.search_results.mouseout(__bind(function(evt){return this.search_results_mouseout(evt);},this));this.form_field_jq.bind("liszt:updated",__bind(function(evt){return this.results_update_field(evt);},this));this.search_field.blur(__bind(function(evt){return this.input_blur(evt);},this));this.search_field.keyup(__bind(function(evt){return this.keyup_checker(evt);},this));this.search_field.keydown(__bind(function(evt){return this.keydown_checker(evt);},this));if(this.is_multiple){this.search_choices.click(__bind(function(evt){return this.choices_click(evt);},this));return this.search_field.focus(__bind(function(evt){return this.input_focus(evt);},this));}else{return this.selected_item.focus(__bind(function(evt){return this.activate_field(evt);},this));}};Chosen.prototype.container_click=function(evt){if(evt&&evt.type==="click"){evt.stopPropagation();}if(!this.pending_destroy_click){if(!this.active_field){if(this.is_multiple){this.search_field.val("");}$(document).click(this.click_test_action);this.results_show();}else{if(!this.is_multiple&&evt&&($(evt.target)===this.selected_item||$(evt.target).parents("a.chzn-single").length)){evt.preventDefault();this.results_toggle();}}return this.activate_field();}else{return this.pending_destroy_click=false;}};Chosen.prototype.mouse_enter=function(){return this.mouse_on_container=true;};Chosen.prototype.mouse_leave=function(){return this.mouse_on_container=false;};Chosen.prototype.input_focus=function(evt){if(!this.active_field){return setTimeout((__bind(function(){return this.container_click();},this)),50);}};Chosen.prototype.input_blur=function(evt){if(!this.mouse_on_container){this.active_field=false;return setTimeout((__bind(function(){return this.blur_test();},this)),100);}};Chosen.prototype.blur_test=function(evt){if(!this.active_field&&this.container.hasClass("chzn-container-active")){return this.close_field();}};Chosen.prototype.close_field=function(){$(document).unbind("click",this.click_test_action);if(!this.is_multiple){this.selected_item.attr("tabindex",this.search_field.attr("tabindex"));this.search_field.attr("tabindex",-1);}this.active_field=false;this.results_hide();this.container.removeClass("chzn-container-active");this.winnow_results_clear();this.clear_backstroke();this.show_search_field_default();return this.search_field_scale();};Chosen.prototype.activate_field=function(){if(!this.is_multiple&&!this.active_field){this.search_field.attr("tabindex",this.selected_item.attr("tabindex"));this.selected_item.attr("tabindex",-1);}this.container.addClass("chzn-container-active");this.active_field=true;this.search_field.val(this.search_field.val());return this.search_field.focus();};Chosen.prototype.test_active_click=function(evt){if($(evt.target).parents("#"+this.container.id).length){return this.active_field=true;}else{return this.close_field();}};Chosen.prototype.results_build=function(){var content,data,startTime,_i,_len,_ref;startTime=new Date();this.parsing=true;this.results_data=SelectParser.select_to_array(this.form_field);if(this.is_multiple&&this.choices>0){this.search_choices.find("li.search-choice").remove();this.choices=0;}else{if(!this.is_multiple){this.selected_item.find("span").text(this.default_text);}}content="";_ref=this.results_data;for(_i=0,_len=_ref.length;_i<_len;_i++){data=_ref[_i];if(data.group){content+=this.result_add_group(data);}else{if(!data.empty){content+=this.result_add_option(data);if(data.selected&&this.is_multiple){this.choice_build(data);}else{if(data.selected&&!this.is_multiple){this.selected_item.find("span").text(data.text);}}}}}this.show_search_field_default();this.search_field_scale();this.search_results.html(content);return this.parsing=false;};Chosen.prototype.result_add_group=function(group){if(!group.disabled){group.dom_id=this.form_field.id+"chzn_g_"+group.array_index;return'
          • '+$("
            ").text(group.label).html()+"
          • ";}else{return"";}};Chosen.prototype.result_add_option=function(option){var classes;if(!option.disabled){option.dom_id=this.form_field.id+"chzn_o_"+option.array_index;classes=option.selected&&this.is_multiple?[]:["active-result"];if(option.selected){classes.push("result-selected");}if(option.group_array_index!=null){classes.push("group-option");}return'
          • '+$("
            ").text(option.text).html()+"
          • ";}else{return"";}};Chosen.prototype.results_update_field=function(){this.result_clear_highlight();this.result_single_selected=null;return this.results_build();};Chosen.prototype.result_do_highlight=function(el){var high_bottom,high_top,maxHeight,visible_bottom,visible_top;if(el.length){this.result_clear_highlight();this.result_highlight=el;this.result_highlight.addClass("highlighted");maxHeight=parseInt(this.search_results.css("maxHeight"),10);visible_top=this.search_results.scrollTop();visible_bottom=maxHeight+visible_top;high_top=this.result_highlight.position().top+this.search_results.scrollTop();high_bottom=high_top+this.result_highlight.outerHeight();if(high_bottom>=visible_bottom){return this.search_results.scrollTop((high_bottom-maxHeight)>0?high_bottom-maxHeight:0);}else{if(high_top'+item.text+'');link=$("#"+choice_id).find("a").first();return link.click(__bind(function(evt){return this.choice_destroy_link_click(evt);},this));};Chosen.prototype.choice_destroy_link_click=function(evt){evt.preventDefault();this.pending_destroy_click=true;return this.choice_destroy($(evt.target));};Chosen.prototype.choice_destroy=function(link){this.choices-=1;this.show_search_field_default();if(this.is_multiple&&this.choices>0&&this.search_field.val().length<1){this.results_hide();}this.result_deselect(link.attr("rel"));return link.parents("li").first().remove();};Chosen.prototype.result_select=function(){var high,high_id,item,position;if(this.result_highlight){high=this.result_highlight;high_id=high.attr("id");this.result_clear_highlight();high.addClass("result-selected");if(this.is_multiple){this.result_deactivate(high);}else{this.result_single_selected=high;}position=high_id.substr(high_id.lastIndexOf("_")+1);item=this.results_data[position];item.selected=true;this.form_field.options[item.options_index].selected=true;if(this.is_multiple){this.choice_build(item);}else{this.selected_item.find("span").first().text(item.text);}this.results_hide();this.search_field.val("");this.form_field_jq.trigger("change");return this.search_field_scale();}};Chosen.prototype.result_activate=function(el){return el.addClass("active-result").show();};Chosen.prototype.result_deactivate=function(el){return el.removeClass("active-result").hide();};Chosen.prototype.result_deselect=function(pos){var result,result_data;result_data=this.results_data[pos];result_data.selected=false;this.form_field.options[result_data.options_index].selected=false;result=$("#"+this.form_field.id+"chzn_o_"+pos);result.removeClass("result-selected").addClass("active-result").show();this.result_clear_highlight();this.winnow_results();this.form_field_jq.trigger("change");return this.search_field_scale();};Chosen.prototype.results_search=function(evt){if(this.results_showing){return this.winnow_results();}else{return this.results_show();}};Chosen.prototype.winnow_results=function(){var found,option,part,parts,regex,result_id,results,searchText,startTime,startpos,text,zregex,_i,_j,_len,_len2,_ref;startTime=new Date();this.no_results_clear();results=0;searchText=this.search_field.val()===this.default_text?"":$.trim(this.search_field.val());regex=new RegExp("^"+searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i");zregex=new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i");_ref=this.results_data;for(_i=0,_len=_ref.length;_i<_len;_i++){option=_ref[_i];if(!option.disabled&&!option.empty){if(option.group){$("#"+option.dom_id).hide();}else{if(!(this.is_multiple&&option.selected)){found=false;result_id=option.dom_id;if(regex.test(option.text)){found=true;results+=1;}else{if(option.text.indexOf(" ")>=0||option.text.indexOf("[")===0){parts=option.text.replace(/\[|\]/g,"").split(" ");if(parts.length){for(_j=0,_len2=parts.length;_j<_len2;_j++){part=parts[_j];if(regex.test(part)){found=true;results+=1;}}}}}if(found){if(searchText.length){startpos=option.text.search(zregex);text=option.text.substr(0,startpos+searchText.length)+"
            "+option.text.substr(startpos+searchText.length);text=text.substr(0,startpos)+""+text.substr(startpos);}else{text=option.text;}if($("#"+result_id).html!==text){$("#"+result_id).html(text);}this.result_activate($("#"+result_id));if(option.group_array_index!=null){$("#"+this.results_data[option.group_array_index].dom_id).show();}}else{if(this.result_highlight&&result_id===this.result_highlight.attr("id")){this.result_clear_highlight();}this.result_deactivate($("#"+result_id));}}}}}if(results<1&&searchText.length){return this.no_results(searchText);}else{return this.winnow_results_set_highlight();}};Chosen.prototype.winnow_results_clear=function(){var li,lis,_i,_len,_results;this.search_field.val("");lis=this.search_results.find("li");_results=[];for(_i=0,_len=lis.length;_i<_len;_i++){li=lis[_i];li=$(li);_results.push(li.hasClass("group-result")?li.show():!this.is_multiple||!li.hasClass("result-selected")?this.result_activate(li):void 0);}return _results;};Chosen.prototype.winnow_results_set_highlight=function(){var do_high;if(!this.result_highlight){do_high=this.search_results.find(".active-result").first();if(do_high){return this.result_do_highlight(do_high);}}};Chosen.prototype.no_results=function(terms){var no_results_html;no_results_html=$('
          • No results match ""
          • ');no_results_html.find("span").first().text(terms);return this.search_results.append(no_results_html);};Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove();};Chosen.prototype.keydown_arrow=function(){var first_active,next_sib;if(!this.result_highlight){first_active=this.search_results.find("li.active-result").first();if(first_active){this.result_do_highlight($(first_active));}}else{if(this.results_showing){next_sib=this.result_highlight.nextAll("li.active-result").first();if(next_sib){this.result_do_highlight(next_sib);}}}if(!this.results_showing){return this.results_show();}};Chosen.prototype.keyup_arrow=function(){var prev_sibs;if(!this.results_showing&&!this.is_multiple){return this.results_show();}else{if(this.result_highlight){prev_sibs=this.result_highlight.prevAll("li.active-result");if(prev_sibs.length){return this.result_do_highlight(prev_sibs.first());}else{if(this.choices>0){this.results_hide();}return this.result_clear_highlight();}}}};Chosen.prototype.keydown_backstroke=function(){if(this.pending_backstroke){this.choice_destroy(this.pending_backstroke.find("a").first());return this.clear_backstroke();}else{this.pending_backstroke=this.search_container.siblings("li.search-choice").last();return this.pending_backstroke.addClass("search-choice-focus");}};Chosen.prototype.clear_backstroke=function(){if(this.pending_backstroke){this.pending_backstroke.removeClass("search-choice-focus");}return this.pending_backstroke=null;};Chosen.prototype.keyup_checker=function(evt){var stroke,_ref;stroke=(_ref=evt.which)!=null?_ref:evt.keyCode;this.search_field_scale();switch(stroke){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0){return this.keydown_backstroke();}else{if(!this.pending_backstroke){this.result_clear_highlight();return this.results_search();}}break;case 13:evt.preventDefault();if(this.results_showing){return this.result_select();}break;case 27:if(this.results_showing){return this.results_hide();}break;case 9:case 38:case 40:case 16:break;default:return this.results_search();}};Chosen.prototype.keydown_checker=function(evt){var stroke,_ref;stroke=(_ref=evt.which)!=null?_ref:evt.keyCode;this.search_field_scale();if(stroke!==8&&this.pending_backstroke){this.clear_backstroke();}switch(stroke){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.mouse_on_container=false;break;case 13:evt.preventDefault();break;case 38:evt.preventDefault();this.keyup_arrow();break;case 40:this.keydown_arrow();break;}};Chosen.prototype.search_field_scale=function(){var dd_top,div,h,style,style_block,styles,w,_i,_len;if(this.is_multiple){h=0;w=0;style_block="position:absolute; left: -1000px; top: -1000px; display:none;";styles=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(_i=0,_len=styles.length;_i<_len;_i++){style=styles[_i];style_block+=style+":"+this.search_field.css(style)+";";}div=$("
            ",{style:style_block});div.text(this.search_field.val());$("body").append(div);w=div.width()+25;div.remove();if(w>this.f_width-10){w=this.f_width-10;}this.search_field.css({width:w+"px"});dd_top=this.container.height();return this.dropdown.css({top:dd_top+"px"});}};return Chosen;})();get_side_border_padding=function(elmt){var side_border_padding;return side_border_padding=elmt.outerWidth()-elmt.width();};root.get_side_border_padding=get_side_border_padding;SelectParser=(function(){function SelectParser(){this.options_index=0;this.parsed=[];}SelectParser.prototype.add_node=function(child){if(child.nodeName==="OPTGROUP"){return this.add_group(child);}else{return this.add_option(child);}};SelectParser.prototype.add_group=function(group){var group_position,option,_i,_len,_ref,_results;group_position=this.parsed.length;this.parsed.push({array_index:group_position,group:true,label:group.label,children:0,disabled:group.disabled});_ref=group.childNodes;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){option=_ref[_i];_results.push(this.add_option(option,group_position,group.disabled));}return _results;};SelectParser.prototype.add_option=function(option,group_position,group_disabled){if(option.nodeName==="OPTION"){if(option.text!==""){if(group_position!=null){this.parsed[group_position].children+=1;}this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:option.value,text:option.text,selected:option.selected,disabled:group_disabled===true?group_disabled:option.disabled,group_array_index:group_position});}else{this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:true});}return this.options_index+=1;}};return SelectParser;})();SelectParser.select_to_array=function(select){var child,parser,_i,_len,_ref;parser=new SelectParser();_ref=select.childNodes;for(_i=0,_len=_ref.length;_i<_len;_i++){child=_ref[_i];parser.add_node(child);}return parser.parsed;};root.SelectParser=SelectParser;}).call(this); \ No newline at end of file diff --git a/src/usr/local/www/javascript/chosen/chosen.proto.js b/src/usr/local/www/javascript/chosen/chosen.proto.js new file mode 100644 index 0000000..e3c0fbd --- /dev/null +++ b/src/usr/local/www/javascript/chosen/chosen.proto.js @@ -0,0 +1,765 @@ +(function() { + /* + Chosen, a Select Box Enhancer for jQuery and Protoype + by Patrick Filler for Harvest, http://getharvest.com + + Available for use under the MIT License, http://en.wikipedia.org/wiki/MIT_License + + Copyright (c) 2011 by Harvest + */ var Chosen, SelectParser, get_side_border_padding, root; + var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + root = typeof exports !== "undefined" && exports !== null ? exports : this; + Chosen = (function() { + function Chosen(elmn) { + this.set_default_values(); + this.form_field = elmn; + this.is_multiple = this.form_field.multiple; + this.default_text_default = this.form_field.multiple ? "Select Some Options" : "Select an Option"; + this.set_up_html(); + this.register_observers(); + } + Chosen.prototype.set_default_values = function() { + this.click_test_action = __bind(function(evt) { + return this.test_active_click(evt); + }, this); + this.active_field = false; + this.mouse_on_container = false; + this.results_showing = false; + this.result_highlighted = null; + this.result_single_selected = null; + this.choices = 0; + this.single_temp = new Template('#{default}
              '); + this.multi_temp = new Template('
                '); + this.choice_temp = new Template('
              • #{choice}
              • '); + return this.no_results_temp = new Template('
              • No results match "#{terms}"
              • '); + }; + Chosen.prototype.set_up_html = function() { + var base_template, container_props, dd_top, dd_width, sf_width; + this.container_id = this.form_field.id + "_chzn"; + this.f_width = this.form_field.getStyle("width") ? parseInt(this.form_field.getStyle("width"), 10) : this.form_field.getWidth(); + container_props = { + 'id': this.container_id, + 'class': 'chzn-container', + 'style': 'width: ' + this.f_width + 'px' + }; + this.default_text = this.form_field.readAttribute('title') ? this.form_field.readAttribute('title') : this.default_text_default; + base_template = this.is_multiple ? new Element('div', container_props).update(this.multi_temp.evaluate({ + "default": this.default_text + })) : new Element('div', container_props).update(this.single_temp.evaluate({ + "default": this.default_text + })); + this.form_field.hide().insert({ + after: base_template + }); + this.container = $(this.container_id); + this.container.addClassName("chzn-container-" + (this.is_multiple ? "multi" : "single")); + this.dropdown = this.container.down('div.chzn-drop'); + dd_top = this.container.getHeight(); + dd_width = this.f_width - get_side_border_padding(this.dropdown); + this.dropdown.setStyle({ + "width": dd_width + "px", + "top": dd_top + "px" + }); + this.search_field = this.container.down('input'); + this.search_results = this.container.down('ul.chzn-results'); + this.search_field_scale(); + this.search_no_results = this.container.down('li.no-results'); + if (this.is_multiple) { + this.search_choices = this.container.down('ul.chzn-choices'); + this.search_container = this.container.down('li.search-field'); + } else { + this.search_container = this.container.down('div.chzn-search'); + this.selected_item = this.container.down('.chzn-single'); + sf_width = dd_width - get_side_border_padding(this.search_container) - get_side_border_padding(this.search_field); + this.search_field.setStyle({ + "width": sf_width + "px" + }); + } + this.results_build(); + return this.set_tab_index(); + }; + Chosen.prototype.register_observers = function() { + this.container.observe("click", __bind(function(evt) { + return this.container_click(evt); + }, this)); + this.container.observe("mouseenter", __bind(function(evt) { + return this.mouse_enter(evt); + }, this)); + this.container.observe("mouseleave", __bind(function(evt) { + return this.mouse_leave(evt); + }, this)); + this.search_results.observe("click", __bind(function(evt) { + return this.search_results_click(evt); + }, this)); + this.search_results.observe("mouseover", __bind(function(evt) { + return this.search_results_mouseover(evt); + }, this)); + this.search_results.observe("mouseout", __bind(function(evt) { + return this.search_results_mouseout(evt); + }, this)); + this.form_field.observe("liszt:updated", __bind(function(evt) { + return this.results_update_field(evt); + }, this)); + this.search_field.observe("blur", __bind(function(evt) { + return this.input_blur(evt); + }, this)); + this.search_field.observe("keyup", __bind(function(evt) { + return this.keyup_checker(evt); + }, this)); + this.search_field.observe("keydown", __bind(function(evt) { + return this.keydown_checker(evt); + }, this)); + if (this.is_multiple) { + this.search_choices.observe("click", __bind(function(evt) { + return this.choices_click(evt); + }, this)); + return this.search_field.observe("focus", __bind(function(evt) { + return this.input_focus(evt); + }, this)); + } else { + return this.selected_item.observe("focus", __bind(function(evt) { + return this.activate_field(evt); + }, this)); + } + }; + Chosen.prototype.container_click = function(evt) { + if (evt && evt.type === "click") { + evt.stop(); + } + if (!this.pending_destroy_click) { + if (!this.active_field) { + if (this.is_multiple) { + this.search_field.clear(); + } + document.observe("click", this.click_test_action); + this.results_show(); + } else if (!this.is_multiple && evt && (evt.target === this.selected_item || evt.target.up("a.chzn-single"))) { + this.results_toggle(); + } + return this.activate_field(); + } else { + return this.pending_destroy_click = false; + } + }; + Chosen.prototype.mouse_enter = function() { + return this.mouse_on_container = true; + }; + Chosen.prototype.mouse_leave = function() { + return this.mouse_on_container = false; + }; + Chosen.prototype.input_focus = function(evt) { + if (!this.active_field) { + return setTimeout(this.container_click.bind(this), 50); + } + }; + Chosen.prototype.input_blur = function(evt) { + if (!this.mouse_on_container) { + this.active_field = false; + return setTimeout(this.blur_test.bind(this), 100); + } + }; + Chosen.prototype.blur_test = function(evt) { + if (!this.active_field && this.container.hasClassName("chzn-container-active")) { + return this.close_field(); + } + }; + Chosen.prototype.close_field = function() { + document.stopObserving("click", this.click_test_action); + if (!this.is_multiple) { + this.selected_item.tabIndex = this.search_field.tabIndex; + this.search_field.tabIndex = -1; + } + this.active_field = false; + this.results_hide(); + this.container.removeClassName("chzn-container-active"); + this.winnow_results_clear(); + this.clear_backstroke(); + this.show_search_field_default(); + return this.search_field_scale(); + }; + Chosen.prototype.activate_field = function() { + if (!this.is_multiple && !this.active_field) { + this.search_field.tabIndex = this.selected_item.tabIndex; + this.selected_item.tabIndex = -1; + } + this.container.addClassName("chzn-container-active"); + this.active_field = true; + this.search_field.value = this.search_field.value; + return this.search_field.focus(); + }; + Chosen.prototype.test_active_click = function(evt) { + if (evt.target.up('#' + this.container.id)) { + return this.active_field = true; + } else { + return this.close_field(); + } + }; + Chosen.prototype.results_build = function() { + var content, data, startTime, _i, _len, _ref; + startTime = new Date(); + this.parsing = true; + this.results_data = SelectParser.select_to_array(this.form_field); + if (this.is_multiple && this.choices > 0) { + this.search_choices.select("li.search-choice").invoke("remove"); + this.choices = 0; + } else if (!this.is_multiple) { + this.selected_item.down("span").update(this.default_text); + } + content = ''; + _ref = this.results_data; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + data = _ref[_i]; + if (data.group) { + content += this.result_add_group(data); + } else if (!data.empty) { + content += this.result_add_option(data); + if (data.selected && this.is_multiple) { + this.choice_build(data); + } else if (data.selected && !this.is_multiple) { + this.selected_item.down("span").update(data.text); + } + } + } + this.show_search_field_default(); + this.search_field_scale(); + this.search_results.update(content); + return this.parsing = false; + }; + Chosen.prototype.result_add_group = function(group) { + if (!group.disabled) { + group.dom_id = this.form_field.id + "chzn_g_" + group.array_index; + return '
              • ' + group.label.escapeHTML() + '
              • '; + } else { + return ""; + } + }; + Chosen.prototype.result_add_option = function(option) { + var classes; + if (!option.disabled) { + option.dom_id = this.form_field.id + "chzn_o_" + option.array_index; + classes = option.selected && this.is_multiple ? [] : ["active-result"]; + if (option.selected) { + classes.push("result-selected"); + } + if (option.group_array_index != null) { + classes.push("group-option"); + } + return '
              • ' + option.text.escapeHTML() + '
              • '; + } else { + return ""; + } + }; + Chosen.prototype.results_update_field = function() { + this.result_clear_highlight(); + this.result_single_selected = null; + return this.results_build(); + }; + Chosen.prototype.result_do_highlight = function(el) { + var high_bottom, high_top, maxHeight, visible_bottom, visible_top; + this.result_clear_highlight(); + this.result_highlight = el; + this.result_highlight.addClassName("highlighted"); + maxHeight = parseInt(this.search_results.getStyle('maxHeight'), 10); + visible_top = this.search_results.scrollTop; + visible_bottom = maxHeight + visible_top; + high_top = this.result_highlight.positionedOffset().top; + high_bottom = high_top + this.result_highlight.getHeight(); + if (high_bottom >= visible_bottom) { + return this.search_results.scrollTop = (high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0; + } else if (high_top < visible_top) { + return this.search_results.scrollTop = high_top; + } + }; + Chosen.prototype.result_clear_highlight = function() { + if (this.result_highlight) { + this.result_highlight.removeClassName('highlighted'); + } + return this.result_highlight = null; + }; + Chosen.prototype.results_toggle = function() { + if (this.results_showing) { + return this.results_hide(); + } else { + return this.results_show(); + } + }; + Chosen.prototype.results_show = function() { + var dd_top; + if (!this.is_multiple) { + this.selected_item.addClassName('chzn-single-with-drop'); + if (this.result_single_selected) { + this.result_do_highlight(this.result_single_selected); + } + } + dd_top = this.is_multiple ? this.container.getHeight() : this.container.getHeight() - 1; + this.dropdown.setStyle({ + "top": dd_top + "px", + "left": 0 + }); + this.results_showing = true; + this.search_field.focus(); + this.search_field.value = this.search_field.value; + return this.winnow_results(); + }; + Chosen.prototype.results_hide = function() { + if (!this.is_multiple) { + this.selected_item.removeClassName('chzn-single-with-drop'); + } + this.result_clear_highlight(); + this.dropdown.setStyle({ + "left": "-9000px" + }); + return this.results_showing = false; + }; + Chosen.prototype.set_tab_index = function(el) { + var ti; + if (this.form_field.tabIndex) { + ti = this.form_field.tabIndex; + this.form_field.tabIndex = -1; + if (this.is_multiple) { + return this.search_field.tabIndex = ti; + } else { + this.selected_item.tabIndex = ti; + return this.search_field.tabIndex = -1; + } + } + }; + Chosen.prototype.show_search_field_default = function() { + if (this.is_multiple && this.choices < 1 && !this.active_field) { + this.search_field.value = this.default_text; + return this.search_field.addClassName("default"); + } else { + this.search_field.value = ""; + return this.search_field.removeClassName("default"); + } + }; + Chosen.prototype.search_results_click = function(evt) { + var target; + target = evt.target.hasClassName("active-result") ? evt.target : evt.target.up(".active-result"); + if (target) { + this.result_highlight = target; + return this.result_select(); + } + }; + Chosen.prototype.search_results_mouseover = function(evt) { + var target; + target = evt.target.hasClassName("active-result") ? evt.target : evt.target.up(".active-result"); + if (target) { + return this.result_do_highlight(target); + } + }; + Chosen.prototype.search_results_mouseout = function(evt) { + if (evt.target.hasClassName('active-result') || evt.target.up('.active-result')) { + return this.result_clear_highlight(); + } + }; + Chosen.prototype.choices_click = function(evt) { + evt.preventDefault(); + if (this.active_field && !(evt.target.hasClassName('search-choice') || evt.target.up('.search-choice')) && !this.results_showing) { + return this.results_show(); + } + }; + Chosen.prototype.choice_build = function(item) { + var choice_id, link; + choice_id = this.form_field.id + "_chzn_c_" + item.array_index; + this.choices += 1; + this.search_container.insert({ + before: this.choice_temp.evaluate({ + "id": choice_id, + "choice": item.text, + "position": item.array_index + }) + }); + link = $(choice_id).down('a'); + return link.observe("click", __bind(function(evt) { + return this.choice_destroy_link_click(evt); + }, this)); + }; + Chosen.prototype.choice_destroy_link_click = function(evt) { + evt.preventDefault(); + this.pending_destroy_click = true; + return this.choice_destroy(evt.target); + }; + Chosen.prototype.choice_destroy = function(link) { + this.choices -= 1; + this.show_search_field_default(); + if (this.is_multiple && this.choices > 0 && this.search_field.value.length < 1) { + this.results_hide(); + } + this.result_deselect(link.readAttribute("rel")); + return link.up('li').remove(); + }; + Chosen.prototype.result_select = function() { + var high, item, position; + if (this.result_highlight) { + high = this.result_highlight; + this.result_clear_highlight(); + high.addClassName("result-selected"); + if (this.is_multiple) { + this.result_deactivate(high); + } else { + this.result_single_selected = high; + } + position = high.id.substr(high.id.lastIndexOf("_") + 1); + item = this.results_data[position]; + item.selected = true; + this.form_field.options[item.options_index].selected = true; + if (this.is_multiple) { + this.choice_build(item); + } else { + this.selected_item.down("span").update(item.text); + } + this.results_hide(); + this.search_field.value = ""; + if (typeof Event.simulate === 'function') { + this.form_field.simulate("change"); + } + return this.search_field_scale(); + } + }; + Chosen.prototype.result_activate = function(el) { + return el.addClassName("active-result").show(); + }; + Chosen.prototype.result_deactivate = function(el) { + return el.removeClassName("active-result").hide(); + }; + Chosen.prototype.result_deselect = function(pos) { + var result, result_data; + result_data = this.results_data[pos]; + result_data.selected = false; + this.form_field.options[result_data.options_index].selected = false; + result = $(this.form_field.id + "chzn_o_" + pos); + result.removeClassName("result-selected").addClassName("active-result").show(); + this.result_clear_highlight(); + this.winnow_results(); + if (typeof Event.simulate === 'function') { + this.form_field.simulate("change"); + } + return this.search_field_scale(); + }; + Chosen.prototype.results_search = function(evt) { + if (this.results_showing) { + return this.winnow_results(); + } else { + return this.results_show(); + } + }; + Chosen.prototype.winnow_results = function() { + var found, option, part, parts, regex, result_id, results, searchText, startTime, startpos, text, zregex, _i, _j, _len, _len2, _ref; + startTime = new Date(); + this.no_results_clear(); + results = 0; + searchText = this.search_field.value === this.default_text ? "" : this.search_field.value.strip(); + regex = new RegExp('^' + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i'); + zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i'); + _ref = this.results_data; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + option = _ref[_i]; + if (!option.disabled && !option.empty) { + if (option.group) { + $(option.dom_id).hide(); + } else if (!(this.is_multiple && option.selected)) { + found = false; + result_id = option.dom_id; + if (regex.test(option.text)) { + found = true; + results += 1; + } else if (option.text.indexOf(" ") >= 0 || option.text.indexOf("[") === 0) { + parts = option.text.replace(/\[|\]/g, "").split(" "); + if (parts.length) { + for (_j = 0, _len2 = parts.length; _j < _len2; _j++) { + part = parts[_j]; + if (regex.test(part)) { + found = true; + results += 1; + } + } + } + } + if (found) { + if (searchText.length) { + startpos = option.text.search(zregex); + text = option.text.substr(0, startpos + searchText.length) + '
                ' + option.text.substr(startpos + searchText.length); + text = text.substr(0, startpos) + '' + text.substr(startpos); + } else { + text = option.text; + } + if ($(result_id).innerHTML !== text) { + $(result_id).update(text); + } + this.result_activate($(result_id)); + if (option.group_array_index != null) { + $(this.results_data[option.group_array_index].dom_id).show(); + } + } else { + if ($(result_id) === this.result_highlight) { + this.result_clear_highlight(); + } + this.result_deactivate($(result_id)); + } + } + } + } + if (results < 1 && searchText.length) { + return this.no_results(searchText); + } else { + return this.winnow_results_set_highlight(); + } + }; + Chosen.prototype.winnow_results_clear = function() { + var li, lis, _i, _len, _results; + this.search_field.clear(); + lis = this.search_results.select("li"); + _results = []; + for (_i = 0, _len = lis.length; _i < _len; _i++) { + li = lis[_i]; + _results.push(li.hasClassName("group-result") ? li.show() : !this.is_multiple || !li.hasClassName("result-selected") ? this.result_activate(li) : void 0); + } + return _results; + }; + Chosen.prototype.winnow_results_set_highlight = function() { + var do_high; + if (!this.result_highlight) { + do_high = this.search_results.down(".active-result"); + if (do_high) { + return this.result_do_highlight(do_high); + } + } + }; + Chosen.prototype.no_results = function(terms) { + return this.search_results.insert(this.no_results_temp.evaluate({ + "terms": terms.escapeHTML() + })); + }; + Chosen.prototype.no_results_clear = function() { + var nr, _results; + nr = null; + _results = []; + while (nr = this.search_results.down(".no-results")) { + _results.push(nr.remove()); + } + return _results; + }; + Chosen.prototype.keydown_arrow = function() { + var actives, nexts, sibs; + actives = this.search_results.select("li.active-result"); + if (actives.length) { + if (!this.result_highlight) { + this.result_do_highlight(actives.first()); + } else if (this.results_showing) { + sibs = this.result_highlight.nextSiblings(); + nexts = sibs.intersect(actives); + if (nexts.length) { + this.result_do_highlight(nexts.first()); + } + } + if (!this.results_showing) { + return this.results_show(); + } + } + }; + Chosen.prototype.keyup_arrow = function() { + var actives, prevs, sibs; + if (!this.results_showing && !this.is_multiple) { + return this.results_show(); + } else if (this.result_highlight) { + sibs = this.result_highlight.previousSiblings(); + actives = this.search_results.select("li.active-result"); + prevs = sibs.intersect(actives); + if (prevs.length) { + return this.result_do_highlight(prevs.first()); + } else { + if (this.choices > 0) { + this.results_hide(); + } + return this.result_clear_highlight(); + } + } + }; + Chosen.prototype.keydown_backstroke = function() { + if (this.pending_backstroke) { + this.choice_destroy(this.pending_backstroke.down("a")); + return this.clear_backstroke(); + } else { + this.pending_backstroke = this.search_container.siblings("li.search-choice").last(); + return this.pending_backstroke.addClassName("search-choice-focus"); + } + }; + Chosen.prototype.clear_backstroke = function() { + if (this.pending_backstroke) { + this.pending_backstroke.removeClassName("search-choice-focus"); + } + return this.pending_backstroke = null; + }; + Chosen.prototype.keyup_checker = function(evt) { + var stroke, _ref; + stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; + this.search_field_scale(); + switch (stroke) { + case 8: + if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) { + return this.keydown_backstroke(); + } else if (!this.pending_backstroke) { + this.result_clear_highlight(); + return this.results_search(); + } + break; + case 13: + evt.preventDefault(); + if (this.results_showing) { + return this.result_select(); + } + break; + case 27: + if (this.results_showing) { + return this.results_hide(); + } + break; + case 9: + case 38: + case 40: + case 16: + break; + default: + return this.results_search(); + } + }; + Chosen.prototype.keydown_checker = function(evt) { + var stroke, _ref; + stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; + this.search_field_scale(); + if (stroke !== 8 && this.pending_backstroke) { + this.clear_backstroke(); + } + switch (stroke) { + case 8: + return this.backstroke_length = this.search_field.value.length; + case 9: + return this.mouse_on_container = false; + case 13: + return evt.preventDefault(); + case 38: + evt.preventDefault(); + return this.keyup_arrow(); + case 40: + return this.keydown_arrow(); + } + }; + Chosen.prototype.search_field_scale = function() { + var dd_top, div, h, style, style_block, styles, w, _i, _len; + if (this.is_multiple) { + h = 0; + w = 0; + style_block = "position:absolute; left: -1000px; top: -1000px; display:none;"; + styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing']; + for (_i = 0, _len = styles.length; _i < _len; _i++) { + style = styles[_i]; + style_block += style + ":" + this.search_field.getStyle(style) + ";"; + } + div = new Element('div', { + 'style': style_block + }).update(this.search_field.value); + document.body.appendChild(div); + w = Element.measure(div, 'width') + 25; + div.remove(); + if (w > this.f_width - 10) { + w = this.f_width - 10; + } + this.search_field.setStyle({ + 'width': w + 'px' + }); + dd_top = this.container.getHeight(); + return this.dropdown.setStyle({ + "top": dd_top + "px" + }); + } + }; + return Chosen; + })(); + root.Chosen = Chosen; + document.observe('dom:loaded', function(evt) { + var select, selects, _i, _len, _results; + selects = $$(".chzn-select"); + _results = []; + for (_i = 0, _len = selects.length; _i < _len; _i++) { + select = selects[_i]; + _results.push(new Chosen(select)); + } + return _results; + }); + get_side_border_padding = function(elmt) { + var layout, side_border_padding; + layout = new Element.Layout(elmt); + return side_border_padding = layout.get("border-left") + layout.get("border-right") + layout.get("padding-left") + layout.get("padding-right"); + }; + root.get_side_border_padding = get_side_border_padding; + root = typeof exports !== "undefined" && exports !== null ? exports : this; + SelectParser = (function() { + function SelectParser() { + this.options_index = 0; + this.parsed = []; + } + SelectParser.prototype.add_node = function(child) { + if (child.nodeName === "OPTGROUP") { + return this.add_group(child); + } else { + return this.add_option(child); + } + }; + SelectParser.prototype.add_group = function(group) { + var group_position, option, _i, _len, _ref, _results; + group_position = this.parsed.length; + this.parsed.push({ + array_index: group_position, + group: true, + label: group.label, + children: 0, + disabled: group.disabled + }); + _ref = group.childNodes; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + option = _ref[_i]; + _results.push(this.add_option(option, group_position, group.disabled)); + } + return _results; + }; + SelectParser.prototype.add_option = function(option, group_position, group_disabled) { + if (option.nodeName === "OPTION") { + if (option.text !== "") { + if (group_position != null) { + this.parsed[group_position].children += 1; + } + this.parsed.push({ + array_index: this.parsed.length, + options_index: this.options_index, + value: option.value, + text: option.text, + selected: option.selected, + disabled: group_disabled === true ? group_disabled : option.disabled, + group_array_index: group_position + }); + } else { + this.parsed.push({ + array_index: this.parsed.length, + options_index: this.options_index, + empty: true + }); + } + return this.options_index += 1; + } + }; + return SelectParser; + })(); + SelectParser.select_to_array = function(select) { + var child, parser, _i, _len, _ref; + parser = new SelectParser(); + _ref = select.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + parser.add_node(child); + } + return parser.parsed; + }; + root.SelectParser = SelectParser; +}).call(this); diff --git a/src/usr/local/www/javascript/chosen/chosen.proto.min.js b/src/usr/local/www/javascript/chosen/chosen.proto.min.js new file mode 100644 index 0000000..79109c5 --- /dev/null +++ b/src/usr/local/www/javascript/chosen/chosen.proto.min.js @@ -0,0 +1,9 @@ +/* +Chosen, a Select Box Enhancer for jQuery and Protoype +by Patrick Filler for Harvest, http://getharvest.com + +Available for use under the MIT License, http://en.wikipedia.org/wiki/MIT_License + +Copyright (c) 2011 by Harvest +*/ +(function(){var Chosen,SelectParser,get_side_border_padding,root;var __bind=function(fn,me){return function(){return fn.apply(me,arguments);};};root=typeof exports!=="undefined"&&exports!==null?exports:this;Chosen=(function(){function Chosen(elmn){this.set_default_values();this.form_field=elmn;this.is_multiple=this.form_field.multiple;this.default_text_default=this.form_field.multiple?"Select Some Options":"Select an Option";this.set_up_html();this.register_observers();}Chosen.prototype.set_default_values=function(){this.click_test_action=__bind(function(evt){return this.test_active_click(evt);},this);this.active_field=false;this.mouse_on_container=false;this.results_showing=false;this.result_highlighted=null;this.result_single_selected=null;this.choices=0;this.single_temp=new Template('#{default}
                  ');this.multi_temp=new Template('
                    ');this.choice_temp=new Template('
                  • #{choice}
                  • ');return this.no_results_temp=new Template('
                  • No results match "#{terms}"
                  • ');};Chosen.prototype.set_up_html=function(){var base_template,container_props,dd_top,dd_width,sf_width;this.container_id=this.form_field.id+"_chzn";this.f_width=this.form_field.getStyle("width")?parseInt(this.form_field.getStyle("width"),10):this.form_field.getWidth();container_props={id:this.container_id,"class":"chzn-container",style:"width: "+this.f_width+"px"};this.default_text=this.form_field.readAttribute("title")?this.form_field.readAttribute("title"):this.default_text_default;base_template=this.is_multiple?new Element("div",container_props).update(this.multi_temp.evaluate({"default":this.default_text})):new Element("div",container_props).update(this.single_temp.evaluate({"default":this.default_text}));this.form_field.hide().insert({after:base_template});this.container=$(this.container_id);this.container.addClassName("chzn-container-"+(this.is_multiple?"multi":"single"));this.dropdown=this.container.down("div.chzn-drop");dd_top=this.container.getHeight();dd_width=this.f_width-get_side_border_padding(this.dropdown);this.dropdown.setStyle({width:dd_width+"px",top:dd_top+"px"});this.search_field=this.container.down("input");this.search_results=this.container.down("ul.chzn-results");this.search_field_scale();this.search_no_results=this.container.down("li.no-results");if(this.is_multiple){this.search_choices=this.container.down("ul.chzn-choices");this.search_container=this.container.down("li.search-field");}else{this.search_container=this.container.down("div.chzn-search");this.selected_item=this.container.down(".chzn-single");sf_width=dd_width-get_side_border_padding(this.search_container)-get_side_border_padding(this.search_field);this.search_field.setStyle({width:sf_width+"px"});}this.results_build();return this.set_tab_index();};Chosen.prototype.register_observers=function(){this.container.observe("click",__bind(function(evt){return this.container_click(evt);},this));this.container.observe("mouseenter",__bind(function(evt){return this.mouse_enter(evt);},this));this.container.observe("mouseleave",__bind(function(evt){return this.mouse_leave(evt);},this));this.search_results.observe("click",__bind(function(evt){return this.search_results_click(evt);},this));this.search_results.observe("mouseover",__bind(function(evt){return this.search_results_mouseover(evt);},this));this.search_results.observe("mouseout",__bind(function(evt){return this.search_results_mouseout(evt);},this));this.form_field.observe("liszt:updated",__bind(function(evt){return this.results_update_field(evt);},this));this.search_field.observe("blur",__bind(function(evt){return this.input_blur(evt);},this));this.search_field.observe("keyup",__bind(function(evt){return this.keyup_checker(evt);},this));this.search_field.observe("keydown",__bind(function(evt){return this.keydown_checker(evt);},this));if(this.is_multiple){this.search_choices.observe("click",__bind(function(evt){return this.choices_click(evt);},this));return this.search_field.observe("focus",__bind(function(evt){return this.input_focus(evt);},this));}else{return this.selected_item.observe("focus",__bind(function(evt){return this.activate_field(evt);},this));}};Chosen.prototype.container_click=function(evt){if(evt&&evt.type==="click"){evt.stop();}if(!this.pending_destroy_click){if(!this.active_field){if(this.is_multiple){this.search_field.clear();}document.observe("click",this.click_test_action);this.results_show();}else{if(!this.is_multiple&&evt&&(evt.target===this.selected_item||evt.target.up("a.chzn-single"))){this.results_toggle();}}return this.activate_field();}else{return this.pending_destroy_click=false;}};Chosen.prototype.mouse_enter=function(){return this.mouse_on_container=true;};Chosen.prototype.mouse_leave=function(){return this.mouse_on_container=false;};Chosen.prototype.input_focus=function(evt){if(!this.active_field){return setTimeout(this.container_click.bind(this),50);}};Chosen.prototype.input_blur=function(evt){if(!this.mouse_on_container){this.active_field=false;return setTimeout(this.blur_test.bind(this),100);}};Chosen.prototype.blur_test=function(evt){if(!this.active_field&&this.container.hasClassName("chzn-container-active")){return this.close_field();}};Chosen.prototype.close_field=function(){document.stopObserving("click",this.click_test_action);if(!this.is_multiple){this.selected_item.tabIndex=this.search_field.tabIndex;this.search_field.tabIndex=-1;}this.active_field=false;this.results_hide();this.container.removeClassName("chzn-container-active");this.winnow_results_clear();this.clear_backstroke();this.show_search_field_default();return this.search_field_scale();};Chosen.prototype.activate_field=function(){if(!this.is_multiple&&!this.active_field){this.search_field.tabIndex=this.selected_item.tabIndex;this.selected_item.tabIndex=-1;}this.container.addClassName("chzn-container-active");this.active_field=true;this.search_field.value=this.search_field.value;return this.search_field.focus();};Chosen.prototype.test_active_click=function(evt){if(evt.target.up("#"+this.container.id)){return this.active_field=true;}else{return this.close_field();}};Chosen.prototype.results_build=function(){var content,data,startTime,_i,_len,_ref;startTime=new Date();this.parsing=true;this.results_data=SelectParser.select_to_array(this.form_field);if(this.is_multiple&&this.choices>0){this.search_choices.select("li.search-choice").invoke("remove");this.choices=0;}else{if(!this.is_multiple){this.selected_item.down("span").update(this.default_text);}}content="";_ref=this.results_data;for(_i=0,_len=_ref.length;_i<_len;_i++){data=_ref[_i];if(data.group){content+=this.result_add_group(data);}else{if(!data.empty){content+=this.result_add_option(data);if(data.selected&&this.is_multiple){this.choice_build(data);}else{if(data.selected&&!this.is_multiple){this.selected_item.down("span").update(data.text);}}}}}this.show_search_field_default();this.search_field_scale();this.search_results.update(content);return this.parsing=false;};Chosen.prototype.result_add_group=function(group){if(!group.disabled){group.dom_id=this.form_field.id+"chzn_g_"+group.array_index;return'
                  • '+group.label.escapeHTML()+"
                  • ";}else{return"";}};Chosen.prototype.result_add_option=function(option){var classes;if(!option.disabled){option.dom_id=this.form_field.id+"chzn_o_"+option.array_index;classes=option.selected&&this.is_multiple?[]:["active-result"];if(option.selected){classes.push("result-selected");}if(option.group_array_index!=null){classes.push("group-option");}return'
                  • '+option.text.escapeHTML()+"
                  • ";}else{return"";}};Chosen.prototype.results_update_field=function(){this.result_clear_highlight();this.result_single_selected=null;return this.results_build();};Chosen.prototype.result_do_highlight=function(el){var high_bottom,high_top,maxHeight,visible_bottom,visible_top;this.result_clear_highlight();this.result_highlight=el;this.result_highlight.addClassName("highlighted");maxHeight=parseInt(this.search_results.getStyle("maxHeight"),10);visible_top=this.search_results.scrollTop;visible_bottom=maxHeight+visible_top;high_top=this.result_highlight.positionedOffset().top;high_bottom=high_top+this.result_highlight.getHeight();if(high_bottom>=visible_bottom){return this.search_results.scrollTop=(high_bottom-maxHeight)>0?high_bottom-maxHeight:0;}else{if(high_top0&&this.search_field.value.length<1){this.results_hide();}this.result_deselect(link.readAttribute("rel"));return link.up("li").remove();};Chosen.prototype.result_select=function(){var high,item,position;if(this.result_highlight){high=this.result_highlight;this.result_clear_highlight();high.addClassName("result-selected");if(this.is_multiple){this.result_deactivate(high);}else{this.result_single_selected=high;}position=high.id.substr(high.id.lastIndexOf("_")+1);item=this.results_data[position];item.selected=true;this.form_field.options[item.options_index].selected=true;if(this.is_multiple){this.choice_build(item);}else{this.selected_item.down("span").update(item.text);}this.results_hide();this.search_field.value="";if(typeof Event.simulate==="function"){this.form_field.simulate("change");}return this.search_field_scale();}};Chosen.prototype.result_activate=function(el){return el.addClassName("active-result").show();};Chosen.prototype.result_deactivate=function(el){return el.removeClassName("active-result").hide();};Chosen.prototype.result_deselect=function(pos){var result,result_data;result_data=this.results_data[pos];result_data.selected=false;this.form_field.options[result_data.options_index].selected=false;result=$(this.form_field.id+"chzn_o_"+pos);result.removeClassName("result-selected").addClassName("active-result").show();this.result_clear_highlight();this.winnow_results();if(typeof Event.simulate==="function"){this.form_field.simulate("change");}return this.search_field_scale();};Chosen.prototype.results_search=function(evt){if(this.results_showing){return this.winnow_results();}else{return this.results_show();}};Chosen.prototype.winnow_results=function(){var found,option,part,parts,regex,result_id,results,searchText,startTime,startpos,text,zregex,_i,_j,_len,_len2,_ref;startTime=new Date();this.no_results_clear();results=0;searchText=this.search_field.value===this.default_text?"":this.search_field.value.strip();regex=new RegExp("^"+searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i");zregex=new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i");_ref=this.results_data;for(_i=0,_len=_ref.length;_i<_len;_i++){option=_ref[_i];if(!option.disabled&&!option.empty){if(option.group){$(option.dom_id).hide();}else{if(!(this.is_multiple&&option.selected)){found=false;result_id=option.dom_id;if(regex.test(option.text)){found=true;results+=1;}else{if(option.text.indexOf(" ")>=0||option.text.indexOf("[")===0){parts=option.text.replace(/\[|\]/g,"").split(" ");if(parts.length){for(_j=0,_len2=parts.length;_j<_len2;_j++){part=parts[_j];if(regex.test(part)){found=true;results+=1;}}}}}if(found){if(searchText.length){startpos=option.text.search(zregex);text=option.text.substr(0,startpos+searchText.length)+"
                    "+option.text.substr(startpos+searchText.length);text=text.substr(0,startpos)+""+text.substr(startpos);}else{text=option.text;}if($(result_id).innerHTML!==text){$(result_id).update(text);}this.result_activate($(result_id));if(option.group_array_index!=null){$(this.results_data[option.group_array_index].dom_id).show();}}else{if($(result_id)===this.result_highlight){this.result_clear_highlight();}this.result_deactivate($(result_id));}}}}}if(results<1&&searchText.length){return this.no_results(searchText);}else{return this.winnow_results_set_highlight();}};Chosen.prototype.winnow_results_clear=function(){var li,lis,_i,_len,_results;this.search_field.clear();lis=this.search_results.select("li");_results=[];for(_i=0,_len=lis.length;_i<_len;_i++){li=lis[_i];_results.push(li.hasClassName("group-result")?li.show():!this.is_multiple||!li.hasClassName("result-selected")?this.result_activate(li):void 0);}return _results;};Chosen.prototype.winnow_results_set_highlight=function(){var do_high;if(!this.result_highlight){do_high=this.search_results.down(".active-result");if(do_high){return this.result_do_highlight(do_high);}}};Chosen.prototype.no_results=function(terms){return this.search_results.insert(this.no_results_temp.evaluate({terms:terms.escapeHTML()}));};Chosen.prototype.no_results_clear=function(){var nr,_results;nr=null;_results=[];while(nr=this.search_results.down(".no-results")){_results.push(nr.remove());}return _results;};Chosen.prototype.keydown_arrow=function(){var actives,nexts,sibs;actives=this.search_results.select("li.active-result");if(actives.length){if(!this.result_highlight){this.result_do_highlight(actives.first());}else{if(this.results_showing){sibs=this.result_highlight.nextSiblings();nexts=sibs.intersect(actives);if(nexts.length){this.result_do_highlight(nexts.first());}}}if(!this.results_showing){return this.results_show();}}};Chosen.prototype.keyup_arrow=function(){var actives,prevs,sibs;if(!this.results_showing&&!this.is_multiple){return this.results_show();}else{if(this.result_highlight){sibs=this.result_highlight.previousSiblings();actives=this.search_results.select("li.active-result");prevs=sibs.intersect(actives);if(prevs.length){return this.result_do_highlight(prevs.first());}else{if(this.choices>0){this.results_hide();}return this.result_clear_highlight();}}}};Chosen.prototype.keydown_backstroke=function(){if(this.pending_backstroke){this.choice_destroy(this.pending_backstroke.down("a"));return this.clear_backstroke();}else{this.pending_backstroke=this.search_container.siblings("li.search-choice").last();return this.pending_backstroke.addClassName("search-choice-focus");}};Chosen.prototype.clear_backstroke=function(){if(this.pending_backstroke){this.pending_backstroke.removeClassName("search-choice-focus");}return this.pending_backstroke=null;};Chosen.prototype.keyup_checker=function(evt){var stroke,_ref;stroke=(_ref=evt.which)!=null?_ref:evt.keyCode;this.search_field_scale();switch(stroke){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0){return this.keydown_backstroke();}else{if(!this.pending_backstroke){this.result_clear_highlight();return this.results_search();}}break;case 13:evt.preventDefault();if(this.results_showing){return this.result_select();}break;case 27:if(this.results_showing){return this.results_hide();}break;case 9:case 38:case 40:case 16:break;default:return this.results_search();}};Chosen.prototype.keydown_checker=function(evt){var stroke,_ref;stroke=(_ref=evt.which)!=null?_ref:evt.keyCode;this.search_field_scale();if(stroke!==8&&this.pending_backstroke){this.clear_backstroke();}switch(stroke){case 8:return this.backstroke_length=this.search_field.value.length;case 9:return this.mouse_on_container=false;case 13:return evt.preventDefault();case 38:evt.preventDefault();return this.keyup_arrow();case 40:return this.keydown_arrow();}};Chosen.prototype.search_field_scale=function(){var dd_top,div,h,style,style_block,styles,w,_i,_len;if(this.is_multiple){h=0;w=0;style_block="position:absolute; left: -1000px; top: -1000px; display:none;";styles=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(_i=0,_len=styles.length;_i<_len;_i++){style=styles[_i];style_block+=style+":"+this.search_field.getStyle(style)+";";}div=new Element("div",{style:style_block}).update(this.search_field.value);document.body.appendChild(div);w=Element.measure(div,"width")+25;div.remove();if(w>this.f_width-10){w=this.f_width-10;}this.search_field.setStyle({width:w+"px"});dd_top=this.container.getHeight();return this.dropdown.setStyle({top:dd_top+"px"});}};return Chosen;})();root.Chosen=Chosen;document.observe("dom:loaded",function(evt){var select,selects,_i,_len,_results;selects=$$(".chzn-select");_results=[];for(_i=0,_len=selects.length;_i<_len;_i++){select=selects[_i];_results.push(new Chosen(select));}return _results;});get_side_border_padding=function(elmt){var layout,side_border_padding;layout=new Element.Layout(elmt);return side_border_padding=layout.get("border-left")+layout.get("border-right")+layout.get("padding-left")+layout.get("padding-right");};root.get_side_border_padding=get_side_border_padding;root=typeof exports!=="undefined"&&exports!==null?exports:this;SelectParser=(function(){function SelectParser(){this.options_index=0;this.parsed=[];}SelectParser.prototype.add_node=function(child){if(child.nodeName==="OPTGROUP"){return this.add_group(child);}else{return this.add_option(child);}};SelectParser.prototype.add_group=function(group){var group_position,option,_i,_len,_ref,_results;group_position=this.parsed.length;this.parsed.push({array_index:group_position,group:true,label:group.label,children:0,disabled:group.disabled});_ref=group.childNodes;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){option=_ref[_i];_results.push(this.add_option(option,group_position,group.disabled));}return _results;};SelectParser.prototype.add_option=function(option,group_position,group_disabled){if(option.nodeName==="OPTION"){if(option.text!==""){if(group_position!=null){this.parsed[group_position].children+=1;}this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:option.value,text:option.text,selected:option.selected,disabled:group_disabled===true?group_disabled:option.disabled,group_array_index:group_position});}else{this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:true});}return this.options_index+=1;}};return SelectParser;})();SelectParser.select_to_array=function(select){var child,parser,_i,_len,_ref;parser=new SelectParser();_ref=select.childNodes;for(_i=0,_len=_ref.length;_i<_len;_i++){child=_ref[_i];parser.add_node(child);}return parser.parsed;};root.SelectParser=SelectParser;}).call(this); \ No newline at end of file diff --git a/src/usr/local/www/javascript/chosen/coffee/chosen.jquery.coffee b/src/usr/local/www/javascript/chosen/coffee/chosen.jquery.coffee new file mode 100644 index 0000000..0d6596a --- /dev/null +++ b/src/usr/local/www/javascript/chosen/coffee/chosen.jquery.coffee @@ -0,0 +1,633 @@ +### +Chosen, a Select Box Enhancer for jQuery and Protoype +by Patrick Filler for Harvest, http://getharvest.com + +Available for use under the MIT License, http://en.wikipedia.org/wiki/MIT_License + +Copyright (c) 2011 by Harvest +### + +root = exports ? this +$ = jQuery + +$.fn.extend({ + chosen: (data, options) -> + $(this).each((input_field) -> + new Chosen(this, data, options) unless ($ this).hasClass "chzn-done" + ) +}) + +class Chosen + + constructor: (elmn) -> + this.set_default_values() + + @form_field = elmn + @form_field_jq = $ @form_field + @is_multiple = @form_field.multiple + + @default_text_default = if @form_field.multiple then "Select Some Options" else "Select an Option" + + this.set_up_html() + this.register_observers() + @form_field_jq.addClass "chzn-done" + + set_default_values: -> + + @click_test_action = (evt) => this.test_active_click(evt) + @active_field = false + @mouse_on_container = false + @results_showing = false + @result_highlighted = null + @result_single_selected = null + @choices = 0 + + set_up_html: -> + @container_id = @form_field.id + "_chzn" + + @f_width = @form_field_jq.width() + + @default_text = if @form_field_jq.attr 'title' then @form_field_jq.attr 'title' else @default_text_default + + container_div = ($ "
                    ", { + id: @container_id + class: 'chzn-container' + style: 'width: ' + (@f_width) + 'px;' #use parens around @f_width so coffeescript doesn't think + ' px' is a function parameter + }) + + if @is_multiple + container_div.html '
                      ' + else + container_div.html '' + @default_text + '
                        ' + + @form_field_jq.hide().after container_div + @container = ($ '#' + @container_id) + @container.addClass( "chzn-container-" + (if @is_multiple then "multi" else "single") ) + @dropdown = @container.find('div.chzn-drop').first() + + dd_top = @container.height() + dd_width = (@f_width - get_side_border_padding(@dropdown)) + + @dropdown.css({"width": dd_width + "px", "top": dd_top + "px"}) + + @search_field = @container.find('input').first() + @search_results = @container.find('ul.chzn-results').first() + this.search_field_scale() + + @search_no_results = @container.find('li.no-results').first() + + if @is_multiple + @search_choices = @container.find('ul.chzn-choices').first() + @search_container = @container.find('li.search-field').first() + else + @search_container = @container.find('div.chzn-search').first() + @selected_item = @container.find('.chzn-single').first() + sf_width = dd_width - get_side_border_padding(@search_container) - get_side_border_padding(@search_field) + @search_field.css( {"width" : sf_width + "px"} ) + + this.results_build() + this.set_tab_index() + + + register_observers: -> + @container.click (evt) => this.container_click(evt) + @container.mouseenter (evt) => this.mouse_enter(evt) + @container.mouseleave (evt) => this.mouse_leave(evt) + + @search_results.click (evt) => this.search_results_click(evt) + @search_results.mouseover (evt) => this.search_results_mouseover(evt) + @search_results.mouseout (evt) => this.search_results_mouseout(evt) + + @form_field_jq.bind "liszt:updated", (evt) => this.results_update_field(evt) + + @search_field.blur (evt) => this.input_blur(evt) + @search_field.keyup (evt) => this.keyup_checker(evt) + @search_field.keydown (evt) => this.keydown_checker(evt) + + if @is_multiple + @search_choices.click (evt) => this.choices_click(evt) + @search_field.focus (evt) => this.input_focus(evt) + else + @selected_item.focus (evt) => this.activate_field(evt) + + container_click: (evt) -> + if evt and evt.type is "click" + evt.stopPropagation() + if not @pending_destroy_click + if not @active_field + @search_field.val "" if @is_multiple + $(document).click @click_test_action + this.results_show() + else if not @is_multiple and evt and ($(evt.target) is @selected_item || $(evt.target).parents("a.chzn-single").length) + evt.preventDefault() + this.results_toggle() + + this.activate_field() + else + @pending_destroy_click = false + + mouse_enter: -> @mouse_on_container = true + mouse_leave: -> @mouse_on_container = false + + input_focus: (evt) -> + setTimeout (=> this.container_click()), 50 unless @active_field + + input_blur: (evt) -> + if not @mouse_on_container + @active_field = false + setTimeout (=> this.blur_test()), 100 + + blur_test: (evt) -> + this.close_field() if not @active_field and @container.hasClass "chzn-container-active" + + close_field: -> + $(document).unbind "click", @click_test_action + + if not @is_multiple + @selected_item.attr "tabindex", @search_field.attr("tabindex") + @search_field.attr "tabindex", -1 + + @active_field = false + this.results_hide() + + @container.removeClass "chzn-container-active" + this.winnow_results_clear() + this.clear_backstroke() + + this.show_search_field_default() + this.search_field_scale() + + activate_field: -> + if not @is_multiple and not @active_field + @search_field.attr "tabindex", (@selected_item.attr "tabindex") + @selected_item.attr "tabindex", -1 + + @container.addClass "chzn-container-active" + @active_field = true + + @search_field.val(@search_field.val()) + @search_field.focus() + + + test_active_click: (evt) -> + if $(evt.target).parents('#' + @container.id).length + @active_field = true + else + this.close_field() + + results_build: -> + startTime = new Date() + @parsing = true + @results_data = SelectParser.select_to_array @form_field + + if @is_multiple and @choices > 0 + @search_choices.find("li.search-choice").remove() + @choices = 0 + else if not @is_multiple + @selected_item.find("span").text @default_text + + content = '' + for data in @results_data + if data.group + content += this.result_add_group data + else if !data.empty + content += this.result_add_option data + if data.selected and @is_multiple + this.choice_build data + else if data.selected and not @is_multiple + @selected_item.find("span").text data.text + + this.show_search_field_default() + this.search_field_scale() + + @search_results.html content + @parsing = false + + + result_add_group: (group) -> + if not group.disabled + group.dom_id = @form_field.id + "chzn_g_" + group.array_index + '
                      • ' + $("
                        ").text(group.label).html() + '
                      • ' + else + "" + + result_add_option: (option) -> + if not option.disabled + option.dom_id = @form_field.id + "chzn_o_" + option.array_index + + classes = if option.selected and @is_multiple then [] else ["active-result"] + classes.push "result-selected" if option.selected + classes.push "group-option" if option.group_array_index? + + '
                      • ' + $("
                        ").text(option.text).html() + '
                      • ' + else + "" + + results_update_field: -> + this.result_clear_highlight() + @result_single_selected = null + this.results_build() + + result_do_highlight: (el) -> + if el.length + this.result_clear_highlight() + + @result_highlight = el + @result_highlight.addClass "highlighted" + + maxHeight = parseInt @search_results.css("maxHeight"), 10 + visible_top = @search_results.scrollTop() + visible_bottom = maxHeight + visible_top + + high_top = @result_highlight.position().top + @search_results.scrollTop() + high_bottom = high_top + @result_highlight.outerHeight() + + if high_bottom >= visible_bottom + @search_results.scrollTop if (high_bottom - maxHeight) > 0 then (high_bottom - maxHeight) else 0 + else if high_top < visible_top + @search_results.scrollTop high_top + + result_clear_highlight: -> + @result_highlight.removeClass "highlighted" if @result_highlight + @result_highlight = null + + results_toggle: -> + if @results_showing + this.results_hide() + else + this.results_show() + + results_show: -> + if not @is_multiple + @selected_item.addClass "chzn-single-with-drop" + if @result_single_selected + this.result_do_highlight( @result_single_selected ) + + dd_top = if @is_multiple then @container.height() else (@container.height() - 1) + @dropdown.css {"top": dd_top + "px", "left":0} + @results_showing = true + + @search_field.focus() + @search_field.val @search_field.val() + + this.winnow_results() + + results_hide: -> + @selected_item.removeClass "chzn-single-with-drop" unless @is_multiple + this.result_clear_highlight() + @dropdown.css {"left":"-9000px"} + @results_showing = false + + + set_tab_index: (el) -> + if @form_field_jq.attr "tabindex" + ti = @form_field_jq.attr "tabindex" + @form_field_jq.attr "tabindex", -1 + + if @is_multiple + @search_field.attr "tabindex", ti + else + @selected_item.attr "tabindex", ti + @search_field.attr "tabindex", -1 + + show_search_field_default: -> + if @is_multiple and @choices < 1 and not @active_field + @search_field.val(@default_text) + @search_field.addClass "default" + else + @search_field.val("") + @search_field.removeClass "default" + + search_results_click: (evt) -> + target = if $(evt.target).hasClass "active-result" then $(evt.target) else $(evt.target).parents(".active-result").first() + if target.length + @result_highlight = target + this.result_select() + + search_results_mouseover: (evt) -> + target = if $(evt.target).hasClass "active-result" then $(evt.target) else $(evt.target).parents(".active-result").first() + this.result_do_highlight( target ) if target + + search_results_mouseout: (evt) -> + this.result_clear_highlight() if $(evt.target).hasClass "active-result" or $(evt.target).parents('.active-result').first() + + + choices_click: (evt) -> + evt.preventDefault() + if( @active_field and not($(evt.target).hasClass "search-choice" or $(evt.target).parents('.search-choice').first) and not @results_showing ) + this.results_show() + + choice_build: (item) -> + choice_id = @form_field.id + "_chzn_c_" + item.array_index + @choices += 1 + @search_container.before '
                      • ' + item.text + '
                      • ' + link = $('#' + choice_id).find("a").first() + link.click (evt) => this.choice_destroy_link_click(evt) + + choice_destroy_link_click: (evt) -> + evt.preventDefault() + @pending_destroy_click = true + this.choice_destroy $(evt.target) + + choice_destroy: (link) -> + @choices -= 1 + this.show_search_field_default() + + this.results_hide() if @is_multiple and @choices > 0 and @search_field.val().length < 1 + + this.result_deselect (link.attr "rel") + link.parents('li').first().remove() + + result_select: -> + if @result_highlight + high = @result_highlight + high_id = high.attr "id" + + this.result_clear_highlight() + + high.addClass "result-selected" + + if @is_multiple + this.result_deactivate high + else + @result_single_selected = high + + position = high_id.substr(high_id.lastIndexOf("_") + 1 ) + item = @results_data[position] + item.selected = true + + @form_field.options[item.options_index].selected = true + + if @is_multiple + this.choice_build item + else + @selected_item.find("span").first().text item.text + + this.results_hide() + @search_field.val "" + + @form_field_jq.trigger "change" + this.search_field_scale() + + result_activate: (el) -> + el.addClass("active-result").show() + + result_deactivate: (el) -> + el.removeClass("active-result").hide() + + result_deselect: (pos) -> + result_data = @results_data[pos] + result_data.selected = false + + @form_field.options[result_data.options_index].selected = false + result = $("#" + @form_field.id + "chzn_o_" + pos) + result.removeClass("result-selected").addClass("active-result").show() + + this.result_clear_highlight() + this.winnow_results() + + @form_field_jq.trigger "change" + this.search_field_scale() + + results_search: (evt) -> + if @results_showing + this.winnow_results() + else + this.results_show() + + winnow_results: -> + startTime = new Date() + this.no_results_clear() + + results = 0 + + searchText = if @search_field.val() is @default_text then "" else $.trim @search_field.val() + regex = new RegExp('^' + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i') + zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i') + + for option in @results_data + if not option.disabled and not option.empty + if option.group + $('#' + option.dom_id).hide() + else if not (@is_multiple and option.selected) + found = false + result_id = option.dom_id + + if regex.test option.text + found = true + results += 1 + else if option.text.indexOf(" ") >= 0 or option.text.indexOf("[") == 0 + #TODO: replace this substitution of /\[\]/ with a list of characters to skip. + parts = option.text.replace(/\[|\]/g, "").split(" ") + if parts.length + for part in parts + if regex.test part + found = true + results += 1 + + if found + if searchText.length + startpos = option.text.search zregex + text = option.text.substr(0, startpos + searchText.length) + '
                        ' + option.text.substr(startpos + searchText.length) + text = text.substr(0, startpos) + '' + text.substr(startpos) + else + text = option.text + + $("#" + result_id).html text if $("#" + result_id).html != text + + this.result_activate $("#" + result_id) + + $("#" + @results_data[option.group_array_index].dom_id).show() if option.group_array_index? + else + this.result_clear_highlight() if @result_highlight and result_id is @result_highlight.attr 'id' + this.result_deactivate $("#" + result_id) + + if results < 1 and searchText.length + this.no_results searchText + else + this.winnow_results_set_highlight() + + winnow_results_clear: -> + @search_field.val "" + lis = @search_results.find("li") + + for li in lis + li = $(li) + if li.hasClass "group-result" + li.show() + else if not @is_multiple or not li.hasClass "result-selected" + this.result_activate li + + winnow_results_set_highlight: -> + if not @result_highlight + do_high = @search_results.find(".active-result").first() + if(do_high) + this.result_do_highlight do_high + + no_results: (terms) -> + no_results_html = $('
                      • No results match ""
                      • ') + no_results_html.find("span").first().text(terms) + + @search_results.append no_results_html + + no_results_clear: -> + @search_results.find(".no-results").remove() + + keydown_arrow: -> + if not @result_highlight + first_active = @search_results.find("li.active-result").first() + this.result_do_highlight $(first_active) if first_active + else if @results_showing + next_sib = @result_highlight.nextAll("li.active-result").first() + this.result_do_highlight next_sib if next_sib + this.results_show() if not @results_showing + + keyup_arrow: -> + if not @results_showing and not @is_multiple + this.results_show() + else if @result_highlight + prev_sibs = @result_highlight.prevAll("li.active-result") + + if prev_sibs.length + this.result_do_highlight prev_sibs.first() + else + this.results_hide() if @choices > 0 + this.result_clear_highlight() + + keydown_backstroke: -> + if @pending_backstroke + this.choice_destroy @pending_backstroke.find("a").first() + this.clear_backstroke() + else + @pending_backstroke = @search_container.siblings("li.search-choice").last() + @pending_backstroke.addClass "search-choice-focus" + + clear_backstroke: -> + @pending_backstroke.removeClass "search-choice-focus" if @pending_backstroke + @pending_backstroke = null + + keyup_checker: (evt) -> + stroke = evt.which ? evt.keyCode + this.search_field_scale() + + switch stroke + when 8 + if @is_multiple and @backstroke_length < 1 and @choices > 0 + this.keydown_backstroke() + else if not @pending_backstroke + this.result_clear_highlight() + this.results_search() + when 13 + evt.preventDefault() + this.result_select() if this.results_showing + when 27 + this.results_hide() if @results_showing + when 9, 38, 40, 16 + # don't do anything on these keys + else this.results_search() + + + keydown_checker: (evt) -> + stroke = evt.which ? evt.keyCode + this.search_field_scale() + + this.clear_backstroke() if stroke != 8 and this.pending_backstroke + + switch stroke + when 8 + @backstroke_length = this.search_field.val().length + break + when 9 + @mouse_on_container = false + break + when 13 + evt.preventDefault() + break + when 38 + evt.preventDefault() + this.keyup_arrow() + break + when 40 + this.keydown_arrow() + break + + + search_field_scale: -> + if @is_multiple + h = 0 + w = 0 + + style_block = "position:absolute; left: -1000px; top: -1000px; display:none;" + styles = ['font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing'] + + for style in styles + style_block += style + ":" + @search_field.css(style) + ";" + + div = $('
                        ', { 'style' : style_block }) + div.text @search_field.val() + $('body').append div + + w = div.width() + 25 + div.remove() + + if( w > @f_width-10 ) + w = @f_width - 10 + + @search_field.css({'width': w + 'px'}) + + dd_top = @container.height() + @dropdown.css({"top": dd_top + "px"}) + +get_side_border_padding = (elmt) -> + side_border_padding = elmt.outerWidth() - elmt.width() + +root.get_side_border_padding = get_side_border_padding + +class SelectParser + + constructor: -> + @options_index = 0 + @parsed = [] + + add_node: (child) -> + if child.nodeName is "OPTGROUP" + this.add_group child + else + this.add_option child + + add_group: (group) -> + group_position = @parsed.length + @parsed.push + array_index: group_position + group: true + label: group.label + children: 0 + disabled: group.disabled + this.add_option( option, group_position, group.disabled ) for option in group.childNodes + + add_option: (option, group_position, group_disabled) -> + if option.nodeName is "OPTION" + if option.text != "" + if group_position? + @parsed[group_position].children += 1 + @parsed.push + array_index: @parsed.length + options_index: @options_index + value: option.value + text: option.text + selected: option.selected + disabled: if group_disabled is true then group_disabled else option.disabled + group_array_index: group_position + else + @parsed.push + array_index: @parsed.length + options_index: @options_index + empty: true + @options_index += 1 + +SelectParser.select_to_array = (select) -> + parser = new SelectParser() + parser.add_node( child ) for child in select.childNodes + parser.parsed + +root.SelectParser = SelectParser diff --git a/src/usr/local/www/javascript/chosen/coffee/chosen.proto.coffee b/src/usr/local/www/javascript/chosen/coffee/chosen.proto.coffee new file mode 100644 index 0000000..87a22b6 --- /dev/null +++ b/src/usr/local/www/javascript/chosen/coffee/chosen.proto.coffee @@ -0,0 +1,629 @@ +### +Chosen, a Select Box Enhancer for jQuery and Protoype +by Patrick Filler for Harvest, http://getharvest.com + +Available for use under the MIT License, http://en.wikipedia.org/wiki/MIT_License + +Copyright (c) 2011 by Harvest +### + +root = exports ? this + +class Chosen + + constructor: (elmn) -> + this.set_default_values() + + @form_field = elmn + @is_multiple = @form_field.multiple + + @default_text_default = if @form_field.multiple then "Select Some Options" else "Select an Option" + + this.set_up_html() + this.register_observers() + + + set_default_values: -> + + @click_test_action = (evt) => this.test_active_click(evt) + @active_field = false + @mouse_on_container = false + @results_showing = false + @result_highlighted = null + @result_single_selected = null + @choices = 0 + + # HTML Templates + @single_temp = new Template('#{default}
                          ') + @multi_temp = new Template('
                            ') + @choice_temp = new Template('
                          • #{choice}
                          • ') + @no_results_temp = new Template('
                          • No results match "#{terms}"
                          • ') + + + set_up_html: -> + @container_id = @form_field.id + "_chzn" + + @f_width = if @form_field.getStyle("width") then parseInt @form_field.getStyle("width"), 10 else @form_field.getWidth() + + container_props = + 'id': @container_id + 'class': 'chzn-container' + 'style': 'width: ' + (@f_width) + 'px' #use parens around @f_width so coffeescript doesn't think + ' px' is a function parameter + + @default_text = if @form_field.readAttribute 'title' then @form_field.readAttribute 'title' else @default_text_default + + base_template = if @is_multiple then new Element('div', container_props).update( @multi_temp.evaluate({ "default": @default_text}) ) else new Element('div', container_props).update( @single_temp.evaluate({ "default":@default_text }) ) + + @form_field.hide().insert({ after: base_template }) + @container = $(@container_id) + @container.addClassName( "chzn-container-" + (if @is_multiple then "multi" else "single") ) + @dropdown = @container.down('div.chzn-drop') + + dd_top = @container.getHeight() + dd_width = (@f_width - get_side_border_padding(@dropdown)) + + @dropdown.setStyle({"width": dd_width + "px", "top": dd_top + "px"}) + + @search_field = @container.down('input') + @search_results = @container.down('ul.chzn-results') + this.search_field_scale() + + @search_no_results = @container.down('li.no-results') + + if @is_multiple + @search_choices = @container.down('ul.chzn-choices') + @search_container = @container.down('li.search-field') + else + @search_container = @container.down('div.chzn-search') + @selected_item = @container.down('.chzn-single') + sf_width = dd_width - get_side_border_padding(@search_container) - get_side_border_padding(@search_field) + @search_field.setStyle( {"width" : sf_width + "px"} ) + + this.results_build() + this.set_tab_index() + + + register_observers: -> + @container.observe "click", (evt) => this.container_click(evt) + @container.observe "mouseenter", (evt) => this.mouse_enter(evt) + @container.observe "mouseleave", (evt) => this.mouse_leave(evt) + + @search_results.observe "click", (evt) => this.search_results_click(evt) + @search_results.observe "mouseover", (evt) => this.search_results_mouseover(evt) + @search_results.observe "mouseout", (evt) => this.search_results_mouseout(evt) + + @form_field.observe "liszt:updated", (evt) => this.results_update_field(evt) + + @search_field.observe "blur", (evt) => this.input_blur(evt) + @search_field.observe "keyup", (evt) => this.keyup_checker(evt) + @search_field.observe "keydown", (evt) => this.keydown_checker(evt) + + if @is_multiple + @search_choices.observe "click", (evt) => this.choices_click(evt) + @search_field.observe "focus", (evt) => this.input_focus(evt) + else + @selected_item.observe "focus", (evt) => this.activate_field(evt) + + + container_click: (evt) -> + if evt and evt.type is "click" + evt.stop() + if not @pending_destroy_click + if not @active_field + @search_field.clear() if @is_multiple + document.observe "click", @click_test_action + this.results_show() + else if not @is_multiple and evt and (evt.target is @selected_item || evt.target.up("a.chzn-single")) + this.results_toggle() + + this.activate_field() + else + @pending_destroy_click = false + + mouse_enter: -> @mouse_on_container = true + mouse_leave: -> @mouse_on_container = false + + input_focus: (evt) -> + setTimeout this.container_click.bind(this), 50 unless @active_field + + input_blur: (evt) -> + if not @mouse_on_container + @active_field = false + setTimeout this.blur_test.bind(this), 100 + + blur_test: (evt) -> + this.close_field() if not @active_field and @container.hasClassName("chzn-container-active") + + close_field: -> + document.stopObserving "click", @click_test_action + + if not @is_multiple + @selected_item.tabIndex = @search_field.tabIndex + @search_field.tabIndex = -1 + + @active_field = false + this.results_hide() + + @container.removeClassName "chzn-container-active" + this.winnow_results_clear() + this.clear_backstroke() + + this.show_search_field_default() + this.search_field_scale() + + activate_field: -> + if not @is_multiple and not @active_field + @search_field.tabIndex = @selected_item.tabIndex + @selected_item.tabIndex = -1 + + @container.addClassName "chzn-container-active" + @active_field = true + + @search_field.value = @search_field.value + @search_field.focus() + + + test_active_click: (evt) -> + if evt.target.up('#' + @container.id) + @active_field = true + else + this.close_field() + + results_build: -> + startTime = new Date() + @parsing = true + @results_data = SelectParser.select_to_array @form_field + + if @is_multiple and @choices > 0 + @search_choices.select("li.search-choice").invoke("remove") + @choices = 0 + else if not @is_multiple + @selected_item.down("span").update(@default_text) + + content = '' + for data in @results_data + if data.group + content += this.result_add_group data + else if !data.empty + content += this.result_add_option data + if data.selected and @is_multiple + this.choice_build data + else if data.selected and not @is_multiple + @selected_item.down("span").update( data.text ) + + this.show_search_field_default() + this.search_field_scale() + + @search_results.update content + @parsing = false + + + result_add_group: (group) -> + if not group.disabled + group.dom_id = @form_field.id + "chzn_g_" + group.array_index + '
                          • ' + group.label.escapeHTML() + '
                          • ' + else + "" + + result_add_option: (option) -> + if not option.disabled + option.dom_id = @form_field.id + "chzn_o_" + option.array_index + + classes = if option.selected and @is_multiple then [] else ["active-result"] + classes.push "result-selected" if option.selected + classes.push "group-option" if option.group_array_index? + + '
                          • ' + option.text.escapeHTML() + '
                          • ' + else + "" + + results_update_field: -> + this.result_clear_highlight() + @result_single_selected = null + this.results_build() + + result_do_highlight: (el) -> + this.result_clear_highlight() + + @result_highlight = el + @result_highlight.addClassName "highlighted" + + maxHeight = parseInt @search_results.getStyle('maxHeight'), 10 + visible_top = @search_results.scrollTop + visible_bottom = maxHeight + visible_top + + high_top = @result_highlight.positionedOffset().top + high_bottom = high_top + @result_highlight.getHeight() + + if high_bottom >= visible_bottom + @search_results.scrollTop = if (high_bottom - maxHeight) > 0 then (high_bottom - maxHeight) else 0 + else if high_top < visible_top + @search_results.scrollTop = high_top + + result_clear_highlight: -> + @result_highlight.removeClassName('highlighted') if @result_highlight + @result_highlight = null + + results_toggle: -> + if @results_showing + this.results_hide() + else + this.results_show() + + results_show: -> + if not @is_multiple + @selected_item.addClassName('chzn-single-with-drop') + if @result_single_selected + this.result_do_highlight( @result_single_selected ) + + dd_top = if @is_multiple then @container.getHeight() else (@container.getHeight() - 1) + @dropdown.setStyle {"top": dd_top + "px", "left":0} + @results_showing = true + + @search_field.focus() + @search_field.value = @search_field.value + + this.winnow_results() + + results_hide: -> + @selected_item.removeClassName('chzn-single-with-drop') unless @is_multiple + this.result_clear_highlight() + @dropdown.setStyle({"left":"-9000px"}) + @results_showing = false + + + set_tab_index: (el) -> + if @form_field.tabIndex + ti = @form_field.tabIndex + @form_field.tabIndex = -1 + + if @is_multiple + @search_field.tabIndex = ti + else + @selected_item.tabIndex = ti + @search_field.tabIndex = -1 + + show_search_field_default: -> + if @is_multiple and @choices < 1 and not @active_field + @search_field.value = @default_text + @search_field.addClassName "default" + else + @search_field.value = "" + @search_field.removeClassName "default" + + search_results_click: (evt) -> + target = if evt.target.hasClassName("active-result") then evt.target else evt.target.up(".active-result") + if target + @result_highlight = target + this.result_select() + + search_results_mouseover: (evt) -> + target = if evt.target.hasClassName("active-result") then evt.target else evt.target.up(".active-result") + this.result_do_highlight( target ) if target + + search_results_mouseout: (evt) -> + this.result_clear_highlight() if evt.target.hasClassName('active-result') or evt.target.up('.active-result') + + + choices_click: (evt) -> + evt.preventDefault() + if( @active_field and not(evt.target.hasClassName('search-choice') or evt.target.up('.search-choice')) and not @results_showing ) + this.results_show() + + choice_build: (item) -> + choice_id = @form_field.id + "_chzn_c_" + item.array_index + @choices += 1 + @search_container.insert { before: @choice_temp.evaluate({"id":choice_id, "choice":item.text, "position":item.array_index}) } + link = $(choice_id).down('a') + link.observe "click", (evt) => this.choice_destroy_link_click(evt) + + choice_destroy_link_click: (evt) -> + evt.preventDefault() + @pending_destroy_click = true + this.choice_destroy evt.target + + choice_destroy: (link) -> + @choices -= 1 + this.show_search_field_default() + + this.results_hide() if @is_multiple and @choices > 0 and @search_field.value.length < 1 + + this.result_deselect link.readAttribute("rel") + link.up('li').remove() + + result_select: -> + if @result_highlight + high = @result_highlight + this.result_clear_highlight() + + high.addClassName("result-selected") + + if @is_multiple + this.result_deactivate high + else + @result_single_selected = high + + position = high.id.substr(high.id.lastIndexOf("_") + 1 ) + item = @results_data[position] + item.selected = true + + @form_field.options[item.options_index].selected = true + + if @is_multiple + this.choice_build item + else + @selected_item.down("span").update(item.text) + + this.results_hide() + @search_field.value = "" + + @form_field.simulate("change") if typeof Event.simulate is 'function' + this.search_field_scale() + + result_activate: (el) -> + el.addClassName("active-result").show() + + result_deactivate: (el) -> + el.removeClassName("active-result").hide() + + result_deselect: (pos) -> + result_data = @results_data[pos] + result_data.selected = false + + @form_field.options[result_data.options_index].selected = false + result = $(@form_field.id + "chzn_o_" + pos) + result.removeClassName("result-selected").addClassName("active-result").show() + + this.result_clear_highlight() + this.winnow_results() + + @form_field.simulate("change") if typeof Event.simulate is 'function' + this.search_field_scale() + + results_search: (evt) -> + if @results_showing + this.winnow_results() + else + this.results_show() + + winnow_results: -> + startTime = new Date() + this.no_results_clear() + + results = 0 + + searchText = if @search_field.value is @default_text then "" else @search_field.value.strip() + regex = new RegExp('^' + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i') + zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i') + + for option in @results_data + if not option.disabled and not option.empty + if option.group + $(option.dom_id).hide() + else if not (@is_multiple and option.selected) + found = false + result_id = option.dom_id + + if regex.test option.text + found = true + results += 1 + else if option.text.indexOf(" ") >= 0 or option.text.indexOf("[") == 0 + #TODO: replace this substitution of /\[\]/ with a list of characters to skip. + parts = option.text.replace(/\[|\]/g, "").split(" ") + if parts.length + for part in parts + if regex.test part + found = true + results += 1 + + if found + if searchText.length + startpos = option.text.search zregex + text = option.text.substr(0, startpos + searchText.length) + '
                            ' + option.text.substr(startpos + searchText.length) + text = text.substr(0, startpos) + '' + text.substr(startpos) + else + text = option.text + + $(result_id).update text if $(result_id).innerHTML != text + + this.result_activate $(result_id) + + $(@results_data[option.group_array_index].dom_id).show() if option.group_array_index? + else + this.result_clear_highlight() if $(result_id) is @result_highlight + this.result_deactivate $(result_id) + + if results < 1 and searchText.length + this.no_results(searchText) + else + this.winnow_results_set_highlight() + + winnow_results_clear: -> + @search_field.clear() + lis = @search_results.select("li") + + for li in lis + if li.hasClassName("group-result") + li.show() + else if not @is_multiple or not li.hasClassName("result-selected") + this.result_activate li + + winnow_results_set_highlight: -> + if not @result_highlight + do_high = @search_results.down(".active-result") + if(do_high) + this.result_do_highlight do_high + + no_results: (terms) -> + @search_results.insert @no_results_temp.evaluate({"terms":terms.escapeHTML()}) + + no_results_clear: -> + nr = null + nr.remove() while nr = @search_results.down(".no-results") + + + keydown_arrow: -> + actives = @search_results.select("li.active-result") + if actives.length + if not @result_highlight + this.result_do_highlight actives.first() + else if @results_showing + sibs = @result_highlight.nextSiblings() + nexts = sibs.intersect(actives) + this.result_do_highlight nexts.first() if nexts.length + this.results_show() if not @results_showing + + keyup_arrow: -> + if not @results_showing and not @is_multiple + this.results_show() + else if @result_highlight + sibs = @result_highlight.previousSiblings() + actives = @search_results.select("li.active-result") + prevs = sibs.intersect(actives) + + if prevs.length + this.result_do_highlight prevs.first() + else + this.results_hide() if @choices > 0 + this.result_clear_highlight() + + keydown_backstroke: -> + if @pending_backstroke + this.choice_destroy @pending_backstroke.down("a") + this.clear_backstroke() + else + @pending_backstroke = @search_container.siblings("li.search-choice").last() + @pending_backstroke.addClassName("search-choice-focus") + + clear_backstroke: -> + @pending_backstroke.removeClassName("search-choice-focus") if @pending_backstroke + @pending_backstroke = null + + keyup_checker: (evt) -> + stroke = evt.which ? evt.keyCode + this.search_field_scale() + + switch stroke + when 8 + if @is_multiple and @backstroke_length < 1 and @choices > 0 + this.keydown_backstroke() + else if not @pending_backstroke + this.result_clear_highlight() + this.results_search() + when 13 + evt.preventDefault() + this.result_select() if this.results_showing + when 27 + this.results_hide() if @results_showing + when 9, 38, 40, 16 + # don't do anything on these keys + else this.results_search() + + + keydown_checker: (evt) -> + stroke = evt.which ? evt.keyCode + this.search_field_scale() + + this.clear_backstroke() if stroke != 8 and this.pending_backstroke + + switch stroke + when 8 + @backstroke_length = this.search_field.value.length + when 9 + @mouse_on_container = false + when 13 + evt.preventDefault() + when 38 + evt.preventDefault() + this.keyup_arrow() + when 40 + this.keydown_arrow() + + + search_field_scale: -> + if @is_multiple + h = 0 + w = 0 + + style_block = "position:absolute; left: -1000px; top: -1000px; display:none;" + styles = ['font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing'] + + for style in styles + style_block += style + ":" + @search_field.getStyle(style) + ";" + + div = new Element('div', { 'style' : style_block }).update(@search_field.value) + document.body.appendChild(div) + + w = Element.measure(div, 'width') + 25 + div.remove() + + if( w > @f_width-10 ) + w = @f_width - 10 + + @search_field.setStyle({'width': w + 'px'}) + + dd_top = @container.getHeight() + @dropdown.setStyle({"top": dd_top + "px"}) + +root.Chosen = Chosen + +document.observe 'dom:loaded', (evt) -> + selects = $$(".chzn-select") + new Chosen select for select in selects + +get_side_border_padding = (elmt) -> + layout = new Element.Layout(elmt) + side_border_padding = layout.get("border-left") + layout.get("border-right") + layout.get("padding-left") + layout.get("padding-right") + +root.get_side_border_padding = get_side_border_padding + +root = exports ? this + +class SelectParser + + constructor: -> + @options_index = 0 + @parsed = [] + + add_node: (child) -> + if child.nodeName is "OPTGROUP" + this.add_group child + else + this.add_option child + + add_group: (group) -> + group_position = @parsed.length + @parsed.push + array_index: group_position + group: true + label: group.label + children: 0 + disabled: group.disabled + this.add_option( option, group_position, group.disabled ) for option in group.childNodes + + add_option: (option, group_position, group_disabled) -> + if option.nodeName is "OPTION" + if option.text != "" + if group_position? + @parsed[group_position].children += 1 + @parsed.push + array_index: @parsed.length + options_index: @options_index + value: option.value + text: option.text + selected: option.selected + disabled: if group_disabled is true then group_disabled else option.disabled + group_array_index: group_position + else + @parsed.push + array_index: @parsed.length + options_index: @options_index + empty: true + @options_index += 1 + +SelectParser.select_to_array = (select) -> + parser = new SelectParser() + parser.add_node( child ) for child in select.childNodes + parser.parsed + +root.SelectParser = SelectParser diff --git a/src/usr/local/www/javascript/datepicker/css/datepicker.css b/src/usr/local/www/javascript/datepicker/css/datepicker.css new file mode 100644 index 0000000..0773fa6 --- /dev/null +++ b/src/usr/local/www/javascript/datepicker/css/datepicker.css @@ -0,0 +1,178 @@ +/* This is a very basic stylesheet for the date-picker. Feel free to create your own. */ + +/* The wrapper div */ +.datePicker + { + position:absolute; + min-width:21em; + width:21em; + z-index:9999; + text-align:center; + font:900 0.8em/0.8em Verdana, Sans-Serif; + background:transparent; + } +/* + Quirksmode necessity + -------------------- + + If your HTML document renders in quirksmode (i.e. has no doctype declaration) + then uncomment the following CSS rule or the datePicker will be HUGE... + +.datePicker th, +.datePicker td + { + font-size:11px; + } +*/ +/* The iframe hack to cover selectlists in Internet Explorer <= v6 */ +.iehack + { + position:absolute; + background:#fff; + z-index:9998; + padding:0; + border:0; + display:none; + } +/* The button created beside each input */ +.date-picker-control + { + border:0 none; + padding:0; + margin-left:4px; + background:transparent url(../media/cal.gif) no-repeat 0 0; + width:16px; + height:16px; + margin-top:0; + vertical-align:top; + cursor:pointer; + } +/* The next & previous buttons */ +.datePicker th button + { + display:inline; + padding:0; + margin:0; + color:#000; + height:1em; + width:0.8em; + line-height:0.8em; + border-width:0; + font-family: georgia, times new roman, palatino, times, bookman, serif; + background:transparent; + font-weight:bold; + cursor:pointer; + } +.datePicker th button:active, +.datePicker th button:focus, +.date-picker-control:active, +.date-picker-control:focus + { + outline:none; + } +.datePicker th button.prev-but + { + text-align:left; + } +.datePicker th button.next-but + { + text-align:right; + } +/* The mon, tue, wed etc day buttons */ +.datePicker th button.fd-day-header + { + text-align:center; + margin:0 auto; + font:900 1em Verdana, Sans-Serif; + height:auto; + width:auto; + text-decoration:none; + line-height:1.4em; + } +/* The table */ +.datePicker table + { + position:relative; + margin:0; + padding:0; + border:1px solid #ccc; + background:#fff url(../media/gradient-e5e5e5-ffffff.gif) repeat-x 0 -20px; + text-align:center; + width:100%; + } +.datePicker table tfoot td + { + background:#fff url(../media/gradient-e5e5e5-ffffff.gif) repeat-x 0 -40px; + } +/* Common TD & TH styling */ +.datePicker table td + { + border: 1px solid #ccc; + padding:0.6em 0.5em 0.5em 0.5em; + /* Opera requires a line-height bigger than 1em in order to redraw properly */ + line-height:1.2em; + cursor:default; + background:#fff url(../media/gradient-e5e5e5-ffffff.gif) repeat-x 0 -50px; + } +.datePicker table th + { + border:0 none; + padding:0; + line-height:1em; + font-weight:bold; + color:#222; + text-align:center; + } +/* The "mon tue wed etc" day header button styles */ +.datePicker table th.date-picker-day-header + { + text-transform:lowercase; + cursor:help; + } +/* The "todays date" style */ +.datePicker table td.date-picker-today + { + background:#fff url(../media/bullet2.gif) no-repeat 0 0; + color:rgb(100,100,100) !important; + } +/* The "selected date" style */ +.datePicker table td.date-picker-selected-date + { + color:#333 !important; + border-color:#333 !important; + } +/* the "highlight days" style */ +td.date-picker-highlight + { + color:#a86666; + } +/* The date "out of range" style */ +.datePicker table td.out-of-range + { + color:#ccc !important; + font-style:oblique; + background:transparent !important; + cursor:default !important; + } +/* The "disabled days" style */ +.datePicker table td.day-disabled + { + color:#aaa !important; + background:transparent !important; + cursor:default !important; + } +/* The "active cursor" style */ +.datePicker table td#date-picker-hover + { + background:#fff url(../media/bg_header.jpg) no-repeat 0 0; + cursor:pointer; + border-color:rgb(100,130,170); + color:rgb(100,130,170); + } +/* Remove the images for Internet Explorer <= v6 using the "* html" hack */ +* html .datePicker table td.date-picker-selected, +* html .datePicker table td.date-picker-hover, +* html .datePicker table td + { + background-image:none; + } diff --git a/src/usr/local/www/javascript/datepicker/js/blank.html b/src/usr/local/www/javascript/datepicker/js/blank.html new file mode 100644 index 0000000..53a7f24 --- /dev/null +++ b/src/usr/local/www/javascript/datepicker/js/blank.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/usr/local/www/javascript/datepicker/js/datepicker.js b/src/usr/local/www/javascript/datepicker/js/datepicker.js new file mode 100644 index 0000000..3d6dbd3 --- /dev/null +++ b/src/usr/local/www/javascript/datepicker/js/datepicker.js @@ -0,0 +1,1111 @@ +/* + DatePicker v2.5 by frequency-decoder.com (2006/12/01) + + Released under a creative commons Attribution-ShareAlike 2.5 license (http://creativecommons.org/licenses/by-sa/2.5/) + + Please credit frequency-decoder in any derivative work - thanks. + + You are free: + + * to copy, distribute, display, and perform the work + * to make derivative works + * to make commercial use of the work + + Under the following conditions: + + by Attribution. + -------------- + You must attribute the work in the manner specified by the author or licensor. + + sa + -- + Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. + + * For any reuse or distribution, you must make clear to others the license terms of this work. + * Any of these conditions can be waived if you get permission from the copyright holder. +*/ +var datePickerController; + +(function() { + +datePicker.isSupported = typeof document.createElement != "undefined" && + typeof document.documentElement != "undefined" && + typeof document.documentElement.offsetWidth == "number"; + +// Detect the users language +datePicker.languageinfo = navigator.language ? navigator.language : navigator.userLanguage; +datePicker.languageinfo = datePicker.languageinfo ? datePicker.languageinfo.toLowerCase().replace(/-[a-z]+$/, "") : 'en'; + +if(datePicker.languageinfo != 'en') { + // Load the appropriate language file + var scriptFiles = document.getElementsByTagName('head')[0].getElementsByTagName('script'); + var loc = ""; + + for(var i = 0, scriptFile; scriptFile = scriptFiles[i]; i++) { + if(scriptFile.src && scriptFile.src.match(/datepicker/)) { + loc = scriptFile.src.replace("datepicker", "lang/" + datePicker.languageinfo); + break; + }; + }; + + if(loc != "") { + var script = document.createElement('script'); + script.type = "text/javascript"; + script.src = loc; + // Hopefully this allows a UTF-8 js file to be imported into a non-UTF HTML document + script.setAttribute("charset", "utf-8"); + document.getElementsByTagName('head')[0].appendChild(script); + }; +}; + +// Defaults for the language should the locale file not load +datePicker.months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December"]; +datePicker.fullDay = [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday"]; +datePicker.titles = [ + "Previous month", + "Next month", + "Previous year", + "Next year"]; +datePicker.daysPerMonth = [31,28,31,30,31,30,31,31,30,31,30,31]; + +datePicker.getDaysPerMonth = function (nMonth, nYear) { + nMonth = (nMonth + 12) % 12; + var res = datePicker.daysPerMonth[nMonth]; + if(((0 == (nYear%4)) && ((0 != (nYear%100)) || (0 == (nYear%400)))) && nMonth == 1) { + res = 29; + }; + return res; +}; + +function datePicker(options) { + + this.defaults = {}; + + for(opt in options) { + this[opt] = this.defaults[opt] = options[opt]; + }; + + this.date = new Date(); + this.yearinc = 1; + this.timer = null; + this.pause = 1000; + this.timerSet = false; + this.opacity = 0; + this.opacityTo = 0; + this.fadeTimer = null; + this.interval = new Date(); + this.firstDayOfWeek = this.defaults.firstDayOfWeek = 0; + this.dateSet = null; + this.visible = false; + this.div; + this.table; + + var o = this; + + o.reset = function() { + for(def in o.defaults) { + o[def] = o.defaults[def]; + }; + }; + o.setOpacity = function(op) { + o.div.style.opacity = + op/100; + o.div.style.filter = 'alpha(opacity=' + op + ')'; + o.opacity = op; + }; + o.fade = function() { + + window.clearTimeout(o.fadeTimer); + var diff = Math.round(o.opacity + ((o.opacityTo - o.opacity) / 4)); + + o.setOpacity(diff); + + if(Math.abs(o.opacityTo - diff) > 3) { + o.fadeTimer = window.setTimeout(function () { o.fade(); }, 50); + } else { + o.setOpacity(o.opacityTo); + if(o.opacityTo == 0) o.div.style.display = "none"; + }; + }; + o.killEvent = function(e) { + if (e == null) e = document.parentWindow.event; + + if (e.stopPropagation) { + e.stopPropagation(); + e.preventDefault(); + } + /*@cc_on@*/ + /*@if(@_win32) + e.cancelBubble = true; + e.returnValue = false; + /*@end@*/ + return false; + }; + o.startTimer = function () { + if (o.timerSet) o.stopTimer(); + o.timer = window.setTimeout(function () { o.onTimer(); }, o.timerInc); + o.timerSet = true; + }; + o.stopTimer = function () { + if (o.timer != null) window.clearTimeout(o.timer); + o.timerSet = false; + }; + o.events = { + onkeydown: function (e) { + + if(!o.visible) return false; + + if (e == null) e = document.parentWindow.event; + var kc = e.keyCode ? e.keyCode : e.charCode; + + if ( kc == 13 ) { + // close with update + o.returnFormattedDate(); + o.hide(); + return o.killEvent(e); + } else if ( kc == 27 ) { + // close + o.hide(); + return o.killEvent(e); + } else if ( kc == 32 || kc == 0 ) { + // close + o.date = new Date( ); + o.updateTable(); + return o.killEvent(e); + }; + + // Internet Explorer fires the keydown event faster than the JavaScript engine can + // update the interface. The following attempts to fix this. + + /*@cc_on@*/ + /*@if(@_win32) + if(new Date().getTime() - o.interval.getTime() < 100) return o.killEvent(e); + o.interval = new Date(); + /*@end@*/ + + if ((kc > 49 && kc < 56) || (kc > 97 && kc < 104)) { + if (kc > 96) kc -= (96-48); + kc -= 49; + o.firstDayOfWeek = (o.firstDayOfWeek + kc) % 7; + o.updateTable(); + return o.killEvent(e); + }; + + if ( kc < 37 || kc > 40 ) return true; + + var d = new Date( o.date ).valueOf(); + + if ( kc == 37 ) { + // ctrl + left = previous month + if( e.ctrlKey ) { + d = new Date( o.date ); + d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth() - 1,d.getFullYear())) ); // no need to catch dec -> jan for the year + d.setMonth( d.getMonth() - 1 ); + } else { + d -= 24 * 60 * 60 * 1000; + }; + } else if ( kc == 39 ) { + // ctrl + right = next month + if( e.ctrlKey ) { + d = new Date( o.date ); + d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth() + 1,d.getFullYear())) ); // no need to catch dec -> jan for the year + d.setMonth( d.getMonth() + 1 ); + } else { + d += 24 * 60 * 60 * 1000; + }; + } else if ( kc == 38 ) { + // ctrl + up = next year + if( e.ctrlKey ) { + d = new Date( o.date ); + d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth(),d.getFullYear() + 1)) ); // no need to catch dec -> jan for the year + d.setFullYear( d.getFullYear() + 1 ); + } else { + d -= 7 * 24 * 60 * 60 * 1000; + }; + } else if ( kc == 40 ) { + // ctrl + down = prev year + if( e.ctrlKey ) { + d = new Date( o.date ); + d.setDate( Math.min(d.getDate(), datePicker.getDaysPerMonth(d.getMonth(),d.getFullYear() - 1)) ); // no need to catch dec -> jan for the year + d.setFullYear( d.getFullYear() - 1 ); + } else { + d += 7 * 24 * 60 * 60 * 1000; + }; + }; + + var tmpDate = new Date( d ); + if(!o.outOfRange(tmpDate)) { + o.date = tmpDate; + }; + + o.updateTable(); + + return o.killEvent(e); + }, + onmousedown: function(e) { + if ( e == null ) e = document.parentWindow.event; + var el = e.target != null ? e.target : e.srcElement; + + var found = false; + + while(el.parentNode) { + if(el.id && (el.id == "fd-"+o.id || el.id == "fd-but-"+o.id)) { + found = true; + break; + } + try { + el = el.parentNode; + } catch(err) { + break; + } + } + if(found) return true; + datePickerController.hideAll(); + }, + onmouseover: function(e) { + if(document.getElementById("date-picker-hover")) { + document.getElementById("date-picker-hover").id = ""; + }; + + this.id = "date-picker-hover"; + + o.date.setDate(this.firstChild.nodeValue); + }, + onclick: function (e) { + if(o.opacity != o.opacityTo) return false; + if ( e == null ) e = document.parentWindow.event; + var el = e.target != null ? e.target : e.srcElement; + while ( el.nodeType != 1 ) el = el.parentNode; + + var d = new Date( o.date ); + var n = Number( el.firstChild.data ); + + if(isNaN(n)) { return true; }; + + d.setDate( n ); + o.date = d; + + o.returnFormattedDate(); + o.hide(); + return o.killEvent(e); + }, + incDec:function(e) { + if(o.timerSet) { + o.stopTimer(); + }; + + datePickerController.addEvent(document, "mouseup", o.events.clearTimer); + + o.timerInc = 1000; + o.dayInc = arguments[1]; + o.yearInc = arguments[2]; + o.monthInc = arguments[3]; + o.onTimer(); + return o.killEvent(e); + }, + clearTimer:function() { + o.stopped = true; + o.timerInc = 1000; + o.yearInc = 0; + o.monthInc = 0; + o.dayInc = 0; + try { + datePickerController.removeEvent(document, "mouseup", o.events.clearTimer); + } catch(e) { }; + o.stopTimer(); + } + }; + o.onTimer = function() { + var d = new Date( o.date ); + + d.setDate( Math.min(d.getDate()+o.dayInc, datePicker.getDaysPerMonth(d.getMonth()+o.monthInc,d.getFullYear()+o.yearInc)) ); // no need to catch dec -> jan for the year + d.setMonth( d.getMonth() + o.monthInc ); + d.setFullYear( d.getFullYear() + o.yearInc ); + + o.date = d; + + if(o.timerInc > 50) { + o.timerInc = 50 + Math.round(((o.timerInc - 50) / 1.8)); + }; + o.startTimer(); + o.updateTable(); + }; + o.getElem = function() { + return document.getElementById(o.id.replace(/^fd-/, '')) || false; + }; + o.setRangeLow = function(range) { + if(String(range).search(/^(\d\d?\d\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$/) == -1) range = ''; + o.low = o.defaults.low = range; + }; + o.setRangeHigh = function(range) { + if(String(range).search(/^(\d\d?\d\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$/) == -1) range = ''; + o.high = o.defaults.high = range; + }; + o.setDisabledDays = function(dayArray) { + o.disableDays = o.defaults.disableDays = dayArray; + }; + o.setFirstDayOfWeek = function(e) { + if ( e == null ) e = document.parentWindow.event; + var elem = e.target != null ? e.target : e.srcElement; + + if(elem.tagName.toLowerCase() != "th") { + while(elem.tagName.toLowerCase() != "th") elem = elem.parentNode; + } + + var cnt = 0; + + while(elem.previousSibling) { + elem = elem.previousSibling; + if(elem.tagName.toLowerCase() == "th") cnt++; + } + + o.firstDayOfWeek = (o.firstDayOfWeek + cnt) % 7; + o.updateTable(); + + return o.killEvent(e); + }; + o.trueBody = function() { + return; + }; + o.resize = function() { + if(!o.created || !o.getElem()) return; + + o.div.style.visibility = "hidden"; + o.div.style.display = "block"; + + var osh = o.div.offsetHeight; + var osw = o.div.offsetWidth; + + o.div.style.visibility = "visible"; + o.div.style.display = "none"; + + var elem = document.getElementById('fd-but-' + o.id); + var pos = datePickerController.findPosition(elem); + var trueBody = (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body; + + if ( parseInt(trueBody.clientWidth+trueBody.scrollLeft) < parseInt(osw+pos[0])) { + o.div.style.left = Math.abs(parseInt((trueBody.clientWidth+trueBody.scrollLeft) - osw)) + "px"; + } else { + o.div.style.left = pos[0] + "px"; + }; + + if ( parseInt(trueBody.clientHeight+trueBody.scrollTop) < parseInt(osh+pos[1]+elem.offsetHeight+2)) { + o.div.style.top = Math.abs(parseInt(pos[1] - (osh + 2))) + "px"; + } else { + o.div.style.top = Math.abs(parseInt(pos[1] + elem.offsetHeight + 2)) + "px"; + }; + }; + o.equaliseDates = function() { + var clearDayFound = false; + var tmpDate; + for(var i = o.low; i <= o.high; i++) { + tmpDate = String(i); + if(!o.disableDays[new Date(tmpDate.substr(4,2) + '/' + tmpDate.substr(6,2) + '/' + tmpDate.substr(0,4)).getDay() - 1]) { + clearDayFound = true; + break; + }; + }; + if(!clearDayFound) o.disableDays = o.defaults.disableDays = [0,0,0,0,0,0,0]; + }; + o.outOfRange = function(tmpDate) { + if(!o.low && !o.high) return false; + + var level = false; + if(!tmpDate) { + level = true; + tmpDate = o.date; + }; + + var d = (tmpDate.getDate() < 10) ? "0" + tmpDate.getDate() : tmpDate.getDate(); + var m = ((tmpDate.getMonth() + 1) < 10) ? "0" + (tmpDate.getMonth() + 1) : tmpDate.getMonth() + 1; + var y = tmpDate.getFullYear(); + var dt = (y+' '+m+' '+d).replace(/ /g,''); + + if(o.low) { + if(parseInt(dt) < parseInt(o.low)) { + if(!level) return true; + o.date = new Date( o.low.substr(4,2) + '/' + o.low.substr(6,2) + '/' + o.low.substr(0,4) ); + return false; + }; + }; + if(o.high) { + if(parseInt(dt) > parseInt(o.high)) { + if(!level) return true; + o.date = new Date( o.high.substr(4,2) + '/' + o.high.substr(6,2) + '/' + o.high.substr(0,4) ); + }; + }; + return false; + }; + o.create = function() { + + /*@cc_on@*/ + /*@if(@_jscript_version <= 5.6) + if(!document.getElementById("iePopUpHack")) { + var loc = "./blank.html"; + var scriptFiles = document.getElementsByTagName('head')[0].getElementsByTagName('script'); + for(var i = 0, scriptFile; scriptFile = scriptFiles[i]; i++) { + if(scriptFile.src && scriptFile.src.match(/datepicker.js$/)) { + loc = scriptFile.src.replace("datepicker.js", "blank.html"); + break; + }; + }; + + o.iePopUp = document.createElement('iframe'); + o.iePopUp.src = loc; + o.iePopUp.setAttribute('className','iehack'); + o.iePopUp.scrolling="no"; + o.iePopUp.frameBorder="0"; + o.iePopUp.name = o.iePopUp.id = "iePopUpHack"; + document.body.appendChild(o.iePopUp); + } else { + o.iePopUp = document.getElementById("iePopUpHack"); + }; + /*@end@*/ + + if(typeof(fdLocale) == "object" && o.locale) { + datePicker.titles = fdLocale.titles; + datePicker.months = fdLocale.months; + datePicker.fullDay = fdLocale.fullDay; + // Optional parameters + if(fdLocale.dayAbbr) datePicker.dayAbbr = fdLocale.dayAbbr; + if(fdLocale.firstDayOfWeek) o.firstDayOfWeek = o.defaults.firstDayOfWeek = fdLocale.firstDayOfWeek; + }; + + o.div = document.createElement('div'); + o.div.style.zIndex = 9999; + o.div.id = "fd-"+o.id; + var tableBody = document.createElement('tbody'); + var tableHead = document.createElement('thead'); + var nbsp = String.fromCharCode( 160 ); + + o.table = document.createElement('table'); + o.div.className = "datePicker"; + + var tr = document.createElement('tr'); + var th = document.createElement('th'); + + // previous year + var tmpelem = document.createElement('button'); + tmpelem.setAttribute("type", "button"); + tmpelem.className = "prev-but"; + tmpelem.appendChild(document.createTextNode('\u00AB')); + tmpelem.title = datePicker.titles[2]; + tmpelem.onmousedown = function(e) { this.blur(); o.events.incDec(e,0,-1,0); }; + tmpelem.onmouseup = o.events.clearTimer; + th.appendChild( tmpelem ); + + // previous month + var tmpelem = document.createElement('button'); + tmpelem.setAttribute("type", "button"); + tmpelem.className = "prev-but"; + tmpelem.appendChild(document.createTextNode("\u2039")); + tmpelem.title = datePicker.titles[0]; + tmpelem.onmousedown = function(e) { this.blur(); o.events.incDec(e,0,0,-1); }; + tmpelem.onmouseup = o.events.clearTimer; + th.appendChild( tmpelem ); + tr.appendChild( th ); + + // title bar + o.titleBar = document.createElement('th'); + + /*@cc_on + /*@if (@_win32) + o.titleBar.setAttribute('colSpan','5'); + @else @*/ + o.titleBar.setAttribute('colspan','5'); + /*@end + @*/ + + o.titleBar.setAttribute('text-align','center'); + tr.appendChild( o.titleBar ); + + th = document.createElement('th'); + + // next month + var tmpelem = document.createElement('button'); + tmpelem.setAttribute("type", "button"); + tmpelem.className = "next-but"; + tmpelem.appendChild(document.createTextNode('\u203A')); + tmpelem.title = datePicker.titles[1]; + tmpelem.onmousedown = function(e) { this.blur(); o.events.incDec(e,0,0,1); }; + tmpelem.onmouseup = o.events.clearTimer; + + th.appendChild( tmpelem ); + + // next year + var tmpelem = document.createElement('button'); + tmpelem.setAttribute("type", "button"); + tmpelem.className = "next-but"; + tmpelem.appendChild(document.createTextNode('\u00BB')); + tmpelem.title = datePicker.titles[3]; + tmpelem.onmousedown = function(e) { this.blur(); o.events.incDec(e,0,1,0); }; + tmpelem.onmouseup = o.events.clearTimer; + th.appendChild( tmpelem ); + + tr.appendChild( th ); + + tableHead.appendChild(tr); + + var row, col; + + for(var rows = 0; rows < 7; rows++) { + row = document.createElement('tr'); + for(var cols = 0; cols < 7; cols++) { + col = (rows == 0) ? document.createElement('th') : document.createElement('td'); + if(rows != 0) { + col.appendChild(document.createTextNode(nbsp)); + } else { + col.className = "date-picker-day-header"; + col.scope = "col"; + }; + + row.appendChild(col); + } + if(rows != 0) tableBody.appendChild(row); + else tableHead.appendChild(row); + }; + o.table.appendChild( tableHead ); + o.table.appendChild( tableBody ); + + o.div.appendChild( o.table ); + o.created = true; + + document.getElementsByTagName('body')[0].appendChild( o.div ); + }; + o.setDateFromInput = function() { + o.dateSet = null; + + var elem = o.getElem(); + if(!elem) return; + + var date = elem.value; + + var d,m,y,dt,dates; + + d = o.format.replace(/-/g,'').indexOf('d'); + m = o.format.replace(/-/g,'').indexOf('m'); + y = o.format.replace(/-/g,'').indexOf('y'); + + if(o.splitDate) { + dates = []; + + dates[m] = document.getElementById(o.id+'-mm').value; + if(dates[m] < 1 || dates[m] > 12) dates[m] = ""; + + dates[d] = document.getElementById(o.id+'-dd').value; + if(dates[d] < 1 || dates[d] > datePicker.daysPerMonth[dates[m]-1]) dates[d] = ""; + + dates[y] = date; + } else { + if(date.match(/^[0-9]{4}$/)) { + if(date > 1600 && date < 2030) { + o.date.setFullYear(date); + return; + }; + }; + + dates = date.split(o.divider); + + if(dates.length != 3) { + o.date = new Date(); + return; + }; + }; + + var check = new Date( dates[y] + "/" + dates[m] + "/" + dates[d] ); + if(check == 'Invalid Date' /*@cc_on@*/ /*@if(@_win32) || check == 'NaN' /*@end@*/) { + o.date = new Date(); + return; + }; + + o.date.setMonth(dates[m]-1); + o.date.setFullYear(dates[y]); + o.date.setDate(dates[d]); + + o.dateSet = new Date(o.date); + }; + o.returnFormattedDate = function() { + var elem = o.getElem(); + if(!elem) return; + + var d = (o.date.getDate() < 10) ? "0" + o.date.getDate() : o.date.getDate(); + var m = ((o.date.getMonth() + 1) < 10) ? "0" + (o.date.getMonth() + 1) : o.date.getMonth() + 1; + var yyyy = o.date.getFullYear(); + + var weekDay = ( o.date.getDay() + 6 ) % 7; + + if(!(o.disableDays[weekDay])) { + if(o.splitDate) { + document.getElementById(o.id+"-dd").value = d; + document.getElementById(o.id+"-mm").value = m; + elem.value = yyyy; + + document.getElementById(o.id+"-dd").focus(); + if(document.getElementById(o.id+"-dd").onchange) document.getElementById(o.id+"-dd").onchange(); + if(document.getElementById(o.id+"-mm").onchange) document.getElementById(o.id+"-mm").onchange(); + } else { + elem.value = o.format.replace('y',yyyy).replace('m',m).replace('d',d).replace(/-/g,o.divider); + elem.focus(); + }; + if(elem.onchange) elem.onchange(); + }; + }; + // Credit where credit's due: + + // Most of the logic for this method from the webfx date-picker + // http://webfx.eae.net/ + + o.updateTable = function() { + + if(document.getElementById("date-picker-hover")) { + document.getElementById("date-picker-hover").id = ""; + }; + + var i; + var str = ""; + var rows = 6; + var cols = 7; + var currentWeek = 0; + var nbsp = String.fromCharCode( 160 ); + + var cells = new Array( rows ); + + for ( i = 0; i < rows; i++ ) { + cells[i] = new Array( cols ); + }; + + o.outOfRange(); + + // Set the tmpDate to this month + var tmpDate = new Date( o.date.getFullYear(), o.date.getMonth(), 1 ); + var today = new Date(); + + // titleBar + var titleText = datePicker.months[o.date.getMonth()] + nbsp + o.date.getFullYear(); + while(o.titleBar.firstChild) o.titleBar.removeChild(o.titleBar.firstChild); + o.titleBar.appendChild(document.createTextNode(titleText)); + + for ( i = 1; i < 32; i++ ) { + + tmpDate.setDate( i ); + var weekDay = ( tmpDate.getDay() + 6 ) % 7; + var colIndex = ( (weekDay - o.firstDayOfWeek) + 7 ) % 7; + var cell = { text:"", className:"", id:"" }; + + if ( tmpDate.getMonth() == o.date.getMonth() ) { + + cells[currentWeek][colIndex] = { text:"", className:"", id:"" }; + + var isToday = tmpDate.getDate() == today.getDate() && + tmpDate.getMonth() == today.getMonth() && + tmpDate.getFullYear() == today.getFullYear(); + + if ( o.dateSet != null && o.dateSet.getDate() == tmpDate.getDate() && o.dateSet.getMonth() == tmpDate.getMonth() && o.dateSet.getFullYear() == tmpDate.getFullYear()) { + cells[currentWeek][colIndex].className = "date-picker-selected-date"; + }; + if ( o.date.getDate() == tmpDate.getDate() && o.date.getFullYear() == tmpDate.getFullYear()) { + cells[currentWeek][colIndex].id = "date-picker-hover"; + }; + + if(o.highlightDays[weekDay]) { + cells[currentWeek][colIndex].className += " date-picker-highlight"; + }; + if ( isToday ) { + cells[currentWeek][colIndex].className = "date-picker-today"; + }; + if(o.outOfRange(tmpDate)) { + cells[currentWeek][colIndex].className = "out-of-range"; + } else if(o.disableDays[weekDay]) { + cells[currentWeek][colIndex].className = "day-disabled"; + }; + cells[currentWeek][colIndex].text = tmpDate.getDate(); + if ( colIndex == 6 ) currentWeek++; + }; + }; + + // Table headers + var lnk, d; + var ths = o.table.getElementsByTagName('thead')[0].getElementsByTagName('tr')[1].getElementsByTagName('th'); + for ( var y = 0; y < 7; y++ ) { + d = (o.firstDayOfWeek + y) % 7; + + while(ths[y].firstChild) ths[y].removeChild(ths[y].firstChild); + + ths[y].title = datePicker.fullDay[d]; + + // Don't create a button for the first day header + if(y > 0) { + but = document.createElement("BUTTON"); + but.className = "fd-day-header"; + but.onclick = but.onkeypress = ths[y].onclick = o.setFirstDayOfWeek; + but.appendChild(document.createTextNode(datePicker.dayAbbr ? datePicker.dayAbbr[d] : datePicker.fullDay[d].charAt(0))); + ths[y].appendChild(but); + but.title = datePicker.fullDay[d]; + } else { + ths[y].appendChild(document.createTextNode(datePicker.dayAbbr ? datePicker.dayAbbr[d] : datePicker.fullDay[d].charAt(0))); + ths[y].onclick = null; + }; + }; + + + var trs = o.table.getElementsByTagName('tbody')[0].getElementsByTagName('tr'); + + var tmpCell; + + for ( var y = 0; y < rows; y++ ) { + var tds = trs[y].getElementsByTagName('td'); + for (var x = 0; x < cols; x++) { + tmpCell = tds[x]; + + while(tmpCell.firstChild) tmpCell.removeChild(tmpCell.firstChild); + + if ( typeof cells[y][x] != "undefined" ) { + tmpCell.className = cells[y][x].className; + tmpCell.id = cells[y][x].id; + + tmpCell.appendChild(document.createTextNode(cells[y][x].text)); + + if(cells[y][x].className != "out-of-range") { + tmpCell.onmouseover = o.events.onmouseover; + tmpCell.onclick = cells[y][x].className == "day-disabled" ? o.killEvent : o.events.onclick; + tmpCell.title = datePicker.months[o.date.getMonth()] + nbsp + cells[y][x].text + "," + nbsp + o.date.getFullYear(); + } else { + tmpCell.onmouseover = null; + tmpCell.onclick = o.killEvent; + tmpCell.title = ""; + }; + } else { + tmpCell.className = ""; + tmpCell.id = ""; + tmpCell.onmouseover = null; + tmpCell.onclick = function(e) { return o.killEvent(e); }; + tmpCell.appendChild(document.createTextNode(nbsp)); + tmpCell.title = ""; + }; + }; + }; + }; + o.init = function() { + if(o.low && o.high && (o.high - o.low < 7)) { + o.equaliseDates(); + }; + o.resize(); + o.setDateFromInput(); + o.fade(); + o.ieHack(true); + }; + o.ieHack = function(cleanup) { + // IE hack + if(o.iePopUp) { + o.iePopUp.style.display = "block"; + o.iePopUp.style.top = (o.div.offsetTop + 2) + "px"; + o.iePopUp.style.left = o.div.offsetLeft + "px"; + o.iePopUp.style.width = o.div.clientWidth + "px"; + o.iePopUp.style.height = (o.div.clientHeight - 2) + "px"; + if(cleanup) o.iePopUp.style.display = "none"; + } + }; + o.show = function() { + var elem = o.getElem(); + if(!elem || o.visible || elem.disabled) return; + + o.reset(); + o.setDateFromInput(); + o.updateTable(); + o.resize(); + o.ieHack(false); + + datePickerController.addEvent(document, "mousedown", o.events.onmousedown); + datePickerController.addEvent(document, "keypress", o.events.onkeydown); + + // Internet Explorer requires the keydown event in order to catch arrow keys + + /*@cc_on@*/ + /*@if(@_win32) + datePickerController.removeEvent(document, "keypress", o.events.onkeydown); + datePickerController.addEvent(document, "keydown", o.events.onkeydown); + /*@end@*/ + + o.opacityTo = 90; + o.div.style.display = "block"; + o.ieHack(false); + o.fade(); + o.visible = true; + + }; + o.hide = function() { + try { + datePickerController.removeEvent(document, "mousedown", o.events.onmousedown); + datePickerController.removeEvent(document, "keypress", o.events.onkeydown); + datePickerController.removeEvent(document, "keydown", o.events.onkeydown); + } catch(e) { + + }; + if(o.iePopUp) { + o.iePopUp.style.display = "none"; + }; + o.opacityTo = 0; + o.fade(); + o.visible = false; + }; + o.create(); + o.init(); +}; + +datePickerController = { + datePickers: {}, + addEvent: function(obj, type, fn, tmp) { + tmp || (tmp = true); + if( obj.attachEvent ) { + obj["e"+type+fn] = fn; + obj[type+fn] = function(){obj["e"+type+fn]( window.event );}; + obj.attachEvent( "on"+type, obj[type+fn] ); + } else { + obj.addEventListener( type, fn, true ); + }; + }, + removeEvent: function(obj, type, fn, tmp) { + tmp || (tmp = true); + if( obj.detachEvent ) { + obj.detachEvent( "on"+type, obj[type+fn] ); + obj[type+fn] = null; + } else { + obj.removeEventListener( type, fn, true ); + }; + }, + findPosition: function(obj) { + var curleft = 0; + var curtop = 0; + var orig = obj; + + if(obj.offsetParent) { + while(obj.offsetParent) { + curleft += obj.offsetLeft; + curtop += obj.offsetTop; + obj = obj.offsetParent; + }; + } else if (obj.x) { + curleft += obj.x; + curtop += obj.y; + }; + return [ curleft, curtop ]; + }, + hideAll: function(exception) { + for(dp in datePickerController.datePickers) { + if(exception && exception == datePickerController.datePickers[dp].id) continue; + datePickerController.datePickers[dp].hide(); + }; + }, + cleanUp: function() { + var dp; + for(dp in datePickerController.datePickers) { + if(!document.getElementById(datePickerController.datePickers[dp].id)) { + dpElem = document.getElementById("fd-"+datePickerController.datePickers[dp].id); + if(dpElem) { + dpElem.parentNode.removeChild(dpElem); + }; + datePickerController.datePickers[dp] = null; + delete datePickerController.datePickers[dp]; + }; + }; + }, + dateFormat: function(dateIn, favourMDY) { + var dateTest = [ + { regExp:/^(0[1-9]|[12][0-9]|3[01])([- \/.])(0[1-9]|1[012])([- \/.])(\d\d?\d\d)$/, d:1, m:3, y:5 }, // dmy + { regExp:/^(0[1-9]|1[012])([- \/.])(0[1-9]|[12][0-9]|3[01])([- \/.])(\d\d?\d\d)$/, d:3, m:1, y:5 }, // mdy + { regExp:/^(\d\d?\d\d)([- \/.])(0[1-9]|1[012])([- \/.])(0[1-9]|[12][0-9]|3[01])$/, d:5, m:3, y:1 } // ymd + ]; + + var start; + var cnt = 0; + + while(cnt < 3) { + start = (cnt + (favourMDY ? 4 : 3)) % 3; + + if(dateIn.match(dateTest[start].regExp)) { + res = dateIn.match(dateTest[start].regExp); + y = res[dateTest[start].y]; + m = res[dateTest[start].m]; + d = res[dateTest[start].d]; + if(m.length == 1) m = "0" + m; + if(d.length == 1) d = "0" + d; + if(y.length != 4) y = (parseInt(y) < 50) ? '20' + y : '19' + y; + + return y+m+d; + }; + + cnt++; + }; + + return 0; + }, + create: function() { + if(!datePicker.isSupported) return; + + datePickerController.cleanUp(); + + var inputs = document.getElementsByTagName('input'); + + var regExp1 = /disable-days-([1-7]){1,6}/g; // the days to disable + var regExp3 = /highlight-days-([1-7]){1,7}/g; // the days to highlight in red + var regExp4 = /range-low-([0-9\-]){10}/g; // the lowest selectable date + var regExp5 = /range-high-([0-9\-]){10}/g; // the highest selectable date + var regExp6 = /format-([dmy\-]{5})/g; // the input/output date format + var regExp7 = /divider-(dot|slash|space|dash)/g; // the character used to divide the date + var regExp8 = /no-locale/g; // do not attempt to detect the browser language + + for(var i=0, inp; inp = inputs[i]; i++) { + if(inp.className && (inp.className.search(regExp6) != -1 || inp.className.search(/split-date/) != -1) && inp.type == "text" && inp.name) { + + if(!inp.id) { + // Internet explorer requires you to give each input a unique ID attribute. + if(document.getElementById(inp.name)) continue; + inp.id = inp.name; + }; + + var options = { + id:inp.id, + low:"", + high:"", + divider:"/", + format:"d-m-y", + highlightDays:[0,0,0,0,0,1,1], + disableDays:[0,0,0,0,0,0,0], + locale:inp.className.search(regExp8) == -1, + splitDate:0 + }; + + // Split the date into three parts ? + if(inp.className.search(/split-date/) != -1) { + if(document.getElementById(inp.id+'-dd') && document.getElementById(inp.id+'-mm') && document.getElementById(inp.id+'-dd').tagName.toLowerCase() == "input" && document.getElementById(inp.id+'-mm').tagName.toLowerCase() == "input") { + options.splitDate = 1; + }; + }; + + // Date format(variations of d-m-y) + if(inp.className.search(regExp6) != -1) { + options.format = inp.className.match(regExp6)[0].replace('format-',''); + }; + + // What divider to use, a "/", "-", "." or " " + if(inp.className.search(regExp7) != -1) { + var divider = inp.className.match(regExp7)[0].replace('divider-',''); + switch(divider.toLowerCase()) { + case "dot": + options.divider = "."; + break; + case "space": + options.divider = " "; + break; + case "dash": + options.divider = "-"; + break; + default: + options.divider = "/"; + }; + }; + + // The days to highlight + if(inp.className.search(regExp3) != -1) { + var tmp = inp.className.match(regExp3)[0].replace(/highlight-days-/, ''); + options.highlightDays = [0,0,0,0,0,0,0]; + for(var j = 0; j < tmp.length; j++) { + options.highlightDays[tmp.charAt(j) - 1] = 1; + }; + }; + + // The days to disable + if(inp.className.search(regExp1) != -1) { + var tmp = inp.className.match(regExp1)[0].replace(/disable-days-/, ''); + options.disableDays = [0,0,0,0,0,0,0]; + for(var j = 0; j < tmp.length; j++) { + options.disableDays[tmp.charAt(j) - 1] = 1; + }; + }; + + // The lower limit + if(inp.className.search(regExp4) != -1) { + options.low = datePickerController.dateFormat(inp.className.match(regExp4)[0].replace(/range-low-/, ''), options.format.charAt(0) == "m"); + if(options.low == 0) { + options.low = ''; + }; + }; + + // The higher limit + if(inp.className.search(regExp5) != -1) { + options.high = datePickerController.dateFormat(inp.className.match(regExp5)[0].replace(/range-high-/, ''), options.format.charAt(0) == "m"); + if(options.high == 0) { + options.high = ''; + }; + }; + + // Datepicker is already created so reset it's defaults + if(document.getElementById('fd-'+inp.id)) { + for(var opt in options) { + datePickerController.datePickers[inp.id].defaults[opt] = options[opt]; + }; + }; + + // Create the button (if needs be) + if(!document.getElementById("fd-but-" + inp.id)) { + var but = document.createElement('button'); + but.setAttribute("type", "button"); + but.className = "date-picker-control"; + + but.id = "fd-but-" + inp.id; + but.appendChild(document.createTextNode(String.fromCharCode( 160 ))); + + if(inp.nextSibling) { + inp.parentNode.insertBefore(but, inp.nextSibling); + } else { + inp.parentNode.appendChild(but); + }; + + } else { + var but = document.getElementById("fd-but-" + inp.id); + }; + + // Add button events + but.onclick = but.onpress = function() { + var inpId = this.id.replace('fd-but-',''); + + datePickerController.hideAll(inpId); + if(inpId in datePickerController.datePickers && !datePickerController.datePickers[inpId].visible) { + datePickerController.datePickers[inpId].show(); + }; + return false; + }; + + // Create the datePicker (if needs be) + if(!document.getElementById('fd-'+inp.id)) { + datePickerController.datePickers[inp.id] = new datePicker(options); + }; + }; + }; + } + +}; + + +})(); + +datePickerController.addEvent(window, 'load', datePickerController.create); + diff --git a/src/usr/local/www/javascript/datepicker/media/bg_header.jpg b/src/usr/local/www/javascript/datepicker/media/bg_header.jpg new file mode 100755 index 0000000..10dbd74 Binary files /dev/null and b/src/usr/local/www/javascript/datepicker/media/bg_header.jpg differ diff --git a/src/usr/local/www/javascript/datepicker/media/bullet1.gif b/src/usr/local/www/javascript/datepicker/media/bullet1.gif new file mode 100755 index 0000000..ae352c2 Binary files /dev/null and b/src/usr/local/www/javascript/datepicker/media/bullet1.gif differ diff --git a/src/usr/local/www/javascript/datepicker/media/bullet2.gif b/src/usr/local/www/javascript/datepicker/media/bullet2.gif new file mode 100755 index 0000000..04b293d Binary files /dev/null and b/src/usr/local/www/javascript/datepicker/media/bullet2.gif differ diff --git a/src/usr/local/www/javascript/datepicker/media/cal.gif b/src/usr/local/www/javascript/datepicker/media/cal.gif new file mode 100755 index 0000000..8526cf5 Binary files /dev/null and b/src/usr/local/www/javascript/datepicker/media/cal.gif differ diff --git a/src/usr/local/www/javascript/datepicker/media/gradient-e5e5e5-ffffff.gif b/src/usr/local/www/javascript/datepicker/media/gradient-e5e5e5-ffffff.gif new file mode 100755 index 0000000..72a0d3e Binary files /dev/null and b/src/usr/local/www/javascript/datepicker/media/gradient-e5e5e5-ffffff.gif differ diff --git a/src/usr/local/www/javascript/domTT/LICENSE b/src/usr/local/www/javascript/domTT/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/src/usr/local/www/javascript/domTT/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/usr/local/www/javascript/domTT/behaviour.js b/src/usr/local/www/javascript/domTT/behaviour.js new file mode 100644 index 0000000..21b28d7 --- /dev/null +++ b/src/usr/local/www/javascript/domTT/behaviour.js @@ -0,0 +1,254 @@ +/* + Behaviour v1.1 by Ben Nolan, June 2005. Based largely on the work + of Simon Willison (see comments by Simon below). + + Description: + + Uses css selectors to apply javascript behaviours to enable + unobtrusive javascript in html documents. + + Usage: + + var myrules = { + 'b.someclass' : function(element){ + element.onclick = function(){ + alert(this.innerHTML); + } + }, + '#someid u' : function(element){ + element.onmouseover = function(){ + this.innerHTML = "BLAH!"; + } + } + }; + + Behaviour.register(myrules); + + // Call Behaviour.apply() to re-apply the rules (if you + // update the dom, etc). + + License: + + This file is entirely BSD licensed. + + More information: + + http://ripcord.co.nz/behaviour/ + +*/ + +var Behaviour = { + list : new Array, + + register : function(sheet){ + Behaviour.list.push(sheet); + }, + + start : function(){ + Behaviour.addLoadEvent(function(){ + Behaviour.apply(); + }); + }, + + apply : function(){ + for (h=0;sheet=Behaviour.list[h];h++){ + for (selector in sheet){ + list = document.getElementsBySelector(selector); + + if (!list){ + continue; + } + + for (i=0;element=list[i];i++){ + sheet[selector](element); + } + } + } + }, + + addLoadEvent : function(func){ + var oldonload = window.onload; + + if (typeof window.onload != 'function') { + window.onload = func; + } else { + window.onload = function() { + oldonload(); + func(); + }; + } + } +}; + +Behaviour.start(); + +/* + The following code is Copyright (C) Simon Willison 2004. + + document.getElementsBySelector(selector) + - returns an array of element objects from the current document + matching the CSS selector. Selectors can contain element names, + class names and ids and can be nested. For example: + + elements = document.getElementsBySelect('div#main p a.external') + + Will return an array of all 'a' elements with 'external' in their + class attribute that are contained inside 'p' elements that are + contained inside the 'div' element which has id="main" + + New in version 0.4: Support for CSS2 and CSS3 attribute selectors: + See http://www.w3.org/TR/css3-selectors/#attribute-selectors + + Version 0.4 - Simon Willison, March 25th 2003 + -- Works in Phoenix 0.5, Mozilla 1.3, Opera 7, Internet Explorer 6, Internet Explorer 5 on Windows + -- Opera 7 fails +*/ + +function getAllChildren(e) { + // Returns all children of element. Workaround required for IE5/Windows. Ugh. + return e.all ? e.all : e.getElementsByTagName('*'); +} + +document.getElementsBySelector = function(selector) { + // Attempt to fail gracefully in lesser browsers + if (!document.getElementsByTagName) { + return new Array(); + } + // Split selector in to tokens + var tokens = selector.split(' '); + var currentContext = new Array(document); + for (var i = 0; i < tokens.length; i++) { + token = tokens[i].replace(/^\s+/,'').replace(/\s+$/,''); + if (token.indexOf('#') > -1) { + // Token is an ID selector + var bits = token.split('#'); + var tagName = bits[0]; + var id = bits[1]; + var element = document.getElementById(id); + if (tagName && element.nodeName.toLowerCase() != tagName) { + // tag with that ID not found, return false + return new Array(); + } + // Set currentContext to contain just this element + currentContext = new Array(element); + continue; // Skip to next token + } + if (token.indexOf('.') > -1) { + // Token contains a class selector + var bits = token.split('.'); + var tagName = bits[0]; + var className = bits[1]; + if (!tagName) { + tagName = '*'; + } + // Get elements matching tag, filter them for class selector + var found = new Array; + var foundCount = 0; + for (var h = 0; h < currentContext.length; h++) { + var elements; + if (tagName == '*') { + elements = getAllChildren(currentContext[h]); + } else { + elements = currentContext[h].getElementsByTagName(tagName); + } + for (var j = 0; j < elements.length; j++) { + found[foundCount++] = elements[j]; + } + } + currentContext = new Array; + var currentContextIndex = 0; + for (var k = 0; k < found.length; k++) { + if (found[k].className && found[k].className.match(new RegExp('\\b'+className+'\\b'))) { + currentContext[currentContextIndex++] = found[k]; + } + } + continue; // Skip to next token + } + // Code to deal with attribute selectors + if (token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)) { + var tagName = RegExp.$1; + var attrName = RegExp.$2; + var attrOperator = RegExp.$3; + var attrValue = RegExp.$4; + if (!tagName) { + tagName = '*'; + } + // Grab all of the tagName elements within current context + var found = new Array; + var foundCount = 0; + for (var h = 0; h < currentContext.length; h++) { + var elements; + if (tagName == '*') { + elements = getAllChildren(currentContext[h]); + } else { + elements = currentContext[h].getElementsByTagName(tagName); + } + for (var j = 0; j < elements.length; j++) { + found[foundCount++] = elements[j]; + } + } + currentContext = new Array; + var currentContextIndex = 0; + var checkFunction; // This function will be used to filter the elements + switch (attrOperator) { + case '=': // Equality + checkFunction = function(e) { return (e.getAttribute(attrName) == attrValue); }; + break; + case '~': // Match one of space separated words + checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b'))); }; + break; + case '|': // Match start with value followed by optional hyphen + checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?'))); }; + break; + case '^': // Match starts with value + checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) == 0); }; + break; + case '$': // Match ends with value - fails with "Warning" in Opera 7 + checkFunction = function(e) { return (e.getAttribute(attrName).lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length); }; + break; + case '*': // Match ends with value + checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) > -1); }; + break; + default : + // Just test for existence of attribute + checkFunction = function(e) { return e.getAttribute(attrName); }; + } + currentContext = new Array; + var currentContextIndex = 0; + for (var k = 0; k < found.length; k++) { + if (checkFunction(found[k])) { + currentContext[currentContextIndex++] = found[k]; + } + } + // alert('Attribute Selector: '+tagName+' '+attrName+' '+attrOperator+' '+attrValue); + continue; // Skip to next token + } + + if (!currentContext[0]){ + return; + } + + // If we get here, token is JUST an element (not a class or ID selector) + tagName = token; + var found = new Array; + var foundCount = 0; + for (var h = 0; h < currentContext.length; h++) { + var elements = currentContext[h].getElementsByTagName(tagName); + for (var j = 0; j < elements.length; j++) { + found[foundCount++] = elements[j]; + } + } + currentContext = found; + } + return currentContext; +} + +/* That revolting regular expression explained +/^(\w+)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/ + \---/ \---/\-------------/ \-------/ + | | | | + | | | The value + | | ~,|,^,$,* or = + | Attribute + Tag +*/ diff --git a/src/usr/local/www/javascript/domTT/domLib.js b/src/usr/local/www/javascript/domTT/domLib.js new file mode 100644 index 0000000..9a51a34 --- /dev/null +++ b/src/usr/local/www/javascript/domTT/domLib.js @@ -0,0 +1,706 @@ +/** $Id: domLib.js 2321 2006-06-12 06:45:41Z dallen $ */ +// {{{ license + +/* + * Copyright 2002-2005 Dan Allen, Mojavelinux.com (dan.allen@mojavelinux.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// }}} +// {{{ intro + +/** + * Title: DOM Library Core + * Version: 0.70 + * + * Summary: + * A set of commonly used functions that make it easier to create javascript + * applications that rely on the DOM. + * + * Updated: 2005/05/17 + * + * Maintainer: Dan Allen + * Maintainer: Jason Rust + * + * License: Apache 2.0 + */ + +// }}} +// {{{ global constants (DO NOT EDIT) + +// -- Browser Detection -- +var domLib_userAgent = navigator.userAgent.toLowerCase(); +var domLib_isMac = navigator.appVersion.indexOf('Mac') != -1; +var domLib_isWin = domLib_userAgent.indexOf('windows') != -1; +// NOTE: could use window.opera for detecting Opera +var domLib_isOpera = domLib_userAgent.indexOf('opera') != -1; +var domLib_isOpera7up = domLib_userAgent.match(/opera.(7|8)/i); +var domLib_isSafari = domLib_userAgent.indexOf('safari') != -1; +var domLib_isKonq = domLib_userAgent.indexOf('konqueror') != -1; +// Both konqueror and safari use the khtml rendering engine +var domLib_isKHTML = (domLib_isKonq || domLib_isSafari || domLib_userAgent.indexOf('khtml') != -1); +var domLib_isIE = (!domLib_isKHTML && !domLib_isOpera && (domLib_userAgent.indexOf('msie 5') != -1 || domLib_userAgent.indexOf('msie 6') != -1 || domLib_userAgent.indexOf('msie 7') != -1 || domLib_userAgent.indexOf('msie 8') != -1)); +var domLib_isIE5up = domLib_isIE; +var domLib_isIE50 = (domLib_isIE && domLib_userAgent.indexOf('msie 5.0') != -1); +var domLib_isIE55 = (domLib_isIE && domLib_userAgent.indexOf('msie 5.5') != -1); +var domLib_isIE5 = (domLib_isIE50 || domLib_isIE55); +// safari and konq may use string "khtml, like gecko", so check for destinctive / +var domLib_isGecko = domLib_userAgent.indexOf('gecko/') != -1; +var domLib_isMacIE = (domLib_isIE && domLib_isMac); +var domLib_isIE55up = domLib_isIE5up && !domLib_isIE50 && !domLib_isMacIE; +var domLib_isIE6up = domLib_isIE55up && !domLib_isIE55; + +// -- Browser Abilities -- +var domLib_standardsMode = (document.compatMode && document.compatMode == 'CSS1Compat'); +var domLib_useLibrary = (domLib_isOpera7up || domLib_isKHTML || domLib_isIE5up || domLib_isGecko || domLib_isMacIE || document.defaultView); +// fixed in Konq3.2 +var domLib_hasBrokenTimeout = (domLib_isMacIE || (domLib_isKonq && domLib_userAgent.match(/konqueror\/3.([2-9])/) == null)); +var domLib_canFade = (domLib_isGecko || domLib_isIE || domLib_isSafari || domLib_isOpera); +var domLib_canDrawOverSelect = (domLib_isMac || domLib_isOpera || domLib_isGecko); +var domLib_canDrawOverFlash = (domLib_isMac || domLib_isWin); + +// -- Event Variables -- +var domLib_eventTarget = domLib_isIE ? 'srcElement' : 'currentTarget'; +var domLib_eventButton = domLib_isIE ? 'button' : 'which'; +var domLib_eventTo = domLib_isIE ? 'toElement' : 'relatedTarget'; +var domLib_stylePointer = domLib_isIE ? 'hand' : 'pointer'; +// NOTE: a bug exists in Opera that prevents maxWidth from being set to 'none', so we make it huge +var domLib_styleNoMaxWidth = domLib_isOpera ? '10000px' : 'none'; +var domLib_hidePosition = '-1000px'; +var domLib_scrollbarWidth = 14; +var domLib_autoId = 1; +var domLib_zIndex = 1010; + +// -- Detection -- +var domLib_collisionElements; +var domLib_collisionsCached = false; + +var domLib_timeoutStateId = 0; +var domLib_timeoutStates = new domTT_Hash(); + +// }}} +// {{{ DOM enhancements + +if (!document.ELEMENT_NODE) +{ + document.ELEMENT_NODE = 1; + document.ATTRIBUTE_NODE = 2; + document.TEXT_NODE = 3; + document.DOCUMENT_NODE = 9; + document.DOCUMENT_FRAGMENT_NODE = 11; +} + +function domLib_clone(obj) +{ + var copy = {}; + for (var i in obj) + { + var value = obj[i]; + try + { + if (value != null && typeof(value) == 'object' && value != window && !value.nodeType) + { + copy[i] = domLib_clone(value); + } + else + { + copy[i] = value; + } + } + catch(e) + { + copy[i] = value; + } + } + + return copy; +} + +// }}} +// {{{ class domTT_Hash() + +function domTT_Hash() +{ + this.length = 0; + this.numericLength = 0; + this.elementData = []; + for (var i = 0; i < arguments.length; i += 2) + { + if (typeof(arguments[i + 1]) != 'undefined') + { + this.elementData[arguments[i]] = arguments[i + 1]; + this.length++; + if (arguments[i] == parseInt(arguments[i])) + { + this.numericLength++; + } + } + } +} + +// using prototype as opposed to inner functions saves on memory +domTT_Hash.prototype.get = function(in_key) +{ + if (typeof(this.elementData[in_key]) != 'undefined') { + return this.elementData[in_key]; + } + + return null; +}; + +domTT_Hash.prototype.set = function(in_key, in_value) +{ + if (typeof(in_value) != 'undefined') + { + if (typeof(this.elementData[in_key]) == 'undefined') + { + this.length++; + if (in_key == parseInt(in_key)) + { + this.numericLength++; + } + } + + return this.elementData[in_key] = in_value; + } + + return false; +}; + +domTT_Hash.prototype.remove = function(in_key) +{ + var tmp_value; + if (typeof(this.elementData[in_key]) != 'undefined') + { + this.length--; + if (in_key == parseInt(in_key)) + { + this.numericLength--; + } + + tmp_value = this.elementData[in_key]; + delete this.elementData[in_key]; + } + + return tmp_value; +}; + +domTT_Hash.prototype.size = function() +{ + return this.length; +}; + +domTT_Hash.prototype.has = function(in_key) +{ + return typeof(this.elementData[in_key]) != 'undefined'; +}; + +domTT_Hash.prototype.find = function(in_obj) +{ + for (var tmp_key in this.elementData) + { + if (this.elementData[tmp_key] == in_obj) + { + return tmp_key; + } + } + + return null; +}; + +domTT_Hash.prototype.merge = function(in_hash) +{ + for (var tmp_key in in_hash.elementData) + { + if (typeof(this.elementData[tmp_key]) == 'undefined') + { + this.length++; + if (tmp_key == parseInt(tmp_key)) + { + this.numericLength++; + } + } + + this.elementData[tmp_key] = in_hash.elementData[tmp_key]; + } +}; + +domTT_Hash.prototype.compare = function(in_hash) +{ + if (this.length != in_hash.length) + { + return false; + } + + for (var tmp_key in this.elementData) + { + if (this.elementData[tmp_key] != in_hash.elementData[tmp_key]) + { + return false; + } + } + + return true; +}; + +// }}} +// {{{ domLib_isDescendantOf() + +function domLib_isDescendantOf(in_object, in_ancestor, in_bannedTags) +{ + if (in_object == null) + { + return false; + } + + if (in_object == in_ancestor) + { + return true; + } + + if (typeof(in_bannedTags) != 'undefined' && + (',' + in_bannedTags.join(',') + ',').indexOf(',' + in_object.tagName + ',') != -1) + { + return false; + } + + while (in_object != document.documentElement) + { + try + { + if ((tmp_object = in_object.offsetParent) && tmp_object == in_ancestor) + { + return true; + } + else if ((tmp_object = in_object.parentNode) == in_ancestor) + { + return true; + } + else + { + in_object = tmp_object; + } + } + // in case we get some wierd error, assume we left the building + catch(e) + { + return false; + } + } + + return false; +} + +// }}} +// {{{ domLib_detectCollisions() + +/** + * For any given target element, determine if elements on the page + * are colliding with it that do not obey the rules of z-index. + */ +function domLib_detectCollisions(in_object, in_recover, in_useCache) +{ + // the reason for the cache is that if the root menu is built before + // the page is done loading, then it might not find all the elements. + // so really the only time you don't use cache is when building the + // menu as part of the page load + if (!domLib_collisionsCached) + { + var tags = []; + + if (!domLib_canDrawOverFlash) + { + tags[tags.length] = 'object'; + } + + if (!domLib_canDrawOverSelect) + { + tags[tags.length] = 'select'; + } + + domLib_collisionElements = domLib_getElementsByTagNames(tags, true); + domLib_collisionsCached = in_useCache; + } + + // if we don't have a tip, then unhide selects + if (in_recover) + { + for (var cnt = 0; cnt < domLib_collisionElements.length; cnt++) + { + var thisElement = domLib_collisionElements[cnt]; + + if (!thisElement.hideList) + { + thisElement.hideList = new domTT_Hash(); + } + + thisElement.hideList.remove(in_object.id); + if (!thisElement.hideList.length) + { + domLib_collisionElements[cnt].style.visibility = 'visible'; + if (domLib_isKonq) + { + domLib_collisionElements[cnt].style.display = ''; + } + } + } + + return; + } + else if (domLib_collisionElements.length == 0) + { + return; + } + + // okay, we have a tip, so hunt and destroy + var objectOffsets = domLib_getOffsets(in_object); + + for (var cnt = 0; cnt < domLib_collisionElements.length; cnt++) + { + var thisElement = domLib_collisionElements[cnt]; + + // if collision element is in active element, move on + // WARNING: is this too costly? + if (domLib_isDescendantOf(thisElement, in_object)) + { + continue; + } + + // konqueror only has trouble with multirow selects + if (domLib_isKonq && + thisElement.tagName == 'SELECT' && + (thisElement.size <= 1 && !thisElement.multiple)) + { + continue; + } + + if (!thisElement.hideList) + { + thisElement.hideList = new domTT_Hash(); + } + + var selectOffsets = domLib_getOffsets(thisElement); + var center2centerDistance = Math.sqrt(Math.pow(selectOffsets.get('leftCenter') - objectOffsets.get('leftCenter'), 2) + Math.pow(selectOffsets.get('topCenter') - objectOffsets.get('topCenter'), 2)); + var radiusSum = selectOffsets.get('radius') + objectOffsets.get('radius'); + // the encompassing circles are overlapping, get in for a closer look + if (center2centerDistance < radiusSum) + { + // tip is left of select + if ((objectOffsets.get('leftCenter') <= selectOffsets.get('leftCenter') && objectOffsets.get('right') < selectOffsets.get('left')) || + // tip is right of select + (objectOffsets.get('leftCenter') > selectOffsets.get('leftCenter') && objectOffsets.get('left') > selectOffsets.get('right')) || + // tip is above select + (objectOffsets.get('topCenter') <= selectOffsets.get('topCenter') && objectOffsets.get('bottom') < selectOffsets.get('top')) || + // tip is below select + (objectOffsets.get('topCenter') > selectOffsets.get('topCenter') && objectOffsets.get('top') > selectOffsets.get('bottom'))) + { + thisElement.hideList.remove(in_object.id); + if (!thisElement.hideList.length) + { + thisElement.style.visibility = 'visible'; + if (domLib_isKonq) + { + thisElement.style.display = ''; + } + } + } + else + { + thisElement.hideList.set(in_object.id, true); + thisElement.style.visibility = 'hidden'; + if (domLib_isKonq) + { + thisElement.style.display = 'none'; + } + } + } + } +} + +// }}} +// {{{ domLib_getOffsets() + +function domLib_getOffsets(in_object, in_preserveScroll) +{ + if (typeof(in_preserveScroll) == 'undefined') { + in_preserveScroll = false; + } + + var originalObject = in_object; + var originalWidth = in_object.offsetWidth; + var originalHeight = in_object.offsetHeight; + var offsetLeft = 0; + var offsetTop = 0; + + while (in_object) + { + offsetLeft += in_object.offsetLeft; + offsetTop += in_object.offsetTop; + in_object = in_object.offsetParent; + // consider scroll offset of parent elements + if (in_object && !in_preserveScroll) + { + offsetLeft -= in_object.scrollLeft; + offsetTop -= in_object.scrollTop; + } + } + + // MacIE misreports the offsets (even with margin: 0 in body{}), still not perfect + if (domLib_isMacIE) { + offsetLeft += 10; + offsetTop += 10; + } + + return new domTT_Hash( + 'left', offsetLeft, + 'top', offsetTop, + 'right', offsetLeft + originalWidth, + 'bottom', offsetTop + originalHeight, + 'leftCenter', offsetLeft + originalWidth/2, + 'topCenter', offsetTop + originalHeight/2, + 'radius', Math.max(originalWidth, originalHeight) + ); +} + +// }}} +// {{{ domLib_setTimeout() + +function domLib_setTimeout(in_function, in_timeout, in_args) +{ + if (typeof(in_args) == 'undefined') + { + in_args = []; + } + + if (in_timeout == -1) + { + // timeout event is disabled + return 0; + } + else if (in_timeout == 0) + { + in_function(in_args); + return 0; + } + + // must make a copy of the arguments so that we release the reference + var args = domLib_clone(in_args); + + if (!domLib_hasBrokenTimeout) + { + return setTimeout(function() { in_function(args); }, in_timeout); + } + else + { + var id = domLib_timeoutStateId++; + var data = new domTT_Hash(); + data.set('function', in_function); + data.set('args', args); + domLib_timeoutStates.set(id, data); + + data.set('timeoutId', setTimeout('domLib_timeoutStates.get(' + id + ').get(\'function\')(domLib_timeoutStates.get(' + id + ').get(\'args\')); domLib_timeoutStates.remove(' + id + ');', in_timeout)); + return id; + } +} + +// }}} +// {{{ domLib_clearTimeout() + +function domLib_clearTimeout(in_id) +{ + if (!domLib_hasBrokenTimeout) + { + if (in_id > 0) { + clearTimeout(in_id); + } + } + else + { + if (domLib_timeoutStates.has(in_id)) + { + clearTimeout(domLib_timeoutStates.get(in_id).get('timeoutId')); + domLib_timeoutStates.remove(in_id); + } + } +} + +// }}} +// {{{ domLib_getEventPosition() + +function domLib_getEventPosition(in_eventObj) +{ + var eventPosition = new domTT_Hash('x', 0, 'y', 0, 'scrollX', 0, 'scrollY', 0); + + // IE varies depending on standard compliance mode + if (domLib_isIE) + { + var doc = (domLib_standardsMode ? document.documentElement : document.body); + // NOTE: events may fire before the body has been loaded + if (doc) + { + eventPosition.set('x', in_eventObj.clientX + doc.scrollLeft); + eventPosition.set('y', in_eventObj.clientY + doc.scrollTop); + eventPosition.set('scrollX', doc.scrollLeft); + eventPosition.set('scrollY', doc.scrollTop); + } + } + else + { + eventPosition.set('x', in_eventObj.pageX); + eventPosition.set('y', in_eventObj.pageY); + eventPosition.set('scrollX', in_eventObj.pageX - in_eventObj.clientX); + eventPosition.set('scrollY', in_eventObj.pageY - in_eventObj.clientY); + } + + return eventPosition; +} + +// }}} +// {{{ domLib_cancelBubble() + +function domLib_cancelBubble(in_event) +{ + var eventObj = in_event ? in_event : window.event; + eventObj.cancelBubble = true; +} + +// }}} +// {{{ domLib_getIFrameReference() + +function domLib_getIFrameReference(in_frame) +{ + if (domLib_isGecko || domLib_isIE) + { + return in_frame.frameElement; + } + else + { + // we could either do it this way or require an id on the frame + // equivalent to the name + var name = in_frame.name; + if (!name || !in_frame.parent) + { + return null; + } + + var candidates = in_frame.parent.document.getElementsByTagName('iframe'); + for (var i = 0; i < candidates.length; i++) + { + if (candidates[i].name == name) + { + return candidates[i]; + } + } + + return null; + } +} + +// }}} +// {{{ domLib_getElementsByClass() + +function domLib_getElementsByClass(in_class) +{ + var elements = domLib_isIE5 ? document.all : document.getElementsByTagName('*'); + var matches = []; + var cnt = 0; + for (var i = 0; i < elements.length; i++) + { + if ((" " + elements[i].className + " ").indexOf(" " + in_class + " ") != -1) + { + matches[cnt++] = elements[i]; + } + } + + return matches; +} + +// }}} +// {{{ domLib_getElementsByTagNames() + +function domLib_getElementsByTagNames(in_list, in_excludeHidden) +{ + var elements = []; + for (var i = 0; i < in_list.length; i++) + { + var matches = document.getElementsByTagName(in_list[i]); + for (var j = 0; j < matches.length; j++) + { + // skip objects that have nested embeds, or else we get "flashing" + if (matches[j].tagName == 'OBJECT' && domLib_isGecko) + { + var kids = matches[j].childNodes; + var skip = false; + for (var k = 0; k < kids.length; k++) + { + if (kids[k].tagName == 'EMBED') + { + skip = true; + break; + } + } + if (skip) continue; + } + + if (in_excludeHidden && domLib_getComputedStyle(matches[j], 'visibility') == 'hidden') + { + continue; + } + + elements[elements.length] = matches[j]; + } + } + + return elements; +} + +// }}} +// {{{ domLib_getComputedStyle() + +function domLib_getComputedStyle(in_obj, in_property) +{ + if (domLib_isIE) + { + var humpBackProp = in_property.replace(/-(.)/, function (a, b) { return b.toUpperCase(); }); + return eval('in_obj.currentStyle.' + humpBackProp); + } + // getComputedStyle() is broken in konqueror, so let's go for the style object + else if (domLib_isKonq) + { + //var humpBackProp = in_property.replace(/-(.)/, function (a, b) { return b.toUpperCase(); }); + return eval('in_obj.style.' + in_property); + } + else + { + return document.defaultView.getComputedStyle(in_obj, null).getPropertyValue(in_property); + } +} + +// }}} +// {{{ makeTrue() + +function makeTrue() +{ + return true; +} + +// }}} +// {{{ makeFalse() + +function makeFalse() +{ + return false; +} + +// }}} diff --git a/src/usr/local/www/javascript/domTT/domTT.js b/src/usr/local/www/javascript/domTT/domTT.js new file mode 100644 index 0000000..fc9bf6a --- /dev/null +++ b/src/usr/local/www/javascript/domTT/domTT.js @@ -0,0 +1,1132 @@ +/** $Id: domTT.js 2324 2006-06-12 07:06:39Z dallen $ */ +// {{{ license + +/* + * Copyright 2002-2005 Dan Allen, Mojavelinux.com (dan.allen@mojavelinux.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// }}} +// {{{ intro + +/** + * Title: DOM Tooltip Library + * Version: 0.7.3 + * + * Summary: + * Allows developers to add custom tooltips to the webpages. Tooltips are + * generated using the domTT_activate() function and customized by setting + * a handful of options. + * + * Maintainer: Dan Allen + * Contributors: + * Josh Gross + * Jason Rust + * + * License: Apache 2.0 + * However, if you use this library, you earn the position of official bug + * reporter :) Please post questions or problem reports to the newsgroup: + * + * http://groups-beta.google.com/group/dom-tooltip + * + * If you are doing this for commercial work, perhaps you could send me a few + * Starbucks Coffee gift dollars or PayPal bucks to encourage future + * developement (NOT REQUIRED). E-mail me for my snail mail address. + + * + * Homepage: http://www.mojavelinux.com/projects/domtooltip/ + * + * Newsgroup: http://groups-beta.google.com/group/dom-tooltip + * + * Freshmeat Project: http://freshmeat.net/projects/domtt/?topic_id=92 + * + * Updated: 2005/07/16 + * + * Supported Browsers: + * Mozilla (Gecko), IE 5.5+, IE on Mac, Safari, Konqueror, Opera 7 + * + * Usage: + * Please see the HOWTO documentation. +**/ + +// }}} +// {{{ settings (editable) + +// IE mouse events seem to be off by 2 pixels +var domTT_offsetX = (domLib_isIE ? -2 : 0); +var domTT_offsetY = (domLib_isIE ? 4 : 2); +var domTT_direction = 'southeast'; +var domTT_mouseHeight = domLib_isIE ? 13 : 19; +var domTT_closeLink = 'X'; +var domTT_closeAction = 'hide'; +var domTT_activateDelay = 500; +var domTT_maxWidth = false; +var domTT_styleClass = 'domTT'; +var domTT_fade = 'neither'; +var domTT_lifetime = 0; +var domTT_grid = 0; +var domTT_trailDelay = 200; +var domTT_useGlobalMousePosition = true; +var domTT_postponeActivation = false; +var domTT_tooltipIdPrefix = '[domTT]'; +var domTT_screenEdgeDetection = true; +var domTT_screenEdgePadding = 4; +var domTT_oneOnly = false; +var domTT_cloneNodes = false; +var domTT_detectCollisions = true; +var domTT_bannedTags = ['OPTION']; +var domTT_draggable = false; +if (typeof(domTT_dragEnabled) == 'undefined') +{ + domTT_dragEnabled = false; +} + +// }}} +// {{{ globals (DO NOT EDIT) + +var domTT_predefined = new domTT_Hash(); +// tooltips are keyed on both the tip id and the owner id, +// since events can originate on either object +var domTT_tooltips = new domTT_Hash(); +var domTT_lastOpened = 0; +var domTT_documentLoaded = false; +var domTT_mousePosition = null; + +// }}} +// {{{ document.onmousemove + +if (domLib_useLibrary && domTT_useGlobalMousePosition) +{ + document.onmousemove = function(in_event) + { + if (typeof(in_event) == 'undefined') { in_event = window.event; } + + domTT_mousePosition = domLib_getEventPosition(in_event); + if (domTT_dragEnabled && domTT_dragMouseDown) + { + domTT_dragUpdate(in_event); + } + }; +} + +// }}} +// {{{ domTT_activate() + +function domTT_activate(in_this, in_event) +{ + if (!domLib_useLibrary || (domTT_postponeActivation && !domTT_documentLoaded)) { return false; } + + // make sure in_event is set (for IE, some cases we have to use window.event) + if (typeof(in_event) == 'undefined') { in_event = window.event; } + + // don't allow tooltips on banned tags (such as OPTION) + if (in_event != null) { + var target = in_event.srcElement ? in_event.srcElement : in_event.target; + if (target != null && (',' + domTT_bannedTags.join(',') + ',').indexOf(',' + target.tagName + ',') != -1) + { + return false; + } + } + + var owner = document.body; + // we have an active event so get the owner + if (in_event != null && in_event.type.match(/key|mouse|click|contextmenu/i)) + { + // make sure we have nothing higher than the body element + if (in_this.nodeType && in_this.nodeType != document.DOCUMENT_NODE) + { + owner = in_this; + } + } + // non active event (make sure we were passed a string id) + else + { + if (typeof(in_this) != 'object' && !(owner = domTT_tooltips.get(in_this))) + { + // NOTE: two steps to avoid "flashing" in gecko + var embryo = document.createElement('div'); + owner = document.body.appendChild(embryo); + owner.style.display = 'none'; + owner.id = in_this; + } + } + + // make sure the owner has a unique id + if (!owner.id) + { + owner.id = '__autoId' + domLib_autoId++; + } + + // see if we should only be opening one tip at a time + // NOTE: this is not "perfect" yet since it really steps on any other + // tip working on fade out or delayed close, but it get's the job done + if (domTT_oneOnly && domTT_lastOpened) + { + domTT_deactivate(domTT_lastOpened); + } + + domTT_lastOpened = owner.id; + + var tooltip = domTT_tooltips.get(owner.id); + if (tooltip) + { + if (tooltip.get('eventType') != in_event.type) + { + if (tooltip.get('type') == 'greasy') + { + tooltip.set('closeAction', 'destroy'); + domTT_deactivate(owner.id); + } + else if (tooltip.get('status') != 'inactive') + { + return owner.id; + } + } + else + { + if (tooltip.get('status') == 'inactive') + { + tooltip.set('status', 'pending'); + tooltip.set('activateTimeout', domLib_setTimeout(domTT_runShow, tooltip.get('delay'), [owner.id, in_event])); + + return owner.id; + } + // either pending or active, let it be + else + { + return owner.id; + } + } + } + + // setup the default options hash + var options = new domTT_Hash( + 'caption', '', + 'content', '', + 'clearMouse', true, + 'closeAction', domTT_closeAction, + 'closeLink', domTT_closeLink, + 'delay', domTT_activateDelay, + 'direction', domTT_direction, + 'draggable', domTT_draggable, + 'fade', domTT_fade, + 'fadeMax', 100, + 'grid', domTT_grid, + 'id', domTT_tooltipIdPrefix + owner.id, + 'inframe', false, + 'lifetime', domTT_lifetime, + 'offsetX', domTT_offsetX, + 'offsetY', domTT_offsetY, + 'parent', document.body, + 'position', 'absolute', + 'styleClass', domTT_styleClass, + 'type', 'greasy', + 'trail', false, + 'lazy', false + ); + + // load in the options from the function call + for (var i = 2; i < arguments.length; i += 2) + { + // load in predefined + if (arguments[i] == 'predefined') + { + var predefinedOptions = domTT_predefined.get(arguments[i + 1]); + for (var j in predefinedOptions.elementData) + { + options.set(j, predefinedOptions.get(j)); + } + } + // set option + else + { + options.set(arguments[i], arguments[i + 1]); + } + } + + options.set('eventType', in_event != null ? in_event.type : null); + + // immediately set the status text if provided + if (options.has('statusText')) + { + try { window.status = options.get('statusText'); } catch(e) {} + } + + // if we didn't give content...assume we just wanted to change the status and return + if (!options.has('content') || options.get('content') == '' || options.get('content') == null) + { + if (typeof(owner.onmouseout) != 'function') + { + owner.onmouseout = function(in_event) { domTT_mouseout(this, in_event); }; + } + + return owner.id; + } + + options.set('owner', owner); + + domTT_create(options); + + // determine the show delay + options.set('delay', (in_event != null && in_event.type.match(/click|mousedown|contextmenu/i)) ? 0 : parseInt(options.get('delay'))); + domTT_tooltips.set(owner.id, options); + domTT_tooltips.set(options.get('id'), options); + options.set('status', 'pending'); + options.set('activateTimeout', domLib_setTimeout(domTT_runShow, options.get('delay'), [owner.id, in_event])); + + return owner.id; +} + +// }}} +// {{{ domTT_create() + +function domTT_create(in_options) +{ + var tipOwner = in_options.get('owner'); + var parentObj = in_options.get('parent'); + var parentDoc = parentObj.ownerDocument || parentObj.document; + + // create the tooltip and hide it + // NOTE: two steps to avoid "flashing" in gecko + var embryo = parentDoc.createElement('div'); + var tipObj = parentObj.appendChild(embryo); + tipObj.style.position = 'absolute'; + tipObj.style.left = '0px'; + tipObj.style.top = '0px'; + tipObj.style.visibility = 'hidden'; + tipObj.id = in_options.get('id'); + tipObj.className = in_options.get('styleClass'); + + var contentBlock; + var tableLayout = false; + + if (in_options.get('caption') || (in_options.get('type') == 'sticky' && in_options.get('caption') !== false)) + { + tableLayout = true; + // layout the tip with a hidden formatting table + var tipLayoutTable = tipObj.appendChild(parentDoc.createElement('table')); + tipLayoutTable.style.borderCollapse = 'collapse'; + if (domLib_isKHTML) + { + tipLayoutTable.cellSpacing = 0; + } + + var tipLayoutTbody = tipLayoutTable.appendChild(parentDoc.createElement('tbody')); + + var numCaptionCells = 0; + var captionRow = tipLayoutTbody.appendChild(parentDoc.createElement('tr')); + var captionCell = captionRow.appendChild(parentDoc.createElement('td')); + captionCell.style.padding = '0px'; + var caption = captionCell.appendChild(parentDoc.createElement('div')); + caption.className = 'caption'; + if (domLib_isIE50) + { + caption.style.height = '100%'; + } + + if (in_options.get('caption').nodeType) + { + caption.appendChild(domTT_cloneNodes ? in_options.get('caption').cloneNode(1) : in_options.get('caption')); + } + else + { + caption.innerHTML = in_options.get('caption'); + } + + if (in_options.get('type') == 'sticky') + { + var numCaptionCells = 2; + var closeLinkCell = captionRow.appendChild(parentDoc.createElement('td')); + closeLinkCell.style.padding = '0px'; + var closeLink = closeLinkCell.appendChild(parentDoc.createElement('div')); + closeLink.className = 'caption'; + if (domLib_isIE50) + { + closeLink.style.height = '100%'; + } + + closeLink.style.textAlign = 'right'; + closeLink.style.cursor = domLib_stylePointer; + // merge the styles of the two cells + closeLink.style.borderLeftWidth = caption.style.borderRightWidth = '0px'; + closeLink.style.paddingLeft = caption.style.paddingRight = '0px'; + closeLink.style.marginLeft = caption.style.marginRight = '0px'; + if (in_options.get('closeLink').nodeType) + { + closeLink.appendChild(in_options.get('closeLink').cloneNode(1)); + } + else + { + closeLink.innerHTML = in_options.get('closeLink'); + } + + closeLink.onclick = function() + { + domTT_deactivate(tipOwner.id); + }; + closeLink.onmousedown = function(in_event) + { + if (typeof(in_event) == 'undefined') { in_event = window.event; } + in_event.cancelBubble = true; + }; + // MacIE has to have a newline at the end and must be made with createTextNode() + if (domLib_isMacIE) + { + closeLinkCell.appendChild(parentDoc.createTextNode("\n")); + } + } + + // MacIE has to have a newline at the end and must be made with createTextNode() + if (domLib_isMacIE) + { + captionCell.appendChild(parentDoc.createTextNode("\n")); + } + + var contentRow = tipLayoutTbody.appendChild(parentDoc.createElement('tr')); + var contentCell = contentRow.appendChild(parentDoc.createElement('td')); + contentCell.style.padding = '0px'; + if (numCaptionCells) + { + if (domLib_isIE || domLib_isOpera) + { + contentCell.colSpan = numCaptionCells; + } + else + { + contentCell.setAttribute('colspan', numCaptionCells); + } + } + + contentBlock = contentCell.appendChild(parentDoc.createElement('div')); + if (domLib_isIE50) + { + contentBlock.style.height = '100%'; + } + } + else + { + contentBlock = tipObj.appendChild(parentDoc.createElement('div')); + } + + contentBlock.className = 'contents'; + + var content = in_options.get('content'); + // allow content has a function to return the actual content + if (typeof(content) == 'function') { + content = content(in_options.get('id')); + } + + if (content != null && content.nodeType) + { + contentBlock.appendChild(domTT_cloneNodes ? content.cloneNode(1) : content); + } + else + { + contentBlock.innerHTML = content; + } + + // adjust the width if specified + if (in_options.has('width')) + { + tipObj.style.width = parseInt(in_options.get('width')) + 'px'; + } + + // check if we are overridding the maxWidth + // if the browser supports maxWidth, the global setting will be ignored (assume stylesheet) + var maxWidth = domTT_maxWidth; + if (in_options.has('maxWidth')) + { + if ((maxWidth = in_options.get('maxWidth')) === false) + { + tipObj.style.maxWidth = domLib_styleNoMaxWidth; + } + else + { + maxWidth = parseInt(in_options.get('maxWidth')); + tipObj.style.maxWidth = maxWidth + 'px'; + } + } + + // HACK: fix lack of maxWidth in CSS for KHTML and IE + if (maxWidth !== false && (domLib_isIE || domLib_isKHTML) && tipObj.offsetWidth > maxWidth) + { + tipObj.style.width = maxWidth + 'px'; + } + + in_options.set('offsetWidth', tipObj.offsetWidth); + in_options.set('offsetHeight', tipObj.offsetHeight); + + // konqueror miscalcuates the width of the containing div when using the layout table based on the + // border size of the containing div + if (domLib_isKonq && tableLayout && !tipObj.style.width) + { + var left = document.defaultView.getComputedStyle(tipObj, '').getPropertyValue('border-left-width'); + var right = document.defaultView.getComputedStyle(tipObj, '').getPropertyValue('border-right-width'); + + left = left.substring(left.indexOf(':') + 2, left.indexOf(';')); + right = right.substring(right.indexOf(':') + 2, right.indexOf(';')); + var correction = 2 * ((left ? parseInt(left) : 0) + (right ? parseInt(right) : 0)); + tipObj.style.width = (tipObj.offsetWidth - correction) + 'px'; + } + + // if a width is not set on an absolutely positioned object, both IE and Opera + // will attempt to wrap when it spills outside of body...we cannot have that + if (domLib_isIE || domLib_isOpera) + { + if (!tipObj.style.width) + { + // HACK: the correction here is for a border + tipObj.style.width = (tipObj.offsetWidth - 2) + 'px'; + } + + // HACK: the correction here is for a border + tipObj.style.height = (tipObj.offsetHeight - 2) + 'px'; + } + + // store placement offsets from event position + var offsetX, offsetY; + + // tooltip floats + if (in_options.get('position') == 'absolute' && !(in_options.has('x') && in_options.has('y'))) + { + // determine the offset relative to the pointer + switch (in_options.get('direction')) + { + case 'northeast': + offsetX = in_options.get('offsetX'); + offsetY = 0 - tipObj.offsetHeight - in_options.get('offsetY'); + break; + case 'northwest': + offsetX = 0 - tipObj.offsetWidth - in_options.get('offsetX'); + offsetY = 0 - tipObj.offsetHeight - in_options.get('offsetY'); + break; + case 'north': + offsetX = 0 - parseInt(tipObj.offsetWidth/2); + offsetY = 0 - tipObj.offsetHeight - in_options.get('offsetY'); + break; + case 'southwest': + offsetX = 0 - tipObj.offsetWidth - in_options.get('offsetX'); + offsetY = in_options.get('offsetY'); + break; + case 'southeast': + offsetX = in_options.get('offsetX'); + offsetY = in_options.get('offsetY'); + break; + case 'south': + offsetX = 0 - parseInt(tipObj.offsetWidth/2); + offsetY = in_options.get('offsetY'); + break; + } + + // if we are in an iframe, get the offsets of the iframe in the parent document + if (in_options.get('inframe')) + { + var iframeObj = domLib_getIFrameReference(window); + if (iframeObj) + { + var frameOffsets = domLib_getOffsets(iframeObj); + offsetX += frameOffsets.get('left'); + offsetY += frameOffsets.get('top'); + } + } + } + // tooltip is fixed + else + { + offsetX = 0; + offsetY = 0; + in_options.set('trail', false); + } + + // set the direction-specific offsetX/Y + in_options.set('offsetX', offsetX); + in_options.set('offsetY', offsetY); + if (in_options.get('clearMouse') && in_options.get('direction').indexOf('south') != -1) + { + in_options.set('mouseOffset', domTT_mouseHeight); + } + else + { + in_options.set('mouseOffset', 0); + } + + if (domLib_canFade && typeof(Fadomatic) == 'function') + { + if (in_options.get('fade') != 'neither') + { + var fadeHandler = new Fadomatic(tipObj, 10, 0, 0, in_options.get('fadeMax')); + in_options.set('fadeHandler', fadeHandler); + } + } + else + { + in_options.set('fade', 'neither'); + } + + // setup mouse events + if (in_options.get('trail') && typeof(tipOwner.onmousemove) != 'function') + { + tipOwner.onmousemove = function(in_event) { domTT_mousemove(this, in_event); }; + } + + if (typeof(tipOwner.onmouseout) != 'function') + { + tipOwner.onmouseout = function(in_event) { domTT_mouseout(this, in_event); }; + } + + if (in_options.get('type') == 'sticky') + { + if (in_options.get('position') == 'absolute' && domTT_dragEnabled && in_options.get('draggable')) + { + if (domLib_isIE) + { + captionRow.onselectstart = function() { return false; }; + } + + // setup drag + captionRow.onmousedown = function(in_event) { domTT_dragStart(tipObj, in_event); }; + captionRow.onmousemove = function(in_event) { domTT_dragUpdate(in_event); }; + captionRow.onmouseup = function() { domTT_dragStop(); }; + } + } + else if (in_options.get('type') == 'velcro') + { + /* can use once we have deactivateDelay + tipObj.onmouseover = function(in_event) + { + if (typeof(in_event) == 'undefined') { in_event = window.event; } + var tooltip = domTT_tooltips.get(tipObj.id); + if (in_options.get('lifetime')) { + domLib_clearTimeout(in_options.get('lifetimeTimeout'); + } + }; + */ + tipObj.onmouseout = function(in_event) + { + if (typeof(in_event) == 'undefined') { in_event = window.event; } + if (!domLib_isDescendantOf(in_event[domLib_eventTo], tipObj, domTT_bannedTags)) { + domTT_deactivate(tipOwner.id); + } + }; + // NOTE: this might interfere with links in the tip + tipObj.onclick = function(in_event) + { + domTT_deactivate(tipOwner.id); + }; + } + + if (in_options.get('position') == 'relative') + { + tipObj.style.position = 'relative'; + } + + in_options.set('node', tipObj); + in_options.set('status', 'inactive'); +} + +// }}} +// {{{ domTT_show() + +// in_id is either tip id or the owner id +function domTT_show(in_id, in_event) +{ + + // should always find one since this call would be cancelled if tip was killed + var tooltip = domTT_tooltips.get(in_id); + var status = tooltip.get('status'); + var tipObj = tooltip.get('node'); + + if (tooltip.get('position') == 'absolute') + { + var mouseX, mouseY; + + if (tooltip.has('x') && tooltip.has('y')) + { + mouseX = tooltip.get('x'); + mouseY = tooltip.get('y'); + } + else if (!domTT_useGlobalMousePosition || domTT_mousePosition == null || status == 'active' || tooltip.get('delay') == 0) + { + var eventPosition = domLib_getEventPosition(in_event); + var eventX = eventPosition.get('x'); + var eventY = eventPosition.get('y'); + if (tooltip.get('inframe')) + { + eventX -= eventPosition.get('scrollX'); + eventY -= eventPosition.get('scrollY'); + } + + // only move tip along requested trail axis when updating position + if (status == 'active' && tooltip.get('trail') !== true) + { + var trail = tooltip.get('trail'); + if (trail == 'x') + { + mouseX = eventX; + mouseY = tooltip.get('mouseY'); + } + else if (trail == 'y') + { + mouseX = tooltip.get('mouseX'); + mouseY = eventY; + } + } + else + { + mouseX = eventX; + mouseY = eventY; + } + } + else + { + mouseX = domTT_mousePosition.get('x'); + mouseY = domTT_mousePosition.get('y'); + if (tooltip.get('inframe')) + { + mouseX -= domTT_mousePosition.get('scrollX'); + mouseY -= domTT_mousePosition.get('scrollY'); + } + } + + // we are using a grid for updates + if (tooltip.get('grid')) + { + // if this is not a mousemove event or it is a mousemove event on an active tip and + // the movement is bigger than the grid + if (in_event.type != 'mousemove' || (status == 'active' && (Math.abs(tooltip.get('lastX') - mouseX) > tooltip.get('grid') || Math.abs(tooltip.get('lastY') - mouseY) > tooltip.get('grid')))) + { + tooltip.set('lastX', mouseX); + tooltip.set('lastY', mouseY); + } + // did not satisfy the grid movement requirement + else + { + return false; + } + } + + // mouseX and mouseY store the last acknowleged mouse position, + // good for trailing on one axis + tooltip.set('mouseX', mouseX); + tooltip.set('mouseY', mouseY); + + var coordinates; + if (domTT_screenEdgeDetection) + { + coordinates = domTT_correctEdgeBleed( + tooltip.get('offsetWidth'), + tooltip.get('offsetHeight'), + mouseX, + mouseY, + tooltip.get('offsetX'), + tooltip.get('offsetY'), + tooltip.get('mouseOffset'), + tooltip.get('inframe') ? window.parent : window + ); + } + else + { + coordinates = { + 'x' : mouseX + tooltip.get('offsetX'), + 'y' : mouseY + tooltip.get('offsetY') + tooltip.get('mouseOffset') + }; + } + + // update the position + tipObj.style.left = coordinates.x + 'px'; + tipObj.style.top = coordinates.y + 'px'; + + // increase the tip zIndex so it goes over previously shown tips + tipObj.style.zIndex = domLib_zIndex++; + } + + // if tip is not active, active it now and check for a fade in + if (status == 'pending') + { + // unhide the tooltip + tooltip.set('status', 'active'); + tipObj.style.display = ''; + tipObj.style.visibility = 'visible'; + + var fade = tooltip.get('fade'); + if (fade != 'neither') + { + var fadeHandler = tooltip.get('fadeHandler'); + if (fade == 'out' || fade == 'both') + { + fadeHandler.haltFade(); + if (fade == 'out') + { + fadeHandler.halt(); + } + } + + if (fade == 'in' || fade == 'both') + { + fadeHandler.fadeIn(); + } + } + + if (tooltip.get('type') == 'greasy' && tooltip.get('lifetime') != 0) + { + tooltip.set('lifetimeTimeout', domLib_setTimeout(domTT_runDeactivate, tooltip.get('lifetime'), [tipObj.id])); + } + } + + if (tooltip.get('position') == 'absolute' && domTT_detectCollisions) + { + // utilize original collision element cache + domLib_detectCollisions(tipObj, false, true); + } +} + +// }}} +// {{{ domTT_close() + +// in_handle can either be an child object of the tip, the tip id or the owner id +function domTT_close(in_handle) +{ + var id; + if (typeof(in_handle) == 'object' && in_handle.nodeType) + { + var obj = in_handle; + while (!obj.id || !domTT_tooltips.get(obj.id)) + { + obj = obj.parentNode; + + if (obj.nodeType != document.ELEMENT_NODE) { return; } + } + + id = obj.id; + } + else + { + id = in_handle; + } + + domTT_deactivate(id); +} + +// }}} +// {{{ domTT_closeAll() + +// run through the tooltips and close them all +function domTT_closeAll() +{ + // NOTE: this will iterate 2x # of tooltips + for (var id in domTT_tooltips.elementData) { + domTT_close(id); + } +} + +// }}} +// {{{ domTT_deactivate() + +// in_id is either the tip id or the owner id +function domTT_deactivate(in_id) +{ + var tooltip = domTT_tooltips.get(in_id); + if (tooltip) + { + var status = tooltip.get('status'); + if (status == 'pending') + { + // cancel the creation of this tip if it is still pending + domLib_clearTimeout(tooltip.get('activateTimeout')); + tooltip.set('status', 'inactive'); + } + else if (status == 'active') + { + if (tooltip.get('lifetime')) + { + domLib_clearTimeout(tooltip.get('lifetimeTimeout')); + } + + var tipObj = tooltip.get('node'); + if (tooltip.get('closeAction') == 'hide') + { + var fade = tooltip.get('fade'); + if (fade != 'neither') + { + var fadeHandler = tooltip.get('fadeHandler'); + if (fade == 'out' || fade == 'both') + { + fadeHandler.fadeOut(); + } + else + { + fadeHandler.hide(); + } + } + else + { + tipObj.style.display = 'none'; + } + } + else + { + tooltip.get('parent').removeChild(tipObj); + domTT_tooltips.remove(tooltip.get('owner').id); + domTT_tooltips.remove(tooltip.get('id')); + } + + tooltip.set('status', 'inactive'); + if (domTT_detectCollisions) { + // unhide all of the selects that are owned by this object + // utilize original collision element cache + domLib_detectCollisions(tipObj, true, true); + } + } + } +} + +// }}} +// {{{ domTT_mouseout() + +function domTT_mouseout(in_owner, in_event) +{ + if (!domLib_useLibrary) { return false; } + + if (typeof(in_event) == 'undefined') { in_event = window.event; } + + var toChild = domLib_isDescendantOf(in_event[domLib_eventTo], in_owner, domTT_bannedTags); + var tooltip = domTT_tooltips.get(in_owner.id); + if (tooltip && (tooltip.get('type') == 'greasy' || tooltip.get('status') != 'active')) + { + // deactivate tip if exists and we moved away from the owner + if (!toChild) + { + domTT_deactivate(in_owner.id); + try { window.status = window.defaultStatus; } catch(e) {} + } + } + else if (!toChild) + { + try { window.status = window.defaultStatus; } catch(e) {} + } +} + +// }}} +// {{{ domTT_mousemove() + +function domTT_mousemove(in_owner, in_event) +{ + if (!domLib_useLibrary) { return false; } + + if (typeof(in_event) == 'undefined') { in_event = window.event; } + + var tooltip = domTT_tooltips.get(in_owner.id); + if (tooltip && tooltip.get('trail') && tooltip.get('status') == 'active') + { + // see if we are trailing lazy + if (tooltip.get('lazy')) + { + domLib_setTimeout(domTT_runShow, domTT_trailDelay, [in_owner.id, in_event]); + } + else + { + domTT_show(in_owner.id, in_event); + } + } +} + +// }}} +// {{{ domTT_addPredefined() + +function domTT_addPredefined(in_id) +{ + var options = new domTT_Hash(); + for (var i = 1; i < arguments.length; i += 2) + { + options.set(arguments[i], arguments[i + 1]); + } + + domTT_predefined.set(in_id, options); +} + +// }}} +// {{{ domTT_correctEdgeBleed() + +function domTT_correctEdgeBleed(in_width, in_height, in_x, in_y, in_offsetX, in_offsetY, in_mouseOffset, in_window) +{ + var win, doc; + var bleedRight, bleedBottom; + var pageHeight, pageWidth, pageYOffset, pageXOffset; + + var x = in_x + in_offsetX; + var y = in_y + in_offsetY + in_mouseOffset; + + win = (typeof(in_window) == 'undefined' ? window : in_window); + + // Gecko and IE swaps values of clientHeight, clientWidth properties when + // in standards compliance mode from documentElement to document.body + doc = ((domLib_standardsMode && (domLib_isIE || domLib_isGecko)) ? win.document.documentElement : win.document.body); + + // for IE in compliance mode + if (domLib_isIE) + { + pageHeight = doc.clientHeight; + pageWidth = doc.clientWidth; + pageYOffset = doc.scrollTop; + pageXOffset = doc.scrollLeft; + } + else + { + pageHeight = doc.clientHeight; + pageWidth = doc.clientWidth; + + if (domLib_isKHTML) + { + pageHeight = win.innerHeight; + } + + pageYOffset = win.pageYOffset; + pageXOffset = win.pageXOffset; + } + + // we are bleeding off the right, move tip over to stay on page + // logic: take x position, add width and subtract from effective page width + if ((bleedRight = (x - pageXOffset) + in_width - (pageWidth - domTT_screenEdgePadding)) > 0) + { + x -= bleedRight; + } + + // we are bleeding to the left, move tip over to stay on page + // if tip doesn't fit, we will go back to bleeding off the right + // logic: take x position and check if less than edge padding + if ((x - pageXOffset) < domTT_screenEdgePadding) + { + x = domTT_screenEdgePadding + pageXOffset; + } + + // if we are bleeding off the bottom, flip to north + // logic: take y position, add height and subtract from effective page height + if ((bleedBottom = (y - pageYOffset) + in_height - (pageHeight - domTT_screenEdgePadding)) > 0) + { + y = in_y - in_height - in_offsetY; + } + + // if we are bleeding off the top, flip to south + // if tip doesn't fit, we will go back to bleeding off the bottom + // logic: take y position and check if less than edge padding + if ((y - pageYOffset) < domTT_screenEdgePadding) + { + y = in_y + domTT_mouseHeight + in_offsetY; + } + + return {'x' : x, 'y' : y}; +} + +// }}} +// {{{ domTT_isActive() + +// in_id is either the tip id or the owner id +function domTT_isActive(in_id) +{ + var tooltip = domTT_tooltips.get(in_id); + if (!tooltip || tooltip.get('status') != 'active') + { + return false; + } + else + { + return true; + } +} + +// }}} +// {{{ domTT_runXXX() + +// All of these domMenu_runXXX() methods are used by the event handling sections to +// avoid the circular memory leaks caused by inner functions +function domTT_runDeactivate(args) { domTT_deactivate(args[0]); } +function domTT_runShow(args) { domTT_show(args[0], args[1]); } + +// }}} +// {{{ domTT_replaceTitles() + +function domTT_replaceTitles(in_decorator) +{ + var elements = domLib_getElementsByClass('tooltip'); + for (var i = 0; i < elements.length; i++) + { + if (elements[i].title) + { + var content; + if (typeof(in_decorator) == 'function') + { + content = in_decorator(elements[i]); + } + else + { + content = elements[i].title; + } + + content = content.replace(new RegExp('\'', 'g'), '\\\''); + elements[i].onmouseover = new Function('in_event', "domTT_activate(this, in_event, 'content', '" + content + "')"); + elements[i].title = ''; + } + } +} + +// }}} +// {{{ domTT_update() + +// Allow authors to update the contents of existing tips using the DOM +// Unfortunately, the tip must already exist, or else no work is done. +// TODO: make getting at content or caption cleaner +function domTT_update(handle, content, type) +{ + // type defaults to 'content', can also be 'caption' + if (typeof(type) == 'undefined') + { + type = 'content'; + } + + var tip = domTT_tooltips.get(handle); + if (!tip) + { + return; + } + + var tipObj = tip.get('node'); + var updateNode; + if (type == 'content') + { + //
                            ... + updateNode = tipObj.firstChild; + if (updateNode.className != 'contents') + { + // ...\s*$/g,rb={option:[1,""],legend:[1,"
                            ","
                            "],area:[1,"",""],param:[1,"",""],thead:[1,"
                            ... + updateNode = updateNode.firstChild.firstChild.nextSibling.firstChild.firstChild; + } + } + else + { + updateNode = tipObj.firstChild; + if (updateNode.className == 'contents') + { + // missing caption + return; + } + + // ' + data[i] + ''); + } + } + } else { + for (var i = rows.length - 1; i >= move; i--) { + jQuery(rows[i]).html(jQuery(rows[i - move]).html()); + } + + var tbody = jQuery('#filter-log-entries'); + for (var i = 0; i < data.length; i++) { + var rowIndex = move - 1 - i; + if (rowIndex >= 0) { + jQuery(rows[rowIndex]).html(data[i]); + } else { + jQuery(tbody).prepend('' + data[i] + ''); + } + } + } + + // Much easier to go through each of the rows once they've all be added. + rows = jQuery('#filter-log-entries>tr'); + for (var i = 0; i < rows.length; i++) { + rows[i].className = i % 2 == 0 ? 'listMRodd' : 'listMReven'; + } +} + +function toggle_pause() { + if(isPaused) { + isPaused = false; + fetch_new_rules(); + } else { + isPaused = true; + } +} +/* start local AJAX engine */ +if (typeof updateDelay != 'undefined') { + timer = setInterval('fetch_new_rules()', updateDelay); +} + +function toggleListDescriptions(){ + var ss = document.styleSheets; + for (var i=0; i + * v1.0 + * 04.11.2008, 8:25 PM ~ + * v1.0a + * 03.27.2008, 5:44 AM ~ 04.01.2008, 21:32 PM + * Azer Koçulu + */ + +var firebug = { + env:{ "cache":{}, "ctmp":[], "dIndex":"console", "init":false, "ml":false, "objCn":[] }, + init:function(){ + firebug.el = {}; // elements + firebug.el.content = {}; + with(firebug){ + + document.documentElement.childNodes[0].appendChild( + new pi.element("link").attribute.set("rel","stylesheet").attribute.set("href","http://firebuglite.appspot.com/firebug-lite.css").environment.getElement() + ); + + /* + * main interface + */ + el.main = new pi.element("DIV").attribute.set("id","Firebug").environment.addStyle({ "width":pi.util.GetWindowSize().width+"px" }).insert(document.body); + el.header = new pi.element("DIV").attribute.addClass("Header").insert(el.main); + el.left = {}; + el.left.container = new pi.element("DIV").attribute.addClass("Left").insert(el.main); + el.right = {}; + el.right.container = new pi.element("DIV").attribute.addClass("Right").insert(el.main); + el.main.child.add(new pi.element("DIV").environment.addStyle({ "clear":"both" })); + + /* + * buttons + */ + el.button = {}; + el.button.container = new pi.element("DIV").attribute.addClass("ButtonContainer").insert(el.header); + el.button.logo = new pi.element("A").attribute.set("title","Firebug Lite").attribute.set("target","_blank").attribute.set("href","http://getfirebug.com/lite.html").update(" ").attribute.addClass("Button Logo").insert(el.button.container); + el.button.inspect = new pi.element("A").attribute.addClass("Button").event.addListener("click",d.inspector.toggle).update("Inspect").insert(el.button.container); + el.button.maximize = new pi.element("A").attribute.addClass("Button Maximize").event.addListener("click",win.maximize).insert(el.button.container); + el.button.minimize = new pi.element("A").attribute.addClass("Button Minimize").event.addListener("click",win.minimize).insert(el.button.container); + el.button.close = new pi.element("A").attribute.addClass("Button Close").event.addListener("click",win.close).insert(el.button.container); + + if(pi.env.ie||pi.env.webkit){ + el.button.container.environment.addStyle({ "paddingTop":"12px" }); + } + + /* + * navigation + */ + el.nav = {}; + el.nav.container = new pi.element("DIV").attribute.addClass("Nav").insert(el.left.container); + el.nav.console = new pi.element("A").attribute.addClass("Tab Selected").event.addListener("click",d.navigate.curry(window,"console")).update("Console").insert(el.nav.container); + el.nav.html = new pi.element("A").attribute.addClass("Tab").update("HTML").event.addListener("click",d.navigate.curry(window,"html")).insert(el.nav.container); + el.nav.css = new pi.element("A").attribute.addClass("Tab").update("CSS").event.addListener("click",d.navigate.curry(window,"css")).insert(el.nav.container); + el.nav.scripts = new pi.element("A").attribute.addClass("Tab").update("Script").event.addListener("click",d.navigate.curry(window,"scripts")).insert(el.nav.container); + el.nav.dom = new pi.element("A").attribute.addClass("Tab").update("DOM").event.addListener("click",d.navigate.curry(window,"dom")).insert(el.nav.container); + el.nav.xhr = new pi.element("A").attribute.addClass("Tab").update("XHR").event.addListener("click",d.navigate.curry(window,"xhr")).insert(el.nav.container); + + /* + * inspector + */ + + el.borderInspector = new pi.element("DIV").attribute.set("id","FirebugBorderInspector").event.addListener("click",listen.inspector).insert(document.body); + el.bgInspector = new pi.element("DIV").attribute.set("id","FirebugBGInspector").insert(document.body); + + /* + * console + */ + el.left.console = {}; + el.left.console.container = new pi.element("DIV").attribute.addClass("Console").insert(el.left.container); + el.left.console.mlButton = new pi.element("A").attribute.addClass("MLButton").event.addListener("click",d.console.toggleML).insert(el.left.console.container); + el.left.console.monitor = new pi.element("DIV").insert( + new pi.element("DIV").attribute.addClass("Monitor").insert(el.left.console.container) + ); + el.left.console.container.child.add( + new pi.element("DIV").attribute.addClass("InputArrow").update(">>>") + ); + el.left.console.input = new pi.element("INPUT").attribute.set("type","text").attribute.addClass("Input").event.addListener("keydown",listen.consoleTextbox).insert( + new pi.element("DIV").attribute.addClass("InputContainer").insert(el.left.console.container) + ); + + el.right.console = {}; + el.right.console.container = new pi.element("DIV").attribute.addClass("Console Container").insert(el.right.container); + el.right.console.mlButton = new pi.element("A").attribute.addClass("MLButton CloseML").event.addListener("click",d.console.toggleML).insert(el.right.console.container); + el.right.console.input = new pi.element("TEXTAREA").attribute.addClass("Input").insert(el.right.console.container); + el.right.console.run = new pi.element("A").attribute.addClass("Button").event.addListener("click",listen.runMultiline).update("Run").insert(el.right.console.container); + + el.right.console.clear = new pi.element("A").attribute.addClass("Button").event.addListener("click",d.clean.curry(window,el.right.console.input)).update("Clear").insert(el.right.console.container); + + el.button.console = {}; + el.button.console.container = new pi.element("DIV").attribute.addClass("ButtonSet").insert(el.button.container); + el.button.console.clear = new pi.element("A").attribute.addClass("Button").event.addListener("click",d.clean.curry(window,el.left.console.monitor)).update("Clear").insert(el.button.console.container); + + /* + * html + */ + + el.left.html = {}; + el.left.html.container = new pi.element("DIV").attribute.addClass("HTML").insert(el.left.container); + + el.right.html = {}; + el.right.html.container = new pi.element("DIV").attribute.addClass("HTML Container").insert(el.right.container); + + el.right.html.nav = {}; + el.right.html.nav.container = new pi.element("DIV").attribute.addClass("Nav").insert(el.right.html.container); + el.right.html.nav.computedStyle = new pi.element("A").attribute.addClass("Tab Selected").event.addListener("click",d.html.navigate.curry(firebug,"computedStyle")).update("Computed Style").insert(el.right.html.nav.container); + if(!pi.env.ie6) + el.right.html.nav.dom = new pi.element("A").attribute.addClass("Tab").event.addListener("click",d.html.navigate.curry(firebug,"dom")).update("DOM").insert(el.right.html.nav.container); + + el.right.html.content = new pi.element("DIV").attribute.addClass("Content").insert(el.right.html.container); + + el.button.html = {}; + el.button.html.container = new pi.element("DIV").attribute.addClass("ButtonSet HTML").insert(el.button.container); + + /* + * css + */ + + el.left.css = {}; + el.left.css.container = new pi.element("DIV").attribute.addClass("CSS").insert(el.left.container); + + el.right.css = {}; + el.right.css.container = new pi.element("DIV").attribute.addClass("CSS Container").insert(el.right.container); + + el.right.css.nav = {}; + el.right.css.nav.container = new pi.element("DIV").attribute.addClass("Nav").insert(el.right.css.container); + el.right.css.nav.runCSS = new pi.element("A").attribute.addClass("Tab Selected").update("Run CSS").insert(el.right.css.nav.container); + + el.right.css.mlButton = new pi.element("A").attribute.addClass("MLButton CloseML").event.addListener("click",d.console.toggleML).insert(el.right.css.container); + el.right.css.input = new pi.element("TEXTAREA").attribute.addClass("Input").insert(el.right.css.container); + el.right.css.run = new pi.element("A").attribute.addClass("Button").event.addListener("click",listen.runCSS).update("Run").insert(el.right.css.container); + el.right.css.clear = new pi.element("A").attribute.addClass("Button").event.addListener("click",d.clean.curry(window,el.right.css.input)).update("Clear").insert(el.right.css.container); + + el.button.css = {}; + el.button.css.container = new pi.element("DIV").attribute.addClass("ButtonSet CSS").insert(el.button.container); + el.button.css.selectbox = new pi.element("SELECT").event.addListener("change",listen.cssSelectbox).insert(el.button.css.container); + + /* + * scripts + */ + + el.left.scripts = {}; + el.left.scripts.container = new pi.element("DIV").attribute.addClass("Scripts").insert(el.left.container); + + el.right.scripts = {}; + el.right.scripts.container = new pi.element("DIV").attribute.addClass("Scripts Container").insert(el.right.container); + + el.button.scripts = {}; + el.button.scripts.container = new pi.element("DIV").attribute.addClass("ButtonSet Scripts").insert(el.button.container); + el.button.scripts.selectbox = new pi.element("SELECT").event.addListener("change",listen.scriptsSelectbox).insert(el.button.scripts.container); + el.button.scripts.lineNumbers = new pi.element("A").attribute.addClass("Button").event.addListener("click",d.scripts.toggleLineNumbers).update("Show Line Numbers").insert(el.button.scripts.container); + + /* + * dom + */ + + el.left.dom = {}; + el.left.dom.container = new pi.element("DIV").attribute.addClass("DOM").insert(el.left.container); + + el.right.dom = {}; + el.right.dom.container = new pi.element("DIV").attribute.addClass("DOM Container").insert(el.right.container); + + el.button.dom = {}; + el.button.dom.container = new pi.element("DIV").attribute.addClass("ButtonSet DOM").insert(el.button.container); + el.button.dom.label = new pi.element("LABEL").update("Object Path:").insert(el.button.dom.container); + el.button.dom.textbox = new pi.element("INPUT").event.addListener("keydown",listen.domTextbox).update("window").insert(el.button.dom.container); + + /* + * str + */ + + el.left.str = {}; + el.left.str.container = new pi.element("DIV").attribute.addClass("STR").insert(el.left.container); + + el.right.str = {}; + el.right.str.container = new pi.element("DIV").attribute.addClass("STR").insert(el.left.container); + + el.button.str = {}; + el.button.str.container = new pi.element("DIV").attribute.addClass("ButtonSet XHR").insert(el.button.container); + el.button.str.watch = new pi.element("A").attribute.addClass("Button").event.addListener("click",d.navigate.curry(window,"xhr")).update("Back").insert(el.button.str.container); + + /* + * xhr + */ + + el.left.xhr = {}; + el.left.xhr.container = new pi.element("DIV").attribute.addClass("XHR").insert(el.left.container); + + el.right.xhr = {}; + el.right.xhr.container = new pi.element("DIV").attribute.addClass("XHR").insert(el.left.container); + + + el.button.xhr = {}; + el.button.xhr.container = new pi.element("DIV").attribute.addClass("ButtonSet XHR").insert(el.button.container); + el.button.xhr.label = new pi.element("LABEL").update("XHR Path:").insert(el.button.xhr.container); + el.button.xhr.textbox = new pi.element("INPUT").event.addListener("keydown",listen.xhrTextbox).insert(el.button.xhr.container); + el.button.xhr.watch = new pi.element("A").attribute.addClass("Button").event.addListener("click",listen.addXhrObject).update("Watch").insert(el.button.xhr.container); + + // fix ie6 a:hover bug + if(pi.env.ie6) + { + var buttons = [ + el.button.inspect, + el.button.close, + el.button.inspect, + el.button.console.clear, + el.right.console.run, + el.right.console.clear, + el.right.css.run, + el.right.css.clear + ]; + for(var i=0; i>> console.dir("+_value+")"); + d.dom.open(_value,d.console.addLine()); + } + }, + addLine:function(){ + with (firebug) { + return new pi.element("DIV").attribute.addClass("Row").insert(el.left.console.monitor); + } + }, + openObject:function(_index){ + with (firebug) { + d.dom.open(env.objCn[_index], el.left.dom.container, pi.env.ie); + d.navigate("dom"); + } + }, + historyIndex:0, + history:[], + log:function(_values){ + with (firebug) { + if(env.init==false){ + env.ctmp.push(arguments); + return; + } + + var value = ""; + for(var i=0; i0?" ":"")+d.highlight(arguments[i],false,false,true); + } + + d.console.addLine().update(value); + d.console.scroll(); + + } + }, + print: function(_cmd,_text){ + with (firebug){ + d.console.addLine().attribute.addClass("Arrow").update(">>> "+_cmd); + d.console.addLine().update(d.highlight(_text,false,false,true)); + d.console.scroll(); + d.console.historyIndex = d.console.history.push(_cmd); + } + }, + run:function(cmd){ + with(firebug){ + if(cmd.length==0)return; + el.left.console.input.environment.getElement().value = ""; + try { + var result = eval.call(window,cmd); + d.console.print(cmd,result); + } catch(e){ + d.console.addLine().attribute.addClass("Arrow").update(">>> "+cmd); + if(!pi.env.ff){ + d.console.scroll(); + return d.console.addLine().attribute.addClass("Error").update("Error: "+(e.description||e),true); + } + if(e.fileName==null){ + d.console.addLine().attribute.addClass("Error").update("Error: "+e.message,true); + } + var fileName = e.fileName.split("\/").getLastItem(); + d.console.addLine().attribute.addClass("Error").update("Error: "+e.message+" ("+fileName+","+e.lineNumber+")",true); + d.console.scroll(); + } + d.console.scroll(); + } + }, + scroll:function(){ + with(firebug){ + el.left.console.monitor.environment.getElement().parentNode.scrollTop = Math.abs(el.left.console.monitor.environment.getSize().offsetHeight-200); + } + }, + toggleML:function(){ + with(firebug){ + var open = !env.ml; + env.ml = !env.ml; + d.navigateRightColumn("console",open); + el[open?"left":"right"].console.mlButton.environment.addStyle({ display:"none" }); + el[!open?"left":"right"].console.mlButton.environment.addStyle({ display:"block" }); + el.left.console.monitor.environment.addStyle({ "height":(open?233:210)+"px" }); + el.left.console.mlButton.attribute[(open?"add":"remove")+"Class"]("CloseML"); + } + } + }, + css:{ + index:-1, + open:function(_index){ + with (firebug) { + var item = document.styleSheets[_index]; + var uri = item.href; + if(uri.indexOf("http:\/\/")>-1&&getDomain(uri)!=document.domain){ + el.left.css.container.update("Access to restricted URI denied"); + return; + } + var rules = item[pi.env.ie ? "rules" : "cssRules"]; + var str = ""; + for (var i=0; i"; + for(var i=0; i<_css.length; i++){ + var item = _css[i]; + str += "
                            "+item.replace(/(.+\:)(.+)/,"$1$2;")+"
                            "; + } + str+="
                            }
                            "; + return str; + } + }, + refresh:function(){ + with(firebug){ + el.button.css.selectbox.update(""); + var collection = document.styleSheets; + for(var i=0; i-1){ + // NULL + if(_value==null){ + return "null"; + } + + // BOOLEAN & NUMBER + if (["boolean", "number"].indexOf(typeof _value) > -1) { + return "" + _value + ""; + } + + // FUNCTION + if(typeof _value=="function"){ + return "function()"; + } + + // STRING + return "\""+( !_inObject&&!_inArray?_value : _value.substring(0,35) ).replace(/\n/g,"\\n").replace(/\s/g," ").replace(/>/g,">").replace(/"; + } + // element + else if(isElement){ + if(_value.nodeType==3)return d.highlight(_value.nodeValue); + + if(_inArray||_inObject){ + var result = ""+_value.nodeName.toLowerCase(); + if(_value.getAttribute&&_value.getAttribute("id"))result += "#"+_value.getAttribute("id")+""; + var elClass = _value.getAttribute?_value.getAttribute(pi.env.ie?"className":"class"):""; + if(elClass)result += "."+elClass.split(" ")[0]+""; + return result+""; + } + + var result = "<"+_value.nodeName.toLowerCase()+""; + if(_value.attributes) + for(var i=0; i<_value.attributes.length; i++){ + var item = _value.attributes[i]; + if(pi.env.ie&&Boolean(item.nodeValue)==false)continue; + result += " "+item.nodeName+"=\""+item.nodeValue+"\""; + } + result += ">"; + return result; + } + // array & object + else if(isArray||["object","array"].indexOf(typeof _value)>-1){ + var result = ""; + if(isArray||_value instanceof Array){ + if(_inObject)return "["+_value.length+"]"; + result += "[ "; + + for(var i=0; i<_value.length; i++){ + if((_inObject||_inArray)&&pi.env.ie&&i>3)break; + result += (i > 0 ? ", " : "") + d.highlight(_value[i], false, true, true); + } + result += " ]"; + return result; + } + if(_inObject)return "Object"; + result += "Object"; + var i=0; + for(var key in _value){ + var value = _value[key]; + if((_inObject||_inArray)&&pi.env.ie&&i>3) + break; + result += " "+key+"="+d.highlight(value,true); + i++; + }; + result += ""; + return result; + } else { + if(_inObject) + return ""+_value+""; + return _value; + } + + } + }, + html:{ + nIndex:"computedStyle", + current:null, + highlight:function(_element,_clear,_event){ + with(firebug){ + if(_clear){ + el.bgInspector.environment.addStyle({ "display":"none" }); + return; + } + d.inspector.inspect(_element,true); + } + }, + inspect:function(_element){ + var el = _element, map = [], parent = _element; + while(parent){ + map.push(parent); + if(parent==document.body)break; + parent = parent.parentNode; + } + map = map.reverse(); + with(firebug){ + d.inspector.toggle(); + var parentLayer = el.left.html.container.child.get()[1].childNodes[1].pi; + for(var t=0; map[t];){ + if(t==map.length-1){ + + var link = parentLayer.environment.getElement().previousSibling.pi; + link.attribute.addClass("Selected"); + + if(d.html.current)d.html.current[1].attribute.removeClass("Selected"); + + d.html.current = [_element,link]; + + return t; + } + parentLayer = d.html.openHtmlTree(map[t],parentLayer,map[t+1]); + t++; + } + } + }, + navigate:function(_index,_element){ + with(firebug){ + el.right.html.nav[d.html.nIndex].attribute.removeClass("Selected"); + el.right.html.nav[_index].attribute.addClass("Selected"); + d.html.nIndex = _index; + d.html.openProperties(); + + } + }, + openHtmlTree:function(_element,_parent,_returnParentElementByElement,_event){ + with(firebug){ + var element = _element || document.documentElement, + parent = _parent || el.left.html.container, + returnParentEl = _returnParentElementByElement || null, + returnParentVal = null; + + if(parent!=el.left.html.container){ + var nodeLink = parent.environment.getParent().pi.child.get()[0].pi; + if(d.html.current)d.html.current[1].attribute.removeClass("Selected"); + nodeLink.attribute.addClass("Selected"); + + d.html.current = [_element,nodeLink]; + d.html.openProperties(); + } + + if(element.childNodes&&(element.childNodes.length==0||(element.childNodes.length==1&&element.childNodes[0].nodeType==3)))return; + parent.clean(); + + if(parent.opened&&Boolean(_returnParentElementByElement)==false){ + parent.opened = false; + parent.environment.getParent().pi.child.get()[0].pi.attribute.removeClass("Open"); + return; + } + if (parent != el.left.html.container) { + parent.environment.getParent().pi.child.get()[0].pi.attribute.addClass("Open"); + parent.opened = true; + + } + + for(var i=0; i")); + continue; + } + else if(item.childNodes&&item.childNodes.length==0)continue; + link.attribute.addClass("ParentLink"); + + } + return returnParentVal; + } + }, + openProperties:function(){ + with(firebug){ + + var index = d.html.nIndex; + var node = d.html.current[0]; + d.clean(el.right.html.content); + var str = ""; + switch(index){ + case "computedStyle": + var property = ["opacity","filter","azimuth","background","backgroundAttachment","backgroundColor","backgroundImage","backgroundPosition","backgroundRepeat","border","borderCollapse","borderColor","borderSpacing","borderStyle","borderTop","borderRight","borderBottom","borderLeft","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderWidth","bottom","captionSide","clear","clip","color","content","counterIncrement","counterReset","cue","cueAfter","cueBefore","cursor","direction","display","elevation","emptyCells","cssFloat","font","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","height","left","letterSpacing","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginTop","marginRight","marginBottom","marginLeft","markerOffset","marks","maxHeight","maxWidth","minHeight","minWidth","orphans","outline","outlineColor","outlineStyle","outlineWidth","overflow","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","page","pageBreakAfter","pageBreakBefore","pageBreakInside","pause","pauseAfter","pauseBefore","pitch","pitchRange","playDuring","position","quotes","richness","right","size","speak","speakHeader","speakNumeral","speakPunctuation","speechRate","stress","tableLayout","textAlign","textDecoration","textIndent","textShadow","textTransform","top","unicodeBidi","verticalAlign","visibility","voiceFamily","volume","whiteSpace","widows","width","wordSpacing","zIndex"].sort(); + var view = document.defaultView?document.defaultView.getComputedStyle(node,null):node.currentStyle; + for(var i=0; i
                            "+d.highlight(view[item])+"
                            "; + } + el.right.html.content.update(str); + break; + case "dom": + d.dom.open(node,el.right.html.content,pi.env.ie); + break; + } + } + } + }, + inspector:{ + enabled:false, + el:null, + inspect:function(_element,_bgInspector){ + var el = _element, top = el.offsetTop, left = el.offsetLeft, parent = _element.offsetParent; + while(Boolean(parent)&&parent!=document.firstChild){ + top += parent.offsetTop; + left += parent.offsetLeft; + parent = parent.offsetParent; + if(parent==document.body)break; + }; + + with(firebug){ + el[_bgInspector?"bgInspector":"borderInspector"].environment.addStyle({ + "width":_element.offsetWidth+"px", "height":_element.offsetHeight+"px", + "top":top-(_bgInspector?0:2)+"px", "left":left-(_bgInspector?0:2)+"px", + "display":"block" + }); + + if(!_bgInspector){ + d.inspector.el = _element; + } + }; + }, + toggle:function(){ + with (firebug) { + d.inspector.enabled = !d.inspector.enabled; + el.button.inspect.attribute[(d.inspector.enabled ? "add" : "remove") + "Class"]("Enabled"); + if(d.inspector.enabled==false){ + el.borderInspector.environment.addStyle({ "display":"none" }); + d.inspector.el = null; + } else if(pi.env.dIndex!="html") { + d.navigate("html"); + } + } + } + }, + scripts:{ + index:-1, + lineNumbers:false, + open:function(_index){ + with(firebug){ + d.scripts.index = _index; + el.left.scripts.container.update(""); + var script = document.getElementsByTagName("script")[_index],uri = script.src||document.location.href,source; + + if(uri.indexOf("http:\/\/")>-1&&getDomain(uri)!=document.domain){ + el.left.scripts.container.update("Access to restricted URI denied"); + return; + } + + if(uri!=document.location.href){ + source = env.cache[uri]||pi.xhr.get(uri).responseText; + env.cache[uri] = source; + } else + source = script.innerHTML; + source = source.replace(/\n|\t|<|>/g,function(_ch){ + return ({"<":"<",">":">","\t":"        ","\n":"
                            "})[_ch]; + }); + + if (!d.scripts.lineNumbers) + el.left.scripts.container.child.add( + new pi.element("DIV").attribute.addClass("CodeContainer").update(source) + ); + else { + source = source.split("
                            "); + for (var i = 0; i < source.length; i++) { + el.left.scripts.container.child.add(new pi.element("DIV").child.add(new pi.element("DIV").attribute.addClass("LineNumber").update(i + 1), new pi.element("DIV").attribute.addClass("Code").update(" " + source[i]), new pi.element("DIV").environment.addStyle({ + "clear": "both" + }))); + }; + }; + } + }, + toggleLineNumbers:function(){ + with(firebug){ + d.scripts.lineNumbers = !d.scripts.lineNumbers; + el.button.scripts.lineNumbers.attribute[(d.scripts.lineNumbers ? "add" : "remove") + "Class"]("Enabled"); + d.scripts.open( d.scripts.index ); + + } + }, + refresh:function(){ + with(firebug){ + el.button.scripts.selectbox.clean(); + var collection = document.getElementsByTagName("script"); + for(var i=0; i")) + } + } + }, + xhr:{ + objects:[], + addObject:function(){ + with(firebug){ + for(var i=0; i d.console.historyIndex ? + d.console.history[d.console.historyIndex] : + "" + ); + } + }, + cssSelectbox:function(){ + with(firebug){ + d.css.open(el.button.css.selectbox.environment.getElement().selectedIndex); + } + }, + domTextbox:function(_event){ + with(firebug){ + if(_event.keyCode==13){ + d.dom.open(eval(el.button.dom.textbox.environment.getElement().value),el.left.dom.container); + } + } + }, + inspector:function(){ + with(firebug){ + d.html.inspect(d.inspector.el); + } + }, + keyboard:function(_event){ + with(firebug){ + if(_event.keyCode==27&&d.inspector.enabled) + d.inspector.toggle(); + } + }, + mouse:function(_event){ + with(firebug){ + var target = _event[pi.env.ie?"srcElement":"target"]; + if( + d.inspector.enabled&& + target!=document.body&& + target!=document.firstChild&& + target!=document.childNodes[1]&& + target!=el.borderInspector.environment.getElement()&& + target!=el.main.environment.getElement()&& + target.offsetParent!=el.main.environment.getElement() + ) + d.inspector.inspect(target); + } + }, + runMultiline:function(){ + with(firebug){ + d.console.run.call(window,el.right.console.input.environment.getElement().value); + } + }, + runCSS:function(){ + with(firebug){ + var source = el.right.css.input.environment.getElement().value.replace(/\n|\t/g,"").split("}"); + for(var i=0; i0?collection[0]:document.body.appendChild( document.createElement("style") ); + if(!item.match(/.+\{.+\}/))continue; + if(pi.env.ie) + style.styleSheet.addRule(rule[0],rule[1]); + else + style.sheet.insertRule( rule, style.sheet.cssRules.length ); + } + } + }, + scriptsSelectbox:function(){ + with(firebug){ + d.scripts.open(parseInt(el.button.scripts.selectbox.environment.getElement().value)); + } + }, + xhrTextbox:function(_event){ + with(firebug){ + if(_event.keyCode==13){ + d.xhr.addObject.apply(window, el.button.xhr.textbox.environment.getElement().value.split(",")); + } + } + } + } +}; + +window.console = firebug.d.console; +pi.util.AddEvent(window,"resize",firebug.d.refreshSize); +pi.util.AddEvent(document,"mousemove",firebug.listen.mouse); +pi.util.AddEvent(document,"keydown",firebug.listen.keyboard); +pi.util.DOMContentLoaded.push(firebug.init); \ No newline at end of file diff --git a/src/usr/local/www/javascript/firewall_nat_edit/autosuggest.js b/src/usr/local/www/javascript/firewall_nat_edit/autosuggest.js new file mode 100644 index 0000000..d9b5ac0 --- /dev/null +++ b/src/usr/local/www/javascript/firewall_nat_edit/autosuggest.js @@ -0,0 +1,337 @@ + +/** + * An autosuggest textbox control. + * @class + * @scope public + */ +function AutoSuggestControl(oTextbox /*:HTMLInputElement*/, + oProvider /*:SuggestionProvider*/) { + + /** + * The currently selected suggestions. + * @scope private + */ + this.cur /*:int*/ = -1; + + /** + * The dropdown list layer. + * @scope private + */ + this.layer = null; + + /** + * Suggestion provider for the autosuggest feature. + * @scope private. + */ + this.provider /*:SuggestionProvider*/ = oProvider; + + /** + * The textbox to capture. + * @scope private + */ + this.textbox /*:HTMLInputElement*/ = oTextbox; + + //initialize the control + this.init(); + +} + +/** + * Autosuggests one or more suggestions for what the user has typed. + * If no suggestions are passed in, then no autosuggest occurs. + * @scope private + * @param aSuggestions An array of suggestion strings. + * @param bTypeAhead If the control should provide a type ahead suggestion. + */ +AutoSuggestControl.prototype.autosuggest = function (aSuggestions /*:Array*/, + bTypeAhead /*:boolean*/) { + + //make sure there's at least one suggestion + if (aSuggestions.length > 0) { + if (bTypeAhead) { + this.typeAhead(aSuggestions[0]); + } + + this.showSuggestions(aSuggestions); + } else { + this.hideSuggestions(); + } +}; + +/** + * Creates the dropdown layer to display multiple suggestions. + * @scope private + */ +AutoSuggestControl.prototype.createDropDown = function () { + + var oThis = this; + + //create the layer and assign styles + this.layer = document.createElement("div"); + this.layer.className = "suggestions"; + this.layer.style.visibility = "hidden"; + this.layer.style.width = this.textbox.offsetWidth; + + //when the user clicks on the a suggestion, get the text (innerHTML) + //and place it into a textbox + this.layer.onmousedown = + this.layer.onmouseup = + this.layer.onmouseover = function (oEvent) { + oEvent = oEvent || window.event; + oTarget = oEvent.target || oEvent.srcElement; + + if (oEvent.type == "mousedown") { + oThis.textbox.value = oTarget.firstChild.nodeValue; + oThis.hideSuggestions(); + } else if (oEvent.type == "mouseover") { + oThis.highlightSuggestion(oTarget); + } else { + oThis.textbox.focus(); + } + }; + + + document.body.appendChild(this.layer); +}; + +/** + * Gets the left coordinate of the textbox. + * @scope private + * @return The left coordinate of the textbox in pixels. + */ +AutoSuggestControl.prototype.getLeft = function () /*:int*/ { + + var oNode = this.textbox; + var iLeft = 0; + + while(oNode.tagName != "BODY") { + iLeft += oNode.offsetLeft; + oNode = oNode.offsetParent; + } + + return iLeft; +}; + +/** + * Gets the top coordinate of the textbox. + * @scope private + * @return The top coordinate of the textbox in pixels. + */ +AutoSuggestControl.prototype.getTop = function () /*:int*/ { + + var oNode = this.textbox; + var iTop = 0; + + while(oNode.tagName != "BODY") { + iTop += oNode.offsetTop; + oNode = oNode.offsetParent; + } + + return iTop; +}; + +/** + * Handles three keydown events. + * @scope private + * @param oEvent The event object for the keydown event. + */ +AutoSuggestControl.prototype.handleKeyDown = function (oEvent /*:Event*/) { + + switch(oEvent.keyCode) { + case 38: //up arrow + this.previousSuggestion(); + break; + case 40: //down arrow + this.nextSuggestion(); + break; + case 13: //enter + this.hideSuggestions(); + break; + } + +}; + +/** + * Handles keyup events. + * @scope private + * @param oEvent The event object for the keyup event. + */ +AutoSuggestControl.prototype.handleKeyUp = function (oEvent /*:Event*/) { + + var iKeyCode = oEvent.keyCode; + + //for backspace (8) and delete (46), shows suggestions without typeahead + if (iKeyCode == 8 || iKeyCode == 46) { + this.provider.requestSuggestions(this, false); + + //make sure not to interfere with non-character keys + } else if (iKeyCode < 32 || (iKeyCode >= 33 && iKeyCode < 46) || (iKeyCode >= 112 && iKeyCode <= 123)) { + //ignore + } else { + //request suggestions from the suggestion provider with typeahead + this.provider.requestSuggestions(this, true); + } +}; + +/** + * Hides the suggestion dropdown. + * @scope private + */ +AutoSuggestControl.prototype.hideSuggestions = function () { + this.layer.style.visibility = "hidden"; +}; + +/** + * Highlights the given node in the suggestions dropdown. + * @scope private + * @param oSuggestionNode The node representing a suggestion in the dropdown. + */ +AutoSuggestControl.prototype.highlightSuggestion = function (oSuggestionNode) { + + for (var i=0; i < this.layer.childNodes.length; i++) { + var oNode = this.layer.childNodes[i]; + if (oNode == oSuggestionNode) { + oNode.className = "current"; + } else if (oNode.className == "current") { + oNode.className = ""; + } + } +}; + +/** + * Initializes the textbox with event handlers for + * auto suggest functionality. + * @scope private + */ +AutoSuggestControl.prototype.init = function () { + + //save a reference to this object + var oThis = this; + + //assign the onkeyup event handler + this.textbox.onkeyup = function (oEvent) { + + //check for the proper location of the event object + if (!oEvent) { + oEvent = window.event; + } + + //call the handleKeyUp() method with the event object + oThis.handleKeyUp(oEvent); + }; + + //assign onkeydown event handler + this.textbox.onkeydown = function (oEvent) { + + //check for the proper location of the event object + if (!oEvent) { + oEvent = window.event; + } + + //call the handleKeyDown() method with the event object + oThis.handleKeyDown(oEvent); + }; + + //assign onblur event handler (hides suggestions) + this.textbox.onblur = function () { + oThis.hideSuggestions(); + }; + + //create the suggestions dropdown + this.createDropDown(); +}; + +/** + * Highlights the next suggestion in the dropdown and + * places the suggestion into the textbox. + * @scope private + */ +AutoSuggestControl.prototype.nextSuggestion = function () { + var cSuggestionNodes = this.layer.childNodes; + + if (cSuggestionNodes.length > 0 && this.cur < cSuggestionNodes.length-1) { + var oNode = cSuggestionNodes[++this.cur]; + this.highlightSuggestion(oNode); + this.textbox.value = oNode.firstChild.nodeValue; + } +}; + +/** + * Highlights the previous suggestion in the dropdown and + * places the suggestion into the textbox. + * @scope private + */ +AutoSuggestControl.prototype.previousSuggestion = function () { + var cSuggestionNodes = this.layer.childNodes; + + if (cSuggestionNodes.length > 0 && this.cur > 0) { + var oNode = cSuggestionNodes[--this.cur]; + this.highlightSuggestion(oNode); + this.textbox.value = oNode.firstChild.nodeValue; + } +}; + +/** + * Selects a range of text in the textbox. + * @scope public + * @param iStart The start index (base 0) of the selection. + * @param iLength The number of characters to select. + */ +AutoSuggestControl.prototype.selectRange = function (iStart /*:int*/, iLength /*:int*/) { + + //use text ranges for Internet Explorer + if (this.textbox.createTextRange) { + var oRange = this.textbox.createTextRange(); + oRange.moveStart("character", iStart); + oRange.moveEnd("character", iLength - this.textbox.value.length); + oRange.select(); + + //use setSelectionRange() for Mozilla + } else if (this.textbox.setSelectionRange) { + this.textbox.setSelectionRange(iStart, iLength); + } + + //set focus back to the textbox + this.textbox.focus(); +}; + +/** + * Builds the suggestion layer contents, moves it into position, + * and displays the layer. + * @scope private + * @param aSuggestions An array of suggestions for the control. + */ +AutoSuggestControl.prototype.showSuggestions = function (aSuggestions /*:Array*/) { + + var oDiv = null; + this.layer.innerHTML = ""; //clear contents of the layer + + for (var i=0; i < aSuggestions.length; i++) { + oDiv = document.createElement("div"); + oDiv.appendChild(document.createTextNode(aSuggestions[i])); + this.layer.appendChild(oDiv); + } + + this.layer.style.left = this.getLeft() + "px"; + this.layer.style.top = (this.getTop()+this.textbox.offsetHeight) + "px"; + this.layer.style.width = this.textbox.offsetWidth + "px"; + this.layer.style.visibility = "visible"; + +}; + +/** + * Inserts a suggestion into the textbox, highlighting the + * suggested part of the text. + * @scope private + * @param sSuggestion The suggestion for the textbox. + */ +AutoSuggestControl.prototype.typeAhead = function (sSuggestion /*:String*/) { + + //check for support of typeahead functionality + if (this.textbox.createTextRange || this.textbox.setSelectionRange){ + var iLen = this.textbox.value.length; + this.textbox.value = sSuggestion; + this.selectRange(iLen, sSuggestion.length); + } +}; + diff --git a/src/usr/local/www/javascript/firewall_nat_edit/disablekeys.js b/src/usr/local/www/javascript/firewall_nat_edit/disablekeys.js new file mode 100644 index 0000000..5d6c87a --- /dev/null +++ b/src/usr/local/www/javascript/firewall_nat_edit/disablekeys.js @@ -0,0 +1,6 @@ +function kH(e) { + var pK = document.all? window.event.keyCode:e.which; + return pK != 13; +} +document.onkeypress = kH; +if (document.layers) document.captureEvents(Event.KEYPRESS); \ No newline at end of file diff --git a/src/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js b/src/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js new file mode 100644 index 0000000..7007b40 --- /dev/null +++ b/src/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js @@ -0,0 +1,203 @@ +//= 0 && document.iform.proto.selectedIndex <= 2) { + portsenabled = 1; + } else { + portsenabled = 0; + } + + if (portsenabled) { + document.getElementById("sprtable").style.display = showsource == 1 ? '':'none'; + document.getElementById("dprtr").style.display = ''; + document.getElementById("lprtr").style.display = document.iform.nordr.checked ? 'none' : ''; + } else { + document.getElementById("sprtable").style.display = 'none'; + document.getElementById("dprtr").style.display = 'none'; + document.getElementById("lprtr").style.display = 'none'; + document.getElementById("dstbeginport").selectedIndex = 0; + document.getElementById("dstbeginport_cust").value = ""; + document.getElementById("dstendport").selectedIndex = 0; + document.getElementById("dstendport_cust").value = ""; + document.getElementById("localbeginport").selectedIndex = 0; + document.getElementById("localbeginport_cust").value = ""; + } +} + +function typesel_change() { + switch (document.iform.srctype.selectedIndex) { + case 1: /* single */ + document.iform.src.disabled = 0; + document.iform.srcmask.value = ""; + document.iform.srcmask.disabled = 1; + break; + case 2: /* network */ + document.iform.src.disabled = 0; + document.iform.srcmask.disabled = 0; + break; + default: + document.iform.src.value = ""; + document.iform.src.disabled = 1; + document.iform.srcmask.value = ""; + document.iform.srcmask.disabled = 1; + break; + } + if( dstenabled ) + { + switch (document.iform.dsttype.selectedIndex) { + case 1: /* single */ + document.iform.dst.disabled = 0; + document.iform.dstmask.value = ""; + document.iform.dstmask.disabled = 1; + break; + case 2: /* network */ + document.iform.dst.disabled = 0; + document.iform.dstmask.disabled = 0; + break; + default: + document.iform.dst.value = ""; + document.iform.dst.disabled = 1; + document.iform.dstmask.value = ""; + document.iform.dstmask.disabled = 1; + break; + } + } +} + +function src_rep_change() { + document.iform.srcendport.selectedIndex = document.iform.srcbeginport.selectedIndex; +} + +function dst_rep_change() { + document.iform.dstendport.selectedIndex = document.iform.dstbeginport.selectedIndex; +} + +function dst_change( iface, old_iface, old_dst ) { + if ( ( old_dst == "" ) || ( old_iface.concat("ip") == old_dst ) ) { + document.iform.dsttype.value = iface.concat("ip"); + } +} +//]]> diff --git a/src/usr/local/www/javascript/firewall_nat_edit/suggestions.js b/src/usr/local/www/javascript/firewall_nat_edit/suggestions.js new file mode 100644 index 0000000..4d1e127 --- /dev/null +++ b/src/usr/local/www/javascript/firewall_nat_edit/suggestions.js @@ -0,0 +1,33 @@ + +/** + * Provides suggestions for state names (USA). + * @class + * @scope public + */ +function StateSuggestions(text) { + this.states = text; +} + +/** + * Request suggestions for the given autosuggest control. + * @scope protected + * @param oAutoSuggestControl The autosuggest control to provide suggestions for. + */ +StateSuggestions.prototype.requestSuggestions = function (oAutoSuggestControl /*:AutoSuggestControl*/, + bTypeAhead /*:boolean*/) { + var aSuggestions = []; + var sTextboxValue = oAutoSuggestControl.textbox.value; + + if (sTextboxValue.length > 0){ + + //search for matching states + for (var i=0; i < this.states.length; i++) { + if (this.states[i].toLowerCase().indexOf(sTextboxValue.toLowerCase()) == 0) { + aSuggestions.push(this.states[i]); + } + } + } + + //provide suggestions to the control + oAutoSuggestControl.autosuggest(aSuggestions, bTypeAhead); +}; diff --git a/src/usr/local/www/javascript/firewall_rules_edit/autosuggest.js b/src/usr/local/www/javascript/firewall_rules_edit/autosuggest.js new file mode 100644 index 0000000..d9b5ac0 --- /dev/null +++ b/src/usr/local/www/javascript/firewall_rules_edit/autosuggest.js @@ -0,0 +1,337 @@ + +/** + * An autosuggest textbox control. + * @class + * @scope public + */ +function AutoSuggestControl(oTextbox /*:HTMLInputElement*/, + oProvider /*:SuggestionProvider*/) { + + /** + * The currently selected suggestions. + * @scope private + */ + this.cur /*:int*/ = -1; + + /** + * The dropdown list layer. + * @scope private + */ + this.layer = null; + + /** + * Suggestion provider for the autosuggest feature. + * @scope private. + */ + this.provider /*:SuggestionProvider*/ = oProvider; + + /** + * The textbox to capture. + * @scope private + */ + this.textbox /*:HTMLInputElement*/ = oTextbox; + + //initialize the control + this.init(); + +} + +/** + * Autosuggests one or more suggestions for what the user has typed. + * If no suggestions are passed in, then no autosuggest occurs. + * @scope private + * @param aSuggestions An array of suggestion strings. + * @param bTypeAhead If the control should provide a type ahead suggestion. + */ +AutoSuggestControl.prototype.autosuggest = function (aSuggestions /*:Array*/, + bTypeAhead /*:boolean*/) { + + //make sure there's at least one suggestion + if (aSuggestions.length > 0) { + if (bTypeAhead) { + this.typeAhead(aSuggestions[0]); + } + + this.showSuggestions(aSuggestions); + } else { + this.hideSuggestions(); + } +}; + +/** + * Creates the dropdown layer to display multiple suggestions. + * @scope private + */ +AutoSuggestControl.prototype.createDropDown = function () { + + var oThis = this; + + //create the layer and assign styles + this.layer = document.createElement("div"); + this.layer.className = "suggestions"; + this.layer.style.visibility = "hidden"; + this.layer.style.width = this.textbox.offsetWidth; + + //when the user clicks on the a suggestion, get the text (innerHTML) + //and place it into a textbox + this.layer.onmousedown = + this.layer.onmouseup = + this.layer.onmouseover = function (oEvent) { + oEvent = oEvent || window.event; + oTarget = oEvent.target || oEvent.srcElement; + + if (oEvent.type == "mousedown") { + oThis.textbox.value = oTarget.firstChild.nodeValue; + oThis.hideSuggestions(); + } else if (oEvent.type == "mouseover") { + oThis.highlightSuggestion(oTarget); + } else { + oThis.textbox.focus(); + } + }; + + + document.body.appendChild(this.layer); +}; + +/** + * Gets the left coordinate of the textbox. + * @scope private + * @return The left coordinate of the textbox in pixels. + */ +AutoSuggestControl.prototype.getLeft = function () /*:int*/ { + + var oNode = this.textbox; + var iLeft = 0; + + while(oNode.tagName != "BODY") { + iLeft += oNode.offsetLeft; + oNode = oNode.offsetParent; + } + + return iLeft; +}; + +/** + * Gets the top coordinate of the textbox. + * @scope private + * @return The top coordinate of the textbox in pixels. + */ +AutoSuggestControl.prototype.getTop = function () /*:int*/ { + + var oNode = this.textbox; + var iTop = 0; + + while(oNode.tagName != "BODY") { + iTop += oNode.offsetTop; + oNode = oNode.offsetParent; + } + + return iTop; +}; + +/** + * Handles three keydown events. + * @scope private + * @param oEvent The event object for the keydown event. + */ +AutoSuggestControl.prototype.handleKeyDown = function (oEvent /*:Event*/) { + + switch(oEvent.keyCode) { + case 38: //up arrow + this.previousSuggestion(); + break; + case 40: //down arrow + this.nextSuggestion(); + break; + case 13: //enter + this.hideSuggestions(); + break; + } + +}; + +/** + * Handles keyup events. + * @scope private + * @param oEvent The event object for the keyup event. + */ +AutoSuggestControl.prototype.handleKeyUp = function (oEvent /*:Event*/) { + + var iKeyCode = oEvent.keyCode; + + //for backspace (8) and delete (46), shows suggestions without typeahead + if (iKeyCode == 8 || iKeyCode == 46) { + this.provider.requestSuggestions(this, false); + + //make sure not to interfere with non-character keys + } else if (iKeyCode < 32 || (iKeyCode >= 33 && iKeyCode < 46) || (iKeyCode >= 112 && iKeyCode <= 123)) { + //ignore + } else { + //request suggestions from the suggestion provider with typeahead + this.provider.requestSuggestions(this, true); + } +}; + +/** + * Hides the suggestion dropdown. + * @scope private + */ +AutoSuggestControl.prototype.hideSuggestions = function () { + this.layer.style.visibility = "hidden"; +}; + +/** + * Highlights the given node in the suggestions dropdown. + * @scope private + * @param oSuggestionNode The node representing a suggestion in the dropdown. + */ +AutoSuggestControl.prototype.highlightSuggestion = function (oSuggestionNode) { + + for (var i=0; i < this.layer.childNodes.length; i++) { + var oNode = this.layer.childNodes[i]; + if (oNode == oSuggestionNode) { + oNode.className = "current"; + } else if (oNode.className == "current") { + oNode.className = ""; + } + } +}; + +/** + * Initializes the textbox with event handlers for + * auto suggest functionality. + * @scope private + */ +AutoSuggestControl.prototype.init = function () { + + //save a reference to this object + var oThis = this; + + //assign the onkeyup event handler + this.textbox.onkeyup = function (oEvent) { + + //check for the proper location of the event object + if (!oEvent) { + oEvent = window.event; + } + + //call the handleKeyUp() method with the event object + oThis.handleKeyUp(oEvent); + }; + + //assign onkeydown event handler + this.textbox.onkeydown = function (oEvent) { + + //check for the proper location of the event object + if (!oEvent) { + oEvent = window.event; + } + + //call the handleKeyDown() method with the event object + oThis.handleKeyDown(oEvent); + }; + + //assign onblur event handler (hides suggestions) + this.textbox.onblur = function () { + oThis.hideSuggestions(); + }; + + //create the suggestions dropdown + this.createDropDown(); +}; + +/** + * Highlights the next suggestion in the dropdown and + * places the suggestion into the textbox. + * @scope private + */ +AutoSuggestControl.prototype.nextSuggestion = function () { + var cSuggestionNodes = this.layer.childNodes; + + if (cSuggestionNodes.length > 0 && this.cur < cSuggestionNodes.length-1) { + var oNode = cSuggestionNodes[++this.cur]; + this.highlightSuggestion(oNode); + this.textbox.value = oNode.firstChild.nodeValue; + } +}; + +/** + * Highlights the previous suggestion in the dropdown and + * places the suggestion into the textbox. + * @scope private + */ +AutoSuggestControl.prototype.previousSuggestion = function () { + var cSuggestionNodes = this.layer.childNodes; + + if (cSuggestionNodes.length > 0 && this.cur > 0) { + var oNode = cSuggestionNodes[--this.cur]; + this.highlightSuggestion(oNode); + this.textbox.value = oNode.firstChild.nodeValue; + } +}; + +/** + * Selects a range of text in the textbox. + * @scope public + * @param iStart The start index (base 0) of the selection. + * @param iLength The number of characters to select. + */ +AutoSuggestControl.prototype.selectRange = function (iStart /*:int*/, iLength /*:int*/) { + + //use text ranges for Internet Explorer + if (this.textbox.createTextRange) { + var oRange = this.textbox.createTextRange(); + oRange.moveStart("character", iStart); + oRange.moveEnd("character", iLength - this.textbox.value.length); + oRange.select(); + + //use setSelectionRange() for Mozilla + } else if (this.textbox.setSelectionRange) { + this.textbox.setSelectionRange(iStart, iLength); + } + + //set focus back to the textbox + this.textbox.focus(); +}; + +/** + * Builds the suggestion layer contents, moves it into position, + * and displays the layer. + * @scope private + * @param aSuggestions An array of suggestions for the control. + */ +AutoSuggestControl.prototype.showSuggestions = function (aSuggestions /*:Array*/) { + + var oDiv = null; + this.layer.innerHTML = ""; //clear contents of the layer + + for (var i=0; i < aSuggestions.length; i++) { + oDiv = document.createElement("div"); + oDiv.appendChild(document.createTextNode(aSuggestions[i])); + this.layer.appendChild(oDiv); + } + + this.layer.style.left = this.getLeft() + "px"; + this.layer.style.top = (this.getTop()+this.textbox.offsetHeight) + "px"; + this.layer.style.width = this.textbox.offsetWidth + "px"; + this.layer.style.visibility = "visible"; + +}; + +/** + * Inserts a suggestion into the textbox, highlighting the + * suggested part of the text. + * @scope private + * @param sSuggestion The suggestion for the textbox. + */ +AutoSuggestControl.prototype.typeAhead = function (sSuggestion /*:String*/) { + + //check for support of typeahead functionality + if (this.textbox.createTextRange || this.textbox.setSelectionRange){ + var iLen = this.textbox.value.length; + this.textbox.value = sSuggestion; + this.selectRange(iLen, sSuggestion.length); + } +}; + diff --git a/src/usr/local/www/javascript/firewall_rules_edit/disablekeys.js b/src/usr/local/www/javascript/firewall_rules_edit/disablekeys.js new file mode 100644 index 0000000..5d6c87a --- /dev/null +++ b/src/usr/local/www/javascript/firewall_rules_edit/disablekeys.js @@ -0,0 +1,6 @@ +function kH(e) { + var pK = document.all? window.event.keyCode:e.which; + return pK != 13; +} +document.onkeypress = kH; +if (document.layers) document.captureEvents(Event.KEYPRESS); \ No newline at end of file diff --git a/src/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js b/src/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js new file mode 100644 index 0000000..de1ff0c --- /dev/null +++ b/src/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js @@ -0,0 +1,237 @@ +//= 0 && document.iform.proto.selectedIndex <= 2) { + document.getElementById("dprtr").style.display = ''; + if (editenabled) { + document.getElementById("showadvancedboxspr").style.display = 'table-row'; + } + } else { + document.getElementById("sprtable").style.display = 'none'; + document.getElementById("dprtr").style.display = 'none'; + document.getElementById("showadvancedboxspr").style.display = 'none'; + } +} + +function show_aodiv() { + document.getElementById("aoadv").innerHTML=''; + aodiv = document.getElementById('aodivmain'); + aodiv.style.display = "block"; +} + +function show_dsdiv() { + document.getElementById("dsadv").innerHTML=''; + dsdiv = document.getElementById('dsdivmain'); + dsdiv.style.display = "block"; +} + +function show_advanced_noxmlrpc() { + document.getElementById("showadvnoxmlrpcsyncbox").innerHTML=''; + aodiv = document.getElementById('shownoxmlrpcadv'); + aodiv.style.display = "block"; +} + +function show_advanced_vlanprio() { + document.getElementById("showadvvlanpriobox").innerHTML=''; + aodiv = document.getElementById('showvlanprioadv'); + aodiv.style.display = "block"; +} + +function show_advanced_schedule() { + document.getElementById("showadvschedulebox").innerHTML=''; + aodiv = document.getElementById('showscheduleadv'); + aodiv.style.display = "block"; +} + +function show_advanced_gateway() { + document.getElementById("showadvgatewaybox").innerHTML=''; + aodiv = document.getElementById('showgatewayadv'); + aodiv.style.display = "block"; +} + +function show_advanced_sourceos() { + document.getElementById("showadvsourceosbox").innerHTML=''; + aodiv = document.getElementById('showsourceosadv'); + aodiv.style.display = "block"; +} + +function show_advanced_ackqueue() { + document.getElementById("showadvackqueuebox").innerHTML=''; + aodiv = document.getElementById('showackqueueadv'); + aodiv.style.display = "block"; +} + +function show_advanced_inout() { + document.getElementById("showadvinoutbox").innerHTML=''; + aodiv = document.getElementById('showinoutadv'); + aodiv.style.display = "block"; +} + +function show_advanced_state() { + document.getElementById("showadvstatebox").innerHTML=''; + aodiv = document.getElementById('showstateadv'); + aodiv.style.display = "block"; +} + +function show_advanced_tcpflags() { + document.getElementById("showtcpflagsbox").innerHTML=''; + aodiv = document.getElementById('showtcpflagsadv'); + aodiv.style.display = "block"; +} + +function show_advanced_layer7() { + document.getElementById("showadvlayer7box").innerHTML=''; + aodiv = document.getElementById('showlayer7adv'); + aodiv.style.display = "block"; +} + +function src_rep_change() { + document.iform.srcendport.selectedIndex = document.iform.srcbeginport.selectedIndex; +} + +function dst_rep_change() { + document.iform.dstendport.selectedIndex = document.iform.dstbeginport.selectedIndex; +} + +function tcpflags_anyclick(obj) { + if (obj.checked) { + document.getElementById('tcpheader').style.display= 'none'; + } else { + document.getElementById('tcpheader').style.display= ""; + } +} +//]]> diff --git a/src/usr/local/www/javascript/firewall_rules_edit/suggestions.js b/src/usr/local/www/javascript/firewall_rules_edit/suggestions.js new file mode 100644 index 0000000..4d1e127 --- /dev/null +++ b/src/usr/local/www/javascript/firewall_rules_edit/suggestions.js @@ -0,0 +1,33 @@ + +/** + * Provides suggestions for state names (USA). + * @class + * @scope public + */ +function StateSuggestions(text) { + this.states = text; +} + +/** + * Request suggestions for the given autosuggest control. + * @scope protected + * @param oAutoSuggestControl The autosuggest control to provide suggestions for. + */ +StateSuggestions.prototype.requestSuggestions = function (oAutoSuggestControl /*:AutoSuggestControl*/, + bTypeAhead /*:boolean*/) { + var aSuggestions = []; + var sTextboxValue = oAutoSuggestControl.textbox.value; + + if (sTextboxValue.length > 0){ + + //search for matching states + for (var i=0; i < this.states.length; i++) { + if (this.states[i].toLowerCase().indexOf(sTextboxValue.toLowerCase()) == 0) { + aSuggestions.push(this.states[i]); + } + } + } + + //provide suggestions to the control + oAutoSuggestControl.autosuggest(aSuggestions, bTypeAhead); +}; diff --git a/src/usr/local/www/javascript/firewall_shaper_edit/autosuggest.js b/src/usr/local/www/javascript/firewall_shaper_edit/autosuggest.js new file mode 100644 index 0000000..d9b5ac0 --- /dev/null +++ b/src/usr/local/www/javascript/firewall_shaper_edit/autosuggest.js @@ -0,0 +1,337 @@ + +/** + * An autosuggest textbox control. + * @class + * @scope public + */ +function AutoSuggestControl(oTextbox /*:HTMLInputElement*/, + oProvider /*:SuggestionProvider*/) { + + /** + * The currently selected suggestions. + * @scope private + */ + this.cur /*:int*/ = -1; + + /** + * The dropdown list layer. + * @scope private + */ + this.layer = null; + + /** + * Suggestion provider for the autosuggest feature. + * @scope private. + */ + this.provider /*:SuggestionProvider*/ = oProvider; + + /** + * The textbox to capture. + * @scope private + */ + this.textbox /*:HTMLInputElement*/ = oTextbox; + + //initialize the control + this.init(); + +} + +/** + * Autosuggests one or more suggestions for what the user has typed. + * If no suggestions are passed in, then no autosuggest occurs. + * @scope private + * @param aSuggestions An array of suggestion strings. + * @param bTypeAhead If the control should provide a type ahead suggestion. + */ +AutoSuggestControl.prototype.autosuggest = function (aSuggestions /*:Array*/, + bTypeAhead /*:boolean*/) { + + //make sure there's at least one suggestion + if (aSuggestions.length > 0) { + if (bTypeAhead) { + this.typeAhead(aSuggestions[0]); + } + + this.showSuggestions(aSuggestions); + } else { + this.hideSuggestions(); + } +}; + +/** + * Creates the dropdown layer to display multiple suggestions. + * @scope private + */ +AutoSuggestControl.prototype.createDropDown = function () { + + var oThis = this; + + //create the layer and assign styles + this.layer = document.createElement("div"); + this.layer.className = "suggestions"; + this.layer.style.visibility = "hidden"; + this.layer.style.width = this.textbox.offsetWidth; + + //when the user clicks on the a suggestion, get the text (innerHTML) + //and place it into a textbox + this.layer.onmousedown = + this.layer.onmouseup = + this.layer.onmouseover = function (oEvent) { + oEvent = oEvent || window.event; + oTarget = oEvent.target || oEvent.srcElement; + + if (oEvent.type == "mousedown") { + oThis.textbox.value = oTarget.firstChild.nodeValue; + oThis.hideSuggestions(); + } else if (oEvent.type == "mouseover") { + oThis.highlightSuggestion(oTarget); + } else { + oThis.textbox.focus(); + } + }; + + + document.body.appendChild(this.layer); +}; + +/** + * Gets the left coordinate of the textbox. + * @scope private + * @return The left coordinate of the textbox in pixels. + */ +AutoSuggestControl.prototype.getLeft = function () /*:int*/ { + + var oNode = this.textbox; + var iLeft = 0; + + while(oNode.tagName != "BODY") { + iLeft += oNode.offsetLeft; + oNode = oNode.offsetParent; + } + + return iLeft; +}; + +/** + * Gets the top coordinate of the textbox. + * @scope private + * @return The top coordinate of the textbox in pixels. + */ +AutoSuggestControl.prototype.getTop = function () /*:int*/ { + + var oNode = this.textbox; + var iTop = 0; + + while(oNode.tagName != "BODY") { + iTop += oNode.offsetTop; + oNode = oNode.offsetParent; + } + + return iTop; +}; + +/** + * Handles three keydown events. + * @scope private + * @param oEvent The event object for the keydown event. + */ +AutoSuggestControl.prototype.handleKeyDown = function (oEvent /*:Event*/) { + + switch(oEvent.keyCode) { + case 38: //up arrow + this.previousSuggestion(); + break; + case 40: //down arrow + this.nextSuggestion(); + break; + case 13: //enter + this.hideSuggestions(); + break; + } + +}; + +/** + * Handles keyup events. + * @scope private + * @param oEvent The event object for the keyup event. + */ +AutoSuggestControl.prototype.handleKeyUp = function (oEvent /*:Event*/) { + + var iKeyCode = oEvent.keyCode; + + //for backspace (8) and delete (46), shows suggestions without typeahead + if (iKeyCode == 8 || iKeyCode == 46) { + this.provider.requestSuggestions(this, false); + + //make sure not to interfere with non-character keys + } else if (iKeyCode < 32 || (iKeyCode >= 33 && iKeyCode < 46) || (iKeyCode >= 112 && iKeyCode <= 123)) { + //ignore + } else { + //request suggestions from the suggestion provider with typeahead + this.provider.requestSuggestions(this, true); + } +}; + +/** + * Hides the suggestion dropdown. + * @scope private + */ +AutoSuggestControl.prototype.hideSuggestions = function () { + this.layer.style.visibility = "hidden"; +}; + +/** + * Highlights the given node in the suggestions dropdown. + * @scope private + * @param oSuggestionNode The node representing a suggestion in the dropdown. + */ +AutoSuggestControl.prototype.highlightSuggestion = function (oSuggestionNode) { + + for (var i=0; i < this.layer.childNodes.length; i++) { + var oNode = this.layer.childNodes[i]; + if (oNode == oSuggestionNode) { + oNode.className = "current"; + } else if (oNode.className == "current") { + oNode.className = ""; + } + } +}; + +/** + * Initializes the textbox with event handlers for + * auto suggest functionality. + * @scope private + */ +AutoSuggestControl.prototype.init = function () { + + //save a reference to this object + var oThis = this; + + //assign the onkeyup event handler + this.textbox.onkeyup = function (oEvent) { + + //check for the proper location of the event object + if (!oEvent) { + oEvent = window.event; + } + + //call the handleKeyUp() method with the event object + oThis.handleKeyUp(oEvent); + }; + + //assign onkeydown event handler + this.textbox.onkeydown = function (oEvent) { + + //check for the proper location of the event object + if (!oEvent) { + oEvent = window.event; + } + + //call the handleKeyDown() method with the event object + oThis.handleKeyDown(oEvent); + }; + + //assign onblur event handler (hides suggestions) + this.textbox.onblur = function () { + oThis.hideSuggestions(); + }; + + //create the suggestions dropdown + this.createDropDown(); +}; + +/** + * Highlights the next suggestion in the dropdown and + * places the suggestion into the textbox. + * @scope private + */ +AutoSuggestControl.prototype.nextSuggestion = function () { + var cSuggestionNodes = this.layer.childNodes; + + if (cSuggestionNodes.length > 0 && this.cur < cSuggestionNodes.length-1) { + var oNode = cSuggestionNodes[++this.cur]; + this.highlightSuggestion(oNode); + this.textbox.value = oNode.firstChild.nodeValue; + } +}; + +/** + * Highlights the previous suggestion in the dropdown and + * places the suggestion into the textbox. + * @scope private + */ +AutoSuggestControl.prototype.previousSuggestion = function () { + var cSuggestionNodes = this.layer.childNodes; + + if (cSuggestionNodes.length > 0 && this.cur > 0) { + var oNode = cSuggestionNodes[--this.cur]; + this.highlightSuggestion(oNode); + this.textbox.value = oNode.firstChild.nodeValue; + } +}; + +/** + * Selects a range of text in the textbox. + * @scope public + * @param iStart The start index (base 0) of the selection. + * @param iLength The number of characters to select. + */ +AutoSuggestControl.prototype.selectRange = function (iStart /*:int*/, iLength /*:int*/) { + + //use text ranges for Internet Explorer + if (this.textbox.createTextRange) { + var oRange = this.textbox.createTextRange(); + oRange.moveStart("character", iStart); + oRange.moveEnd("character", iLength - this.textbox.value.length); + oRange.select(); + + //use setSelectionRange() for Mozilla + } else if (this.textbox.setSelectionRange) { + this.textbox.setSelectionRange(iStart, iLength); + } + + //set focus back to the textbox + this.textbox.focus(); +}; + +/** + * Builds the suggestion layer contents, moves it into position, + * and displays the layer. + * @scope private + * @param aSuggestions An array of suggestions for the control. + */ +AutoSuggestControl.prototype.showSuggestions = function (aSuggestions /*:Array*/) { + + var oDiv = null; + this.layer.innerHTML = ""; //clear contents of the layer + + for (var i=0; i < aSuggestions.length; i++) { + oDiv = document.createElement("div"); + oDiv.appendChild(document.createTextNode(aSuggestions[i])); + this.layer.appendChild(oDiv); + } + + this.layer.style.left = this.getLeft() + "px"; + this.layer.style.top = (this.getTop()+this.textbox.offsetHeight) + "px"; + this.layer.style.width = this.textbox.offsetWidth + "px"; + this.layer.style.visibility = "visible"; + +}; + +/** + * Inserts a suggestion into the textbox, highlighting the + * suggested part of the text. + * @scope private + * @param sSuggestion The suggestion for the textbox. + */ +AutoSuggestControl.prototype.typeAhead = function (sSuggestion /*:String*/) { + + //check for support of typeahead functionality + if (this.textbox.createTextRange || this.textbox.setSelectionRange){ + var iLen = this.textbox.value.length; + this.textbox.value = sSuggestion; + this.selectRange(iLen, sSuggestion.length); + } +}; + diff --git a/src/usr/local/www/javascript/firewall_shaper_edit/disablekeys.js b/src/usr/local/www/javascript/firewall_shaper_edit/disablekeys.js new file mode 100644 index 0000000..5d6c87a --- /dev/null +++ b/src/usr/local/www/javascript/firewall_shaper_edit/disablekeys.js @@ -0,0 +1,6 @@ +function kH(e) { + var pK = document.all? window.event.keyCode:e.which; + return pK != 13; +} +document.onkeypress = kH; +if (document.layers) document.captureEvents(Event.KEYPRESS); \ No newline at end of file diff --git a/src/usr/local/www/javascript/firewall_shaper_edit/firewall_shaper_edit.js b/src/usr/local/www/javascript/firewall_shaper_edit/firewall_shaper_edit.js new file mode 100644 index 0000000..b1b8df0 --- /dev/null +++ b/src/usr/local/www/javascript/firewall_shaper_edit/firewall_shaper_edit.js @@ -0,0 +1,37 @@ +// \ No newline at end of file diff --git a/src/usr/local/www/javascript/firewall_shaper_edit/suggestions.js b/src/usr/local/www/javascript/firewall_shaper_edit/suggestions.js new file mode 100644 index 0000000..4d1e127 --- /dev/null +++ b/src/usr/local/www/javascript/firewall_shaper_edit/suggestions.js @@ -0,0 +1,33 @@ + +/** + * Provides suggestions for state names (USA). + * @class + * @scope public + */ +function StateSuggestions(text) { + this.states = text; +} + +/** + * Request suggestions for the given autosuggest control. + * @scope protected + * @param oAutoSuggestControl The autosuggest control to provide suggestions for. + */ +StateSuggestions.prototype.requestSuggestions = function (oAutoSuggestControl /*:AutoSuggestControl*/, + bTypeAhead /*:boolean*/) { + var aSuggestions = []; + var sTextboxValue = oAutoSuggestControl.textbox.value; + + if (sTextboxValue.length > 0){ + + //search for matching states + for (var i=0; i < this.states.length; i++) { + if (this.states[i].toLowerCase().indexOf(sTextboxValue.toLowerCase()) == 0) { + aSuggestions.push(this.states[i]); + } + } + } + + //provide suggestions to the control + oAutoSuggestControl.autosuggest(aSuggestions, bTypeAhead); +}; diff --git a/src/usr/local/www/javascript/global.js b/src/usr/local/www/javascript/global.js new file mode 100644 index 0000000..0b67f58 --- /dev/null +++ b/src/usr/local/www/javascript/global.js @@ -0,0 +1,43 @@ +var AjaxQueue = { + batchSize: 1, //No.of simultaneous AJAX requests allowed, Default : 1 + urlQueue: [], //Request URLs will be pushed into this array + elementsQueue: [], //Element IDs of elements to be updated on completion of a request + optionsQueue: [], //Request options will be pushed into this array + currentRequest: null, + setBatchSize: function(bSize){ //Method to set a different batch size. Recommended: Set batchSize before making requests + this.batchSize = bSize; + }, + push: function(url, options, elementID){ //Push the request in the queue. elementID is optional and required only for Ajax requests that updates the element + this.urlQueue.push(url); + this.optionsQueue.push(options); + if(elementID!=null){ + this.elementsQueue.push(elementID); + } else { + this.elementsQueue.push("NOTSPECIFIED"); + } + + this._processNext(); + }, + _processNext: function() { // Method for processing the requests in the queue. Private method. Don't call it explicitly + if(this.currentRequest == null && this.urlQueue.length > 0) // Check if the currently processing request count is less than batch size + { + // Call jQuery.ajax on the first item in the queue and remove it from the queue + AjaxQueue.currentRequest = jQuery.ajax(AjaxQueue.urlQueue.shift(), AjaxQueue.optionsQueue.shift()); + AjaxQueue.currentRequest.complete( function() { + //Call AjaxQueue._processNext on completion ( success / failure) of this AJAX request. + AjaxQueue.currentRequest = null; + AjaxQueue._processNext(); + }); + if(this.elementsQueue[0]=="NOTSPECIFIED") { //Check if an elementID was specified + // If no ElementID was specified remove the first item from the queue + var junk = AjaxQueue.elementsQueue.shift(); + } else { + // If ElementID was specified update the first item in the queue and remove it from the queue + AjaxQueue.currentRequest.success( function(data) { + jQuery(AjaxQueue.elementsQueue.shift()).html(data); + }); + } + } + } +}; + diff --git a/src/usr/local/www/javascript/index/ajax.js b/src/usr/local/www/javascript/index/ajax.js new file mode 100644 index 0000000..274b8c0 --- /dev/null +++ b/src/usr/local/www/javascript/index/ajax.js @@ -0,0 +1,196 @@ +/* Most widgets update their backend data every 10 seconds. 11 seconds + * will ensure that we update the GUI right after the stats are updated. + * Seconds * 1000 = value + */ +var Seconds = 11; +var update_interval = (Math.abs(Math.ceil(Seconds))-1)*1000 + 990; + +function updateMeters() { + url = '/getstats.php'; + + jQuery.ajax(url, { + type: 'get', + success: function(data) { + response = data || ""; + if (response != "") + stats(data); + } + }); + setTimer(); +} + +function setTimer() { + timeout = window.setTimeout('updateMeters()', update_interval); +} + +function stats(x) { + var values = x.split("|"); + if (jQuery.each(values,function(key,value){ + if (value == 'undefined' || value == null) + return true; + else + return false; + })) + + updateUptime(values[2]); + updateDateTime(values[5]); + updateCPU(values[0]); + updateMemory(values[1]); + updateState(values[3]); + updateTemp(values[4]); + updateInterfaceStats(values[6]); + updateInterfaces(values[7]); + updateGatewayStats(values[8]); + updateCpuFreq(values[9]); + updateLoadAverage(values[10]); + updateMbuf(values[11]); + updateMbufMeter(values[12]); + updateStateMeter(values[13]); +} + +function updateMemory(x) { + if(jQuery('#memusagemeter')) + jQuery("#memusagemeter").html(x + '%'); + if(jQuery('#memUsagePB')) + jQuery('#memUsagePB').progressbar( { value: parseInt(x) } ); +} + +function updateMbuf(x) { + if(jQuery('#mbuf')) + jQuery("#mbuf").html(x); +} + +function updateMbufMeter(x) { + if(jQuery('#mbufusagemeter')) + jQuery("#mbufusagemeter").html(x + '%'); + if(jQuery('#mbufPB')) + jQuery('#mbufPB').progressbar( { value: parseInt(x) } ); +} + +function updateCPU(x) { + if(jQuery('#cpumeter')) + jQuery("#cpumeter").html(x + '%'); + if(jQuery('#cpuPB')) + jQuery('#cpuPB').progressbar( { value: parseInt(x) } ); + /* Load CPU Graph widget if enabled */ + if(widgetActive('cpu_graphs')) { + GraphValue(graph[0], x); + } +} + +function updateTemp(x) { + if(jQuery("#tempmeter")) + jQuery("#tempmeter").html(x + '\u00B0' + 'C'); + if(jQuery('#tempPB')) + jQuery("#tempPB").progressbar( { value: parseInt(x) } ); +} + +function updateDateTime(x) { + if(jQuery('#datetime')) + jQuery("#datetime").html(x); +} + +function updateUptime(x) { + if(jQuery('#uptime')) + jQuery("#uptime").html(x); +} + +function updateState(x) { + if(jQuery('#pfstate')) + jQuery("#pfstate").html(x); +} + +function updateStateMeter(x) { + if(jQuery('#pfstateusagemeter')) + jQuery("#pfstateusagemeter").html(x + '%'); + if(jQuery('#statePB')) + jQuery('#statePB').progressbar( { value: parseInt(x) } ); +} + +function updateGatewayStats(x){ + if (widgetActive("gateways")){ + gateways_split = x.split(","); + for (var y=0; y'; + switch(details[1]) { + case "up": + jQuery('#' + details[0] + '-up').css("display","inline"); + jQuery('#' + details[0] + '-down').css("display","none"); + jQuery('#' + details[0] + '-block').css("display","none"); + jQuery('#' + details[0] + '-ip').html(ipv4_details); + jQuery('#' + details[0] + '-ipv6').html(details[3]); + jQuery('#' + details[0] + '-media').html(details[4]); + break; + case "down": + jQuery('#' + details[0] + '-down').css("display","inline"); + jQuery('#' + details[0] + '-up').css("display","none"); + jQuery('#' + details[0] + '-block').css("display","none"); + jQuery('#' + details[0] + '-ip').html(ipv4_details); + jQuery('#' + details[0] + '-ipv6').html(details[3]); + jQuery('#' + details[0] + '-media').html(details[4]); + break; + case "block": + jQuery('#' + details[0] + '-block').css("display","inline"); + jQuery('#' + details[0] + '-down').css("display","none"); + jQuery('#' + details[0] + '-up').css("display","none"); + break; + } + }); + } +} + +function widgetActive(x) { + var widget = jQuery('#' + x + '-container'); + if ((widget != null) && (widget.css('display') != null) && (widget.css('display') != "none")) + return true; + else + return false; +} + +/* start updater */ +jQuery(document).ready(function(){ + setTimer(); +}); + diff --git a/src/usr/local/www/javascript/interfaces_ppps_edit/ppps_edit.js b/src/usr/local/www/javascript/interfaces_ppps_edit/ppps_edit.js new file mode 100644 index 0000000..45b529b --- /dev/null +++ b/src/usr/local/www/javascript/interfaces_ppps_edit/ppps_edit.js @@ -0,0 +1,253 @@ +/*jslint white: true, sloppy: true, vars: true, eqeq: true */ +/*jslint browser: true, devel: true */ +/*global show_hide_linkfields, jQuery, country_list */ + +function update_select_list(new_options, select_list){ + var option_array = new_options.split("|"); + var i = 0; + var j; + select_list.length = 0; + for(j=0; j < option_array.length-1; j++){ + var option = option_array[j].split(","); + var selected = Boolean(parseInt(option[2], 10)); + select_list[j] = new Option(option[0], option[1], false, selected); + //for testing and debugging + //select_list.options[option_array.length-1+j] = new Option(option[2].toString() +" "+ selected.toString()); + //select_list.options[option_array.length-1+j] = new Option("Link Label: " + linklabel + " Label Text:" + label_text); + } + show_hide_linkfields(select_list); +} + +function show_advanced(hide){ + var select_list = document.iform["interfaces[]"].options; + var adv_rows = parseInt(jQuery('#adv_rows').html(), 10); + var adv_show = Boolean(parseInt(jQuery('#adv_show').html(), 10)); + var status = Boolean(parseInt(hide, 10)); + var j, advanced; + if (status){ + jQuery('#advanced_').hide(); + for(j=0; j < adv_rows; j++){ + advanced = "#advanced_" + j.toString(); + jQuery(advanced).show(); + } + jQuery('#adv_show').html("1"); + show_hide_linkfields(select_list); + } else { + jQuery('#advanced_').show(); + for(j=0; j < adv_rows; j++){ + advanced = "#advanced_" + j.toString(); + jQuery(advanced).hide(); + } + jQuery('#adv_show').html("0"); + show_hide_linkfields(select_list); + } +} + +function show_hide_linkfields(options){ + var i = 0; + var port_count = parseInt(jQuery('#port_count').html(), 10); + var adv_show = Boolean(parseInt(jQuery('#adv_show').html(), 10)); + var j, count, type, link, lnklabel, bw, bwlabel, mtu, mru, mrru, ipfields, gwfields, localip, + localiplabel, subnet, gateway, gatewaylabel; + for(j=0; j < port_count; j++){ + count = j.toString(); + type = jQuery('#type').val(); + link = "#link" + count; + lnklabel = "#linklabel" + count; + bw = "#bandwidth" + count; + bwlabel = "#bwlabel" + count; + mtu = "#mtu" + count; + mru = "#mru" + count; + mrru = "#mrru" + count; + ipfields = "#ip_fields" + count; + gwfields = "#gw_fields" + count; + localip = "#localip" + count; + localiplabel = "#localiplabel" + count; + subnet = "#subnet" + count; + gateway = "#gateway" + count; + gatewaylabel = "#gatewaylabel" + count; + + jQuery(ipfields + ',' + gwfields + ',' + link).hide(); + jQuery(subnet).prop('disabled',true); + + jQuery(bw).attr("name","bandwidth[]"); + jQuery(mtu).attr("name","mtu[]"); + jQuery(mru).attr("name","mru[]"); + jQuery(mrru).attr("name","mrru[]"); + jQuery(localip).attr("name","localip[]"); + jQuery(subnet).attr("name","subnet[]"); + jQuery(gateway).attr("name","gateway[]"); + + while(i < options.length){ + if (options[i].selected ){ + jQuery(lnklabel).html("Link Parameters (" + options[i].value + ")"); + jQuery(bwlabel).html("Bandwidth (" + options[i].value + ")"); + jQuery(bw).attr("name","bandwidth[" + options[i].value + "]"); + jQuery(mtu).attr("name","mtu[" + options[i].value + "]"); + jQuery(mru).attr("name","mru[" + options[i].value + "]"); + jQuery(mrru).attr("name","mrru[" + options[i].value + "]"); + jQuery(localiplabel).html("Local IP (" + options[i].value + ")"); + jQuery(gatewaylabel).html("Gateway (" + options[i].value + ")"); + jQuery(localip).attr("name","localip[" + options[i].value + "]"); + jQuery(subnet).attr("name","subnet[" + options[i].value + "]"); + jQuery(gateway).attr("name","gateway[" + options[i].value + "]"); + if (type == 'ppp' && adv_show){ + jQuery(ipfields + ',' + gwfields).show(); + } + if (type == 'pptp' || type == 'l2tp'){ + jQuery(subnet).prop("disabled",false); + jQuery(ipfields + ',' + gwfields).show(); + } + if (adv_show){ + jQuery(link).show(); + } + i++; + break; + } + i++; + } + } +} + + +function updateType(t){ + var serialports = jQuery('#serialports').html(); + var ports = jQuery('#ports').html(); + var select_list = document.iform["interfaces[]"].options; + jQuery('#adv_show').html("0"); + show_advanced('0'); + jQuery("#select").show(); + switch(t) { + case "select": + jQuery('#ppp,#pppoe,#ppp_provider,#phone_num,#apn_').hide(); + select_list.length = 0; + select_list[0] = new Option("Select Link Type First",""); + break; + case "ppp": + update_select_list(serialports, select_list); + jQuery('#select,#pppoe').hide(); + jQuery('#ppp_provider,#phone_num,#apn_').show(); + country_list(); + break; + case "pppoe": + update_select_list(ports, select_list); + jQuery('#select,#ppp,#ppp_provider,#phone_num,#apn_').hide(); + break; + case "l2tp": + case "pptp": + update_select_list(ports, select_list); + jQuery('#select,#ppp,#pppoe,#ppp_provider,#phone_num,#apn_').hide(); + break; + default: + select_list.length = 0; + select_list[0] = new Option("Select Link Type First",""); + break; + } + if (t == "pppoe" || t == "ppp"){ + jQuery("#" + t).show(); + } +} + +function show_reset_settings(reset_type) { + if (reset_type == 'preset') { + jQuery('#pppoepresetwrap').show(0); + jQuery('#pppoecustomwrap').hide(0); + } + else if (reset_type == 'custom') { + jQuery('#pppoecustomwrap').show(0); + jQuery('#pppoepresetwrap').hide(0); + } else { + jQuery('#pppoecustomwrap').hide(0); + jQuery('#pppoepresetwrap').hide(0); + } +} + +function country_list() { + jQuery('#country option').remove(); + jQuery('#provider option').remove(); + jQuery('#providerplan option').remove(); + jQuery('#country').append(new Option('', '')); + jQuery.ajax("getserviceproviders.php",{ + success: function(responseText) { + var responseTextArr = responseText.split("\n"); + var value, i, country; + responseTextArr.sort(); + for (i = 0; i < responseTextArr.length; i += 1) { + value = responseTextArr[i]; + if (/\S/.test(value)) { + country = value.split(":"); + jQuery('#country').append(new Option(country[0],country[1])); + } + } + } + }); + jQuery('#trcountry').css("display","table-row"); +} + +function providers_list() { + jQuery('#provider option').remove(); + jQuery('#providerplan option').remove(); + jQuery('#provider').append(new Option('', '')); + jQuery.ajax("getserviceproviders.php",{ + type: 'POST', + data: {country : jQuery('#country').val()}, + success: function(responseText) { + var responseTextArr = responseText.split("\n"); + var value, i; + responseTextArr.sort(); + for (i = 0; i < responseTextArr.length; i += 1) { + value = responseTextArr[i]; + if (/\S/.test(value)) { + jQuery('#provider').append(new Option(value, value)); + } + } + } + }); + jQuery('#trprovider').css("display","table-row"); + jQuery('#trproviderplan').css("display","none"); +} + +function providerplan_list() { + jQuery('#providerplan option').remove(); + jQuery('#providerplan').append( new Option('','') ); + jQuery.ajax("getserviceproviders.php",{ + type: 'POST', + data: {country : jQuery('#country').val(), provider : jQuery('#provider').val()}, + success: function(responseText) { + var responseTextArr = responseText.split("\n"); + var value, providerplan, i; + responseTextArr.sort(); + for (i = 0; i < responseTextArr.length; i += 1) { + value = responseTextArr[i]; + if (/\S/.test(value)) { + providerplan = value.split(":"); + jQuery('#providerplan').append(new Option(providerplan[0] + " - " + providerplan[1], + providerplan[1])); + } + } + } + }); + jQuery('#trproviderplan').css("display","table-row"); +} + +function prefill_provider() { + jQuery.ajax("getserviceproviders.php",{ + type: "POST", + data: {country : jQuery('#country').val(), provider : jQuery('#provider').val(), plan : jQuery('#providerplan').val()}, + success: function(responseXML) { + var xmldoc = responseXML; + var provider = xmldoc.getElementsByTagName('connection')[0]; + jQuery('#username').val(''); + jQuery('#password').val(''); + if(provider.getElementsByTagName('apn')[0].firstChild.data == "CDMA") { + jQuery('#phone').val('#777'); + jQuery('#apn').val(''); + } else { + jQuery('#phone').val('*99#'); + jQuery('#apn').val(provider.getElementsByTagName('apn')[0].firstChild.data); + } + jQuery('#username').val(provider.getElementsByTagName('username')[0].firstChild.data); + jQuery('#password').val(provider.getElementsByTagName('password')[0].firstChild.data); + } + }); +} diff --git a/src/usr/local/www/javascript/jquery-1.11.1.min.js b/src/usr/local/www/javascript/jquery-1.11.1.min.js new file mode 100644 index 0000000..ab28a24 --- /dev/null +++ b/src/usr/local/www/javascript/jquery-1.11.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
                            ",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; +if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
                            ... + updateNode = updateNode.firstChild.firstChild.firstChild.firstChild; + } + + // TODO: allow for a DOM node as content + updateNode.innerHTML = content; +} + +// }}} diff --git a/src/usr/local/www/javascript/domTT/fadomatic.js b/src/usr/local/www/javascript/domTT/fadomatic.js new file mode 100644 index 0000000..2c67d0b --- /dev/null +++ b/src/usr/local/www/javascript/domTT/fadomatic.js @@ -0,0 +1,180 @@ +/** $Id$ */ +// Title: Fadomatic +// Version: 1.2 +// Homepage: http://chimpen.com/fadomatic +// Author: Philip McCarthy + +// Fade interval in milliseconds +// Make this larger if you experience performance issues +Fadomatic.INTERVAL_MILLIS = 50; + +// Creates a fader +// element - The element to fade +// speed - The speed to fade at, from 0.0 to 100.0 +// initialOpacity (optional, default 100) - element's starting opacity, 0 to 100 +// minOpacity (optional, default 0) - element's minimum opacity, 0 to 100 +// maxOpacity (optional, default 0) - element's minimum opacity, 0 to 100 +function Fadomatic (element, rate, initialOpacity, minOpacity, maxOpacity) { + this._element = element; + this._intervalId = null; + this._rate = rate; + this._isFadeOut = true; + + // Set initial opacity and bounds + // NB use 99 instead of 100 to avoid flicker at start of fade + this._minOpacity = 0; + this._maxOpacity = 99; + this._opacity = 99; + + if (typeof minOpacity != 'undefined') { + if (minOpacity < 0) { + this._minOpacity = 0; + } else if (minOpacity > 99) { + this._minOpacity = 99; + } else { + this._minOpacity = minOpacity; + } + } + + if (typeof maxOpacity != 'undefined') { + if (maxOpacity < 0) { + this._maxOpacity = 0; + } else if (maxOpacity > 99) { + this._maxOpacity = 99; + } else { + this._maxOpacity = maxOpacity; + } + + if (this._maxOpacity < this._minOpacity) { + this._maxOpacity = this._minOpacity; + } + } + + if (typeof initialOpacity != 'undefined') { + if (initialOpacity > this._maxOpacity) { + this._opacity = this._maxOpacity; + } else if (initialOpacity < this._minOpacity) { + this._opacity = this._minOpacity; + } else { + this._opacity = initialOpacity; + } + } + + // See if we're using W3C opacity, MSIE filter, or just + // toggling visiblity + if(typeof element.style.opacity != 'undefined') { + + this._updateOpacity = this._updateOpacityW3c; + + } else if(typeof element.style.filter != 'undefined') { + + // If there's not an alpha filter on the element already, + // add one + if (element.style.filter.indexOf("alpha") == -1) { + + // Attempt to preserve existing filters + var existingFilters=""; + if (element.style.filter) { + existingFilters = element.style.filter+" "; + } + element.style.filter = existingFilters+"alpha(opacity="+this._opacity+")"; + } + + this._updateOpacity = this._updateOpacityMSIE; + + } else { + + this._updateOpacity = this._updateVisibility; + } + + this._updateOpacity(); +} + +// Initiates a fade out +Fadomatic.prototype.fadeOut = function () { + this._isFadeOut = true; + this._beginFade(); +}; + +// Initiates a fade in +Fadomatic.prototype.fadeIn = function () { + this._isFadeOut = false; + this._beginFade(); +}; + +// Makes the element completely opaque, stops any fade in progress +Fadomatic.prototype.show = function () { + this.haltFade(); + this._opacity = this._maxOpacity; + this._updateOpacity(); +}; + +// Makes the element completely transparent, stops any fade in progress +Fadomatic.prototype.hide = function () { + this.haltFade(); + this._opacity = 0; + this._updateOpacity(); +}; + +// Halts any fade in progress +Fadomatic.prototype.haltFade = function () { + + clearInterval(this._intervalId); +}; + +// Resumes a fade where it was halted +Fadomatic.prototype.resumeFade = function () { + + this._beginFade(); +}; + +// Pseudo-private members + +Fadomatic.prototype._beginFade = function () { + + this.haltFade(); + var objref = this; + this._intervalId = setInterval(function() { objref._tickFade(); },Fadomatic.INTERVAL_MILLIS); +}; + +Fadomatic.prototype._tickFade = function () { + + if (this._isFadeOut) { + this._opacity -= this._rate; + if (this._opacity < this._minOpacity) { + this._opacity = this._minOpacity; + this.haltFade(); + } + } else { + this._opacity += this._rate; + if (this._opacity > this._maxOpacity ) { + this._opacity = this._maxOpacity; + this.haltFade(); + } + } + + this._updateOpacity(); +}; + +Fadomatic.prototype._updateVisibility = function () { + + if (this._opacity > 0) { + this._element.style.visibility = 'visible'; + } else { + this._element.style.visibility = 'hidden'; + } +}; + +Fadomatic.prototype._updateOpacityW3c = function () { + + this._element.style.opacity = this._opacity/100; + this._updateVisibility(); +}; + +Fadomatic.prototype._updateOpacityMSIE = function () { + + this._element.filters.alpha.opacity = this._opacity; + this._updateVisibility(); +}; + +Fadomatic.prototype._updateOpacity = null; diff --git a/src/usr/local/www/javascript/filter_log.js b/src/usr/local/www/javascript/filter_log.js new file mode 100644 index 0000000..66a7309 --- /dev/null +++ b/src/usr/local/www/javascript/filter_log.js @@ -0,0 +1,168 @@ +if (typeof getURL == 'undefined') { + getURL = function(url, callback) { + if (!url) + throw 'No URL for getURL'; + try { + if (typeof callback.operationComplete == 'function') + callback = callback.operationComplete; + } catch (e) {} + if (typeof callback != 'function') + throw 'No callback function for getURL'; + var http_request = null; + if (typeof XMLHttpRequest != 'undefined') { + http_request = new XMLHttpRequest(); + } + else if (typeof ActiveXObject != 'undefined') { + try { + http_request = new ActiveXObject('Msxml2.XMLHTTP'); + } catch (e) { + try { + http_request = new ActiveXObject('Microsoft.XMLHTTP'); + } catch (e) {} + } + } + if (!http_request) + throw 'Both getURL and XMLHttpRequest are undefined'; + http_request.onreadystatechange = function() { + if (http_request.readyState == 4) { + callback( { success : true, + content : http_request.responseText, + contentType : http_request.getResponseHeader("Content-Type") } ); + } + }; + http_request.open('GET', url, true); + http_request.send(null); + }; +} + +function outputrule(req) { + alert(req.content); +} +function fetch_new_rules() { + if(isPaused) + return; + if(isBusy) + return; + isBusy = true; + getURL('diag_logs_filter_dynamic.php?lastsawtime=' + lastsawtime, fetch_new_rules_callback); +} +function fetch_new_rules_callback(callback_data) { + if(isPaused) + return; + + var data_split; + var new_data_to_add = Array(); + var data = callback_data.content; + + data_split = data.split("\n"); + + for(var x=0; xtr'); + + // Number of rows to move by + var move = rows.length + data.length - nentries; + if (move < 0) + move = 0; + + if (isReverse == false) { + for (var i = move; i < rows.length; i++) { + jQuery(rows[i - move]).html(jQuery(rows[i]).html()); + } + + var tbody = jQuery('#filter-log-entries'); + for (var i = 0; i < data.length; i++) { + var rowIndex = rows.length - move + i; + if (rowIndex < rows.length) { + jQuery(rows[rowIndex]).html(data[i]); + } else { + jQuery(tbody).append('
                            a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/
                            ","
                            "],tr:[2,"","
                            "],col:[2,"","
                            "],td:[3,"","
                            "],_default:k.htmlSerialize?[0,"",""]:[1,"X
                            ","
                            "]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("'); + this.iefix = $(this.update.id+'_iefix'); + } + if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50); + }, + + fixIEOverlapping: function() { + Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)}); + this.iefix.style.zIndex = 1; + this.update.style.zIndex = 2; + Element.show(this.iefix); + }, + + hide: function() { + this.stopIndicator(); + if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update); + if(this.iefix) Element.hide(this.iefix); + }, + + startIndicator: function() { + if(this.options.indicator) Element.show(this.options.indicator); + }, + + stopIndicator: function() { + if(this.options.indicator) Element.hide(this.options.indicator); + }, + + onKeyPress: function(event) { + if(this.active) + switch(event.keyCode) { + case Event.KEY_TAB: + case Event.KEY_RETURN: + this.selectEntry(); + Event.stop(event); + case Event.KEY_ESC: + this.hide(); + this.active = false; + Event.stop(event); + return; + case Event.KEY_LEFT: + case Event.KEY_RIGHT: + return; + case Event.KEY_UP: + this.markPrevious(); + this.render(); + Event.stop(event); + return; + case Event.KEY_DOWN: + this.markNext(); + this.render(); + Event.stop(event); + return; + } + else + if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || + (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return; + + this.changed = true; + this.hasFocus = true; + + if(this.observer) clearTimeout(this.observer); + this.observer = + setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); + }, + + activate: function() { + this.changed = false; + this.hasFocus = true; + this.getUpdatedChoices(); + }, + + onHover: function(event) { + var element = Event.findElement(event, 'LI'); + if(this.index != element.autocompleteIndex) + { + this.index = element.autocompleteIndex; + this.render(); + } + Event.stop(event); + }, + + onClick: function(event) { + var element = Event.findElement(event, 'LI'); + this.index = element.autocompleteIndex; + this.selectEntry(); + this.hide(); + }, + + onBlur: function(event) { + // needed to make click events working + setTimeout(this.hide.bind(this), 250); + this.hasFocus = false; + this.active = false; + }, + + render: function() { + if(this.entryCount > 0) { + for (var i = 0; i < this.entryCount; i++) + this.index==i ? + Element.addClassName(this.getEntry(i),"selected") : + Element.removeClassName(this.getEntry(i),"selected"); + if(this.hasFocus) { + this.show(); + this.active = true; + } + } else { + this.active = false; + this.hide(); + } + }, + + markPrevious: function() { + if(this.index > 0) this.index--; + else this.index = this.entryCount-1; + this.getEntry(this.index).scrollIntoView(true); + }, + + markNext: function() { + if(this.index < this.entryCount-1) this.index++; + else this.index = 0; + this.getEntry(this.index).scrollIntoView(false); + }, + + getEntry: function(index) { + return this.update.firstChild.childNodes[index]; + }, + + getCurrentEntry: function() { + return this.getEntry(this.index); + }, + + selectEntry: function() { + this.active = false; + this.updateElement(this.getCurrentEntry()); + }, + + updateElement: function(selectedElement) { + if (this.options.updateElement) { + this.options.updateElement(selectedElement); + return; + } + var value = ''; + if (this.options.select) { + var nodes = $(selectedElement).select('.' + this.options.select) || []; + if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); + } else + value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal'); + + var bounds = this.getTokenBounds(); + if (bounds[0] != -1) { + var newValue = this.element.value.substr(0, bounds[0]); + var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/); + if (whitespace) + newValue += whitespace[0]; + this.element.value = newValue + value + this.element.value.substr(bounds[1]); + } else { + this.element.value = value; + } + this.oldElementValue = this.element.value; + this.element.focus(); + + if (this.options.afterUpdateElement) + this.options.afterUpdateElement(this.element, selectedElement); + }, + + updateChoices: function(choices) { + if(!this.changed && this.hasFocus) { + this.update.innerHTML = choices; + Element.cleanWhitespace(this.update); + Element.cleanWhitespace(this.update.down()); + + if(this.update.firstChild && this.update.down().childNodes) { + this.entryCount = + this.update.down().childNodes.length; + for (var i = 0; i < this.entryCount; i++) { + var entry = this.getEntry(i); + entry.autocompleteIndex = i; + this.addObservers(entry); + } + } else { + this.entryCount = 0; + } + + this.stopIndicator(); + this.index = 0; + + if(this.entryCount==1 && this.options.autoSelect) { + this.selectEntry(); + this.hide(); + } else { + this.render(); + } + } + }, + + addObservers: function(element) { + Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this)); + Event.observe(element, "click", this.onClick.bindAsEventListener(this)); + }, + + onObserverEvent: function() { + this.changed = false; + this.tokenBounds = null; + if(this.getToken().length>=this.options.minChars) { + this.getUpdatedChoices(); + } else { + this.active = false; + this.hide(); + } + this.oldElementValue = this.element.value; + }, + + getToken: function() { + var bounds = this.getTokenBounds(); + return this.element.value.substring(bounds[0], bounds[1]).strip(); + }, + + getTokenBounds: function() { + if (null != this.tokenBounds) return this.tokenBounds; + var value = this.element.value; + if (value.strip().empty()) return [-1, 0]; + var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue); + var offset = (diff == this.oldElementValue.length ? 1 : 0); + var prevTokenPos = -1, nextTokenPos = value.length; + var tp; + for (var index = 0, l = this.options.tokens.length; index < l; ++index) { + tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1); + if (tp > prevTokenPos) prevTokenPos = tp; + tp = value.indexOf(this.options.tokens[index], diff + offset); + if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp; + } + return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]); + } +}); + +Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) { + var boundary = Math.min(newS.length, oldS.length); + for (var index = 0; index < boundary; ++index) + if (newS[index] != oldS[index]) + return index; + return boundary; +}; + +Ajax.Autocompleter = Class.create(Autocompleter.Base, { + initialize: function(element, update, url, options) { + this.baseInitialize(element, update, options); + this.options.asynchronous = true; + this.options.onComplete = this.onComplete.bind(this); + this.options.defaultParams = this.options.parameters || null; + this.url = url; + }, + + getUpdatedChoices: function() { + this.startIndicator(); + + var entry = encodeURIComponent(this.options.paramName) + '=' + + encodeURIComponent(this.getToken()); + + this.options.parameters = this.options.callback ? + this.options.callback(this.element, entry) : entry; + + if(this.options.defaultParams) + this.options.parameters += '&' + this.options.defaultParams; + + new Ajax.Request(this.url, this.options); + }, + + onComplete: function(request) { + this.updateChoices(request.responseText); + } +}); + +// The local array autocompleter. Used when you'd prefer to +// inject an array of autocompletion options into the page, rather +// than sending out Ajax queries, which can be quite slow sometimes. +// +// The constructor takes four parameters. The first two are, as usual, +// the id of the monitored textbox, and id of the autocompletion menu. +// The third is the array you want to autocomplete from, and the fourth +// is the options block. +// +// Extra local autocompletion options: +// - choices - How many autocompletion choices to offer +// +// - partialSearch - If false, the autocompleter will match entered +// text only at the beginning of strings in the +// autocomplete array. Defaults to true, which will +// match text at the beginning of any *word* in the +// strings in the autocomplete array. If you want to +// search anywhere in the string, additionally set +// the option fullSearch to true (default: off). +// +// - fullSsearch - Search anywhere in autocomplete array strings. +// +// - partialChars - How many characters to enter before triggering +// a partial match (unlike minChars, which defines +// how many characters are required to do any match +// at all). Defaults to 2. +// +// - ignoreCase - Whether to ignore case when autocompleting. +// Defaults to true. +// +// It's possible to pass in a custom function as the 'selector' +// option, if you prefer to write your own autocompletion logic. +// In that case, the other options above will not apply unless +// you support them. + +Autocompleter.Local = Class.create(Autocompleter.Base, { + initialize: function(element, update, array, options) { + this.baseInitialize(element, update, options); + this.options.array = array; + }, + + getUpdatedChoices: function() { + this.updateChoices(this.options.selector(this)); + }, + + setOptions: function(options) { + this.options = Object.extend({ + choices: 10, + partialSearch: true, + partialChars: 2, + ignoreCase: true, + fullSearch: false, + selector: function(instance) { + var ret = []; // Beginning matches + var partial = []; // Inside matches + var entry = instance.getToken(); + var count = 0; + + for (var i = 0; i < instance.options.array.length && + ret.length < instance.options.choices ; i++) { + + var elem = instance.options.array[i]; + var foundPos = instance.options.ignoreCase ? + elem.toLowerCase().indexOf(entry.toLowerCase()) : + elem.indexOf(entry); + + while (foundPos != -1) { + if (foundPos == 0 && elem.length != entry.length) { + ret.push("
                          • " + elem.substr(0, entry.length) + "" + + elem.substr(entry.length) + "
                          • "); + break; + } else if (entry.length >= instance.options.partialChars && + instance.options.partialSearch && foundPos != -1) { + if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { + partial.push("
                          • " + elem.substr(0, foundPos) + "" + + elem.substr(foundPos, entry.length) + "" + elem.substr( + foundPos + entry.length) + "
                          • "); + break; + } + } + + foundPos = instance.options.ignoreCase ? + elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : + elem.indexOf(entry, foundPos + 1); + + } + } + if (partial.length) + ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)); + return "
                              " + ret.join('') + "
                            "; + } + }, options || { }); + } +}); + +// AJAX in-place editor and collection editor +// Full rewrite by Christophe Porteneuve (April 2007). + +// Use this if you notice weird scrolling problems on some browsers, +// the DOM might be a bit confused when this gets called so do this +// waits 1 ms (with setTimeout) until it does the activation +Field.scrollFreeActivate = function(field) { + setTimeout(function() { + Field.activate(field); + }, 1); +}; + +Ajax.InPlaceEditor = Class.create({ + initialize: function(element, url, options) { + this.url = url; + this.element = element = $(element); + this.prepareOptions(); + this._controls = { }; + arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!! + Object.extend(this.options, options || { }); + if (!this.options.formId && this.element.id) { + this.options.formId = this.element.id + '-inplaceeditor'; + if ($(this.options.formId)) + this.options.formId = ''; + } + if (this.options.externalControl) + this.options.externalControl = $(this.options.externalControl); + if (!this.options.externalControl) + this.options.externalControlOnly = false; + this._originalBackground = this.element.getStyle('background-color') || 'transparent'; + this.element.title = this.options.clickToEditText; + this._boundCancelHandler = this.handleFormCancellation.bind(this); + this._boundComplete = (this.options.onComplete || Prototype.emptyFunction).bind(this); + this._boundFailureHandler = this.handleAJAXFailure.bind(this); + this._boundSubmitHandler = this.handleFormSubmission.bind(this); + this._boundWrapperHandler = this.wrapUp.bind(this); + this.registerListeners(); + }, + checkForEscapeOrReturn: function(e) { + if (!this._editing || e.ctrlKey || e.altKey || e.shiftKey) return; + if (Event.KEY_ESC == e.keyCode) + this.handleFormCancellation(e); + else if (Event.KEY_RETURN == e.keyCode) + this.handleFormSubmission(e); + }, + createControl: function(mode, handler, extraClasses) { + var control = this.options[mode + 'Control']; + var text = this.options[mode + 'Text']; + if ('button' == control) { + var btn = document.createElement('input'); + btn.type = 'submit'; + btn.value = text; + btn.className = 'editor_' + mode + '_button'; + if ('cancel' == mode) + btn.onclick = this._boundCancelHandler; + this._form.appendChild(btn); + this._controls[mode] = btn; + } else if ('link' == control) { + var link = document.createElement('a'); + link.href = '#'; + link.appendChild(document.createTextNode(text)); + link.onclick = 'cancel' == mode ? this._boundCancelHandler : this._boundSubmitHandler; + link.className = 'editor_' + mode + '_link'; + if (extraClasses) + link.className += ' ' + extraClasses; + this._form.appendChild(link); + this._controls[mode] = link; + } + }, + createEditField: function() { + var text = (this.options.loadTextURL ? this.options.loadingText : this.getText()); + var fld; + if (1 >= this.options.rows && !/\r|\n/.test(this.getText())) { + fld = document.createElement('input'); + fld.type = 'text'; + var size = this.options.size || this.options.cols || 0; + if (0 < size) fld.size = size; + } else { + fld = document.createElement('textarea'); + fld.rows = (1 >= this.options.rows ? this.options.autoRows : this.options.rows); + fld.cols = this.options.cols || 40; + } + fld.name = this.options.paramName; + fld.value = text; // No HTML breaks conversion anymore + fld.className = 'editor_field'; + if (this.options.submitOnBlur) + fld.onblur = this._boundSubmitHandler; + this._controls.editor = fld; + if (this.options.loadTextURL) + this.loadExternalText(); + this._form.appendChild(this._controls.editor); + }, + createForm: function() { + var ipe = this; + function addText(mode, condition) { + var text = ipe.options['text' + mode + 'Controls']; + if (!text || condition === false) return; + ipe._form.appendChild(document.createTextNode(text)); + }; + this._form = $(document.createElement('form')); + this._form.id = this.options.formId; + this._form.addClassName(this.options.formClassName); + this._form.onsubmit = this._boundSubmitHandler; + this.createEditField(); + if ('textarea' == this._controls.editor.tagName.toLowerCase()) + this._form.appendChild(document.createElement('br')); + if (this.options.onFormCustomization) + this.options.onFormCustomization(this, this._form); + addText('Before', this.options.okControl || this.options.cancelControl); + this.createControl('ok', this._boundSubmitHandler); + addText('Between', this.options.okControl && this.options.cancelControl); + this.createControl('cancel', this._boundCancelHandler, 'editor_cancel'); + addText('After', this.options.okControl || this.options.cancelControl); + }, + destroy: function() { + if (this._oldInnerHTML) + this.element.innerHTML = this._oldInnerHTML; + this.leaveEditMode(); + this.unregisterListeners(); + }, + enterEditMode: function(e) { + if (this._saving || this._editing) return; + this._editing = true; + this.triggerCallback('onEnterEditMode'); + if (this.options.externalControl) + this.options.externalControl.hide(); + this.element.hide(); + this.createForm(); + this.element.parentNode.insertBefore(this._form, this.element); + if (!this.options.loadTextURL) + this.postProcessEditField(); + if (e) Event.stop(e); + }, + enterHover: function(e) { + if (this.options.hoverClassName) + this.element.addClassName(this.options.hoverClassName); + if (this._saving) return; + this.triggerCallback('onEnterHover'); + }, + getText: function() { + return this.element.innerHTML.unescapeHTML(); + }, + handleAJAXFailure: function(transport) { + this.triggerCallback('onFailure', transport); + if (this._oldInnerHTML) { + this.element.innerHTML = this._oldInnerHTML; + this._oldInnerHTML = null; + } + }, + handleFormCancellation: function(e) { + this.wrapUp(); + if (e) Event.stop(e); + }, + handleFormSubmission: function(e) { + var form = this._form; + var value = $F(this._controls.editor); + this.prepareSubmission(); + var params = this.options.callback(form, value) || ''; + if (Object.isString(params)) + params = params.toQueryParams(); + params.editorId = this.element.id; + if (this.options.htmlResponse) { + var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions); + Object.extend(options, { + parameters: params, + onComplete: this._boundWrapperHandler, + onFailure: this._boundFailureHandler + }); + new Ajax.Updater({ success: this.element }, this.url, options); + } else { + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: params, + onComplete: this._boundWrapperHandler, + onFailure: this._boundFailureHandler + }); + new Ajax.Request(this.url, options); + } + if (e) Event.stop(e); + }, + leaveEditMode: function() { + this.element.removeClassName(this.options.savingClassName); + this.removeForm(); + this.leaveHover(); + this.element.style.backgroundColor = this._originalBackground; + this.element.show(); + if (this.options.externalControl) + this.options.externalControl.show(); + this._saving = false; + this._editing = false; + this._oldInnerHTML = null; + this.triggerCallback('onLeaveEditMode'); + }, + leaveHover: function(e) { + if (this.options.hoverClassName) + this.element.removeClassName(this.options.hoverClassName); + if (this._saving) return; + this.triggerCallback('onLeaveHover'); + }, + loadExternalText: function() { + this._form.addClassName(this.options.loadingClassName); + this._controls.editor.disabled = true; + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: 'editorId=' + encodeURIComponent(this.element.id), + onComplete: Prototype.emptyFunction, + onSuccess: function(transport) { + this._form.removeClassName(this.options.loadingClassName); + var text = transport.responseText; + if (this.options.stripLoadedTextTags) + text = text.stripTags(); + this._controls.editor.value = text; + this._controls.editor.disabled = false; + this.postProcessEditField(); + }.bind(this), + onFailure: this._boundFailureHandler + }); + new Ajax.Request(this.options.loadTextURL, options); + }, + postProcessEditField: function() { + var fpc = this.options.fieldPostCreation; + if (fpc) + $(this._controls.editor)['focus' == fpc ? 'focus' : 'activate'](); + }, + prepareOptions: function() { + this.options = Object.clone(Ajax.InPlaceEditor.DefaultOptions); + Object.extend(this.options, Ajax.InPlaceEditor.DefaultCallbacks); + [this._extraDefaultOptions].flatten().compact().each(function(defs) { + Object.extend(this.options, defs); + }.bind(this)); + }, + prepareSubmission: function() { + this._saving = true; + this.removeForm(); + this.leaveHover(); + this.showSaving(); + }, + registerListeners: function() { + this._listeners = { }; + var listener; + $H(Ajax.InPlaceEditor.Listeners).each(function(pair) { + listener = this[pair.value].bind(this); + this._listeners[pair.key] = listener; + if (!this.options.externalControlOnly) + this.element.observe(pair.key, listener); + if (this.options.externalControl) + this.options.externalControl.observe(pair.key, listener); + }.bind(this)); + }, + removeForm: function() { + if (!this._form) return; + this._form.remove(); + this._form = null; + this._controls = { }; + }, + showSaving: function() { + this._oldInnerHTML = this.element.innerHTML; + this.element.innerHTML = this.options.savingText; + this.element.addClassName(this.options.savingClassName); + this.element.style.backgroundColor = this._originalBackground; + this.element.show(); + }, + triggerCallback: function(cbName, arg) { + if ('function' == typeof this.options[cbName]) { + this.options[cbName](this, arg); + } + }, + unregisterListeners: function() { + $H(this._listeners).each(function(pair) { + if (!this.options.externalControlOnly) + this.element.stopObserving(pair.key, pair.value); + if (this.options.externalControl) + this.options.externalControl.stopObserving(pair.key, pair.value); + }.bind(this)); + }, + wrapUp: function(transport) { + this.leaveEditMode(); + // Can't use triggerCallback due to backward compatibility: requires + // binding + direct element + this._boundComplete(transport, this.element); + } +}); + +Object.extend(Ajax.InPlaceEditor.prototype, { + dispose: Ajax.InPlaceEditor.prototype.destroy +}); + +Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, { + initialize: function($super, element, url, options) { + this._extraDefaultOptions = Ajax.InPlaceCollectionEditor.DefaultOptions; + $super(element, url, options); + }, + + createEditField: function() { + var list = document.createElement('select'); + list.name = this.options.paramName; + list.size = 1; + this._controls.editor = list; + this._collection = this.options.collection || []; + if (this.options.loadCollectionURL) + this.loadCollection(); + else + this.checkForExternalText(); + this._form.appendChild(this._controls.editor); + }, + + loadCollection: function() { + this._form.addClassName(this.options.loadingClassName); + this.showLoadingText(this.options.loadingCollectionText); + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: 'editorId=' + encodeURIComponent(this.element.id), + onComplete: Prototype.emptyFunction, + onSuccess: function(transport) { + var js = transport.responseText.strip(); + if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check + throw('Server returned an invalid collection representation.'); + this._collection = eval(js); + this.checkForExternalText(); + }.bind(this), + onFailure: this.onFailure + }); + new Ajax.Request(this.options.loadCollectionURL, options); + }, + + showLoadingText: function(text) { + this._controls.editor.disabled = true; + var tempOption = this._controls.editor.firstChild; + if (!tempOption) { + tempOption = document.createElement('option'); + tempOption.value = ''; + this._controls.editor.appendChild(tempOption); + tempOption.selected = true; + } + tempOption.update((text || '').stripScripts().stripTags()); + }, + + checkForExternalText: function() { + this._text = this.getText(); + if (this.options.loadTextURL) + this.loadExternalText(); + else + this.buildOptionList(); + }, + + loadExternalText: function() { + this.showLoadingText(this.options.loadingText); + var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); + Object.extend(options, { + parameters: 'editorId=' + encodeURIComponent(this.element.id), + onComplete: Prototype.emptyFunction, + onSuccess: function(transport) { + this._text = transport.responseText.strip(); + this.buildOptionList(); + }.bind(this), + onFailure: this.onFailure + }); + new Ajax.Request(this.options.loadTextURL, options); + }, + + buildOptionList: function() { + this._form.removeClassName(this.options.loadingClassName); + this._collection = this._collection.map(function(entry) { + return 2 === entry.length ? entry : [entry, entry].flatten(); + }); + var marker = ('value' in this.options) ? this.options.value : this._text; + var textFound = this._collection.any(function(entry) { + return entry[0] == marker; + }.bind(this)); + this._controls.editor.update(''); + var option; + this._collection.each(function(entry, index) { + option = document.createElement('option'); + option.value = entry[0]; + option.selected = textFound ? entry[0] == marker : 0 == index; + option.appendChild(document.createTextNode(entry[1])); + this._controls.editor.appendChild(option); + }.bind(this)); + this._controls.editor.disabled = false; + Field.scrollFreeActivate(this._controls.editor); + } +}); + +//**** DEPRECATION LAYER FOR InPlace[Collection]Editor! **** +//**** This only exists for a while, in order to let **** +//**** users adapt to the new API. Read up on the new **** +//**** API and convert your code to it ASAP! **** + +Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions = function(options) { + if (!options) return; + function fallback(name, expr) { + if (name in options || expr === undefined) return; + options[name] = expr; + }; + fallback('cancelControl', (options.cancelLink ? 'link' : (options.cancelButton ? 'button' : + options.cancelLink == options.cancelButton == false ? false : undefined))); + fallback('okControl', (options.okLink ? 'link' : (options.okButton ? 'button' : + options.okLink == options.okButton == false ? false : undefined))); + fallback('highlightColor', options.highlightcolor); + fallback('highlightEndColor', options.highlightendcolor); +}; + +Object.extend(Ajax.InPlaceEditor, { + DefaultOptions: { + ajaxOptions: { }, + autoRows: 3, // Use when multi-line w/ rows == 1 + cancelControl: 'link', // 'link'|'button'|false + cancelText: 'cancel', + clickToEditText: 'Click to edit', + externalControl: null, // id|elt + externalControlOnly: false, + fieldPostCreation: 'activate', // 'activate'|'focus'|false + formClassName: 'inplaceeditor-form', + formId: null, // id|elt + highlightColor: '#ffff99', + highlightEndColor: '#ffffff', + hoverClassName: '', + htmlResponse: true, + loadingClassName: 'inplaceeditor-loading', + loadingText: 'Loading...', + okControl: 'button', // 'link'|'button'|false + okText: 'ok', + paramName: 'value', + rows: 1, // If 1 and multi-line, uses autoRows + savingClassName: 'inplaceeditor-saving', + savingText: 'Saving...', + size: 0, + stripLoadedTextTags: false, + submitOnBlur: false, + textAfterControls: '', + textBeforeControls: '', + textBetweenControls: '' + }, + DefaultCallbacks: { + callback: function(form) { + return Form.serialize(form); + }, + onComplete: function(transport, element) { + // For backward compatibility, this one is bound to the IPE, and passes + // the element directly. It was too often customized, so we don't break it. + new Effect.Highlight(element, { + startcolor: this.options.highlightColor, keepBackgroundImage: true }); + }, + onEnterEditMode: null, + onEnterHover: function(ipe) { + ipe.element.style.backgroundColor = ipe.options.highlightColor; + if (ipe._effect) + ipe._effect.cancel(); + }, + onFailure: function(transport, ipe) { + alert('Error communication with the server: ' + transport.responseText.stripTags()); + }, + onFormCustomization: null, // Takes the IPE and its generated form, after editor, before controls. + onLeaveEditMode: null, + onLeaveHover: function(ipe) { + ipe._effect = new Effect.Highlight(ipe.element, { + startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor, + restorecolor: ipe._originalBackground, keepBackgroundImage: true + }); + } + }, + Listeners: { + click: 'enterEditMode', + keydown: 'checkForEscapeOrReturn', + mouseover: 'enterHover', + mouseout: 'leaveHover' + } +}); + +Ajax.InPlaceCollectionEditor.DefaultOptions = { + loadingCollectionText: 'Loading options...' +}; + +// Delayed observer, like Form.Element.Observer, +// but waits for delay after last key input +// Ideal for live-search fields + +Form.Element.DelayedObserver = Class.create({ + initialize: function(element, delay, callback) { + this.delay = delay || 0.5; + this.element = $(element); + this.callback = callback; + this.timer = null; + this.lastValue = $F(this.element); + Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this)); + }, + delayedListener: function(event) { + if(this.lastValue == $F(this.element)) return; + if(this.timer) clearTimeout(this.timer); + this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000); + this.lastValue = $F(this.element); + }, + onTimerEvent: function() { + this.timer = null; + this.callback(this.element, $F(this.element)); + } +}); \ No newline at end of file diff --git a/src/usr/local/www/javascript/scriptaculous/dragdrop.js b/src/usr/local/www/javascript/scriptaculous/dragdrop.js new file mode 100644 index 0000000..452601e --- /dev/null +++ b/src/usr/local/www/javascript/scriptaculous/dragdrop.js @@ -0,0 +1,974 @@ +// script.aculo.us dragdrop.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +if(Object.isUndefined(Effect)) + throw("dragdrop.js requires including script.aculo.us' effects.js library"); + +var Droppables = { + drops: [], + + remove: function(element) { + this.drops = this.drops.reject(function(d) { return d.element==$(element); }); + }, + + add: function(element) { + element = $(element); + var options = Object.extend({ + greedy: true, + hoverclass: null, + tree: false + }, arguments[1] || { }); + + // cache containers + if(options.containment) { + options._containers = []; + var containment = options.containment; + if(Object.isArray(containment)) { + containment.each( function(c) { options._containers.push($(c)); }); + } else { + options._containers.push($(containment)); + } + } + + if(options.accept) options.accept = [options.accept].flatten(); + + Element.makePositioned(element); // fix IE + options.element = element; + + this.drops.push(options); + }, + + findDeepestChild: function(drops) { + deepest = drops[0]; + + for (i = 1; i < drops.length; ++i) + if (Element.isParent(drops[i].element, deepest.element)) + deepest = drops[i]; + + return deepest; + }, + + isContained: function(element, drop) { + var containmentNode; + if(drop.tree) { + containmentNode = element.treeNode; + } else { + containmentNode = element.parentNode; + } + return drop._containers.detect(function(c) { return containmentNode == c; }); + }, + + isAffected: function(point, element, drop) { + return ( + (drop.element!=element) && + ((!drop._containers) || + this.isContained(element, drop)) && + ((!drop.accept) || + (Element.classNames(element).detect( + function(v) { return drop.accept.include(v); } ) )) && + Position.within(drop.element, point[0], point[1]) ); + }, + + deactivate: function(drop) { + if(drop.hoverclass) + Element.removeClassName(drop.element, drop.hoverclass); + this.last_active = null; + }, + + activate: function(drop) { + if(drop.hoverclass) + Element.addClassName(drop.element, drop.hoverclass); + this.last_active = drop; + }, + + show: function(point, element) { + if(!this.drops.length) return; + var drop, affected = []; + + this.drops.each( function(drop) { + if(Droppables.isAffected(point, element, drop)) + affected.push(drop); + }); + + if(affected.length>0) + drop = Droppables.findDeepestChild(affected); + + if(this.last_active && this.last_active != drop) this.deactivate(this.last_active); + if (drop) { + Position.within(drop.element, point[0], point[1]); + if(drop.onHover) + drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); + + if (drop != this.last_active) Droppables.activate(drop); + } + }, + + fire: function(event, element) { + if(!this.last_active) return; + Position.prepare(); + + if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active)) + if (this.last_active.onDrop) { + this.last_active.onDrop(element, this.last_active.element, event); + return true; + } + }, + + reset: function() { + if(this.last_active) + this.deactivate(this.last_active); + } +}; + +var Draggables = { + drags: [], + observers: [], + + register: function(draggable) { + if(this.drags.length == 0) { + this.eventMouseUp = this.endDrag.bindAsEventListener(this); + this.eventMouseMove = this.updateDrag.bindAsEventListener(this); + this.eventKeypress = this.keyPress.bindAsEventListener(this); + + Event.observe(document, "mouseup", this.eventMouseUp); + Event.observe(document, "mousemove", this.eventMouseMove); + Event.observe(document, "keypress", this.eventKeypress); + } + this.drags.push(draggable); + }, + + unregister: function(draggable) { + this.drags = this.drags.reject(function(d) { return d==draggable; }); + if(this.drags.length == 0) { + Event.stopObserving(document, "mouseup", this.eventMouseUp); + Event.stopObserving(document, "mousemove", this.eventMouseMove); + Event.stopObserving(document, "keypress", this.eventKeypress); + } + }, + + activate: function(draggable) { + if(draggable.options.delay) { + this._timeout = setTimeout(function() { + Draggables._timeout = null; + window.focus(); + Draggables.activeDraggable = draggable; + }.bind(this), draggable.options.delay); + } else { + window.focus(); // allows keypress events if window isn't currently focused, fails for Safari + this.activeDraggable = draggable; + } + }, + + deactivate: function() { + this.activeDraggable = null; + }, + + updateDrag: function(event) { + if(!this.activeDraggable) return; + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + // Mozilla-based browsers fire successive mousemove events with + // the same coordinates, prevent needless redrawing (moz bug?) + if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; + this._lastPointer = pointer; + + this.activeDraggable.updateDrag(event, pointer); + }, + + endDrag: function(event) { + if(this._timeout) { + clearTimeout(this._timeout); + this._timeout = null; + } + if(!this.activeDraggable) return; + this._lastPointer = null; + this.activeDraggable.endDrag(event); + this.activeDraggable = null; + }, + + keyPress: function(event) { + if(this.activeDraggable) + this.activeDraggable.keyPress(event); + }, + + addObserver: function(observer) { + this.observers.push(observer); + this._cacheObserverCallbacks(); + }, + + removeObserver: function(element) { // element instead of observer fixes mem leaks + this.observers = this.observers.reject( function(o) { return o.element==element; }); + this._cacheObserverCallbacks(); + }, + + notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag' + if(this[eventName+'Count'] > 0) + this.observers.each( function(o) { + if(o[eventName]) o[eventName](eventName, draggable, event); + }); + if(draggable.options[eventName]) draggable.options[eventName](draggable, event); + }, + + _cacheObserverCallbacks: function() { + ['onStart','onEnd','onDrag'].each( function(eventName) { + Draggables[eventName+'Count'] = Draggables.observers.select( + function(o) { return o[eventName]; } + ).length; + }); + } +}; + +/*--------------------------------------------------------------------------*/ + +var Draggable = Class.create({ + initialize: function(element) { + var defaults = { + handle: false, + reverteffect: function(element, top_offset, left_offset) { + var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; + new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, + queue: {scope:'_draggable', position:'end'} + }); + }, + endeffect: function(element) { + var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0; + new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity, + queue: {scope:'_draggable', position:'end'}, + afterFinish: function(){ + Draggable._dragging[element] = false; + } + }); + }, + zindex: 1000, + revert: false, + quiet: false, + scroll: false, + scrollSensitivity: 20, + scrollSpeed: 15, + snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] } + delay: 0 + }; + + if(!arguments[1] || Object.isUndefined(arguments[1].endeffect)) + Object.extend(defaults, { + starteffect: function(element) { + element._opacity = Element.getOpacity(element); + Draggable._dragging[element] = true; + new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7}); + } + }); + + var options = Object.extend(defaults, arguments[1] || { }); + + this.element = $(element); + + if(options.handle && Object.isString(options.handle)) + this.handle = this.element.down('.'+options.handle, 0); + + if(!this.handle) this.handle = $(options.handle); + if(!this.handle) this.handle = this.element; + + if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) { + options.scroll = $(options.scroll); + this._isScrollChild = Element.childOf(this.element, options.scroll); + } + + Element.makePositioned(this.element); // fix IE + + this.options = options; + this.dragging = false; + + this.eventMouseDown = this.initDrag.bindAsEventListener(this); + Event.observe(this.handle, "mousedown", this.eventMouseDown); + + Draggables.register(this); + }, + + destroy: function() { + Event.stopObserving(this.handle, "mousedown", this.eventMouseDown); + Draggables.unregister(this); + }, + + currentDelta: function() { + return([ + parseInt(Element.getStyle(this.element,'left') || '0'), + parseInt(Element.getStyle(this.element,'top') || '0')]); + }, + + initDrag: function(event) { + if(!Object.isUndefined(Draggable._dragging[this.element]) && + Draggable._dragging[this.element]) return; + if(Event.isLeftClick(event)) { + // abort on form elements, fixes a Firefox issue + var src = Event.element(event); + if((tag_name = src.tagName.toUpperCase()) && ( + tag_name=='input' || + tag_name=='select' || + tag_name=='option' || + tag_name=='button' || + tag_name=='textarea')) return; + + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + var pos = this.element.cumulativeOffset(); + this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]); }); + + Draggables.activate(this); + Event.stop(event); + } + }, + + startDrag: function(event) { + this.dragging = true; + if(!this.delta) + this.delta = this.currentDelta(); + + if(this.options.zindex) { + this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0); + this.element.style.zIndex = this.options.zindex; + } + + if(this.options.ghosting) { + this._clone = this.element.cloneNode(true); + this._originallyAbsolute = (this.element.getStyle('position') == 'absolute'); + if (!this._originallyAbsolute) + Position.absolutize(this.element); + this.element.parentNode.insertBefore(this._clone, this.element); + } + + if(this.options.scroll) { + if (this.options.scroll == window) { + var where = this._getWindowScroll(this.options.scroll); + this.originalScrollLeft = where.left; + this.originalScrollTop = where.top; + } else { + this.originalScrollLeft = this.options.scroll.scrollLeft; + this.originalScrollTop = this.options.scroll.scrollTop; + } + } + + Draggables.notify('onStart', this, event); + + if(this.options.starteffect) this.options.starteffect(this.element); + }, + + updateDrag: function(event, pointer) { + if(!this.dragging) this.startDrag(event); + + if(!this.options.quiet){ + Position.prepare(); + Droppables.show(pointer, this.element); + } + + Draggables.notify('onDrag', this, event); + + this.draw(pointer); + if(this.options.change) this.options.change(this); + + if(this.options.scroll) { + this.stopScrolling(); + + var p; + if (this.options.scroll == window) { + with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; } + } else { + p = Position.page(this.options.scroll); + p[0] += this.options.scroll.scrollLeft + Position.deltaX; + p[1] += this.options.scroll.scrollTop + Position.deltaY; + p.push(p[0]+this.options.scroll.offsetWidth); + p.push(p[1]+this.options.scroll.offsetHeight); + } + var speed = [0,0]; + if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity); + if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity); + if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity); + if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity); + this.startScrolling(speed); + } + + // fix AppleWebKit rendering + if(Prototype.Browser.WebKit) window.scrollBy(0,0); + + Event.stop(event); + }, + + finishDrag: function(event, success) { + this.dragging = false; + + if(this.options.quiet){ + Position.prepare(); + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + Droppables.show(pointer, this.element); + } + + if(this.options.ghosting) { + if (!this._originallyAbsolute) + Position.relativize(this.element); + delete this._originallyAbsolute; + Element.remove(this._clone); + this._clone = null; + } + + var dropped = false; + if(success) { + dropped = Droppables.fire(event, this.element); + if (!dropped) dropped = false; + } + if(dropped && this.options.onDropped) this.options.onDropped(this.element); + Draggables.notify('onEnd', this, event); + + var revert = this.options.revert; + if(revert && Object.isFunction(revert)) revert = revert(this.element); + + var d = this.currentDelta(); + if(revert && this.options.reverteffect) { + if (dropped == 0 || revert != 'failure') + this.options.reverteffect(this.element, + d[1]-this.delta[1], d[0]-this.delta[0]); + } else { + this.delta = d; + } + + if(this.options.zindex) + this.element.style.zIndex = this.originalZ; + + if(this.options.endeffect) + this.options.endeffect(this.element); + + Draggables.deactivate(this); + Droppables.reset(); + }, + + keyPress: function(event) { + if(event.keyCode!=Event.KEY_ESC) return; + this.finishDrag(event, false); + Event.stop(event); + }, + + endDrag: function(event) { + if(!this.dragging) return; + this.stopScrolling(); + this.finishDrag(event, true); + Event.stop(event); + }, + + draw: function(point) { + var pos = this.element.cumulativeOffset(); + if(this.options.ghosting) { + var r = Position.realOffset(this.element); + pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; + } + + var d = this.currentDelta(); + pos[0] -= d[0]; pos[1] -= d[1]; + + if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) { + pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft; + pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop; + } + + var p = [0,1].map(function(i){ + return (point[i]-pos[i]-this.offset[i]); + }.bind(this)); + + if(this.options.snap) { + if(Object.isFunction(this.options.snap)) { + p = this.options.snap(p[0],p[1],this); + } else { + if(Object.isArray(this.options.snap)) { + p = p.map( function(v, i) { + return (v/this.options.snap[i]).round()*this.options.snap[i]; }.bind(this)); + } else { + p = p.map( function(v) { + return (v/this.options.snap).round()*this.options.snap; }.bind(this)); + } + }} + + var style = this.element.style; + if((!this.options.constraint) || (this.options.constraint=='horizontal')) + style.left = p[0] + "px"; + if((!this.options.constraint) || (this.options.constraint=='vertical')) + style.top = p[1] + "px"; + + if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering + }, + + stopScrolling: function() { + if(this.scrollInterval) { + clearInterval(this.scrollInterval); + this.scrollInterval = null; + Draggables._lastScrollPointer = null; + } + }, + + startScrolling: function(speed) { + if(!(speed[0] || speed[1])) return; + this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed]; + this.lastScrolled = new Date(); + this.scrollInterval = setInterval(this.scroll.bind(this), 10); + }, + + scroll: function() { + var current = new Date(); + var delta = current - this.lastScrolled; + this.lastScrolled = current; + if(this.options.scroll == window) { + with (this._getWindowScroll(this.options.scroll)) { + if (this.scrollSpeed[0] || this.scrollSpeed[1]) { + var d = delta / 1000; + this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] ); + } + } + } else { + this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000; + this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000; + } + + Position.prepare(); + Droppables.show(Draggables._lastPointer, this.element); + Draggables.notify('onDrag', this); + if (this._isScrollChild) { + Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer); + Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000; + Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000; + if (Draggables._lastScrollPointer[0] < 0) + Draggables._lastScrollPointer[0] = 0; + if (Draggables._lastScrollPointer[1] < 0) + Draggables._lastScrollPointer[1] = 0; + this.draw(Draggables._lastScrollPointer); + } + + if(this.options.change) this.options.change(this); + }, + + _getWindowScroll: function(w) { + var T, L, W, H; + with (w.document) { + if (w.document.documentElement && documentElement.scrollTop) { + T = documentElement.scrollTop; + L = documentElement.scrollLeft; + } else if (w.document.body) { + T = body.scrollTop; + L = body.scrollLeft; + } + if (w.innerWidth) { + W = w.innerWidth; + H = w.innerHeight; + } else if (w.document.documentElement && documentElement.clientWidth) { + W = documentElement.clientWidth; + H = documentElement.clientHeight; + } else { + W = body.offsetWidth; + H = body.offsetHeight; + } + } + return { top: T, left: L, width: W, height: H }; + } +}); + +Draggable._dragging = { }; + +/*--------------------------------------------------------------------------*/ + +var SortableObserver = Class.create({ + initialize: function(element, observer) { + this.element = $(element); + this.observer = observer; + this.lastValue = Sortable.serialize(this.element); + }, + + onStart: function() { + this.lastValue = Sortable.serialize(this.element); + }, + + onEnd: function() { + Sortable.unmark(); + if(this.lastValue != Sortable.serialize(this.element)) + this.observer(this.element); + } +}); + +var Sortable = { + SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/, + + sortables: { }, + + _findRootElement: function(element) { + while (element.tagName.toUpperCase() != "BODY") { + if(element.id && Sortable.sortables[element.id]) return element; + element = element.parentNode; + } + }, + + options: function(element) { + element = Sortable._findRootElement($(element)); + if(!element) return; + return Sortable.sortables[element.id]; + }, + + destroy: function(element){ + element = $(element); + var s = Sortable.sortables[element.id]; + + if(s) { + Draggables.removeObserver(s.element); + s.droppables.each(function(d){ Droppables.remove(d); }); + s.draggables.invoke('destroy'); + + delete Sortable.sortables[s.element.id]; + } + }, + + create: function(element) { + element = $(element); + var options = Object.extend({ + element: element, + tag: 'li', // assumes li children, override with tag: 'tagname' + dropOnEmpty: false, + tree: false, + treeTag: 'ul', + overlap: 'vertical', // one of 'vertical', 'horizontal' + constraint: 'vertical', // one of 'vertical', 'horizontal', false + containment: element, // also takes array of elements (or id's); or false + handle: false, // or a CSS class + only: false, + delay: 0, + hoverclass: null, + ghosting: false, + quiet: false, + scroll: false, + scrollSensitivity: 20, + scrollSpeed: 15, + format: this.SERIALIZE_RULE, + + // these take arrays of elements or ids and can be + // used for better initialization performance + elements: false, + handles: false, + + onChange: Prototype.emptyFunction, + onUpdate: Prototype.emptyFunction + }, arguments[1] || { }); + + // clear any old sortable with same element + this.destroy(element); + + // build options for the draggables + var options_for_draggable = { + revert: true, + quiet: options.quiet, + scroll: options.scroll, + scrollSpeed: options.scrollSpeed, + scrollSensitivity: options.scrollSensitivity, + delay: options.delay, + ghosting: options.ghosting, + constraint: options.constraint, + handle: options.handle }; + + if(options.starteffect) + options_for_draggable.starteffect = options.starteffect; + + if(options.reverteffect) + options_for_draggable.reverteffect = options.reverteffect; + else + if(options.ghosting) options_for_draggable.reverteffect = function(element) { + element.style.top = 0; + element.style.left = 0; + }; + + if(options.endeffect) + options_for_draggable.endeffect = options.endeffect; + + if(options.zindex) + options_for_draggable.zindex = options.zindex; + + // build options for the droppables + var options_for_droppable = { + overlap: options.overlap, + containment: options.containment, + tree: options.tree, + hoverclass: options.hoverclass, + onHover: Sortable.onHover + }; + + var options_for_tree = { + onHover: Sortable.onEmptyHover, + overlap: options.overlap, + containment: options.containment, + hoverclass: options.hoverclass + }; + + // fix for gecko engine + Element.cleanWhitespace(element); + + options.draggables = []; + options.droppables = []; + + // drop on empty handling + if(options.dropOnEmpty || options.tree) { + Droppables.add(element, options_for_tree); + options.droppables.push(element); + } + + (options.elements || this.findElements(element, options) || []).each( function(e,i) { + var handle = options.handles ? $(options.handles[i]) : + (options.handle ? $(e).select('.' + options.handle)[0] : e); + options.draggables.push( + new Draggable(e, Object.extend(options_for_draggable, { handle: handle }))); + Droppables.add(e, options_for_droppable); + if(options.tree) e.treeNode = element; + options.droppables.push(e); + }); + + if(options.tree) { + (Sortable.findTreeElements(element, options) || []).each( function(e) { + Droppables.add(e, options_for_tree); + e.treeNode = element; + options.droppables.push(e); + }); + } + + // keep reference + this.sortables[element.identify()] = options; + + // for onupdate + Draggables.addObserver(new SortableObserver(element, options.onUpdate)); + + }, + + // return all suitable-for-sortable elements in a guaranteed order + findElements: function(element, options) { + return Element.findChildren( + element, options.only, options.tree ? true : false, options.tag); + }, + + findTreeElements: function(element, options) { + return Element.findChildren( + element, options.only, options.tree ? true : false, options.treeTag); + }, + + onHover: function(element, dropon, overlap) { + if(Element.isParent(dropon, element)) return; + + if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) { + return; + } else if(overlap>0.5) { + Sortable.mark(dropon, 'before'); + if(dropon.previousSibling != element) { + var oldParentNode = element.parentNode; + element.style.visibility = "hidden"; // fix gecko rendering + dropon.parentNode.insertBefore(element, dropon); + if(dropon.parentNode!=oldParentNode) + Sortable.options(oldParentNode).onChange(element); + Sortable.options(dropon.parentNode).onChange(element); + } + } else { + Sortable.mark(dropon, 'after'); + var nextElement = dropon.nextSibling || null; + if(nextElement != element) { + var oldParentNode = element.parentNode; + element.style.visibility = "hidden"; // fix gecko rendering + dropon.parentNode.insertBefore(element, nextElement); + if(dropon.parentNode!=oldParentNode) + Sortable.options(oldParentNode).onChange(element); + Sortable.options(dropon.parentNode).onChange(element); + } + } + }, + + onEmptyHover: function(element, dropon, overlap) { + var oldParentNode = element.parentNode; + var droponOptions = Sortable.options(dropon); + + if(!Element.isParent(dropon, element)) { + var index; + + var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only}); + var child = null; + + if(children) { + var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap); + + for (index = 0; index < children.length; index += 1) { + if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) { + offset -= Element.offsetSize (children[index], droponOptions.overlap); + } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) { + child = index + 1 < children.length ? children[index + 1] : null; + break; + } else { + child = children[index]; + break; + } + } + } + + dropon.insertBefore(element, child); + + Sortable.options(oldParentNode).onChange(element); + droponOptions.onChange(element); + } + }, + + unmark: function() { + if(Sortable._marker) Sortable._marker.hide(); + }, + + mark: function(dropon, position) { + // mark on ghosting only + var sortable = Sortable.options(dropon.parentNode); + if(sortable && !sortable.ghosting) return; + + if(!Sortable._marker) { + Sortable._marker = + ($('dropmarker') || Element.extend(document.createElement('DIV'))). + hide().addClassName('dropmarker').setStyle({position:'absolute'}); + document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); + } + var offsets = dropon.cumulativeOffset(); + Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'}); + + if(position=='after') + if(sortable.overlap == 'horizontal') + Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'}); + else + Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'}); + + Sortable._marker.show(); + }, + + _tree: function(element, options, parent) { + var children = Sortable.findElements(element, options) || []; + + for (var i = 0; i < children.length; ++i) { + var match = children[i].id.match(options.format); + + if (!match) continue; + + var child = { + id: encodeURIComponent(match ? match[1] : null), + element: element, + parent: parent, + children: [], + position: parent.children.length, + container: $(children[i]).down(options.treeTag) + }; + + /* Get the element containing the children and recurse over it */ + if (child.container) + this._tree(child.container, options, child); + + parent.children.push (child); + } + + return parent; + }, + + tree: function(element) { + element = $(element); + var sortableOptions = this.options(element); + var options = Object.extend({ + tag: sortableOptions.tag, + treeTag: sortableOptions.treeTag, + only: sortableOptions.only, + name: element.id, + format: sortableOptions.format + }, arguments[1] || { }); + + var root = { + id: null, + parent: null, + children: [], + container: element, + position: 0 + }; + + return Sortable._tree(element, options, root); + }, + + /* Construct a [i] index for a particular node */ + _constructIndex: function(node) { + var index = ''; + do { + if (node.id) index = '[' + node.position + ']' + index; + } while ((node = node.parent) != null); + return index; + }, + + sequence: function(element) { + element = $(element); + var options = Object.extend(this.options(element), arguments[1] || { }); + + return $(this.findElements(element, options) || []).map( function(item) { + return item.id.match(options.format) ? item.id.match(options.format)[1] : ''; + }); + }, + + setSequence: function(element, new_sequence) { + element = $(element); + var options = Object.extend(this.options(element), arguments[2] || { }); + + var nodeMap = { }; + this.findElements(element, options).each( function(n) { + if (n.id.match(options.format)) + nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; + n.parentNode.removeChild(n); + }); + + new_sequence.each(function(ident) { + var n = nodeMap[ident]; + if (n) { + n[1].appendChild(n[0]); + delete nodeMap[ident]; + } + }); + }, + + serialize: function(element) { + element = $(element); + var options = Object.extend(Sortable.options(element), arguments[1] || { }); + var name = encodeURIComponent( + (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); + + if (options.tree) { + return Sortable.tree(element, arguments[1]).children.map( function (item) { + return [name + Sortable._constructIndex(item) + "[id]=" + + encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); + }).flatten().join('&'); + } else { + return Sortable.sequence(element, arguments[1]).map( function(item) { + return name + "[]=" + encodeURIComponent(item); + }).join('&'); + } + } +}; + +// Returns true if child is contained within element +Element.isParent = function(child, element) { + if (!child.parentNode || child == element) return false; + if (child.parentNode == element) return true; + return Element.isParent(child.parentNode, element); +}; + +Element.findChildren = function(element, only, recursive, tagName) { + if(!element.hasChildNodes()) return null; + tagName = tagName.toUpperCase(); + if(only) only = [only].flatten(); + var elements = []; + $A(element.childNodes).each( function(e) { + if(e.tagName && e.tagName.toUpperCase()==tagName && + (!only || (Element.classNames(e).detect(function(v) { return only.include(v); })))) + elements.push(e); + if(recursive) { + var grandchildren = Element.findChildren(e, only, recursive, tagName); + if(grandchildren) elements.push(grandchildren); + } + }); + + return (elements.length>0 ? elements.flatten() : []); +}; + +Element.offsetSize = function (element, type) { + return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')]; +}; \ No newline at end of file diff --git a/src/usr/local/www/javascript/scriptaculous/effects.js b/src/usr/local/www/javascript/scriptaculous/effects.js new file mode 100644 index 0000000..7d5192c --- /dev/null +++ b/src/usr/local/www/javascript/scriptaculous/effects.js @@ -0,0 +1,1123 @@ +// script.aculo.us effects.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// Contributors: +// Justin Palmer (http://encytemedia.com/) +// Mark Pilgrim (http://diveintomark.org/) +// Martin Bialasinki +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +// converts rgb() and #xxx to #xxxxxx format, +// returns self (or first argument) if not convertable +String.prototype.parseColor = function() { + var color = '#'; + if (this.slice(0,4) == 'rgb(') { + var cols = this.slice(4,this.length-1).split(','); + var i=0; do { color += parseInt(cols[i]).toColorPart(); } while (++i<3); + } else { + if (this.slice(0,1) == '#') { + if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); + if (this.length==7) color = this.toLowerCase(); + } + } + return (color.length==7 ? color : (arguments[0] || this)); +}; + +/*--------------------------------------------------------------------------*/ + +Element.collectTextNodes = function(element) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); + }).flatten().join(''); +}; + +Element.collectTextNodesIgnoreClass = function(element, className) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? + Element.collectTextNodesIgnoreClass(node, className) : '')); + }).flatten().join(''); +}; + +Element.setContentZoom = function(element, percent) { + element = $(element); + element.setStyle({fontSize: (percent/100) + 'em'}); + if (Prototype.Browser.WebKit) window.scrollBy(0,0); + return element; +}; + +Element.getInlineOpacity = function(element){ + return $(element).style.opacity || ''; +}; + +Element.forceRerendering = function(element) { + try { + element = $(element); + var n = document.createTextNode(' '); + element.appendChild(n); + element.removeChild(n); + } catch(e) { } +}; + +/*--------------------------------------------------------------------------*/ + +var Effect = { + _elementDoesNotExistError: { + name: 'ElementDoesNotExistError', + message: 'The specified DOM element does not exist, but is required for this effect to operate' + }, + Transitions: { + linear: Prototype.K, + sinoidal: function(pos) { + return (-Math.cos(pos*Math.PI)/2) + .5; + }, + reverse: function(pos) { + return 1-pos; + }, + flicker: function(pos) { + var pos = ((-Math.cos(pos*Math.PI)/4) + .75) + Math.random()/4; + return pos > 1 ? 1 : pos; + }, + wobble: function(pos) { + return (-Math.cos(pos*Math.PI*(9*pos))/2) + .5; + }, + pulse: function(pos, pulses) { + return (-Math.cos((pos*((pulses||5)-.5)*2)*Math.PI)/2) + .5; + }, + spring: function(pos) { + return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6)); + }, + none: function(pos) { + return 0; + }, + full: function(pos) { + return 1; + } + }, + DefaultOptions: { + duration: 1.0, // seconds + fps: 100, // 100= assume 66fps max. + sync: false, // true for combining + from: 0.0, + to: 1.0, + delay: 0.0, + queue: 'parallel' + }, + tagifyText: function(element) { + var tagifyStyle = 'position:relative'; + if (Prototype.Browser.IE) tagifyStyle += ';zoom:1'; + + element = $(element); + $A(element.childNodes).each( function(child) { + if (child.nodeType==3) { + child.nodeValue.toArray().each( function(character) { + element.insertBefore( + new Element('span', {style: tagifyStyle}).update( + character == ' ' ? String.fromCharCode(160) : character), + child); + }); + Element.remove(child); + } + }); + }, + multiple: function(element, effect) { + var elements; + if (((typeof element == 'object') || + Object.isFunction(element)) && + (element.length)) + elements = element; + else + elements = $(element).childNodes; + + var options = Object.extend({ + speed: 0.1, + delay: 0.0 + }, arguments[2] || { }); + var masterDelay = options.delay; + + $A(elements).each( function(element, index) { + new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); + }); + }, + PAIRS: { + 'slide': ['SlideDown','SlideUp'], + 'blind': ['BlindDown','BlindUp'], + 'appear': ['Appear','Fade'] + }, + toggle: function(element, effect, options) { + element = $(element); + effect = (effect || 'appear').toLowerCase(); + + return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({ + queue: { position:'end', scope:(element.id || 'global'), limit: 1 } + }, options || {})); + } +}; + +Effect.DefaultOptions.transition = Effect.Transitions.sinoidal; + +/* ------------- core effects ------------- */ + +Effect.ScopedQueue = Class.create(Enumerable, { + initialize: function() { + this.effects = []; + this.interval = null; + }, + _each: function(iterator) { + this.effects._each(iterator); + }, + add: function(effect) { + var timestamp = new Date().getTime(); + + var position = Object.isString(effect.options.queue) ? + effect.options.queue : effect.options.queue.position; + + switch(position) { + case 'front': + // move unstarted effects after this effect + this.effects.findAll(function(e){ return e.state=='idle'; }).each( function(e) { + e.startOn += effect.finishOn; + e.finishOn += effect.finishOn; + }); + break; + case 'with-last': + timestamp = this.effects.pluck('startOn').max() || timestamp; + break; + case 'end': + // start effect after last queued effect has finished + timestamp = this.effects.pluck('finishOn').max() || timestamp; + break; + } + + effect.startOn += timestamp; + effect.finishOn += timestamp; + + if (!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) + this.effects.push(effect); + + if (!this.interval) + this.interval = setInterval(this.loop.bind(this), 15); + }, + remove: function(effect) { + this.effects = this.effects.reject(function(e) { return e==effect; }); + if (this.effects.length == 0) { + clearInterval(this.interval); + this.interval = null; + } + }, + loop: function() { + var timePos = new Date().getTime(); + for(var i=0, len=this.effects.length;i= this.startOn) { + if (timePos >= this.finishOn) { + this.render(1.0); + this.cancel(); + this.event('beforeFinish'); + if (this.finish) this.finish(); + this.event('afterFinish'); + return; + } + var pos = (timePos - this.startOn) / this.totalTime, + frame = (pos * this.totalFrames).round(); + if (frame > this.currentFrame) { + this.render(pos); + this.currentFrame = frame; + } + } + }, + cancel: function() { + if (!this.options.sync) + Effect.Queues.get(Object.isString(this.options.queue) ? + 'global' : this.options.queue.scope).remove(this); + this.state = 'finished'; + }, + event: function(eventName) { + if (this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); + if (this.options[eventName]) this.options[eventName](this); + }, + inspect: function() { + var data = $H(); + for(property in this) + if (!Object.isFunction(this[property])) data.set(property, this[property]); + return '#'; + } +}); + +Effect.Parallel = Class.create(Effect.Base, { + initialize: function(effects) { + this.effects = effects || []; + this.start(arguments[1]); + }, + update: function(position) { + this.effects.invoke('render', position); + }, + finish: function(position) { + this.effects.each( function(effect) { + effect.render(1.0); + effect.cancel(); + effect.event('beforeFinish'); + if (effect.finish) effect.finish(position); + effect.event('afterFinish'); + }); + } +}); + +Effect.Tween = Class.create(Effect.Base, { + initialize: function(object, from, to) { + object = Object.isString(object) ? $(object) : object; + var args = $A(arguments), method = args.last(), + options = args.length == 5 ? args[3] : null; + this.method = Object.isFunction(method) ? method.bind(object) : + Object.isFunction(object[method]) ? object[method].bind(object) : + function(value) { object[method] = value; }; + this.start(Object.extend({ from: from, to: to }, options || { })); + }, + update: function(position) { + this.method(position); + } +}); + +Effect.Event = Class.create(Effect.Base, { + initialize: function() { + this.start(Object.extend({ duration: 0 }, arguments[0] || { })); + }, + update: Prototype.emptyFunction +}); + +Effect.Opacity = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + // make this work on IE on elements without 'layout' + if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout)) + this.element.setStyle({zoom: 1}); + var options = Object.extend({ + from: this.element.getOpacity() || 0.0, + to: 1.0 + }, arguments[1] || { }); + this.start(options); + }, + update: function(position) { + this.element.setOpacity(position); + } +}); + +Effect.Move = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + x: 0, + y: 0, + mode: 'relative' + }, arguments[1] || { }); + this.start(options); + }, + setup: function() { + this.element.makePositioned(); + this.originalLeft = parseFloat(this.element.getStyle('left') || '0'); + this.originalTop = parseFloat(this.element.getStyle('top') || '0'); + if (this.options.mode == 'absolute') { + this.options.x = this.options.x - this.originalLeft; + this.options.y = this.options.y - this.originalTop; + } + }, + update: function(position) { + this.element.setStyle({ + left: (this.options.x * position + this.originalLeft).round() + 'px', + top: (this.options.y * position + this.originalTop).round() + 'px' + }); + } +}); + +// for backwards compatibility +Effect.MoveBy = function(element, toTop, toLeft) { + return new Effect.Move(element, + Object.extend({ x: toLeft, y: toTop }, arguments[3] || { })); +}; + +Effect.Scale = Class.create(Effect.Base, { + initialize: function(element, percent) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + scaleX: true, + scaleY: true, + scaleContent: true, + scaleFromCenter: false, + scaleMode: 'box', // 'box' or 'contents' or { } with provided values + scaleFrom: 100.0, + scaleTo: percent + }, arguments[2] || { }); + this.start(options); + }, + setup: function() { + this.restoreAfterFinish = this.options.restoreAfterFinish || false; + this.elementPositioning = this.element.getStyle('position'); + + this.originalStyle = { }; + ['top','left','width','height','fontSize'].each( function(k) { + this.originalStyle[k] = this.element.style[k]; + }.bind(this)); + + this.originalTop = this.element.offsetTop; + this.originalLeft = this.element.offsetLeft; + + var fontSize = this.element.getStyle('font-size') || '100%'; + ['em','px','%','pt'].each( function(fontSizeType) { + if (fontSize.indexOf(fontSizeType)>0) { + this.fontSize = parseFloat(fontSize); + this.fontSizeType = fontSizeType; + } + }.bind(this)); + + this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; + + this.dims = null; + if (this.options.scaleMode=='box') + this.dims = [this.element.offsetHeight, this.element.offsetWidth]; + if (/^content/.test(this.options.scaleMode)) + this.dims = [this.element.scrollHeight, this.element.scrollWidth]; + if (!this.dims) + this.dims = [this.options.scaleMode.originalHeight, + this.options.scaleMode.originalWidth]; + }, + update: function(position) { + var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); + if (this.options.scaleContent && this.fontSize) + this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType }); + this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); + }, + finish: function(position) { + if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle); + }, + setDimensions: function(height, width) { + var d = { }; + if (this.options.scaleX) d.width = width.round() + 'px'; + if (this.options.scaleY) d.height = height.round() + 'px'; + if (this.options.scaleFromCenter) { + var topd = (height - this.dims[0])/2; + var leftd = (width - this.dims[1])/2; + if (this.elementPositioning == 'absolute') { + if (this.options.scaleY) d.top = this.originalTop-topd + 'px'; + if (this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; + } else { + if (this.options.scaleY) d.top = -topd + 'px'; + if (this.options.scaleX) d.left = -leftd + 'px'; + } + } + this.element.setStyle(d); + } +}); + +Effect.Highlight = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || { }); + this.start(options); + }, + setup: function() { + // Prevent executing on elements not in the layout flow + if (this.element.getStyle('display')=='none') { this.cancel(); return; } + // Disable background image during the effect + this.oldStyle = { }; + if (!this.options.keepBackgroundImage) { + this.oldStyle.backgroundImage = this.element.getStyle('background-image'); + this.element.setStyle({backgroundImage: 'none'}); + } + if (!this.options.endcolor) + this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff'); + if (!this.options.restorecolor) + this.options.restorecolor = this.element.getStyle('background-color'); + // init color calculations + this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16); }.bind(this)); + this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i]; }.bind(this)); + }, + update: function(position) { + this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){ + return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) }); + }, + finish: function() { + this.element.setStyle(Object.extend(this.oldStyle, { + backgroundColor: this.options.restorecolor + })); + } +}); + +Effect.ScrollTo = function(element) { + var options = arguments[1] || { }, + scrollOffsets = document.viewport.getScrollOffsets(), + elementOffsets = $(element).cumulativeOffset(); + + if (options.offset) elementOffsets[1] += options.offset; + + return new Effect.Tween(null, + scrollOffsets.top, + elementOffsets[1], + options, + function(p){ scrollTo(scrollOffsets.left, p.round()); } + ); +}; + +/* ------------- combination effects ------------- */ + +Effect.Fade = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + var options = Object.extend({ + from: element.getOpacity() || 1.0, + to: 0.0, + afterFinishInternal: function(effect) { + if (effect.options.to!=0) return; + effect.element.hide().setStyle({opacity: oldOpacity}); + } + }, arguments[1] || { }); + return new Effect.Opacity(element,options); +}; + +Effect.Appear = function(element) { + element = $(element); + var options = Object.extend({ + from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0), + to: 1.0, + // force Safari to render floated elements properly + afterFinishInternal: function(effect) { + effect.element.forceRerendering(); + }, + beforeSetup: function(effect) { + effect.element.setOpacity(effect.options.from).show(); + }}, arguments[1] || { }); + return new Effect.Opacity(element,options); +}; + +Effect.Puff = function(element) { + element = $(element); + var oldStyle = { + opacity: element.getInlineOpacity(), + position: element.getStyle('position'), + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height + }; + return new Effect.Parallel( + [ new Effect.Scale(element, 200, + { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], + Object.extend({ duration: 1.0, + beforeSetupInternal: function(effect) { + Position.absolutize(effect.effects[0].element); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().setStyle(oldStyle); } + }, arguments[1] || { }) + ); +}; + +Effect.BlindUp = function(element) { + element = $(element); + element.makeClipping(); + return new Effect.Scale(element, 0, + Object.extend({ scaleContent: false, + scaleX: false, + restoreAfterFinish: true, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }, arguments[1] || { }) + ); +}; + +Effect.BlindDown = function(element) { + element = $(element); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: 0, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping(); + } + }, arguments[1] || { })); +}; + +Effect.SwitchOff = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + return new Effect.Appear(element, Object.extend({ + duration: 0.4, + from: 0, + transition: Effect.Transitions.flicker, + afterFinishInternal: function(effect) { + new Effect.Scale(effect.element, 1, { + duration: 0.3, scaleFromCenter: true, + scaleX: false, scaleContent: false, restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity}); + } + }); + } + }, arguments[1] || { })); +}; + +Effect.DropOut = function(element) { + element = $(element); + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left'), + opacity: element.getInlineOpacity() }; + return new Effect.Parallel( + [ new Effect.Move(element, {x: 0, y: 100, sync: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 }) ], + Object.extend( + { duration: 0.5, + beforeSetup: function(effect) { + effect.effects[0].element.makePositioned(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); + } + }, arguments[1] || { })); +}; + +Effect.Shake = function(element) { + element = $(element); + var options = Object.extend({ + distance: 20, + duration: 0.5 + }, arguments[1] || {}); + var distance = parseFloat(options.distance); + var split = parseFloat(options.duration) / 10.0; + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left') }; + return new Effect.Move(element, + { x: distance, y: 0, duration: split, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) { + effect.element.undoPositioned().setStyle(oldStyle); + }}); }}); }}); }}); }}); }}); +}; + +Effect.SlideDown = function(element) { + element = $(element).cleanWhitespace(); + // SlideDown need to have the content of the element wrapped in a container element with fixed height! + var oldInnerBottom = element.down().getStyle('bottom'); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: window.opera ? 0 : 1, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if (window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping().undoPositioned(); + effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); } + }, arguments[1] || { }) + ); +}; + +Effect.SlideUp = function(element) { + element = $(element).cleanWhitespace(); + var oldInnerBottom = element.down().getStyle('bottom'); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, window.opera ? 0 : 1, + Object.extend({ scaleContent: false, + scaleX: false, + scaleMode: 'box', + scaleFrom: 100, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if (window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned(); + effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); + } + }, arguments[1] || { }) + ); +}; + +// Bug in opera makes the TD containing this element expand for a instance after finish +Effect.Squish = function(element) { + return new Effect.Scale(element, window.opera ? 1 : 0, { + restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }); +}; + +Effect.Grow = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.full + }, arguments[1] || { }); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var initialMoveX, initialMoveY; + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + initialMoveX = initialMoveY = moveX = moveY = 0; + break; + case 'top-right': + initialMoveX = dims.width; + initialMoveY = moveY = 0; + moveX = -dims.width; + break; + case 'bottom-left': + initialMoveX = moveX = 0; + initialMoveY = dims.height; + moveY = -dims.height; + break; + case 'bottom-right': + initialMoveX = dims.width; + initialMoveY = dims.height; + moveX = -dims.width; + moveY = -dims.height; + break; + case 'center': + initialMoveX = dims.width / 2; + initialMoveY = dims.height / 2; + moveX = -dims.width / 2; + moveY = -dims.height / 2; + break; + } + + return new Effect.Move(element, { + x: initialMoveX, + y: initialMoveY, + duration: 0.01, + beforeSetup: function(effect) { + effect.element.hide().makeClipping().makePositioned(); + }, + afterFinishInternal: function(effect) { + new Effect.Parallel( + [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), + new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), + new Effect.Scale(effect.element, 100, { + scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, + sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) + ], Object.extend({ + beforeSetup: function(effect) { + effect.effects[0].element.setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); + } + }, options) + ); + } + }); +}; + +Effect.Shrink = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.none + }, arguments[1] || { }); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + moveX = moveY = 0; + break; + case 'top-right': + moveX = dims.width; + moveY = 0; + break; + case 'bottom-left': + moveX = 0; + moveY = dims.height; + break; + case 'bottom-right': + moveX = dims.width; + moveY = dims.height; + break; + case 'center': + moveX = dims.width / 2; + moveY = dims.height / 2; + break; + } + + return new Effect.Parallel( + [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), + new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), + new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) + ], Object.extend({ + beforeStartInternal: function(effect) { + effect.effects[0].element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); } + }, options) + ); +}; + +Effect.Pulsate = function(element) { + element = $(element); + var options = arguments[1] || { }, + oldOpacity = element.getInlineOpacity(), + transition = options.transition || Effect.Transitions.linear, + reverser = function(pos){ + return 1 - transition((-Math.cos((pos*(options.pulses||5)*2)*Math.PI)/2) + .5); + }; + + return new Effect.Opacity(element, + Object.extend(Object.extend({ duration: 2.0, from: 0, + afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } + }, options), {transition: reverser})); +}; + +Effect.Fold = function(element) { + element = $(element); + var oldStyle = { + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height }; + element.makeClipping(); + return new Effect.Scale(element, 5, Object.extend({ + scaleContent: false, + scaleX: false, + afterFinishInternal: function(effect) { + new Effect.Scale(element, 1, { + scaleContent: false, + scaleY: false, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().setStyle(oldStyle); + } }); + }}, arguments[1] || { })); +}; + +Effect.Morph = Class.create(Effect.Base, { + initialize: function(element) { + this.element = $(element); + if (!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + style: { } + }, arguments[1] || { }); + + if (!Object.isString(options.style)) this.style = $H(options.style); + else { + if (options.style.include(':')) + this.style = options.style.parseStyle(); + else { + this.element.addClassName(options.style); + this.style = $H(this.element.getStyles()); + this.element.removeClassName(options.style); + var css = this.element.getStyles(); + this.style = this.style.reject(function(style) { + return style.value == css[style.key]; + }); + options.afterFinishInternal = function(effect) { + effect.element.addClassName(effect.options.style); + effect.transforms.each(function(transform) { + effect.element.style[transform.style] = ''; + }); + }; + } + } + this.start(options); + }, + + setup: function(){ + function parseColor(color){ + if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; + color = color.parseColor(); + return $R(0,2).map(function(i){ + return parseInt( color.slice(i*2+1,i*2+3), 16 ); + }); + } + this.transforms = this.style.map(function(pair){ + var property = pair[0], value = pair[1], unit = null; + + if (value.parseColor('#zzzzzz') != '#zzzzzz') { + value = value.parseColor(); + unit = 'color'; + } else if (property == 'opacity') { + value = parseFloat(value); + if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout)) + this.element.setStyle({zoom: 1}); + } else if (Element.CSS_LENGTH.test(value)) { + var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/); + value = parseFloat(components[1]); + unit = (components.length == 3) ? components[2] : null; + } + + var originalValue = this.element.getStyle(property); + return { + style: property.camelize(), + originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), + targetValue: unit=='color' ? parseColor(value) : value, + unit: unit + }; + }.bind(this)).reject(function(transform){ + return ( + (transform.originalValue == transform.targetValue) || + ( + transform.unit != 'color' && + (isNaN(transform.originalValue) || isNaN(transform.targetValue)) + ) + ); + }); + }, + update: function(position) { + var style = { }, transform, i = this.transforms.length; + while(i--) + style[(transform = this.transforms[i]).style] = + transform.unit=='color' ? '#'+ + (Math.round(transform.originalValue[0]+ + (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() + + (Math.round(transform.originalValue[1]+ + (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() + + (Math.round(transform.originalValue[2]+ + (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() : + (transform.originalValue + + (transform.targetValue - transform.originalValue) * position).toFixed(3) + + (transform.unit === null ? '' : transform.unit); + this.element.setStyle(style, true); + } +}); + +Effect.Transform = Class.create({ + initialize: function(tracks){ + this.tracks = []; + this.options = arguments[1] || { }; + this.addTracks(tracks); + }, + addTracks: function(tracks){ + tracks.each(function(track){ + track = $H(track); + var data = track.values().first(); + this.tracks.push($H({ + ids: track.keys().first(), + effect: Effect.Morph, + options: { style: data } + })); + }.bind(this)); + return this; + }, + play: function(){ + return new Effect.Parallel( + this.tracks.map(function(track){ + var ids = track.get('ids'), effect = track.get('effect'), options = track.get('options'); + var elements = [$(ids) || $$(ids)].flatten(); + return elements.map(function(e){ return new effect(e, Object.extend({ sync:true }, options)); }); + }).flatten(), + this.options + ); + } +}); + +Element.CSS_PROPERTIES = $w( + 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' + + 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' + + 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' + + 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' + + 'fontSize fontWeight height left letterSpacing lineHeight ' + + 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+ + 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' + + 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' + + 'right textIndent top width wordSpacing zIndex'); + +Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; + +String.__parseStyleElement = document.createElement('div'); +String.prototype.parseStyle = function(){ + var style, styleRules = $H(); + if (Prototype.Browser.WebKit) + style = new Element('div',{style:this}).style; + else { + String.__parseStyleElement.innerHTML = '
                            '; + style = String.__parseStyleElement.childNodes[0].style; + } + + Element.CSS_PROPERTIES.each(function(property){ + if (style[property]) styleRules.set(property, style[property]); + }); + + if (Prototype.Browser.IE && this.include('opacity')) + styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]); + + return styleRules; +}; + +if (document.defaultView && document.defaultView.getComputedStyle) { + Element.getStyles = function(element) { + var css = document.defaultView.getComputedStyle($(element), null); + return Element.CSS_PROPERTIES.inject({ }, function(styles, property) { + styles[property] = css[property]; + return styles; + }); + }; +} else { + Element.getStyles = function(element) { + element = $(element); + var css = element.currentStyle, styles; + styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) { + results[property] = css[property]; + return results; + }); + if (!styles.opacity) styles.opacity = element.getOpacity(); + return styles; + }; +} + +Effect.Methods = { + morph: function(element, style) { + element = $(element); + new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || { })); + return element; + }, + visualEffect: function(element, effect, options) { + element = $(element); + var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1); + new Effect[klass](element, options); + return element; + }, + highlight: function(element, options) { + element = $(element); + new Effect.Highlight(element, options); + return element; + } +}; + +$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+ + 'pulsate shake puff squish switchOff dropOut').each( + function(effect) { + Effect.Methods[effect] = function(element, options){ + element = $(element); + Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options); + return element; + }; + } +); + +$w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each( + function(f) { Effect.Methods[f] = Element[f]; } +); + +Element.addMethods(Effect.Methods); \ No newline at end of file diff --git a/src/usr/local/www/javascript/scriptaculous/prototype.js b/src/usr/local/www/javascript/scriptaculous/prototype.js new file mode 100644 index 0000000..9cb702c --- /dev/null +++ b/src/usr/local/www/javascript/scriptaculous/prototype.js @@ -0,0 +1,6079 @@ +/* Prototype JavaScript framework, version 1.7 + * (c) 2005-2010 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://www.prototypejs.org/ + * + *--------------------------------------------------------------------------*/ + +var Prototype = { + + Version: '1.7', + + Browser: (function(){ + var ua = navigator.userAgent; + var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]'; + return { + IE: !!window.attachEvent && !isOpera, + Opera: isOpera, + WebKit: ua.indexOf('AppleWebKit/') > -1, + Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1, + MobileSafari: /Apple.*Mobile/.test(ua) + }; + })(), + + BrowserFeatures: { + XPath: !!document.evaluate, + + SelectorsAPI: !!document.querySelector, + + ElementExtensions: (function() { + var constructor = window.Element || window.HTMLElement; + return !!(constructor && constructor.prototype); + })(), + SpecificElementExtensions: (function() { + if (typeof window.HTMLDivElement !== 'undefined') + return true; + + var div = document.createElement('div'), + form = document.createElement('form'), + isSupported = false; + + if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) { + isSupported = true; + } + + div = form = null; + + return isSupported; + })() + }, + + ScriptFragment: ']*>([\\S\\s]*?)<\/script>', + JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, + + emptyFunction: function() { }, + + K: function(x) { return x; } +}; + +if (Prototype.Browser.MobileSafari) + Prototype.BrowserFeatures.SpecificElementExtensions = false; + + +var Abstract = { }; + + +var Try = { + these: function() { + var returnValue; + + for (var i = 0, length = arguments.length; i < length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) { } + } + + return returnValue; + } +}; + +/* Based on Alex Arnell's inheritance implementation. */ + +var Class = (function() { + + var IS_DONTENUM_BUGGY = (function(){ + for (var p in { toString: 1 }) { + if (p === 'toString') return false; + } + return true; + })(); + + function subclass() {}; + function create() { + var parent = null, properties = $A(arguments); + if (Object.isFunction(properties[0])) + parent = properties.shift(); + + function klass() { + this.initialize.apply(this, arguments); + } + + Object.extend(klass, Class.Methods); + klass.superclass = parent; + klass.subclasses = []; + + if (parent) { + subclass.prototype = parent.prototype; + klass.prototype = new subclass; + parent.subclasses.push(klass); + } + + for (var i = 0, length = properties.length; i < length; i++) + klass.addMethods(properties[i]); + + if (!klass.prototype.initialize) + klass.prototype.initialize = Prototype.emptyFunction; + + klass.prototype.constructor = klass; + return klass; + } + + function addMethods(source) { + var ancestor = this.superclass && this.superclass.prototype, + properties = Object.keys(source); + + if (IS_DONTENUM_BUGGY) { + if (source.toString != Object.prototype.toString) + properties.push("toString"); + if (source.valueOf != Object.prototype.valueOf) + properties.push("valueOf"); + } + + for (var i = 0, length = properties.length; i < length; i++) { + var property = properties[i], value = source[property]; + if (ancestor && Object.isFunction(value) && + value.argumentNames()[0] == "$super") { + var method = value; + value = (function(m) { + return function() { return ancestor[m].apply(this, arguments); }; + })(property).wrap(method); + + value.valueOf = method.valueOf.bind(method); + value.toString = method.toString.bind(method); + } + this.prototype[property] = value; + } + + return this; + } + + return { + create: create, + Methods: { + addMethods: addMethods + } + }; +})(); +(function() { + + var _toString = Object.prototype.toString, + NULL_TYPE = 'Null', + UNDEFINED_TYPE = 'Undefined', + BOOLEAN_TYPE = 'Boolean', + NUMBER_TYPE = 'Number', + STRING_TYPE = 'String', + OBJECT_TYPE = 'Object', + FUNCTION_CLASS = '[object Function]', + BOOLEAN_CLASS = '[object Boolean]', + NUMBER_CLASS = '[object Number]', + STRING_CLASS = '[object String]', + ARRAY_CLASS = '[object Array]', + DATE_CLASS = '[object Date]', + NATIVE_JSON_STRINGIFY_SUPPORT = window.JSON && + typeof JSON.stringify === 'function' && + JSON.stringify(0) === '0' && + typeof JSON.stringify(Prototype.K) === 'undefined'; + + function Type(o) { + switch(o) { + case null: return NULL_TYPE; + case (void 0): return UNDEFINED_TYPE; + } + var type = typeof o; + switch(type) { + case 'boolean': return BOOLEAN_TYPE; + case 'number': return NUMBER_TYPE; + case 'string': return STRING_TYPE; + } + return OBJECT_TYPE; + } + + function extend(destination, source) { + for (var property in source) + destination[property] = source[property]; + return destination; + } + + function inspect(object) { + try { + if (isUndefined(object)) return 'undefined'; + if (object === null) return 'null'; + return object.inspect ? object.inspect() : String(object); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } + } + + function toJSON(value) { + return Str('', { '': value }, []); + } + + function Str(key, holder, stack) { + var value = holder[key], + type = typeof value; + + if (Type(value) === OBJECT_TYPE && typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + + var _class = _toString.call(value); + + switch (_class) { + case NUMBER_CLASS: + case BOOLEAN_CLASS: + case STRING_CLASS: + value = value.valueOf(); + } + + switch (value) { + case null: return 'null'; + case true: return 'true'; + case false: return 'false'; + } + + type = typeof value; + switch (type) { + case 'string': + return value.inspect(true); + case 'number': + return isFinite(value) ? String(value) : 'null'; + case 'object': + + for (var i = 0, length = stack.length; i < length; i++) { + if (stack[i] === value) { throw new TypeError(); } + } + stack.push(value); + + var partial = []; + if (_class === ARRAY_CLASS) { + for (var i = 0, length = value.length; i < length; i++) { + var str = Str(i, value, stack); + partial.push(typeof str === 'undefined' ? 'null' : str); + } + partial = '[' + partial.join(',') + ']'; + } else { + var keys = Object.keys(value); + for (var i = 0, length = keys.length; i < length; i++) { + var key = keys[i], str = Str(key, value, stack); + if (typeof str !== "undefined") { + partial.push(key.inspect(true)+ ':' + str); + } + } + partial = '{' + partial.join(',') + '}'; + } + stack.pop(); + return partial; + } + } + + function stringify(object) { + return JSON.stringify(object); + } + + function toQueryString(object) { + return $H(object).toQueryString(); + } + + function toHTML(object) { + return object && object.toHTML ? object.toHTML() : String.interpret(object); + } + + function keys(object) { + if (Type(object) !== OBJECT_TYPE) { throw new TypeError(); } + var results = []; + for (var property in object) { + if (object.hasOwnProperty(property)) { + results.push(property); + } + } + return results; + } + + function values(object) { + var results = []; + for (var property in object) + results.push(object[property]); + return results; + } + + function clone(object) { + return extend({ }, object); + } + + function isElement(object) { + return !!(object && object.nodeType == 1); + } + + function isArray(object) { + return _toString.call(object) === ARRAY_CLASS; + } + + var hasNativeIsArray = (typeof Array.isArray == 'function') + && Array.isArray([]) && !Array.isArray({}); + + if (hasNativeIsArray) { + isArray = Array.isArray; + } + + function isHash(object) { + return object instanceof Hash; + } + + function isFunction(object) { + return _toString.call(object) === FUNCTION_CLASS; + } + + function isString(object) { + return _toString.call(object) === STRING_CLASS; + } + + function isNumber(object) { + return _toString.call(object) === NUMBER_CLASS; + } + + function isDate(object) { + return _toString.call(object) === DATE_CLASS; + } + + function isUndefined(object) { + return typeof object === "undefined"; + } + + extend(Object, { + extend: extend, + inspect: inspect, + toJSON: NATIVE_JSON_STRINGIFY_SUPPORT ? stringify : toJSON, + toQueryString: toQueryString, + toHTML: toHTML, + keys: Object.keys || keys, + values: values, + clone: clone, + isElement: isElement, + isArray: isArray, + isHash: isHash, + isFunction: isFunction, + isString: isString, + isNumber: isNumber, + isDate: isDate, + isUndefined: isUndefined + }); +})(); +Object.extend(Function.prototype, (function() { + var slice = Array.prototype.slice; + + function update(array, args) { + var arrayLength = array.length, length = args.length; + while (length--) array[arrayLength + length] = args[length]; + return array; + } + + function merge(array, args) { + array = slice.call(array, 0); + return update(array, args); + } + + function argumentNames() { + var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1] + .replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '') + .replace(/\s+/g, '').split(','); + return names.length == 1 && !names[0] ? [] : names; + } + + function bind(context) { + if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this; + var __method = this, args = slice.call(arguments, 1); + return function() { + var a = merge(args, arguments); + return __method.apply(context, a); + }; + } + + function bindAsEventListener(context) { + var __method = this, args = slice.call(arguments, 1); + return function(event) { + var a = update([event || window.event], args); + return __method.apply(context, a); + }; + } + + function curry() { + if (!arguments.length) return this; + var __method = this, args = slice.call(arguments, 0); + return function() { + var a = merge(args, arguments); + return __method.apply(this, a); + }; + } + + function delay(timeout) { + var __method = this, args = slice.call(arguments, 1); + timeout = timeout * 1000; + return window.setTimeout(function() { + return __method.apply(__method, args); + }, timeout); + } + + function defer() { + var args = update([0.01], arguments); + return this.delay.apply(this, args); + } + + function wrap(wrapper) { + var __method = this; + return function() { + var a = update([__method.bind(this)], arguments); + return wrapper.apply(this, a); + }; + } + + function methodize() { + if (this._methodized) return this._methodized; + var __method = this; + return this._methodized = function() { + var a = update([this], arguments); + return __method.apply(null, a); + }; + } + + return { + argumentNames: argumentNames, + bind: bind, + bindAsEventListener: bindAsEventListener, + curry: curry, + delay: delay, + defer: defer, + wrap: wrap, + methodize: methodize + }; +})()); + + + +(function(proto) { + + function toISOString() { + return this.getUTCFullYear() + '-' + + (this.getUTCMonth() + 1).toPaddedString(2) + '-' + + this.getUTCDate().toPaddedString(2) + 'T' + + this.getUTCHours().toPaddedString(2) + ':' + + this.getUTCMinutes().toPaddedString(2) + ':' + + this.getUTCSeconds().toPaddedString(2) + 'Z'; + } + + + function toJSON() { + return this.toISOString(); + } + + if (!proto.toISOString) proto.toISOString = toISOString; + if (!proto.toJSON) proto.toJSON = toJSON; + +})(Date.prototype); + + +RegExp.prototype.match = RegExp.prototype.test; + +RegExp.escape = function(str) { + return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); +}; +var PeriodicalExecuter = Class.create({ + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + execute: function() { + this.callback(this); + }, + + stop: function() { + if (!this.timer) return; + clearInterval(this.timer); + this.timer = null; + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.execute(); + this.currentlyExecuting = false; + } catch(e) { + this.currentlyExecuting = false; + throw e; + } + } + } +}); +Object.extend(String, { + interpret: function(value) { + return value == null ? '' : String(value); + }, + specialChar: { + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '\\': '\\\\' + } +}); + +Object.extend(String.prototype, (function() { + var NATIVE_JSON_PARSE_SUPPORT = window.JSON && + typeof JSON.parse === 'function' && + JSON.parse('{"test": true}').test; + + function prepareReplacement(replacement) { + if (Object.isFunction(replacement)) return replacement; + var template = new Template(replacement); + return function(match) { return template.evaluate(match); }; + } + + function gsub(pattern, replacement) { + var result = '', source = this, match; + replacement = prepareReplacement(replacement); + + if (Object.isString(pattern)) + pattern = RegExp.escape(pattern); + + if (!(pattern.length || pattern.source)) { + replacement = replacement(''); + return replacement + source.split('').join(replacement) + replacement; + } + + while (source.length > 0) { + if (match = source.match(pattern)) { + result += source.slice(0, match.index); + result += String.interpret(replacement(match)); + source = source.slice(match.index + match[0].length); + } else { + result += source, source = ''; + } + } + return result; + } + + function sub(pattern, replacement, count) { + replacement = prepareReplacement(replacement); + count = Object.isUndefined(count) ? 1 : count; + + return this.gsub(pattern, function(match) { + if (--count < 0) return match[0]; + return replacement(match); + }); + } + + function scan(pattern, iterator) { + this.gsub(pattern, iterator); + return String(this); + } + + function truncate(length, truncation) { + length = length || 30; + truncation = Object.isUndefined(truncation) ? '...' : truncation; + return this.length > length ? + this.slice(0, length - truncation.length) + truncation : String(this); + } + + function strip() { + return this.replace(/^\s+/, '').replace(/\s+$/, ''); + } + + function stripTags() { + return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, ''); + } + + function stripScripts() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + } + + function extractScripts() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'), + matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + } + + function evalScripts() { + return this.extractScripts().map(function(script) { return eval(script); }); + } + + function escapeHTML() { + return this.replace(/&/g,'&').replace(//g,'>'); + } + + function unescapeHTML() { + return this.stripTags().replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&'); + } + + + function toQueryParams(separator) { + var match = this.strip().match(/([^?#]*)(#.*)?$/); + if (!match) return { }; + + return match[1].split(separator || '&').inject({ }, function(hash, pair) { + if ((pair = pair.split('='))[0]) { + var key = decodeURIComponent(pair.shift()), + value = pair.length > 1 ? pair.join('=') : pair[0]; + + if (value != undefined) value = decodeURIComponent(value); + + if (key in hash) { + if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; + hash[key].push(value); + } + else hash[key] = value; + } + return hash; + }); + } + + function toArray() { + return this.split(''); + } + + function succ() { + return this.slice(0, this.length - 1) + + String.fromCharCode(this.charCodeAt(this.length - 1) + 1); + } + + function times(count) { + return count < 1 ? '' : new Array(count + 1).join(this); + } + + function camelize() { + return this.replace(/-+(.)?/g, function(match, chr) { + return chr ? chr.toUpperCase() : ''; + }); + } + + function capitalize() { + return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); + } + + function underscore() { + return this.replace(/::/g, '/') + .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') + .replace(/([a-z\d])([A-Z])/g, '$1_$2') + .replace(/-/g, '_') + .toLowerCase(); + } + + function dasherize() { + return this.replace(/_/g, '-'); + } + + function inspect(useDoubleQuotes) { + var escapedString = this.replace(/[\x00-\x1f\\]/g, function(character) { + if (character in String.specialChar) { + return String.specialChar[character]; + } + return '\\u00' + character.charCodeAt().toPaddedString(2, 16); + }); + if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; + return "'" + escapedString.replace(/'/g, '\\\'') + "'"; + } + + function unfilterJSON(filter) { + return this.replace(filter || Prototype.JSONFilter, '$1'); + } + + function isJSON() { + var str = this; + if (str.blank()) return false; + str = str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@'); + str = str.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'); + str = str.replace(/(?:^|:|,)(?:\s*\[)+/g, ''); + return (/^[\],:{}\s]*$/).test(str); + } + + function evalJSON(sanitize) { + var json = this.unfilterJSON(), + cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; + if (cx.test(json)) { + json = json.replace(cx, function (a) { + return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }); + } + try { + if (!sanitize || json.isJSON()) return eval('(' + json + ')'); + } catch (e) { } + throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); + } + + function parseJSON() { + var json = this.unfilterJSON(); + return JSON.parse(json); + } + + function include(pattern) { + return this.indexOf(pattern) > -1; + } + + function startsWith(pattern) { + return this.lastIndexOf(pattern, 0) === 0; + } + + function endsWith(pattern) { + var d = this.length - pattern.length; + return d >= 0 && this.indexOf(pattern, d) === d; + } + + function empty() { + return this == ''; + } + + function blank() { + return /^\s*$/.test(this); + } + + function interpolate(object, pattern) { + return new Template(this, pattern).evaluate(object); + } + + return { + gsub: gsub, + sub: sub, + scan: scan, + truncate: truncate, + strip: String.prototype.trim || strip, + stripTags: stripTags, + stripScripts: stripScripts, + extractScripts: extractScripts, + evalScripts: evalScripts, + escapeHTML: escapeHTML, + unescapeHTML: unescapeHTML, + toQueryParams: toQueryParams, + parseQuery: toQueryParams, + toArray: toArray, + succ: succ, + times: times, + camelize: camelize, + capitalize: capitalize, + underscore: underscore, + dasherize: dasherize, + inspect: inspect, + unfilterJSON: unfilterJSON, + isJSON: isJSON, + evalJSON: NATIVE_JSON_PARSE_SUPPORT ? parseJSON : evalJSON, + include: include, + startsWith: startsWith, + endsWith: endsWith, + empty: empty, + blank: blank, + interpolate: interpolate + }; +})()); + +var Template = Class.create({ + initialize: function(template, pattern) { + this.template = template.toString(); + this.pattern = pattern || Template.Pattern; + }, + + evaluate: function(object) { + if (object && Object.isFunction(object.toTemplateReplacements)) + object = object.toTemplateReplacements(); + + return this.template.gsub(this.pattern, function(match) { + if (object == null) return (match[1] + ''); + + var before = match[1] || ''; + if (before == '\\') return match[2]; + + var ctx = object, expr = match[3], + pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/; + + match = pattern.exec(expr); + if (match == null) return before; + + while (match != null) { + var comp = match[1].startsWith('[') ? match[2].replace(/\\\\]/g, ']') : match[1]; + ctx = ctx[comp]; + if (null == ctx || '' == match[3]) break; + expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); + match = pattern.exec(expr); + } + + return before + String.interpret(ctx); + }); + } +}); +Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; + +var $break = { }; + +var Enumerable = (function() { + function each(iterator, context) { + var index = 0; + try { + this._each(function(value) { + iterator.call(context, value, index++); + }); + } catch (e) { + if (e != $break) throw e; + } + return this; + } + + function eachSlice(number, iterator, context) { + var index = -number, slices = [], array = this.toArray(); + if (number < 1) return array; + while ((index += number) < array.length) + slices.push(array.slice(index, index+number)); + return slices.collect(iterator, context); + } + + function all(iterator, context) { + iterator = iterator || Prototype.K; + var result = true; + this.each(function(value, index) { + result = result && !!iterator.call(context, value, index); + if (!result) throw $break; + }); + return result; + } + + function any(iterator, context) { + iterator = iterator || Prototype.K; + var result = false; + this.each(function(value, index) { + if (result = !!iterator.call(context, value, index)) + throw $break; + }); + return result; + } + + function collect(iterator, context) { + iterator = iterator || Prototype.K; + var results = []; + this.each(function(value, index) { + results.push(iterator.call(context, value, index)); + }); + return results; + } + + function detect(iterator, context) { + var result; + this.each(function(value, index) { + if (iterator.call(context, value, index)) { + result = value; + throw $break; + } + }); + return result; + } + + function findAll(iterator, context) { + var results = []; + this.each(function(value, index) { + if (iterator.call(context, value, index)) + results.push(value); + }); + return results; + } + + function grep(filter, iterator, context) { + iterator = iterator || Prototype.K; + var results = []; + + if (Object.isString(filter)) + filter = new RegExp(RegExp.escape(filter)); + + this.each(function(value, index) { + if (filter.match(value)) + results.push(iterator.call(context, value, index)); + }); + return results; + } + + function include(object) { + if (Object.isFunction(this.indexOf)) + if (this.indexOf(object) != -1) return true; + + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + } + + function inGroupsOf(number, fillWith) { + fillWith = Object.isUndefined(fillWith) ? null : fillWith; + return this.eachSlice(number, function(slice) { + while(slice.length < number) slice.push(fillWith); + return slice; + }); + } + + function inject(memo, iterator, context) { + this.each(function(value, index) { + memo = iterator.call(context, memo, value, index); + }); + return memo; + } + + function invoke(method) { + var args = $A(arguments).slice(1); + return this.map(function(value) { + return value[method].apply(value, args); + }); + } + + function max(iterator, context) { + iterator = iterator || Prototype.K; + var result; + this.each(function(value, index) { + value = iterator.call(context, value, index); + if (result == null || value >= result) + result = value; + }); + return result; + } + + function min(iterator, context) { + iterator = iterator || Prototype.K; + var result; + this.each(function(value, index) { + value = iterator.call(context, value, index); + if (result == null || value < result) + result = value; + }); + return result; + } + + function partition(iterator, context) { + iterator = iterator || Prototype.K; + var trues = [], falses = []; + this.each(function(value, index) { + (iterator.call(context, value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + } + + function pluck(property) { + var results = []; + this.each(function(value) { + results.push(value[property]); + }); + return results; + } + + function reject(iterator, context) { + var results = []; + this.each(function(value, index) { + if (!iterator.call(context, value, index)) + results.push(value); + }); + return results; + } + + function sortBy(iterator, context) { + return this.map(function(value, index) { + return { + value: value, + criteria: iterator.call(context, value, index) + }; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + } + + function toArray() { + return this.map(); + } + + function zip() { + var iterator = Prototype.K, args = $A(arguments); + if (Object.isFunction(args.last())) + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + return iterator(collections.pluck(index)); + }); + } + + function size() { + return this.toArray().length; + } + + function inspect() { + return '#'; + } + + + + + + + + + + return { + each: each, + eachSlice: eachSlice, + all: all, + every: all, + any: any, + some: any, + collect: collect, + map: collect, + detect: detect, + findAll: findAll, + select: findAll, + filter: findAll, + grep: grep, + include: include, + member: include, + inGroupsOf: inGroupsOf, + inject: inject, + invoke: invoke, + max: max, + min: min, + partition: partition, + pluck: pluck, + reject: reject, + sortBy: sortBy, + toArray: toArray, + entries: toArray, + zip: zip, + size: size, + inspect: inspect, + find: detect + }; +})(); + +function $A(iterable) { + if (!iterable) return []; + if ('toArray' in Object(iterable)) return iterable.toArray(); + var length = iterable.length || 0, results = new Array(length); + while (length--) results[length] = iterable[length]; + return results; +} + + +function $w(string) { + if (!Object.isString(string)) return []; + string = string.strip(); + return string ? string.split(/\s+/) : []; +} + +Array.from = $A; + + +(function() { + var arrayProto = Array.prototype, + slice = arrayProto.slice, + _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available + + function each(iterator, context) { + for (var i = 0, length = this.length >>> 0; i < length; i++) { + if (i in this) iterator.call(context, this[i], i, this); + } + } + if (!_each) _each = each; + + function clear() { + this.length = 0; + return this; + } + + function first() { + return this[0]; + } + + function last() { + return this[this.length - 1]; + } + + function compact() { + return this.select(function(value) { + return value != null; + }); + } + + function flatten() { + return this.inject([], function(array, value) { + if (Object.isArray(value)) + return array.concat(value.flatten()); + array.push(value); + return array; + }); + } + + function without() { + var values = slice.call(arguments, 0); + return this.select(function(value) { + return !values.include(value); + }); + } + + function reverse(inline) { + return (inline === false ? this.toArray() : this)._reverse(); + } + + function uniq(sorted) { + return this.inject([], function(array, value, index) { + if (0 == index || (sorted ? array.last() != value : !array.include(value))) + array.push(value); + return array; + }); + } + + function intersect(array) { + return this.uniq().findAll(function(item) { + return array.detect(function(value) { return item === value; }); + }); + } + + + function clone() { + return slice.call(this, 0); + } + + function size() { + return this.length; + } + + function inspect() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + } + + function indexOf(item, i) { + i || (i = 0); + var length = this.length; + if (i < 0) i = length + i; + for (; i < length; i++) + if (this[i] === item) return i; + return -1; + } + + function lastIndexOf(item, i) { + i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; + var n = this.slice(0, i).reverse().indexOf(item); + return (n < 0) ? n : i - n - 1; + } + + function concat() { + var array = slice.call(this, 0), item; + for (var i = 0, length = arguments.length; i < length; i++) { + item = arguments[i]; + if (Object.isArray(item) && !('callee' in item)) { + for (var j = 0, arrayLength = item.length; j < arrayLength; j++) + array.push(item[j]); + } else { + array.push(item); + } + } + return array; + } + + Object.extend(arrayProto, Enumerable); + + if (!arrayProto._reverse) + arrayProto._reverse = arrayProto.reverse; + + Object.extend(arrayProto, { + _each: _each, + clear: clear, + first: first, + last: last, + compact: compact, + flatten: flatten, + without: without, + reverse: reverse, + uniq: uniq, + intersect: intersect, + clone: clone, + toArray: clone, + size: size, + inspect: inspect + }); + + var CONCAT_ARGUMENTS_BUGGY = (function() { + return [].concat(arguments)[0][0] !== 1; + })(1,2); + + if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat; + + if (!arrayProto.indexOf) arrayProto.indexOf = indexOf; + if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf; +})(); +function $H(object) { + return new Hash(object); +}; + +var Hash = Class.create(Enumerable, (function() { + function initialize(object) { + this._object = Object.isHash(object) ? object.toObject() : Object.clone(object); + } + + + function _each(iterator) { + for (var key in this._object) { + var value = this._object[key], pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + } + + function set(key, value) { + return this._object[key] = value; + } + + function get(key) { + if (this._object[key] !== Object.prototype[key]) + return this._object[key]; + } + + function unset(key) { + var value = this._object[key]; + delete this._object[key]; + return value; + } + + function toObject() { + return Object.clone(this._object); + } + + + + function keys() { + return this.pluck('key'); + } + + function values() { + return this.pluck('value'); + } + + function index(value) { + var match = this.detect(function(pair) { + return pair.value === value; + }); + return match && match.key; + } + + function merge(object) { + return this.clone().update(object); + } + + function update(object) { + return new Hash(object).inject(this, function(result, pair) { + result.set(pair.key, pair.value); + return result; + }); + } + + function toQueryPair(key, value) { + if (Object.isUndefined(value)) return key; + return key + '=' + encodeURIComponent(String.interpret(value)); + } + + function toQueryString() { + return this.inject([], function(results, pair) { + var key = encodeURIComponent(pair.key), values = pair.value; + + if (values && typeof values == 'object') { + if (Object.isArray(values)) { + var queryValues = []; + for (var i = 0, len = values.length, value; i < len; i++) { + value = values[i]; + queryValues.push(toQueryPair(key, value)); + } + return results.concat(queryValues); + } + } else results.push(toQueryPair(key, values)); + return results; + }).join('&'); + } + + function inspect() { + return '#'; + } + + function clone() { + return new Hash(this); + } + + return { + initialize: initialize, + _each: _each, + set: set, + get: get, + unset: unset, + toObject: toObject, + toTemplateReplacements: toObject, + keys: keys, + values: values, + index: index, + merge: merge, + update: update, + toQueryString: toQueryString, + inspect: inspect, + toJSON: toObject, + clone: clone + }; +})()); + +Hash.from = $H; +Object.extend(Number.prototype, (function() { + function toColorPart() { + return this.toPaddedString(2, 16); + } + + function succ() { + return this + 1; + } + + function times(iterator, context) { + $R(0, this, true).each(iterator, context); + return this; + } + + function toPaddedString(length, radix) { + var string = this.toString(radix || 10); + return '0'.times(length - string.length) + string; + } + + function abs() { + return Math.abs(this); + } + + function round() { + return Math.round(this); + } + + function ceil() { + return Math.ceil(this); + } + + function floor() { + return Math.floor(this); + } + + return { + toColorPart: toColorPart, + succ: succ, + times: times, + toPaddedString: toPaddedString, + abs: abs, + round: round, + ceil: ceil, + floor: floor + }; +})()); + +function $R(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +} + +var ObjectRange = Class.create(Enumerable, (function() { + function initialize(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + } + + function _each(iterator) { + var value = this.start; + while (this.include(value)) { + iterator(value); + value = value.succ(); + } + } + + function include(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } + + return { + initialize: initialize, + _each: _each, + include: include + }; +})()); + + + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new XMLHttpRequest();}, + function() {return new ActiveXObject('Msxml2.XMLHTTP');}, + function() {return new ActiveXObject('Microsoft.XMLHTTP');} + ) || false; + }, + + activeRequestCount: 0 +}; + +Ajax.Responders = { + responders: [], + + _each: function(iterator) { + this.responders._each(iterator); + }, + + register: function(responder) { + if (!this.include(responder)) + this.responders.push(responder); + }, + + unregister: function(responder) { + this.responders = this.responders.without(responder); + }, + + dispatch: function(callback, request, transport, json) { + this.each(function(responder) { + if (Object.isFunction(responder[callback])) { + try { + responder[callback].apply(responder, [request, transport, json]); + } catch (e) { } + } + }); + } +}; + +Object.extend(Ajax.Responders, Enumerable); + +Ajax.Responders.register({ + onCreate: function() { Ajax.activeRequestCount++; }, + onComplete: function() { Ajax.activeRequestCount--; } +}); +Ajax.Base = Class.create({ + initialize: function(options) { + this.options = { + method: 'post', + asynchronous: true, + contentType: 'application/x-www-form-urlencoded', + encoding: 'UTF-8', + parameters: '', + evalJSON: true, + evalJS: true + }; + Object.extend(this.options, options || { }); + + this.options.method = this.options.method.toLowerCase(); + + if (Object.isHash(this.options.parameters)) + this.options.parameters = this.options.parameters.toObject(); + } +}); +Ajax.Request = Class.create(Ajax.Base, { + _complete: false, + + initialize: function($super, url, options) { + $super(options); + this.transport = Ajax.getTransport(); + this.request(url); + }, + + request: function(url) { + this.url = url; + this.method = this.options.method; + var params = Object.isString(this.options.parameters) ? + this.options.parameters : + Object.toQueryString(this.options.parameters); + + if (!['get', 'post'].include(this.method)) { + params += (params ? '&' : '') + "_method=" + this.method; + this.method = 'post'; + } + + if (params && this.method === 'get') { + this.url += (this.url.include('?') ? '&' : '?') + params; + } + + this.parameters = params.toQueryParams(); + + try { + var response = new Ajax.Response(this); + if (this.options.onCreate) this.options.onCreate(response); + Ajax.Responders.dispatch('onCreate', this, response); + + this.transport.open(this.method.toUpperCase(), this.url, + this.options.asynchronous); + + if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1); + + this.transport.onreadystatechange = this.onStateChange.bind(this); + this.setRequestHeaders(); + + this.body = this.method == 'post' ? (this.options.postBody || params) : null; + this.transport.send(this.body); + + /* Force Firefox to handle ready state 4 for synchronous requests */ + if (!this.options.asynchronous && this.transport.overrideMimeType) + this.onStateChange(); + + } + catch (e) { + this.dispatchException(e); + } + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState > 1 && !((readyState == 4) && this._complete)) + this.respondToReadyState(this.transport.readyState); + }, + + setRequestHeaders: function() { + var headers = { + 'X-Requested-With': 'XMLHttpRequest', + 'X-Prototype-Version': Prototype.Version, + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' + }; + + if (this.method == 'post') { + headers['Content-type'] = this.options.contentType + + (this.options.encoding ? '; charset=' + this.options.encoding : ''); + + /* Force "Connection: close" for older Mozilla browsers to work + * around a bug where XMLHttpRequest sends an incorrect + * Content-length header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType && + (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) + headers['Connection'] = 'close'; + } + + if (typeof this.options.requestHeaders == 'object') { + var extras = this.options.requestHeaders; + + if (Object.isFunction(extras.push)) + for (var i = 0, length = extras.length; i < length; i += 2) + headers[extras[i]] = extras[i+1]; + else + $H(extras).each(function(pair) { headers[pair.key] = pair.value; }); + } + + for (var name in headers) + this.transport.setRequestHeader(name, headers[name]); + }, + + success: function() { + var status = this.getStatus(); + return !status || (status >= 200 && status < 300) || status == 304; + }, + + getStatus: function() { + try { + if (this.transport.status === 1223) return 204; + return this.transport.status || 0; + } catch (e) { return 0; } + }, + + respondToReadyState: function(readyState) { + var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this); + + if (state == 'Complete') { + try { + this._complete = true; + (this.options['on' + response.status] + || this.options['on' + (this.success() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(response, response.headerJSON); + } catch (e) { + this.dispatchException(e); + } + + var contentType = response.getHeader('Content-type'); + if (this.options.evalJS == 'force' + || (this.options.evalJS && this.isSameOrigin() && contentType + && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))) + this.evalResponse(); + } + + try { + (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON); + Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON); + } catch (e) { + this.dispatchException(e); + } + + if (state == 'Complete') { + this.transport.onreadystatechange = Prototype.emptyFunction; + } + }, + + isSameOrigin: function() { + var m = this.url.match(/^\s*https?:\/\/[^\/]*/); + return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({ + protocol: location.protocol, + domain: document.domain, + port: location.port ? ':' + location.port : '' + })); + }, + + getHeader: function(name) { + try { + return this.transport.getResponseHeader(name) || null; + } catch (e) { return null; } + }, + + evalResponse: function() { + try { + return eval((this.transport.responseText || '').unfilterJSON()); + } catch (e) { + this.dispatchException(e); + } + }, + + dispatchException: function(exception) { + (this.options.onException || Prototype.emptyFunction)(this, exception); + Ajax.Responders.dispatch('onException', this, exception); + } +}); + +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + + + + + + + + +Ajax.Response = Class.create({ + initialize: function(request){ + this.request = request; + var transport = this.transport = request.transport, + readyState = this.readyState = transport.readyState; + + if ((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) { + this.status = this.getStatus(); + this.statusText = this.getStatusText(); + this.responseText = String.interpret(transport.responseText); + this.headerJSON = this._getHeaderJSON(); + } + + if (readyState == 4) { + var xml = transport.responseXML; + this.responseXML = Object.isUndefined(xml) ? null : xml; + this.responseJSON = this._getResponseJSON(); + } + }, + + status: 0, + + statusText: '', + + getStatus: Ajax.Request.prototype.getStatus, + + getStatusText: function() { + try { + return this.transport.statusText || ''; + } catch (e) { return ''; } + }, + + getHeader: Ajax.Request.prototype.getHeader, + + getAllHeaders: function() { + try { + return this.getAllResponseHeaders(); + } catch (e) { return null; } + }, + + getResponseHeader: function(name) { + return this.transport.getResponseHeader(name); + }, + + getAllResponseHeaders: function() { + return this.transport.getAllResponseHeaders(); + }, + + _getHeaderJSON: function() { + var json = this.getHeader('X-JSON'); + if (!json) return null; + json = decodeURIComponent(escape(json)); + try { + return json.evalJSON(this.request.options.sanitizeJSON || + !this.request.isSameOrigin()); + } catch (e) { + this.request.dispatchException(e); + } + }, + + _getResponseJSON: function() { + var options = this.request.options; + if (!options.evalJSON || (options.evalJSON != 'force' && + !(this.getHeader('Content-type') || '').include('application/json')) || + this.responseText.blank()) + return null; + try { + return this.responseText.evalJSON(options.sanitizeJSON || + !this.request.isSameOrigin()); + } catch (e) { + this.request.dispatchException(e); + } + } +}); + +Ajax.Updater = Class.create(Ajax.Request, { + initialize: function($super, container, url, options) { + this.container = { + success: (container.success || container), + failure: (container.failure || (container.success ? null : container)) + }; + + options = Object.clone(options); + var onComplete = options.onComplete; + options.onComplete = (function(response, json) { + this.updateContent(response.responseText); + if (Object.isFunction(onComplete)) onComplete(response, json); + }).bind(this); + + $super(url, options); + }, + + updateContent: function(responseText) { + var receiver = this.container[this.success() ? 'success' : 'failure'], + options = this.options; + + if (!options.evalScripts) responseText = responseText.stripScripts(); + + if (receiver = $(receiver)) { + if (options.insertion) { + if (Object.isString(options.insertion)) { + var insertion = { }; insertion[options.insertion] = responseText; + receiver.insert(insertion); + } + else options.insertion(receiver, responseText); + } + else receiver.update(responseText); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(Ajax.Base, { + initialize: function($super, container, url, options) { + $super(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = (this.options.decay || 1); + + this.updater = { }; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.options.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Prototype.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(response) { + if (this.options.decay) { + this.decay = (response.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = response.responseText; + } + this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); + + +function $(element) { + if (arguments.length > 1) { + for (var i = 0, elements = [], length = arguments.length; i < length; i++) + elements.push($(arguments[i])); + return elements; + } + if (Object.isString(element)) + element = document.getElementById(element); + return Element.extend(element); +} + +if (Prototype.BrowserFeatures.XPath) { + document._getElementsByXPath = function(expression, parentElement) { + var results = []; + var query = document.evaluate(expression, $(parentElement) || document, + null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); + for (var i = 0, length = query.snapshotLength; i < length; i++) + results.push(Element.extend(query.snapshotItem(i))); + return results; + }; +} + +/*--------------------------------------------------------------------------*/ + +if (!Node) var Node = { }; + +if (!Node.ELEMENT_NODE) { + Object.extend(Node, { + ELEMENT_NODE: 1, + ATTRIBUTE_NODE: 2, + TEXT_NODE: 3, + CDATA_SECTION_NODE: 4, + ENTITY_REFERENCE_NODE: 5, + ENTITY_NODE: 6, + PROCESSING_INSTRUCTION_NODE: 7, + COMMENT_NODE: 8, + DOCUMENT_NODE: 9, + DOCUMENT_TYPE_NODE: 10, + DOCUMENT_FRAGMENT_NODE: 11, + NOTATION_NODE: 12 + }); +} + + + +(function(global) { + function shouldUseCache(tagName, attributes) { + if (tagName === 'select') return false; + if ('type' in attributes) return false; + return true; + } + + var HAS_EXTENDED_CREATE_ELEMENT_SYNTAX = (function(){ + try { + var el = document.createElement(''); + return el.tagName.toLowerCase() === 'input' && el.name === 'x'; + } + catch(err) { + return false; + } + })(); + + var element = global.Element; + + global.Element = function(tagName, attributes) { + attributes = attributes || { }; + tagName = tagName.toLowerCase(); + var cache = Element.cache; + + if (HAS_EXTENDED_CREATE_ELEMENT_SYNTAX && attributes.name) { + tagName = '<' + tagName + ' name="' + attributes.name + '">'; + delete attributes.name; + return Element.writeAttribute(document.createElement(tagName), attributes); + } + + if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName)); + + var node = shouldUseCache(tagName, attributes) ? + cache[tagName].cloneNode(false) : document.createElement(tagName); + + return Element.writeAttribute(node, attributes); + }; + + Object.extend(global.Element, element || { }); + if (element) global.Element.prototype = element.prototype; + +})(this); + +Element.idCounter = 1; +Element.cache = { }; + +Element._purgeElement = function(element) { + var uid = element._prototypeUID; + if (uid) { + Element.stopObserving(element); + element._prototypeUID = void 0; + delete Element.Storage[uid]; + } +}; + +Element.Methods = { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function(element) { + element = $(element); + Element[Element.visible(element) ? 'hide' : 'show'](element); + return element; + }, + + hide: function(element) { + element = $(element); + element.style.display = 'none'; + return element; + }, + + show: function(element) { + element = $(element); + element.style.display = ''; + return element; + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + return element; + }, + + update: (function(){ + + var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){ + var el = document.createElement("select"), + isBuggy = true; + el.innerHTML = ""; + if (el.options && el.options[0]) { + isBuggy = el.options[0].nodeName.toUpperCase() !== "OPTION"; + } + el = null; + return isBuggy; + })(); + + var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){ + try { + var el = document.createElement("table"); + if (el && el.tBodies) { + el.innerHTML = "
                            "; + var isBuggy = typeof el.tBodies[0] == "undefined"; + el = null; + return isBuggy; + } + } catch (e) { + return true; + } + })(); + + var LINK_ELEMENT_INNERHTML_BUGGY = (function() { + try { + var el = document.createElement('div'); + el.innerHTML = ""; + var isBuggy = (el.childNodes.length === 0); + el = null; + return isBuggy; + } catch(e) { + return true; + } + })(); + + var ANY_INNERHTML_BUGGY = SELECT_ELEMENT_INNERHTML_BUGGY || + TABLE_ELEMENT_INNERHTML_BUGGY || LINK_ELEMENT_INNERHTML_BUGGY; + + var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () { + var s = document.createElement("script"), + isBuggy = false; + try { + s.appendChild(document.createTextNode("")); + isBuggy = !s.firstChild || + s.firstChild && s.firstChild.nodeType !== 3; + } catch (e) { + isBuggy = true; + } + s = null; + return isBuggy; + })(); + + + function update(element, content) { + element = $(element); + var purgeElement = Element._purgeElement; + + var descendants = element.getElementsByTagName('*'), + i = descendants.length; + while (i--) purgeElement(descendants[i]); + + if (content && content.toElement) + content = content.toElement(); + + if (Object.isElement(content)) + return element.update().insert(content); + + content = Object.toHTML(content); + + var tagName = element.tagName.toUpperCase(); + + if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) { + element.text = content; + return element; + } + + if (ANY_INNERHTML_BUGGY) { + if (tagName in Element._insertionTranslations.tags) { + while (element.firstChild) { + element.removeChild(element.firstChild); + } + Element._getContentFromAnonymousElement(tagName, content.stripScripts()) + .each(function(node) { + element.appendChild(node); + }); + } else if (LINK_ELEMENT_INNERHTML_BUGGY && Object.isString(content) && content.indexOf(' -1) { + while (element.firstChild) { + element.removeChild(element.firstChild); + } + var nodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts(), true); + nodes.each(function(node) { element.appendChild(node); }); + } + else { + element.innerHTML = content.stripScripts(); + } + } + else { + element.innerHTML = content.stripScripts(); + } + + content.evalScripts.bind(content).defer(); + return element; + } + + return update; + })(), + + replace: function(element, content) { + element = $(element); + if (content && content.toElement) content = content.toElement(); + else if (!Object.isElement(content)) { + content = Object.toHTML(content); + var range = element.ownerDocument.createRange(); + range.selectNode(element); + content.evalScripts.bind(content).defer(); + content = range.createContextualFragment(content.stripScripts()); + } + element.parentNode.replaceChild(content, element); + return element; + }, + + insert: function(element, insertions) { + element = $(element); + + if (Object.isString(insertions) || Object.isNumber(insertions) || + Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) + insertions = {bottom:insertions}; + + var content, insert, tagName, childNodes; + + for (var position in insertions) { + content = insertions[position]; + position = position.toLowerCase(); + insert = Element._insertionTranslations[position]; + + if (content && content.toElement) content = content.toElement(); + if (Object.isElement(content)) { + insert(element, content); + continue; + } + + content = Object.toHTML(content); + + tagName = ((position == 'before' || position == 'after') + ? element.parentNode : element).tagName.toUpperCase(); + + childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); + + if (position == 'top' || position == 'after') childNodes.reverse(); + childNodes.each(insert.curry(element)); + + content.evalScripts.bind(content).defer(); + } + + return element; + }, + + wrap: function(element, wrapper, attributes) { + element = $(element); + if (Object.isElement(wrapper)) + $(wrapper).writeAttribute(attributes || { }); + else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes); + else wrapper = new Element('div', wrapper); + if (element.parentNode) + element.parentNode.replaceChild(wrapper, element); + wrapper.appendChild(element); + return wrapper; + }, + + inspect: function(element) { + element = $(element); + var result = '<' + element.tagName.toLowerCase(); + $H({'id': 'id', 'className': 'class'}).each(function(pair) { + var property = pair.first(), + attribute = pair.last(), + value = (element[property] || '').toString(); + if (value) result += ' ' + attribute + '=' + value.inspect(true); + }); + return result + '>'; + }, + + recursivelyCollect: function(element, property, maximumLength) { + element = $(element); + maximumLength = maximumLength || -1; + var elements = []; + + while (element = element[property]) { + if (element.nodeType == 1) + elements.push(Element.extend(element)); + if (elements.length == maximumLength) + break; + } + + return elements; + }, + + ancestors: function(element) { + return Element.recursivelyCollect(element, 'parentNode'); + }, + + descendants: function(element) { + return Element.select(element, "*"); + }, + + firstDescendant: function(element) { + element = $(element).firstChild; + while (element && element.nodeType != 1) element = element.nextSibling; + return $(element); + }, + + immediateDescendants: function(element) { + var results = [], child = $(element).firstChild; + while (child) { + if (child.nodeType === 1) { + results.push(Element.extend(child)); + } + child = child.nextSibling; + } + return results; + }, + + previousSiblings: function(element, maximumLength) { + return Element.recursivelyCollect(element, 'previousSibling'); + }, + + nextSiblings: function(element) { + return Element.recursivelyCollect(element, 'nextSibling'); + }, + + siblings: function(element) { + element = $(element); + return Element.previousSiblings(element).reverse() + .concat(Element.nextSiblings(element)); + }, + + match: function(element, selector) { + element = $(element); + if (Object.isString(selector)) + return Prototype.Selector.match(element, selector); + return selector.match(element); + }, + + up: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return $(element.parentNode); + var ancestors = Element.ancestors(element); + return Object.isNumber(expression) ? ancestors[expression] : + Prototype.Selector.find(ancestors, expression, index); + }, + + down: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return Element.firstDescendant(element); + return Object.isNumber(expression) ? Element.descendants(element)[expression] : + Element.select(element, expression)[index || 0]; + }, + + previous: function(element, expression, index) { + element = $(element); + if (Object.isNumber(expression)) index = expression, expression = false; + if (!Object.isNumber(index)) index = 0; + + if (expression) { + return Prototype.Selector.find(element.previousSiblings(), expression, index); + } else { + return element.recursivelyCollect("previousSibling", index + 1)[index]; + } + }, + + next: function(element, expression, index) { + element = $(element); + if (Object.isNumber(expression)) index = expression, expression = false; + if (!Object.isNumber(index)) index = 0; + + if (expression) { + return Prototype.Selector.find(element.nextSiblings(), expression, index); + } else { + var maximumLength = Object.isNumber(index) ? index + 1 : 1; + return element.recursivelyCollect("nextSibling", index + 1)[index]; + } + }, + + + select: function(element) { + element = $(element); + var expressions = Array.prototype.slice.call(arguments, 1).join(', '); + return Prototype.Selector.select(expressions, element); + }, + + adjacent: function(element) { + element = $(element); + var expressions = Array.prototype.slice.call(arguments, 1).join(', '); + return Prototype.Selector.select(expressions, element.parentNode).without(element); + }, + + identify: function(element) { + element = $(element); + var id = Element.readAttribute(element, 'id'); + if (id) return id; + do { id = 'anonymous_element_' + Element.idCounter++; } while ($(id)); + Element.writeAttribute(element, 'id', id); + return id; + }, + + readAttribute: function(element, name) { + element = $(element); + if (Prototype.Browser.IE) { + var t = Element._attributeTranslations.read; + if (t.values[name]) return t.values[name](element, name); + if (t.names[name]) name = t.names[name]; + if (name.include(':')) { + return (!element.attributes || !element.attributes[name]) ? null : + element.attributes[name].value; + } + } + return element.getAttribute(name); + }, + + writeAttribute: function(element, name, value) { + element = $(element); + var attributes = { }, t = Element._attributeTranslations.write; + + if (typeof name == 'object') attributes = name; + else attributes[name] = Object.isUndefined(value) ? true : value; + + for (var attr in attributes) { + name = t.names[attr] || attr; + value = attributes[attr]; + if (t.values[attr]) name = t.values[attr](element, value); + if (value === false || value === null) + element.removeAttribute(name); + else if (value === true) + element.setAttribute(name, name); + else element.setAttribute(name, value); + } + return element; + }, + + getHeight: function(element) { + return Element.getDimensions(element).height; + }, + + getWidth: function(element) { + return Element.getDimensions(element).width; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + var elementClassName = element.className; + return (elementClassName.length > 0 && (elementClassName == className || + new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName))); + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + if (!Element.hasClassName(element, className)) + element.className += (element.className ? ' ' : '') + className; + return element; + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + element.className = element.className.replace( + new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); + return element; + }, + + toggleClassName: function(element, className) { + if (!(element = $(element))) return; + return Element[Element.hasClassName(element, className) ? + 'removeClassName' : 'addClassName'](element, className); + }, + + cleanWhitespace: function(element) { + element = $(element); + var node = element.firstChild; + while (node) { + var nextNode = node.nextSibling; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + element.removeChild(node); + node = nextNode; + } + return element; + }, + + empty: function(element) { + return $(element).innerHTML.blank(); + }, + + descendantOf: function(element, ancestor) { + element = $(element), ancestor = $(ancestor); + + if (element.compareDocumentPosition) + return (element.compareDocumentPosition(ancestor) & 8) === 8; + + if (ancestor.contains) + return ancestor.contains(element) && ancestor !== element; + + while (element = element.parentNode) + if (element == ancestor) return true; + + return false; + }, + + scrollTo: function(element) { + element = $(element); + var pos = Element.cumulativeOffset(element); + window.scrollTo(pos[0], pos[1]); + return element; + }, + + getStyle: function(element, style) { + element = $(element); + style = style == 'float' ? 'cssFloat' : style.camelize(); + var value = element.style[style]; + if (!value || value == 'auto') { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css[style] : null; + } + if (style == 'opacity') return value ? parseFloat(value) : 1.0; + return value == 'auto' ? null : value; + }, + + getOpacity: function(element) { + return $(element).getStyle('opacity'); + }, + + setStyle: function(element, styles) { + element = $(element); + var elementStyle = element.style, match; + if (Object.isString(styles)) { + element.style.cssText += ';' + styles; + return styles.include('opacity') ? + element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element; + } + for (var property in styles) + if (property == 'opacity') element.setOpacity(styles[property]); + else + elementStyle[(property == 'float' || property == 'cssFloat') ? + (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') : + property] = styles[property]; + + return element; + }, + + setOpacity: function(element, value) { + element = $(element); + element.style.opacity = (value == 1 || value === '') ? '' : + (value < 0.00001) ? 0 : value; + return element; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + if (Prototype.Browser.Opera) { + element.style.top = 0; + element.style.left = 0; + } + } + return element; + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + return element; + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return element; + element._overflow = Element.getStyle(element, 'overflow') || 'auto'; + if (element._overflow !== 'hidden') + element.style.overflow = 'hidden'; + return element; + }, + + undoClipping: function(element) { + element = $(element); + if (!element._overflow) return element; + element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; + element._overflow = null; + return element; + }, + + clonePosition: function(element, source) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || { }); + + source = $(source); + var p = Element.viewportOffset(source), delta = [0, 0], parent = null; + + element = $(element); + + if (Element.getStyle(element, 'position') == 'absolute') { + parent = Element.getOffsetParent(element); + delta = Element.viewportOffset(parent); + } + + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if (options.setWidth) element.style.width = source.offsetWidth + 'px'; + if (options.setHeight) element.style.height = source.offsetHeight + 'px'; + return element; + } +}; + +Object.extend(Element.Methods, { + getElementsBySelector: Element.Methods.select, + + childElements: Element.Methods.immediateDescendants +}); + +Element._attributeTranslations = { + write: { + names: { + className: 'class', + htmlFor: 'for' + }, + values: { } + } +}; + +if (Prototype.Browser.Opera) { + Element.Methods.getStyle = Element.Methods.getStyle.wrap( + function(proceed, element, style) { + switch (style) { + case 'height': case 'width': + if (!Element.visible(element)) return null; + + var dim = parseInt(proceed(element, style), 10); + + if (dim !== element['offset' + style.capitalize()]) + return dim + 'px'; + + var properties; + if (style === 'height') { + properties = ['border-top-width', 'padding-top', + 'padding-bottom', 'border-bottom-width']; + } + else { + properties = ['border-left-width', 'padding-left', + 'padding-right', 'border-right-width']; + } + return properties.inject(dim, function(memo, property) { + var val = proceed(element, property); + return val === null ? memo : memo - parseInt(val, 10); + }) + 'px'; + default: return proceed(element, style); + } + } + ); + + Element.Methods.readAttribute = Element.Methods.readAttribute.wrap( + function(proceed, element, attribute) { + if (attribute === 'title') return element.title; + return proceed(element, attribute); + } + ); +} + +else if (Prototype.Browser.IE) { + Element.Methods.getStyle = function(element, style) { + element = $(element); + style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize(); + var value = element.style[style]; + if (!value && element.currentStyle) value = element.currentStyle[style]; + + if (style == 'opacity') { + if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) + if (value[1]) return parseFloat(value[1]) / 100; + return 1.0; + } + + if (value == 'auto') { + if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none')) + return element['offset' + style.capitalize()] + 'px'; + return null; + } + return value; + }; + + Element.Methods.setOpacity = function(element, value) { + function stripAlpha(filter){ + return filter.replace(/alpha\([^\)]*\)/gi,''); + } + element = $(element); + var currentStyle = element.currentStyle; + if ((currentStyle && !currentStyle.hasLayout) || + (!currentStyle && element.style.zoom == 'normal')) + element.style.zoom = 1; + + var filter = element.getStyle('filter'), style = element.style; + if (value == 1 || value === '') { + (filter = stripAlpha(filter)) ? + style.filter = filter : style.removeAttribute('filter'); + return element; + } else if (value < 0.00001) value = 0; + style.filter = stripAlpha(filter) + + 'alpha(opacity=' + (value * 100) + ')'; + return element; + }; + + Element._attributeTranslations = (function(){ + + var classProp = 'className', + forProp = 'for', + el = document.createElement('div'); + + el.setAttribute(classProp, 'x'); + + if (el.className !== 'x') { + el.setAttribute('class', 'x'); + if (el.className === 'x') { + classProp = 'class'; + } + } + el = null; + + el = document.createElement('label'); + el.setAttribute(forProp, 'x'); + if (el.htmlFor !== 'x') { + el.setAttribute('htmlFor', 'x'); + if (el.htmlFor === 'x') { + forProp = 'htmlFor'; + } + } + el = null; + + return { + read: { + names: { + 'class': classProp, + 'className': classProp, + 'for': forProp, + 'htmlFor': forProp + }, + values: { + _getAttr: function(element, attribute) { + return element.getAttribute(attribute); + }, + _getAttr2: function(element, attribute) { + return element.getAttribute(attribute, 2); + }, + _getAttrNode: function(element, attribute) { + var node = element.getAttributeNode(attribute); + return node ? node.value : ""; + }, + _getEv: (function(){ + + var el = document.createElement('div'), f; + el.onclick = Prototype.emptyFunction; + var value = el.getAttribute('onclick'); + + if (String(value).indexOf('{') > -1) { + f = function(element, attribute) { + attribute = element.getAttribute(attribute); + if (!attribute) return null; + attribute = attribute.toString(); + attribute = attribute.split('{')[1]; + attribute = attribute.split('}')[0]; + return attribute.strip(); + }; + } + else if (value === '') { + f = function(element, attribute) { + attribute = element.getAttribute(attribute); + if (!attribute) return null; + return attribute.strip(); + }; + } + el = null; + return f; + })(), + _flag: function(element, attribute) { + return $(element).hasAttribute(attribute) ? attribute : null; + }, + style: function(element) { + return element.style.cssText.toLowerCase(); + }, + title: function(element) { + return element.title; + } + } + } + }; + })(); + + Element._attributeTranslations.write = { + names: Object.extend({ + cellpadding: 'cellPadding', + cellspacing: 'cellSpacing' + }, Element._attributeTranslations.read.names), + values: { + checked: function(element, value) { + element.checked = !!value; + }, + + style: function(element, value) { + element.style.cssText = value ? value : ''; + } + } + }; + + Element._attributeTranslations.has = {}; + + $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' + + 'encType maxLength readOnly longDesc frameBorder').each(function(attr) { + Element._attributeTranslations.write.names[attr.toLowerCase()] = attr; + Element._attributeTranslations.has[attr.toLowerCase()] = attr; + }); + + (function(v) { + Object.extend(v, { + href: v._getAttr2, + src: v._getAttr2, + type: v._getAttr, + action: v._getAttrNode, + disabled: v._flag, + checked: v._flag, + readonly: v._flag, + multiple: v._flag, + onload: v._getEv, + onunload: v._getEv, + onclick: v._getEv, + ondblclick: v._getEv, + onmousedown: v._getEv, + onmouseup: v._getEv, + onmouseover: v._getEv, + onmousemove: v._getEv, + onmouseout: v._getEv, + onfocus: v._getEv, + onblur: v._getEv, + onkeypress: v._getEv, + onkeydown: v._getEv, + onkeyup: v._getEv, + onsubmit: v._getEv, + onreset: v._getEv, + onselect: v._getEv, + onchange: v._getEv + }); + })(Element._attributeTranslations.read.values); + + if (Prototype.BrowserFeatures.ElementExtensions) { + (function() { + function _descendants(element) { + var nodes = element.getElementsByTagName('*'), results = []; + for (var i = 0, node; node = nodes[i]; i++) + if (node.tagName !== "!") // Filter out comment nodes. + results.push(node); + return results; + } + + Element.Methods.down = function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return element.firstDescendant(); + return Object.isNumber(expression) ? _descendants(element)[expression] : + Element.select(element, expression)[index || 0]; + }; + })(); + } + +} + +else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) { + Element.Methods.setOpacity = function(element, value) { + element = $(element); + element.style.opacity = (value == 1) ? 0.999999 : + (value === '') ? '' : (value < 0.00001) ? 0 : value; + return element; + }; +} + +else if (Prototype.Browser.WebKit) { + Element.Methods.setOpacity = function(element, value) { + element = $(element); + element.style.opacity = (value == 1 || value === '') ? '' : + (value < 0.00001) ? 0 : value; + + if (value == 1) + if (element.tagName.toUpperCase() == 'IMG' && element.width) { + element.width++; element.width--; + } else try { + var n = document.createTextNode(' '); + element.appendChild(n); + element.removeChild(n); + } catch (e) { } + + return element; + }; +} + +if ('outerHTML' in document.documentElement) { + Element.Methods.replace = function(element, content) { + element = $(element); + + if (content && content.toElement) content = content.toElement(); + if (Object.isElement(content)) { + element.parentNode.replaceChild(content, element); + return element; + } + + content = Object.toHTML(content); + var parent = element.parentNode, tagName = parent.tagName.toUpperCase(); + + if (Element._insertionTranslations.tags[tagName]) { + var nextSibling = element.next(), + fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); + parent.removeChild(element); + if (nextSibling) + fragments.each(function(node) { parent.insertBefore(node, nextSibling); }); + else + fragments.each(function(node) { parent.appendChild(node); }); + } + else element.outerHTML = content.stripScripts(); + + content.evalScripts.bind(content).defer(); + return element; + }; +} + +Element._returnOffset = function(l, t) { + var result = [l, t]; + result.left = l; + result.top = t; + return result; +}; + +Element._getContentFromAnonymousElement = function(tagName, html, force) { + var div = new Element('div'), + t = Element._insertionTranslations.tags[tagName]; + + var workaround = false; + if (t) workaround = true; + else if (force) { + workaround = true; + t = ['', '', 0]; + } + + if (workaround) { + div.innerHTML = ' ' + t[0] + html + t[1]; + div.removeChild(div.firstChild); + for (var i = t[2]; i--; ) { + div = div.firstChild; + } + } + else { + div.innerHTML = html; + } + return $A(div.childNodes); +}; + +Element._insertionTranslations = { + before: function(element, node) { + element.parentNode.insertBefore(node, element); + }, + top: function(element, node) { + element.insertBefore(node, element.firstChild); + }, + bottom: function(element, node) { + element.appendChild(node); + }, + after: function(element, node) { + element.parentNode.insertBefore(node, element.nextSibling); + }, + tags: { + TABLE: ['
                            test
                            ', '
                            ', 1], + TBODY: ['', '
                            ', 2], + TR: ['', '
                            ', 3], + TD: ['
                            ', '
                            ', 4], + SELECT: ['', 1] + } +}; + +(function() { + var tags = Element._insertionTranslations.tags; + Object.extend(tags, { + THEAD: tags.TBODY, + TFOOT: tags.TBODY, + TH: tags.TD + }); +})(); + +Element.Methods.Simulated = { + hasAttribute: function(element, attribute) { + attribute = Element._attributeTranslations.has[attribute] || attribute; + var node = $(element).getAttributeNode(attribute); + return !!(node && node.specified); + } +}; + +Element.Methods.ByTag = { }; + +Object.extend(Element, Element.Methods); + +(function(div) { + + if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) { + window.HTMLElement = { }; + window.HTMLElement.prototype = div['__proto__']; + Prototype.BrowserFeatures.ElementExtensions = true; + } + + div = null; + +})(document.createElement('div')); + +Element.extend = (function() { + + function checkDeficiency(tagName) { + if (typeof window.Element != 'undefined') { + var proto = window.Element.prototype; + if (proto) { + var id = '_' + (Math.random()+'').slice(2), + el = document.createElement(tagName); + proto[id] = 'x'; + var isBuggy = (el[id] !== 'x'); + delete proto[id]; + el = null; + return isBuggy; + } + } + return false; + } + + function extendElementWith(element, methods) { + for (var property in methods) { + var value = methods[property]; + if (Object.isFunction(value) && !(property in element)) + element[property] = value.methodize(); + } + } + + var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object'); + + if (Prototype.BrowserFeatures.SpecificElementExtensions) { + if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) { + return function(element) { + if (element && typeof element._extendedByPrototype == 'undefined') { + var t = element.tagName; + if (t && (/^(?:object|applet|embed)$/i.test(t))) { + extendElementWith(element, Element.Methods); + extendElementWith(element, Element.Methods.Simulated); + extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]); + } + } + return element; + }; + } + return Prototype.K; + } + + var Methods = { }, ByTag = Element.Methods.ByTag; + + var extend = Object.extend(function(element) { + if (!element || typeof element._extendedByPrototype != 'undefined' || + element.nodeType != 1 || element == window) return element; + + var methods = Object.clone(Methods), + tagName = element.tagName.toUpperCase(); + + if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); + + extendElementWith(element, methods); + + element._extendedByPrototype = Prototype.emptyFunction; + return element; + + }, { + refresh: function() { + if (!Prototype.BrowserFeatures.ElementExtensions) { + Object.extend(Methods, Element.Methods); + Object.extend(Methods, Element.Methods.Simulated); + } + } + }); + + extend.refresh(); + return extend; +})(); + +if (document.documentElement.hasAttribute) { + Element.hasAttribute = function(element, attribute) { + return element.hasAttribute(attribute); + }; +} +else { + Element.hasAttribute = Element.Methods.Simulated.hasAttribute; +} + +Element.addMethods = function(methods) { + var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; + + if (!methods) { + Object.extend(Form, Form.Methods); + Object.extend(Form.Element, Form.Element.Methods); + Object.extend(Element.Methods.ByTag, { + "FORM": Object.clone(Form.Methods), + "INPUT": Object.clone(Form.Element.Methods), + "SELECT": Object.clone(Form.Element.Methods), + "TEXTAREA": Object.clone(Form.Element.Methods), + "BUTTON": Object.clone(Form.Element.Methods) + }); + } + + if (arguments.length == 2) { + var tagName = methods; + methods = arguments[1]; + } + + if (!tagName) Object.extend(Element.Methods, methods || { }); + else { + if (Object.isArray(tagName)) tagName.each(extend); + else extend(tagName); + } + + function extend(tagName) { + tagName = tagName.toUpperCase(); + if (!Element.Methods.ByTag[tagName]) + Element.Methods.ByTag[tagName] = { }; + Object.extend(Element.Methods.ByTag[tagName], methods); + } + + function copy(methods, destination, onlyIfAbsent) { + onlyIfAbsent = onlyIfAbsent || false; + for (var property in methods) { + var value = methods[property]; + if (!Object.isFunction(value)) continue; + if (!onlyIfAbsent || !(property in destination)) + destination[property] = value.methodize(); + } + } + + function findDOMClass(tagName) { + var klass; + var trans = { + "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", + "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", + "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", + "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", + "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": + "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": + "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": + "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": + "FrameSet", "IFRAME": "IFrame" + }; + if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element'; + if (window[klass]) return window[klass]; + klass = 'HTML' + tagName + 'Element'; + if (window[klass]) return window[klass]; + klass = 'HTML' + tagName.capitalize() + 'Element'; + if (window[klass]) return window[klass]; + + var element = document.createElement(tagName), + proto = element['__proto__'] || element.constructor.prototype; + + element = null; + return proto; + } + + var elementPrototype = window.HTMLElement ? HTMLElement.prototype : + Element.prototype; + + if (F.ElementExtensions) { + copy(Element.Methods, elementPrototype); + copy(Element.Methods.Simulated, elementPrototype, true); + } + + if (F.SpecificElementExtensions) { + for (var tag in Element.Methods.ByTag) { + var klass = findDOMClass(tag); + if (Object.isUndefined(klass)) continue; + copy(T[tag], klass.prototype); + } + } + + Object.extend(Element, Element.Methods); + delete Element.ByTag; + + if (Element.extend.refresh) Element.extend.refresh(); + Element.cache = { }; +}; + + +document.viewport = { + + getDimensions: function() { + return { width: this.getWidth(), height: this.getHeight() }; + }, + + getScrollOffsets: function() { + return Element._returnOffset( + window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, + window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop); + } +}; + +(function(viewport) { + var B = Prototype.Browser, doc = document, element, property = {}; + + function getRootElement() { + if (B.WebKit && !doc.evaluate) + return document; + + if (B.Opera && window.parseFloat(window.opera.version()) < 9.5) + return document.body; + + return document.documentElement; + } + + function define(D) { + if (!element) element = getRootElement(); + + property[D] = 'client' + D; + + viewport['get' + D] = function() { return element[property[D]]; }; + return viewport['get' + D](); + } + + viewport.getWidth = define.curry('Width'); + + viewport.getHeight = define.curry('Height'); +})(document.viewport); + + +Element.Storage = { + UID: 1 +}; + +Element.addMethods({ + getStorage: function(element) { + if (!(element = $(element))) return; + + var uid; + if (element === window) { + uid = 0; + } else { + if (typeof element._prototypeUID === "undefined") + element._prototypeUID = Element.Storage.UID++; + uid = element._prototypeUID; + } + + if (!Element.Storage[uid]) + Element.Storage[uid] = $H(); + + return Element.Storage[uid]; + }, + + store: function(element, key, value) { + if (!(element = $(element))) return; + + if (arguments.length === 2) { + Element.getStorage(element).update(key); + } else { + Element.getStorage(element).set(key, value); + } + + return element; + }, + + retrieve: function(element, key, defaultValue) { + if (!(element = $(element))) return; + var hash = Element.getStorage(element), value = hash.get(key); + + if (Object.isUndefined(value)) { + hash.set(key, defaultValue); + value = defaultValue; + } + + return value; + }, + + clone: function(element, deep) { + if (!(element = $(element))) return; + var clone = element.cloneNode(deep); + clone._prototypeUID = void 0; + if (deep) { + var descendants = Element.select(clone, '*'), + i = descendants.length; + while (i--) { + descendants[i]._prototypeUID = void 0; + } + } + return Element.extend(clone); + }, + + purge: function(element) { + if (!(element = $(element))) return; + var purgeElement = Element._purgeElement; + + purgeElement(element); + + var descendants = element.getElementsByTagName('*'), + i = descendants.length; + + while (i--) purgeElement(descendants[i]); + + return null; + } +}); + +(function() { + + function toDecimal(pctString) { + var match = pctString.match(/^(\d+)%?$/i); + if (!match) return null; + return (Number(match[1]) / 100); + } + + function getPixelValue(value, property, context) { + var element = null; + if (Object.isElement(value)) { + element = value; + value = element.getStyle(property); + } + + if (value === null) { + return null; + } + + if ((/^(?:-)?\d+(\.\d+)?(px)?$/i).test(value)) { + return window.parseFloat(value); + } + + var isPercentage = value.include('%'), isViewport = (context === document.viewport); + + if (/\d/.test(value) && element && element.runtimeStyle && !(isPercentage && isViewport)) { + var style = element.style.left, rStyle = element.runtimeStyle.left; + element.runtimeStyle.left = element.currentStyle.left; + element.style.left = value || 0; + value = element.style.pixelLeft; + element.style.left = style; + element.runtimeStyle.left = rStyle; + + return value; + } + + if (element && isPercentage) { + context = context || element.parentNode; + var decimal = toDecimal(value); + var whole = null; + var position = element.getStyle('position'); + + var isHorizontal = property.include('left') || property.include('right') || + property.include('width'); + + var isVertical = property.include('top') || property.include('bottom') || + property.include('height'); + + if (context === document.viewport) { + if (isHorizontal) { + whole = document.viewport.getWidth(); + } else if (isVertical) { + whole = document.viewport.getHeight(); + } + } else { + if (isHorizontal) { + whole = $(context).measure('width'); + } else if (isVertical) { + whole = $(context).measure('height'); + } + } + + return (whole === null) ? 0 : whole * decimal; + } + + return 0; + } + + function toCSSPixels(number) { + if (Object.isString(number) && number.endsWith('px')) { + return number; + } + return number + 'px'; + } + + function isDisplayed(element) { + var originalElement = element; + while (element && element.parentNode) { + var display = element.getStyle('display'); + if (display === 'none') { + return false; + } + element = $(element.parentNode); + } + return true; + } + + var hasLayout = Prototype.K; + if ('currentStyle' in document.documentElement) { + hasLayout = function(element) { + if (!element.currentStyle.hasLayout) { + element.style.zoom = 1; + } + return element; + }; + } + + function cssNameFor(key) { + if (key.include('border')) key = key + '-width'; + return key.camelize(); + } + + Element.Layout = Class.create(Hash, { + initialize: function($super, element, preCompute) { + $super(); + this.element = $(element); + + Element.Layout.PROPERTIES.each( function(property) { + this._set(property, null); + }, this); + + if (preCompute) { + this._preComputing = true; + this._begin(); + Element.Layout.PROPERTIES.each( this._compute, this ); + this._end(); + this._preComputing = false; + } + }, + + _set: function(property, value) { + return Hash.prototype.set.call(this, property, value); + }, + + set: function(property, value) { + throw "Properties of Element.Layout are read-only."; + }, + + get: function($super, property) { + var value = $super(property); + return value === null ? this._compute(property) : value; + }, + + _begin: function() { + if (this._prepared) return; + + var element = this.element; + if (isDisplayed(element)) { + this._prepared = true; + return; + } + + var originalStyles = { + position: element.style.position || '', + width: element.style.width || '', + visibility: element.style.visibility || '', + display: element.style.display || '' + }; + + element.store('prototype_original_styles', originalStyles); + + var position = element.getStyle('position'), + width = element.getStyle('width'); + + if (width === "0px" || width === null) { + element.style.display = 'block'; + width = element.getStyle('width'); + } + + var context = (position === 'fixed') ? document.viewport : + element.parentNode; + + element.setStyle({ + position: 'absolute', + visibility: 'hidden', + display: 'block' + }); + + var positionedWidth = element.getStyle('width'); + + var newWidth; + if (width && (positionedWidth === width)) { + newWidth = getPixelValue(element, 'width', context); + } else if (position === 'absolute' || position === 'fixed') { + newWidth = getPixelValue(element, 'width', context); + } else { + var parent = element.parentNode, pLayout = $(parent).getLayout(); + + newWidth = pLayout.get('width') - + this.get('margin-left') - + this.get('border-left') - + this.get('padding-left') - + this.get('padding-right') - + this.get('border-right') - + this.get('margin-right'); + } + + element.setStyle({ width: newWidth + 'px' }); + + this._prepared = true; + }, + + _end: function() { + var element = this.element; + var originalStyles = element.retrieve('prototype_original_styles'); + element.store('prototype_original_styles', null); + element.setStyle(originalStyles); + this._prepared = false; + }, + + _compute: function(property) { + var COMPUTATIONS = Element.Layout.COMPUTATIONS; + if (!(property in COMPUTATIONS)) { + throw "Property not found."; + } + + return this._set(property, COMPUTATIONS[property].call(this, this.element)); + }, + + toObject: function() { + var args = $A(arguments); + var keys = (args.length === 0) ? Element.Layout.PROPERTIES : + args.join(' ').split(' '); + var obj = {}; + keys.each( function(key) { + if (!Element.Layout.PROPERTIES.include(key)) return; + var value = this.get(key); + if (value != null) obj[key] = value; + }, this); + return obj; + }, + + toHash: function() { + var obj = this.toObject.apply(this, arguments); + return new Hash(obj); + }, + + toCSS: function() { + var args = $A(arguments); + var keys = (args.length === 0) ? Element.Layout.PROPERTIES : + args.join(' ').split(' '); + var css = {}; + + keys.each( function(key) { + if (!Element.Layout.PROPERTIES.include(key)) return; + if (Element.Layout.COMPOSITE_PROPERTIES.include(key)) return; + + var value = this.get(key); + if (value != null) css[cssNameFor(key)] = value + 'px'; + }, this); + return css; + }, + + inspect: function() { + return "#"; + } + }); + + Object.extend(Element.Layout, { + PROPERTIES: $w('height width top left right bottom border-left border-right border-top border-bottom padding-left padding-right padding-top padding-bottom margin-top margin-bottom margin-left margin-right padding-box-width padding-box-height border-box-width border-box-height margin-box-width margin-box-height'), + + COMPOSITE_PROPERTIES: $w('padding-box-width padding-box-height margin-box-width margin-box-height border-box-width border-box-height'), + + COMPUTATIONS: { + 'height': function(element) { + if (!this._preComputing) this._begin(); + + var bHeight = this.get('border-box-height'); + if (bHeight <= 0) { + if (!this._preComputing) this._end(); + return 0; + } + + var bTop = this.get('border-top'), + bBottom = this.get('border-bottom'); + + var pTop = this.get('padding-top'), + pBottom = this.get('padding-bottom'); + + if (!this._preComputing) this._end(); + + return bHeight - bTop - bBottom - pTop - pBottom; + }, + + 'width': function(element) { + if (!this._preComputing) this._begin(); + + var bWidth = this.get('border-box-width'); + if (bWidth <= 0) { + if (!this._preComputing) this._end(); + return 0; + } + + var bLeft = this.get('border-left'), + bRight = this.get('border-right'); + + var pLeft = this.get('padding-left'), + pRight = this.get('padding-right'); + + if (!this._preComputing) this._end(); + + return bWidth - bLeft - bRight - pLeft - pRight; + }, + + 'padding-box-height': function(element) { + var height = this.get('height'), + pTop = this.get('padding-top'), + pBottom = this.get('padding-bottom'); + + return height + pTop + pBottom; + }, + + 'padding-box-width': function(element) { + var width = this.get('width'), + pLeft = this.get('padding-left'), + pRight = this.get('padding-right'); + + return width + pLeft + pRight; + }, + + 'border-box-height': function(element) { + if (!this._preComputing) this._begin(); + var height = element.offsetHeight; + if (!this._preComputing) this._end(); + return height; + }, + + 'border-box-width': function(element) { + if (!this._preComputing) this._begin(); + var width = element.offsetWidth; + if (!this._preComputing) this._end(); + return width; + }, + + 'margin-box-height': function(element) { + var bHeight = this.get('border-box-height'), + mTop = this.get('margin-top'), + mBottom = this.get('margin-bottom'); + + if (bHeight <= 0) return 0; + + return bHeight + mTop + mBottom; + }, + + 'margin-box-width': function(element) { + var bWidth = this.get('border-box-width'), + mLeft = this.get('margin-left'), + mRight = this.get('margin-right'); + + if (bWidth <= 0) return 0; + + return bWidth + mLeft + mRight; + }, + + 'top': function(element) { + var offset = element.positionedOffset(); + return offset.top; + }, + + 'bottom': function(element) { + var offset = element.positionedOffset(), + parent = element.getOffsetParent(), + pHeight = parent.measure('height'); + + var mHeight = this.get('border-box-height'); + + return pHeight - mHeight - offset.top; + }, + + 'left': function(element) { + var offset = element.positionedOffset(); + return offset.left; + }, + + 'right': function(element) { + var offset = element.positionedOffset(), + parent = element.getOffsetParent(), + pWidth = parent.measure('width'); + + var mWidth = this.get('border-box-width'); + + return pWidth - mWidth - offset.left; + }, + + 'padding-top': function(element) { + return getPixelValue(element, 'paddingTop'); + }, + + 'padding-bottom': function(element) { + return getPixelValue(element, 'paddingBottom'); + }, + + 'padding-left': function(element) { + return getPixelValue(element, 'paddingLeft'); + }, + + 'padding-right': function(element) { + return getPixelValue(element, 'paddingRight'); + }, + + 'border-top': function(element) { + return getPixelValue(element, 'borderTopWidth'); + }, + + 'border-bottom': function(element) { + return getPixelValue(element, 'borderBottomWidth'); + }, + + 'border-left': function(element) { + return getPixelValue(element, 'borderLeftWidth'); + }, + + 'border-right': function(element) { + return getPixelValue(element, 'borderRightWidth'); + }, + + 'margin-top': function(element) { + return getPixelValue(element, 'marginTop'); + }, + + 'margin-bottom': function(element) { + return getPixelValue(element, 'marginBottom'); + }, + + 'margin-left': function(element) { + return getPixelValue(element, 'marginLeft'); + }, + + 'margin-right': function(element) { + return getPixelValue(element, 'marginRight'); + } + } + }); + + if ('getBoundingClientRect' in document.documentElement) { + Object.extend(Element.Layout.COMPUTATIONS, { + 'right': function(element) { + var parent = hasLayout(element.getOffsetParent()); + var rect = element.getBoundingClientRect(), + pRect = parent.getBoundingClientRect(); + + return (pRect.right - rect.right).round(); + }, + + 'bottom': function(element) { + var parent = hasLayout(element.getOffsetParent()); + var rect = element.getBoundingClientRect(), + pRect = parent.getBoundingClientRect(); + + return (pRect.bottom - rect.bottom).round(); + } + }); + } + + Element.Offset = Class.create({ + initialize: function(left, top) { + this.left = left.round(); + this.top = top.round(); + + this[0] = this.left; + this[1] = this.top; + }, + + relativeTo: function(offset) { + return new Element.Offset( + this.left - offset.left, + this.top - offset.top + ); + }, + + inspect: function() { + return "#".interpolate(this); + }, + + toString: function() { + return "[#{left}, #{top}]".interpolate(this); + }, + + toArray: function() { + return [this.left, this.top]; + } + }); + + function getLayout(element, preCompute) { + return new Element.Layout(element, preCompute); + } + + function measure(element, property) { + return $(element).getLayout().get(property); + } + + function getDimensions(element) { + element = $(element); + var display = Element.getStyle(element, 'display'); + + if (display && display !== 'none') { + return { width: element.offsetWidth, height: element.offsetHeight }; + } + + var style = element.style; + var originalStyles = { + visibility: style.visibility, + position: style.position, + display: style.display + }; + + var newStyles = { + visibility: 'hidden', + display: 'block' + }; + + if (originalStyles.position !== 'fixed') + newStyles.position = 'absolute'; + + Element.setStyle(element, newStyles); + + var dimensions = { + width: element.offsetWidth, + height: element.offsetHeight + }; + + Element.setStyle(element, originalStyles); + + return dimensions; + } + + function getOffsetParent(element) { + element = $(element); + + if (isDocument(element) || isDetached(element) || isBody(element) || isHtml(element)) + return $(document.body); + + var isInline = (Element.getStyle(element, 'display') === 'inline'); + if (!isInline && element.offsetParent) return $(element.offsetParent); + + while ((element = element.parentNode) && element !== document.body) { + if (Element.getStyle(element, 'position') !== 'static') { + return isHtml(element) ? $(document.body) : $(element); + } + } + + return $(document.body); + } + + + function cumulativeOffset(element) { + element = $(element); + var valueT = 0, valueL = 0; + if (element.parentNode) { + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + } + return new Element.Offset(valueL, valueT); + } + + function positionedOffset(element) { + element = $(element); + + var layout = element.getLayout(); + + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + if (isBody(element)) break; + var p = Element.getStyle(element, 'position'); + if (p !== 'static') break; + } + } while (element); + + valueL -= layout.get('margin-top'); + valueT -= layout.get('margin-left'); + + return new Element.Offset(valueL, valueT); + } + + function cumulativeScrollOffset(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return new Element.Offset(valueL, valueT); + } + + function viewportOffset(forElement) { + element = $(element); + var valueT = 0, valueL = 0, docBody = document.body; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == docBody && + Element.getStyle(element, 'position') == 'absolute') break; + } while (element = element.offsetParent); + + element = forElement; + do { + if (element != docBody) { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } + } while (element = element.parentNode); + return new Element.Offset(valueL, valueT); + } + + function absolutize(element) { + element = $(element); + + if (Element.getStyle(element, 'position') === 'absolute') { + return element; + } + + var offsetParent = getOffsetParent(element); + var eOffset = element.viewportOffset(), + pOffset = offsetParent.viewportOffset(); + + var offset = eOffset.relativeTo(pOffset); + var layout = element.getLayout(); + + element.store('prototype_absolutize_original_styles', { + left: element.getStyle('left'), + top: element.getStyle('top'), + width: element.getStyle('width'), + height: element.getStyle('height') + }); + + element.setStyle({ + position: 'absolute', + top: offset.top + 'px', + left: offset.left + 'px', + width: layout.get('width') + 'px', + height: layout.get('height') + 'px' + }); + + return element; + } + + function relativize(element) { + element = $(element); + if (Element.getStyle(element, 'position') === 'relative') { + return element; + } + + var originalStyles = + element.retrieve('prototype_absolutize_original_styles'); + + if (originalStyles) element.setStyle(originalStyles); + return element; + } + + if (Prototype.Browser.IE) { + getOffsetParent = getOffsetParent.wrap( + function(proceed, element) { + element = $(element); + + if (isDocument(element) || isDetached(element) || isBody(element) || isHtml(element)) + return $(document.body); + + var position = element.getStyle('position'); + if (position !== 'static') return proceed(element); + + element.setStyle({ position: 'relative' }); + var value = proceed(element); + element.setStyle({ position: position }); + return value; + } + ); + + positionedOffset = positionedOffset.wrap(function(proceed, element) { + element = $(element); + if (!element.parentNode) return new Element.Offset(0, 0); + var position = element.getStyle('position'); + if (position !== 'static') return proceed(element); + + var offsetParent = element.getOffsetParent(); + if (offsetParent && offsetParent.getStyle('position') === 'fixed') + hasLayout(offsetParent); + + element.setStyle({ position: 'relative' }); + var value = proceed(element); + element.setStyle({ position: position }); + return value; + }); + } else if (Prototype.Browser.Webkit) { + cumulativeOffset = function(element) { + element = $(element); + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return new Element.Offset(valueL, valueT); + }; + } + + + Element.addMethods({ + getLayout: getLayout, + measure: measure, + getDimensions: getDimensions, + getOffsetParent: getOffsetParent, + cumulativeOffset: cumulativeOffset, + positionedOffset: positionedOffset, + cumulativeScrollOffset: cumulativeScrollOffset, + viewportOffset: viewportOffset, + absolutize: absolutize, + relativize: relativize + }); + + function isBody(element) { + return element.nodeName.toUpperCase() === 'BODY'; + } + + function isHtml(element) { + return element.nodeName.toUpperCase() === 'HTML'; + } + + function isDocument(element) { + return element.nodeType === Node.DOCUMENT_NODE; + } + + function isDetached(element) { + return element !== document.body && + !Element.descendantOf(element, document.body); + } + + if ('getBoundingClientRect' in document.documentElement) { + Element.addMethods({ + viewportOffset: function(element) { + element = $(element); + if (isDetached(element)) return new Element.Offset(0, 0); + + var rect = element.getBoundingClientRect(), + docEl = document.documentElement; + return new Element.Offset(rect.left - docEl.clientLeft, + rect.top - docEl.clientTop); + } + }); + } +})(); +window.$$ = function() { + var expression = $A(arguments).join(', '); + return Prototype.Selector.select(expression, document); +}; + +Prototype.Selector = (function() { + + function select() { + throw new Error('Method "Prototype.Selector.select" must be defined.'); + } + + function match() { + throw new Error('Method "Prototype.Selector.match" must be defined.'); + } + + function find(elements, expression, index) { + index = index || 0; + var match = Prototype.Selector.match, length = elements.length, matchIndex = 0, i; + + for (i = 0; i < length; i++) { + if (match(elements[i], expression) && index == matchIndex++) { + return Element.extend(elements[i]); + } + } + } + + function extendElements(elements) { + for (var i = 0, length = elements.length; i < length; i++) { + Element.extend(elements[i]); + } + return elements; + } + + + var K = Prototype.K; + + return { + select: select, + match: match, + find: find, + extendElements: (Element.extend === K) ? K : extendElements, + extendElement: Element.extend + }; +})(); +Prototype._original_property = window.Sizzle; +/*! + * Sizzle CSS Selector Engine - v1.0 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true; + +[0, 0].sort(function(){ + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function(selector, context, results, seed) { + results = results || []; + var origContext = context = context || document; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var parts = [], m, set, checkSet, check, mode, extra, prune = true, contextXML = isXML(context), + soFar = selector; + + while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context ); + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) + selector += parts.shift(); + + set = posProcess( selector, set ); + } + } + } else { + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + var ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0]; + } + + if ( context ) { + var ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray(set); + } else { + prune = false; + } + + while ( parts.length ) { + var cur = parts.pop(), pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + throw "Syntax error, unrecognized expression: " + (cur || selector); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + } else if ( context && context.nodeType === 1 ) { + for ( var i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + } else { + for ( var i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function(results){ + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort(sortOrder); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[i-1] ) { + results.splice(i--, 1); + } + } + } + } + + return results; +}; + +Sizzle.matches = function(expr, set){ + return Sizzle(expr, null, null, set); +}; + +Sizzle.find = function(expr, context, isXML){ + var set, match; + + if ( !expr ) { + return []; + } + + for ( var i = 0, l = Expr.order.length; i < l; i++ ) { + var type = Expr.order[i], match; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + var left = match[1]; + match.splice(1,1); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace(/\\/g, ""); + set = Expr.find[ type ]( match, context, isXML ); + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = context.getElementsByTagName("*"); + } + + return {set: set, expr: expr}; +}; + +Sizzle.filter = function(expr, set, inplace, not){ + var old = expr, result = [], curLoop = set, match, anyFound, + isXMLFilter = set && set[0] && isXML(set[0]); + + while ( expr && set.length ) { + for ( var type in Expr.filter ) { + if ( (match = Expr.match[ type ].exec( expr )) != null ) { + var filter = Expr.filter[ type ], found, item; + anyFound = false; + + if ( curLoop == result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( var i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + var pass = not ^ !!found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + } else { + curLoop[i] = false; + } + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + if ( expr == old ) { + if ( anyFound == null ) { + throw "Syntax error, unrecognized expression: " + expr; + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + match: { + ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/ + }, + leftMatch: {}, + attrMap: { + "class": "className", + "for": "htmlFor" + }, + attrHandle: { + href: function(elem){ + return elem.getAttribute("href"); + } + }, + relative: { + "+": function(checkSet, part, isXML){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !/\W/.test(part), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag && !isXML ) { + part = part.toUpperCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + ">": function(checkSet, part, isXML){ + var isPartStr = typeof part === "string"; + + if ( isPartStr && !/\W/.test(part) ) { + part = isXML ? part : part.toUpperCase(); + + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName === part ? parent : false; + } + } + } else { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + "": function(checkSet, part, isXML){ + var doneName = done++, checkFn = dirCheck; + + if ( !/\W/.test(part) ) { + var nodeCheck = part = isXML ? part : part.toUpperCase(); + checkFn = dirNodeCheck; + } + + checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML); + }, + "~": function(checkSet, part, isXML){ + var doneName = done++, checkFn = dirCheck; + + if ( typeof part === "string" && !/\W/.test(part) ) { + var nodeCheck = part = isXML ? part : part.toUpperCase(); + checkFn = dirNodeCheck; + } + + checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML); + } + }, + find: { + ID: function(match, context, isXML){ + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + return m ? [m] : []; + } + }, + NAME: function(match, context, isXML){ + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], results = context.getElementsByName(match[1]); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + TAG: function(match, context){ + return context.getElementsByTagName(match[1]); + } + }, + preFilter: { + CLASS: function(match, curLoop, inplace, result, not, isXML){ + match = " " + match[1].replace(/\\/g, "") + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").indexOf(match) >= 0) ) { + if ( !inplace ) + result.push( elem ); + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + ID: function(match){ + return match[1].replace(/\\/g, ""); + }, + TAG: function(match, curLoop){ + for ( var i = 0; curLoop[i] === false; i++ ){} + return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase(); + }, + CHILD: function(match){ + if ( match[1] == "nth" ) { + var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec( + match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + + match[0] = done++; + + return match; + }, + ATTR: function(match, curLoop, inplace, result, not, isXML){ + var name = match[1].replace(/\\/g, ""); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + PSEUDO: function(match, curLoop, inplace, result, not){ + if ( match[1] === "not" ) { + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + if ( !inplace ) { + result.push.apply( result, ret ); + } + return false; + } + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + POS: function(match){ + match.unshift( true ); + return match; + } + }, + filters: { + enabled: function(elem){ + return elem.disabled === false && elem.type !== "hidden"; + }, + disabled: function(elem){ + return elem.disabled === true; + }, + checked: function(elem){ + return elem.checked === true; + }, + selected: function(elem){ + elem.parentNode.selectedIndex; + return elem.selected === true; + }, + parent: function(elem){ + return !!elem.firstChild; + }, + empty: function(elem){ + return !elem.firstChild; + }, + has: function(elem, i, match){ + return !!Sizzle( match[3], elem ).length; + }, + header: function(elem){ + return /h\d/i.test( elem.nodeName ); + }, + text: function(elem){ + return "text" === elem.type; + }, + radio: function(elem){ + return "radio" === elem.type; + }, + checkbox: function(elem){ + return "checkbox" === elem.type; + }, + file: function(elem){ + return "file" === elem.type; + }, + password: function(elem){ + return "password" === elem.type; + }, + submit: function(elem){ + return "submit" === elem.type; + }, + image: function(elem){ + return "image" === elem.type; + }, + reset: function(elem){ + return "reset" === elem.type; + }, + button: function(elem){ + return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON"; + }, + input: function(elem){ + return /input|select|textarea|button/i.test(elem.nodeName); + } + }, + setFilters: { + first: function(elem, i){ + return i === 0; + }, + last: function(elem, i, match, array){ + return i === array.length - 1; + }, + even: function(elem, i){ + return i % 2 === 0; + }, + odd: function(elem, i){ + return i % 2 === 1; + }, + lt: function(elem, i, match){ + return i < match[3] - 0; + }, + gt: function(elem, i, match){ + return i > match[3] - 0; + }, + nth: function(elem, i, match){ + return match[3] - 0 == i; + }, + eq: function(elem, i, match){ + return match[3] - 0 == i; + } + }, + filter: { + PSEUDO: function(elem, match, i, array){ + var name = match[1], filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0; + } else if ( name === "not" ) { + var not = match[3]; + + for ( var i = 0, l = not.length; i < l; i++ ) { + if ( not[i] === elem ) { + return false; + } + } + + return true; + } + }, + CHILD: function(elem, match){ + var type = match[1], node = elem; + switch (type) { + case 'only': + case 'first': + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) return false; + } + if ( type == 'first') return true; + node = elem; + case 'last': + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) return false; + } + return true; + case 'nth': + var first = match[2], last = match[3]; + + if ( first == 1 && last == 0 ) { + return true; + } + + var doneName = match[0], + parent = elem.parentNode; + + if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { + var count = 0; + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + parent.sizcache = doneName; + } + + var diff = elem.nodeIndex - last; + if ( first == 0 ) { + return diff == 0; + } else { + return ( diff % first == 0 && diff / first >= 0 ); + } + } + }, + ID: function(elem, match){ + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + TAG: function(elem, match){ + return (match === "*" && elem.nodeType === 1) || elem.nodeName === match; + }, + CLASS: function(elem, match){ + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + ATTR: function(elem, match){ + var name = match[1], + result = Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value != check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + POS: function(elem, match, i, array){ + var name = match[2], filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source ); +} + +var makeArray = function(array, results) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 ); + +} catch(e){ + makeArray = function(array, results) { + var ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + } else { + if ( typeof array.length === "number" ) { + for ( var i = 0, l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + } else { + for ( var i = 0; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + if ( a == b ) { + hasDuplicate = true; + } + return 0; + } + + var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1; + if ( ret === 0 ) { + hasDuplicate = true; + } + return ret; + }; +} else if ( "sourceIndex" in document.documentElement ) { + sortOrder = function( a, b ) { + if ( !a.sourceIndex || !b.sourceIndex ) { + if ( a == b ) { + hasDuplicate = true; + } + return 0; + } + + var ret = a.sourceIndex - b.sourceIndex; + if ( ret === 0 ) { + hasDuplicate = true; + } + return ret; + }; +} else if ( document.createRange ) { + sortOrder = function( a, b ) { + if ( !a.ownerDocument || !b.ownerDocument ) { + if ( a == b ) { + hasDuplicate = true; + } + return 0; + } + + var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange(); + aRange.setStart(a, 0); + aRange.setEnd(a, 0); + bRange.setStart(b, 0); + bRange.setEnd(b, 0); + var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange); + if ( ret === 0 ) { + hasDuplicate = true; + } + return ret; + }; +} + +(function(){ + var form = document.createElement("div"), + id = "script" + (new Date).getTime(); + form.innerHTML = ""; + + var root = document.documentElement; + root.insertBefore( form, root.firstChild ); + + if ( !!document.getElementById( id ) ) { + Expr.find.ID = function(match, context, isXML){ + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; + } + }; + + Expr.filter.ID = function(elem, match){ + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + root = form = null; // release memory in IE +})(); + +(function(){ + + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function(match, context){ + var results = context.getElementsByTagName(match[1]); + + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + div.innerHTML = ""; + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + Expr.attrHandle.href = function(elem){ + return elem.getAttribute("href", 2); + }; + } + + div = null; // release memory in IE +})(); + +if ( document.querySelectorAll ) (function(){ + var oldSizzle = Sizzle, div = document.createElement("div"); + div.innerHTML = "

                            "; + + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function(query, context, extra, seed){ + context = context || document; + + if ( !seed && context.nodeType === 9 && !isXML(context) ) { + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(e){} + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + div = null; // release memory in IE +})(); + +if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) (function(){ + var div = document.createElement("div"); + div.innerHTML = "
                            "; + + if ( div.getElementsByClassName("e").length === 0 ) + return; + + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) + return; + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function(match, context, isXML) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + div = null; // release memory in IE +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + var sibDir = dir == "previousSibling" && !isXML; + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + if ( elem ) { + if ( sibDir && elem.nodeType === 1 ){ + elem.sizcache = doneName; + elem.sizset = i; + } + elem = elem[dir]; + var match = false; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem.sizcache = doneName; + elem.sizset = i; + } + + if ( elem.nodeName === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + var sibDir = dir == "previousSibling" && !isXML; + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + if ( elem ) { + if ( sibDir && elem.nodeType === 1 ) { + elem.sizcache = doneName; + elem.sizset = i; + } + elem = elem[dir]; + var match = false; + + while ( elem ) { + if ( elem.sizcache === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem.sizcache = doneName; + elem.sizset = i; + } + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +var contains = document.compareDocumentPosition ? function(a, b){ + return a.compareDocumentPosition(b) & 16; +} : function(a, b){ + return a !== b && (a.contains ? a.contains(b) : true); +}; + +var isXML = function(elem){ + return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || + !!elem.ownerDocument && elem.ownerDocument.documentElement.nodeName !== "HTML"; +}; + +var posProcess = function(selector, context){ + var tmpSet = [], later = "", match, + root = context.nodeType ? [context] : context; + + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet ); + } + + return Sizzle.filter( later, tmpSet ); +}; + + +window.Sizzle = Sizzle; + +})(); + +;(function(engine) { + var extendElements = Prototype.Selector.extendElements; + + function select(selector, scope) { + return extendElements(engine(selector, scope || document)); + } + + function match(element, selector) { + return engine.matches(selector, [element]).length == 1; + } + + Prototype.Selector.engine = engine; + Prototype.Selector.select = select; + Prototype.Selector.match = match; +})(Sizzle); + +window.Sizzle = Prototype._original_property; +delete Prototype._original_property; + +var Form = { + reset: function(form) { + form = $(form); + form.reset(); + return form; + }, + + serializeElements: function(elements, options) { + if (typeof options != 'object') options = { hash: !!options }; + else if (Object.isUndefined(options.hash)) options.hash = true; + var key, value, submitted = false, submit = options.submit, accumulator, initial; + + if (options.hash) { + initial = {}; + accumulator = function(result, key, value) { + if (key in result) { + if (!Object.isArray(result[key])) result[key] = [result[key]]; + result[key].push(value); + } else result[key] = value; + return result; + }; + } else { + initial = ''; + accumulator = function(result, key, value) { + return result + (result ? '&' : '') + encodeURIComponent(key) + '=' + encodeURIComponent(value); + }; + } + + return elements.inject(initial, function(result, element) { + if (!element.disabled && element.name) { + key = element.name; value = $(element).getValue(); + if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted && + submit !== false && (!submit || key == submit) && (submitted = true)))) { + result = accumulator(result, key, value); + } + } + return result; + }); + } +}; + +Form.Methods = { + serialize: function(form, options) { + return Form.serializeElements(Form.getElements(form), options); + }, + + getElements: function(form) { + var elements = $(form).getElementsByTagName('*'), + element, + arr = [ ], + serializers = Form.Element.Serializers; + for (var i = 0; element = elements[i]; i++) { + arr.push(element); + } + return arr.inject([], function(elements, child) { + if (serializers[child.tagName.toLowerCase()]) + elements.push(Element.extend(child)); + return elements; + }); + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) return $A(inputs).map(Element.extend); + + for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || (name && input.name != name)) + continue; + matchingInputs.push(Element.extend(input)); + } + + return matchingInputs; + }, + + disable: function(form) { + form = $(form); + Form.getElements(form).invoke('disable'); + return form; + }, + + enable: function(form) { + form = $(form); + Form.getElements(form).invoke('enable'); + return form; + }, + + findFirstElement: function(form) { + var elements = $(form).getElements().findAll(function(element) { + return 'hidden' != element.type && !element.disabled; + }); + var firstByIndex = elements.findAll(function(element) { + return element.hasAttribute('tabIndex') && element.tabIndex >= 0; + }).sortBy(function(element) { return element.tabIndex; }).first(); + + return firstByIndex ? firstByIndex : elements.find(function(element) { + return /^(?:input|select|textarea)$/i.test(element.tagName); + }); + }, + + focusFirstElement: function(form) { + form = $(form); + var element = form.findFirstElement(); + if (element) element.activate(); + return form; + }, + + request: function(form, options) { + form = $(form), options = Object.clone(options || { }); + + var params = options.parameters, action = form.readAttribute('action') || ''; + if (action.blank()) action = window.location.href; + options.parameters = form.serialize(true); + + if (params) { + if (Object.isString(params)) params = params.toQueryParams(); + Object.extend(options.parameters, params); + } + + if (form.hasAttribute('method') && !options.method) + options.method = form.method; + + return new Ajax.Request(action, options); + } +}; + +/*--------------------------------------------------------------------------*/ + + +Form.Element = { + focus: function(element) { + $(element).focus(); + return element; + }, + + select: function(element) { + $(element).select(); + return element; + } +}; + +Form.Element.Methods = { + + serialize: function(element) { + element = $(element); + if (!element.disabled && element.name) { + var value = element.getValue(); + if (value != undefined) { + var pair = { }; + pair[element.name] = value; + return Object.toQueryString(pair); + } + } + return ''; + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + return Form.Element.Serializers[method](element); + }, + + setValue: function(element, value) { + element = $(element); + var method = element.tagName.toLowerCase(); + Form.Element.Serializers[method](element, value); + return element; + }, + + clear: function(element) { + $(element).value = ''; + return element; + }, + + present: function(element) { + return $(element).value != ''; + }, + + activate: function(element) { + element = $(element); + try { + element.focus(); + if (element.select && (element.tagName.toLowerCase() != 'input' || + !(/^(?:button|reset|submit)$/i.test(element.type)))) + element.select(); + } catch (e) { } + return element; + }, + + disable: function(element) { + element = $(element); + element.disabled = true; + return element; + }, + + enable: function(element) { + element = $(element); + element.disabled = false; + return element; + } +}; + +/*--------------------------------------------------------------------------*/ + +var Field = Form.Element; + +var $F = Form.Element.Methods.getValue; + +/*--------------------------------------------------------------------------*/ + +Form.Element.Serializers = (function() { + function input(element, value) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + return inputSelector(element, value); + default: + return valueSelector(element, value); + } + } + + function inputSelector(element, value) { + if (Object.isUndefined(value)) + return element.checked ? element.value : null; + else element.checked = !!value; + } + + function valueSelector(element, value) { + if (Object.isUndefined(value)) return element.value; + else element.value = value; + } + + function select(element, value) { + if (Object.isUndefined(value)) + return (element.type === 'select-one' ? selectOne : selectMany)(element); + + var opt, currentValue, single = !Object.isArray(value); + for (var i = 0, length = element.length; i < length; i++) { + opt = element.options[i]; + currentValue = this.optionValue(opt); + if (single) { + if (currentValue == value) { + opt.selected = true; + return; + } + } + else opt.selected = value.include(currentValue); + } + } + + function selectOne(element) { + var index = element.selectedIndex; + return index >= 0 ? optionValue(element.options[index]) : null; + } + + function selectMany(element) { + var values, length = element.length; + if (!length) return null; + + for (var i = 0, values = []; i < length; i++) { + var opt = element.options[i]; + if (opt.selected) values.push(optionValue(opt)); + } + return values; + } + + function optionValue(opt) { + return Element.hasAttribute(opt, 'value') ? opt.value : opt.text; + } + + return { + input: input, + inputSelector: inputSelector, + textarea: valueSelector, + select: select, + selectOne: selectOne, + selectMany: selectMany, + optionValue: optionValue, + button: valueSelector + }; +})(); + +/*--------------------------------------------------------------------------*/ + + +Abstract.TimedObserver = Class.create(PeriodicalExecuter, { + initialize: function($super, element, frequency, callback) { + $super(callback, frequency); + this.element = $(element); + this.lastValue = this.getValue(); + }, + + execute: function() { + var value = this.getValue(); + if (Object.isString(this.lastValue) && Object.isString(value) ? + this.lastValue != value : String(this.lastValue) != String(value)) { + this.callback(this.element, value); + this.lastValue = value; + } + } +}); + +Form.Element.Observer = Class.create(Abstract.TimedObserver, { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(Abstract.TimedObserver, { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = Class.create({ + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + Form.getElements(this.element).each(this.registerCallback, this); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + default: + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +}); + +Form.Element.EventObserver = Class.create(Abstract.EventObserver, { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(Abstract.EventObserver, { + getValue: function() { + return Form.serialize(this.element); + } +}); +(function() { + + var Event = { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + KEY_HOME: 36, + KEY_END: 35, + KEY_PAGEUP: 33, + KEY_PAGEDOWN: 34, + KEY_INSERT: 45, + + cache: {} + }; + + var docEl = document.documentElement; + var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl + && 'onmouseleave' in docEl; + + + + var isIELegacyEvent = function(event) { return false; }; + + if (window.attachEvent) { + if (window.addEventListener) { + isIELegacyEvent = function(event) { + return !(event instanceof window.Event); + }; + } else { + isIELegacyEvent = function(event) { return true; }; + } + } + + var _isButton; + + function _isButtonForDOMEvents(event, code) { + return event.which ? (event.which === code + 1) : (event.button === code); + } + + var legacyButtonMap = { 0: 1, 1: 4, 2: 2 }; + function _isButtonForLegacyEvents(event, code) { + return event.button === legacyButtonMap[code]; + } + + function _isButtonForWebKit(event, code) { + switch (code) { + case 0: return event.which == 1 && !event.metaKey; + case 1: return event.which == 2 || (event.which == 1 && event.metaKey); + case 2: return event.which == 3; + default: return false; + } + } + + if (window.attachEvent) { + if (!window.addEventListener) { + _isButton = _isButtonForLegacyEvents; + } else { + _isButton = function(event, code) { + return isIELegacyEvent(event) ? _isButtonForLegacyEvents(event, code) : + _isButtonForDOMEvents(event, code); + }; + } + } else if (Prototype.Browser.WebKit) { + _isButton = _isButtonForWebKit; + } else { + _isButton = _isButtonForDOMEvents; + } + + function isLeftClick(event) { return _isButton(event, 0); } + + function isMiddleClick(event) { return _isButton(event, 1); } + + function isRightClick(event) { return _isButton(event, 2); } + + function element(event) { + event = Event.extend(event); + + var node = event.target, type = event.type, + currentTarget = event.currentTarget; + + if (currentTarget && currentTarget.tagName) { + if (type === 'load' || type === 'error' || + (type === 'click' && currentTarget.tagName.toLowerCase() === 'input' + && currentTarget.type === 'radio')) + node = currentTarget; + } + + if (node.nodeType == Node.TEXT_NODE) + node = node.parentNode; + + return Element.extend(node); + } + + function findElement(event, expression) { + var element = Event.element(event); + + if (!expression) return element; + while (element) { + if (Object.isElement(element) && Prototype.Selector.match(element, expression)) { + return Element.extend(element); + } + element = element.parentNode; + } + } + + function pointer(event) { + return { x: pointerX(event), y: pointerY(event) }; + } + + function pointerX(event) { + var docElement = document.documentElement, + body = document.body || { scrollLeft: 0 }; + + return event.pageX || (event.clientX + + (docElement.scrollLeft || body.scrollLeft) - + (docElement.clientLeft || 0)); + } + + function pointerY(event) { + var docElement = document.documentElement, + body = document.body || { scrollTop: 0 }; + + return event.pageY || (event.clientY + + (docElement.scrollTop || body.scrollTop) - + (docElement.clientTop || 0)); + } + + function stop(event) { + Event.extend(event); + event.preventDefault(); + event.stopPropagation(); + + event.stopped = true; + } + + Event.Methods = { + isLeftClick: isLeftClick, + isMiddleClick: isMiddleClick, + isRightClick: isRightClick, + + element: element, + findElement: findElement, + + pointer: pointer, + pointerX: pointerX, + pointerY: pointerY, + + stop: stop + }; + + var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { + m[name] = Event.Methods[name].methodize(); + return m; + }); + + if (window.attachEvent) { + function _relatedTarget(event) { + var element; + switch (event.type) { + case 'mouseover': + case 'mouseenter': + element = event.fromElement; + break; + case 'mouseout': + case 'mouseleave': + element = event.toElement; + break; + default: + return null; + } + return Element.extend(element); + } + + var additionalMethods = { + stopPropagation: function() { this.cancelBubble = true; }, + preventDefault: function() { this.returnValue = false; }, + inspect: function() { return '[object Event]'; } + }; + + Event.extend = function(event, element) { + if (!event) return false; + + if (!isIELegacyEvent(event)) return event; + + if (event._extendedByPrototype) return event; + event._extendedByPrototype = Prototype.emptyFunction; + + var pointer = Event.pointer(event); + + Object.extend(event, { + target: event.srcElement || element, + relatedTarget: _relatedTarget(event), + pageX: pointer.x, + pageY: pointer.y + }); + + Object.extend(event, methods); + Object.extend(event, additionalMethods); + + return event; + }; + } else { + Event.extend = Prototype.K; + } + + if (window.addEventListener) { + Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__; + Object.extend(Event.prototype, methods); + } + + function _createResponder(element, eventName, handler) { + var registry = Element.retrieve(element, 'prototype_event_registry'); + + if (Object.isUndefined(registry)) { + CACHE.push(element); + registry = Element.retrieve(element, 'prototype_event_registry', $H()); + } + + var respondersForEvent = registry.get(eventName); + if (Object.isUndefined(respondersForEvent)) { + respondersForEvent = []; + registry.set(eventName, respondersForEvent); + } + + if (respondersForEvent.pluck('handler').include(handler)) return false; + + var responder; + if (eventName.include(":")) { + responder = function(event) { + if (Object.isUndefined(event.eventName)) + return false; + + if (event.eventName !== eventName) + return false; + + Event.extend(event, element); + handler.call(element, event); + }; + } else { + if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED && + (eventName === "mouseenter" || eventName === "mouseleave")) { + if (eventName === "mouseenter" || eventName === "mouseleave") { + responder = function(event) { + Event.extend(event, element); + + var parent = event.relatedTarget; + while (parent && parent !== element) { + try { parent = parent.parentNode; } + catch(e) { parent = element; } + } + + if (parent === element) return; + + handler.call(element, event); + }; + } + } else { + responder = function(event) { + Event.extend(event, element); + handler.call(element, event); + }; + } + } + + responder.handler = handler; + respondersForEvent.push(responder); + return responder; + } + + function _destroyCache() { + for (var i = 0, length = CACHE.length; i < length; i++) { + Event.stopObserving(CACHE[i]); + CACHE[i] = null; + } + } + + var CACHE = []; + + if (Prototype.Browser.IE) + window.attachEvent('onunload', _destroyCache); + + if (Prototype.Browser.WebKit) + window.addEventListener('unload', Prototype.emptyFunction, false); + + + var _getDOMEventName = Prototype.K, + translations = { mouseenter: "mouseover", mouseleave: "mouseout" }; + + if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) { + _getDOMEventName = function(eventName) { + return (translations[eventName] || eventName); + }; + } + + function observe(element, eventName, handler) { + element = $(element); + + var responder = _createResponder(element, eventName, handler); + + if (!responder) return element; + + if (eventName.include(':')) { + if (element.addEventListener) + element.addEventListener("dataavailable", responder, false); + else { + element.attachEvent("ondataavailable", responder); + element.attachEvent("onlosecapture", responder); + } + } else { + var actualEventName = _getDOMEventName(eventName); + + if (element.addEventListener) + element.addEventListener(actualEventName, responder, false); + else + element.attachEvent("on" + actualEventName, responder); + } + + return element; + } + + function stopObserving(element, eventName, handler) { + element = $(element); + + var registry = Element.retrieve(element, 'prototype_event_registry'); + if (!registry) return element; + + if (!eventName) { + registry.each( function(pair) { + var eventName = pair.key; + stopObserving(element, eventName); + }); + return element; + } + + var responders = registry.get(eventName); + if (!responders) return element; + + if (!handler) { + responders.each(function(r) { + stopObserving(element, eventName, r.handler); + }); + return element; + } + + var i = responders.length, responder; + while (i--) { + if (responders[i].handler === handler) { + responder = responders[i]; + break; + } + } + if (!responder) return element; + + if (eventName.include(':')) { + if (element.removeEventListener) + element.removeEventListener("dataavailable", responder, false); + else { + element.detachEvent("ondataavailable", responder); + element.detachEvent("onlosecapture", responder); + } + } else { + var actualEventName = _getDOMEventName(eventName); + if (element.removeEventListener) + element.removeEventListener(actualEventName, responder, false); + else + element.detachEvent('on' + actualEventName, responder); + } + + registry.set(eventName, responders.without(responder)); + + return element; + } + + function fire(element, eventName, memo, bubble) { + element = $(element); + + if (Object.isUndefined(bubble)) + bubble = true; + + if (element == document && document.createEvent && !element.dispatchEvent) + element = document.documentElement; + + var event; + if (document.createEvent) { + event = document.createEvent('HTMLEvents'); + event.initEvent('dataavailable', bubble, true); + } else { + event = document.createEventObject(); + event.eventType = bubble ? 'ondataavailable' : 'onlosecapture'; + } + + event.eventName = eventName; + event.memo = memo || { }; + + if (document.createEvent) + element.dispatchEvent(event); + else + element.fireEvent(event.eventType, event); + + return Event.extend(event); + } + + Event.Handler = Class.create({ + initialize: function(element, eventName, selector, callback) { + this.element = $(element); + this.eventName = eventName; + this.selector = selector; + this.callback = callback; + this.handler = this.handleEvent.bind(this); + }, + + start: function() { + Event.observe(this.element, this.eventName, this.handler); + return this; + }, + + stop: function() { + Event.stopObserving(this.element, this.eventName, this.handler); + return this; + }, + + handleEvent: function(event) { + var element = Event.findElement(event, this.selector); + if (element) this.callback.call(this.element, event, element); + } + }); + + function on(element, eventName, selector, callback) { + element = $(element); + if (Object.isFunction(selector) && Object.isUndefined(callback)) { + callback = selector, selector = null; + } + + return new Event.Handler(element, eventName, selector, callback).start(); + } + + Object.extend(Event, Event.Methods); + + Object.extend(Event, { + fire: fire, + observe: observe, + stopObserving: stopObserving, + on: on + }); + + Element.addMethods({ + fire: fire, + + observe: observe, + + stopObserving: stopObserving, + + on: on + }); + + Object.extend(document, { + fire: fire.methodize(), + + observe: observe.methodize(), + + stopObserving: stopObserving.methodize(), + + on: on.methodize(), + + loaded: false + }); + + if (window.Event) Object.extend(window.Event, Event); + else window.Event = Event; +})(); + +(function() { + /* Support for the DOMContentLoaded event is based on work by Dan Webb, + Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */ + + var timer; + + function fireContentLoadedEvent() { + if (document.loaded) return; + if (timer) window.clearTimeout(timer); + document.loaded = true; + document.fire('dom:loaded'); + } + + function checkReadyState() { + if (document.readyState === 'complete') { + document.stopObserving('readystatechange', checkReadyState); + fireContentLoadedEvent(); + } + } + + function pollDoScroll() { + try { document.documentElement.doScroll('left'); } + catch(e) { + timer = pollDoScroll.defer(); + return; + } + fireContentLoadedEvent(); + } + + if (document.addEventListener) { + document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false); + } else { + document.observe('readystatechange', checkReadyState); + if (window == top) + timer = pollDoScroll.defer(); + } + + Event.observe(window, 'load', fireContentLoadedEvent); +})(); + +Element.addMethods(); + +/*------------------------------- DEPRECATED -------------------------------*/ + +Hash.toQueryString = Object.toQueryString; + +var Toggle = { display: Element.toggle }; + +Element.Methods.childOf = Element.Methods.descendantOf; + +var Insertion = { + Before: function(element, content) { + return Element.insert(element, {before:content}); + }, + + Top: function(element, content) { + return Element.insert(element, {top:content}); + }, + + Bottom: function(element, content) { + return Element.insert(element, {bottom:content}); + }, + + After: function(element, content) { + return Element.insert(element, {after:content}); + } +}; + +var $continue = new Error('"throw $continue" is deprecated, use "return" instead'); + +var Position = { + includeScrollOffsets: false, + + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = Element.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = Element.cumulativeScrollOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = Element.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + + cumulativeOffset: Element.Methods.cumulativeOffset, + + positionedOffset: Element.Methods.positionedOffset, + + absolutize: function(element) { + Position.prepare(); + return Element.absolutize(element); + }, + + relativize: function(element) { + Position.prepare(); + return Element.relativize(element); + }, + + realOffset: Element.Methods.cumulativeScrollOffset, + + offsetParent: Element.Methods.getOffsetParent, + + page: Element.Methods.viewportOffset, + + clone: function(source, target, options) { + options = options || { }; + return Element.clonePosition(target, source, options); + } +}; + +/*--------------------------------------------------------------------------*/ + +if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){ + function iter(name) { + return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]"; + } + + instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ? + function(element, className) { + className = className.toString().strip(); + var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className); + return cond ? document._getElementsByXPath('.//*' + cond, element) : []; + } : function(element, className) { + className = className.toString().strip(); + var elements = [], classNames = (/\s/.test(className) ? $w(className) : null); + if (!classNames && !className) return elements; + + var nodes = $(element).getElementsByTagName('*'); + className = ' ' + className + ' '; + + for (var i = 0, child, cn; child = nodes[i]; i++) { + if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) || + (classNames && classNames.all(function(name) { + return !name.toString().blank() && cn.include(' ' + name + ' '); + })))) + elements.push(Element.extend(child)); + } + return elements; + }; + + return function(className, parentElement) { + return $(parentElement || document.body).getElementsByClassName(className); + }; +}(Element.Methods); + +/*--------------------------------------------------------------------------*/ + +Element.ClassNames = Class.create(); +Element.ClassNames.prototype = { + initialize: function(element) { + this.element = $(element); + }, + + _each: function(iterator) { + this.element.className.split(/\s+/).select(function(name) { + return name.length > 0; + })._each(iterator); + }, + + set: function(className) { + this.element.className = className; + }, + + add: function(classNameToAdd) { + if (this.include(classNameToAdd)) return; + this.set($A(this).concat(classNameToAdd).join(' ')); + }, + + remove: function(classNameToRemove) { + if (!this.include(classNameToRemove)) return; + this.set($A(this).without(classNameToRemove).join(' ')); + }, + + toString: function() { + return $A(this).join(' '); + } +}; + +Object.extend(Element.ClassNames.prototype, Enumerable); + +/*--------------------------------------------------------------------------*/ + +(function() { + window.Selector = Class.create({ + initialize: function(expression) { + this.expression = expression.strip(); + }, + + findElements: function(rootElement) { + return Prototype.Selector.select(this.expression, rootElement); + }, + + match: function(element) { + return Prototype.Selector.match(element, this.expression); + }, + + toString: function() { + return this.expression; + }, + + inspect: function() { + return "#"; + } + }); + + Object.extend(Selector, { + matchElements: function(elements, expression) { + var match = Prototype.Selector.match, + results = []; + + for (var i = 0, length = elements.length; i < length; i++) { + var element = elements[i]; + if (match(element, expression)) { + results.push(Element.extend(element)); + } + } + return results; + }, + + findElement: function(elements, expression, index) { + index = index || 0; + var matchIndex = 0, element; + for (var i = 0, length = elements.length; i < length; i++) { + element = elements[i]; + if (Prototype.Selector.match(element, expression) && index === matchIndex++) { + return Element.extend(element); + } + } + }, + + findChildElements: function(element, expressions) { + var selector = expressions.toArray().join(', '); + return Prototype.Selector.select(selector, element || document); + } + }); +})(); diff --git a/src/usr/local/www/javascript/scriptaculous/scriptaculous.js b/src/usr/local/www/javascript/scriptaculous/scriptaculous.js new file mode 100644 index 0000000..6bf437a --- /dev/null +++ b/src/usr/local/www/javascript/scriptaculous/scriptaculous.js @@ -0,0 +1,68 @@ +// script.aculo.us scriptaculous.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +var Scriptaculous = { + Version: '1.8.3', + require: function(libraryName) { + try{ + // inserting via DOM fails in Safari 2.0, so brute force approach + document.write(' to your HTML + Add class="sortable" to any table you'd like to make sortable + Click on the headers to sort + + Thanks to many, many people for contributions and suggestions. + Licenced as X11: http://www.kryogenix.org/code/browser/licence.html + This basically means: do what you want with it. + + -- pfSense modifications -- + Allow for sorting of IP adresses + 2012-09-15 Allow for multiple header rows, using "sortableHeaderRowIdentifier" class for the TR that has the column headers. (used in firewall-log) + 2012-09-15 Allow sorting multiple dual/mutlti rows together, using sortablemultirow="2" attribute for the table + 2012-09-15 Allow sorting of IP:Port texts, changed sort compare function + 2012-11-05 Allow sorting of IP:Port and *:port texts toghether also AAA_23 AAA_123 in 'numeric order' (used in Diagnostics\Sockets column LOCAL) +*/ + + +var stIsIE = /*@cc_on!@*/false; + +sorttable = { + init: function() { + // quit if this function has already been called + if (arguments.callee.done) return; + // flag this function so we don't do the same thing twice + arguments.callee.done = true; + // kill the timer + if (_timer) clearInterval(_timer); + + if (!document.createElement || !document.getElementsByTagName) return; + + sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; + + forEach(document.getElementsByTagName('table'), function(table) { + if (table.className.search(/\bsortable\b/) != -1) { + sorttable.makeSortable(table); + } + }); + + }, + + makeSortable: function(table) { + if (table.getElementsByTagName('thead').length == 0) { + // table doesn't have a tHead. Since it should have, create one and + // put the first table row in it. + the = document.createElement('thead'); + the.appendChild(table.rows[0]); + table.insertBefore(the,table.firstChild); + } + // Safari doesn't support table.tHead, sigh + if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; + + headrow = undefined; + if (table.tHead.rows.length == 1) + headrow = table.tHead.rows[0].cells; + else + { + //if multiple rows are found one must be marked with class
                            + + + + +
                            + +
                            +
                            +edit_uri('load_balancer_monitor_edit.php'); + $t->my_uri('load_balancer_monitor.php'); + $t->add_column(gettext('Name'), 'name', 20); + $t->add_column(gettext('Type'), 'type', 10); + $t->add_column(gettext('Description'), 'descr', 30); + $t->add_button('edit'); + $t->add_button('dup'); + $t->add_button('del'); + $t->add_content_array($a_monitor); + $t->display(); +?> +
                            +
                            + + + + diff --git a/src/usr/local/www/load_balancer_monitor_edit.php b/src/usr/local/www/load_balancer_monitor_edit.php new file mode 100644 index 0000000..532136b --- /dev/null +++ b/src/usr/local/www/load_balancer_monitor_edit.php @@ -0,0 +1,390 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-services-loadbalancer-monitor-edit +##|*NAME=Services: Load Balancer: Monitor: Edit page +##|*DESCR=Allow access to the 'Services: Load Balancer: Monitor: Edit' page. +##|*MATCH=load_balancer_monitor_edit.php* +##|-PRIV + +require("guiconfig.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/load_balancer_monitor.php'); +} + +if (!is_array($config['load_balancer']['monitor_type'])) { + $config['load_balancer']['monitor_type'] = array(); +} +$a_monitor = &$config['load_balancer']['monitor_type']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_monitor[$id]) { + $pconfig['name'] = $a_monitor[$id]['name']; + $pconfig['type'] = $a_monitor[$id]['type']; + $pconfig['descr'] = $a_monitor[$id]['descr']; + $pconfig['options'] = array(); + $pconfig['options'] = $a_monitor[$id]['options']; +} else { + /* Some sane page defaults */ + $pconfig['options']['path'] = '/'; + $pconfig['options']['code'] = 200; +} + +$changedesc = gettext("Load Balancer: Monitor:") . " "; +$changecount = 0; + +if ($_POST) { + $changecount++; + + unset($input_errors); + $pconfig = $_POST; + + /* turn $_POST['http_options_*'] into $pconfig['options'][*] */ + foreach ($_POST as $key => $val) { + if (stristr($key, 'options') !== false) { + if (stristr($key, $pconfig['type'].'_') !== false) { + $opt = explode('_', $key); + $pconfig['options'][$opt[2]] = $val; + } + unset($pconfig[$key]); + } + } + + /* input validation */ + $reqdfields = explode(" ", "name type descr"); + $reqdfieldsn = array(gettext("Name"), gettext("Type"), gettext("Description")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + /* Ensure that our monitor names are unique */ + for ($i = 0; isset($config['load_balancer']['monitor_type'][$i]); $i++) { + if (($_POST['name'] == $config['load_balancer']['monitor_type'][$i]['name']) && ($i != $id)) { + $input_errors[] = gettext("This monitor name has already been used. Monitor names must be unique."); + } + } + + if (preg_match('/[ \/]/', $_POST['name'])) { + $input_errors[] = gettext("You cannot use spaces or slashes in the 'name' field."); + } + + if (strlen($_POST['name']) > 16) { + $input_errors[] = gettext("The 'name' field must be 16 characters or less."); + } + + switch ($_POST['type']) { + case 'icmp': { + break; + } + case 'tcp': { + break; + } + case 'http': + case 'https': { + if (is_array($pconfig['options'])) { + if (isset($pconfig['options']['host']) && $pconfig['options']['host'] != "") { + if (!is_hostname($pconfig['options']['host'])) { + $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'."); + } + } + if (isset($pconfig['options']['code']) && $pconfig['options']['code'] != "") { + // Check code + if (!is_rfc2616_code($pconfig['options']['code'])) { + $input_errors[] = gettext("HTTP(s) codes must be from RFC2616."); + } + } + if (!isset($pconfig['options']['path']) || $pconfig['options']['path'] == "") { + $input_errors[] = gettext("The path to monitor must be set."); + } + } + break; + } + case 'send': { + if (is_array($pconfig['options'])) { + if (isset($pconfig['options']['send']) && $pconfig['options']['send'] != "") { + // Check send + } + if (isset($pconfig['options']['expect']) && $pconfig['options']['expect'] != "") { + // Check expect + } + } + break; + } + } + + if (!$input_errors) { + $monent = array(); + if (isset($id) && $a_monitor[$id]) { + $monent = $a_monitor[$id]; + } + if ($monent['name'] != "") { + $changedesc .= " " . sprintf(gettext("modified '%s' monitor:"), $monent['name']); + } + + update_if_changed("name", $monent['name'], $pconfig['name']); + update_if_changed("type", $monent['type'], $pconfig['type']); + update_if_changed("description", $monent['descr'], $pconfig['descr']); + if ($pconfig['type'] == "http" || $pconfig['type'] == "https") { + /* log updates, then clear array and reassign - dumb, but easiest way to have a clear array */ + update_if_changed("path", $monent['options']['path'], $pconfig['options']['path']); + update_if_changed("host", $monent['options']['host'], $pconfig['options']['host']); + update_if_changed("code", $monent['options']['code'], $pconfig['options']['code']); + $monent['options'] = array(); + $monent['options']['path'] = $pconfig['options']['path']; + $monent['options']['host'] = $pconfig['options']['host']; + $monent['options']['code'] = $pconfig['options']['code']; + } + if ($pconfig['type'] == "send") { + /* log updates, then clear array and reassign - dumb, but easiest way to have a clear array */ + update_if_changed("send", $monent['options']['send'], $pconfig['options']['send']); + update_if_changed("expect", $monent['options']['expect'], $pconfig['options']['expect']); + $monent['options'] = array(); + $monent['options']['send'] = $pconfig['options']['send']; + $monent['options']['expect'] = $pconfig['options']['expect']; + } + if ($pconfig['type'] == "tcp" || $pconfig['type'] == "icmp") { + $monent['options'] = array(); + } + + if (isset($id) && $a_monitor[$id]) { + /* modify all pools with this name */ + for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) { + if ($config['load_balancer']['lbpool'][$i]['monitor'] == $a_monitor[$id]['name']) { + $config['load_balancer']['lbpool'][$i]['monitor'] = $monent['name']; + } + } + $a_monitor[$id] = $monent; + } else { + $a_monitor[] = $monent; + } + + if ($changecount > 0) { + /* Mark config dirty */ + mark_subsystem_dirty('loadbalancer'); + write_config($changedesc); + } + + header("Location: load_balancer_monitor.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Monitor"), gettext("Edit")); +$shortcut_section = "relayd"; + +include("head.inc"); +$types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => gettext("HTTP"), "https" => gettext("HTTPS"), "send" => gettext("Send/Expect")); + +?> + + + + + + + +
                            + + + + + + + + + + + + + + + + + > + + + > + + + > + + + + > + + + + > + + + + + + + +
                            + size="16" maxlength="16" /> +
                            + size="64" /> +
                            + +
                            + + + + + + + + + + + + + + +
                            + size="64" /> +
                            + size="64" />
                            +
                            + +
                            +
                            + + + + + + + + + + + + + + +
                            + size="64" /> +
                            + size="64" />
                            +
                            + +
                            +
                            + + + + + + + + + +
                            + size="64" /> +
                            + size="64" /> +
                            +
                              + " /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/load_balancer_pool.php b/src/usr/local/www/load_balancer_pool.php new file mode 100644 index 0000000..47f3a89 --- /dev/null +++ b/src/usr/local/www/load_balancer_pool.php @@ -0,0 +1,159 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-loadbalancer-pool +##|*NAME=Load Balancer: Pool page +##|*DESCR=Allow access to the 'Load Balancer: Pool' page. +##|*MATCH=load_balancer_pool.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +if (!is_array($config['load_balancer']['lbpool'])) { + $config['load_balancer']['lbpool'] = array(); +} +$a_pool = &$config['load_balancer']['lbpool']; + + +if ($_POST) { + $pconfig = $_POST; + + if ($_POST['apply']) { + $retval = 0; + $retval |= filter_configure(); + $retval |= relayd_configure(); + + $savemsg = get_std_save_message($retval); + clear_subsystem_dirty('loadbalancer'); + } +} + +if ($_GET['act'] == "del") { + if (array_key_exists($_GET['id'], $a_pool)) { + /* make sure no virtual servers reference this entry */ + if (is_array($config['load_balancer']['virtual_server'])) { + foreach ($config['load_balancer']['virtual_server'] as $vs) { + if ($vs['poolname'] == $a_pool[$_GET['id']]['name']) { + $input_errors[] = gettext("This entry cannot be deleted because it is still referenced by at least one virtual server."); + break; + } + } + } + + if (!$input_errors) { + unset($a_pool[$_GET['id']]); + write_config(); + mark_subsystem_dirty('loadbalancer'); + header("Location: load_balancer_pool.php"); + exit; + } + } +} + +/* Index monitor_type array for easy hyperlinking */ +$mondex = array(); +for ($i = 0; isset($config['load_balancer']['monitor_type'][$i]); $i++) { + $mondex[$config['load_balancer']['monitor_type'][$i]['name']] = $i; +} +for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) { + $a_pool[$i]['monitor'] = "" . htmlspecialchars($a_pool[$i]['monitor']) . ""; +} + +$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Pool")); +$shortcut_section = "relayd"; + +include("head.inc"); + +?> + + +
                            + + +
                            +"));?>
                            + + + + + + + + + +
                            + +
                            +
                            +edit_uri('load_balancer_pool_edit.php'); + $t->my_uri('load_balancer_pool.php'); + $t->add_column(gettext('Name'), 'name', 10); + $t->add_column(gettext('Mode'), 'mode', 10); + $t->add_column(gettext('Servers'), 'servers', 15); + $t->add_column(gettext('Port'), 'port', 10); + $t->add_column(gettext('Monitor'), 'monitor', 10); + $t->add_column(gettext('Description'), 'descr', 25); + $t->add_button('edit'); + $t->add_button('dup'); + $t->add_button('del'); + $t->add_content_array($a_pool); + $t->display(); +?> +
                            +
                            +
                            + +
                            + + +
                            +
                            + + + diff --git a/src/usr/local/www/load_balancer_pool_edit.php b/src/usr/local/www/load_balancer_pool_edit.php new file mode 100644 index 0000000..cf5c72f --- /dev/null +++ b/src/usr/local/www/load_balancer_pool_edit.php @@ -0,0 +1,368 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-loadbalancer-pool-edit +##|*NAME=Load Balancer: Pool: Edit page +##|*DESCR=Allow access to the 'Load Balancer: Pool: Edit' page. +##|*MATCH=load_balancer_pool_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter.inc"); +require_once("util.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/load_balancer_pool.php'); +} + +if (!is_array($config['load_balancer']['lbpool'])) { + $config['load_balancer']['lbpool'] = array(); +} +$a_pool = &$config['load_balancer']['lbpool']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_pool[$id]) { + $pconfig['name'] = $a_pool[$id]['name']; + $pconfig['mode'] = $a_pool[$id]['mode']; + $pconfig['descr'] = $a_pool[$id]['descr']; + $pconfig['port'] = $a_pool[$id]['port']; + $pconfig['retry'] = $a_pool[$id]['retry']; + $pconfig['servers'] = &$a_pool[$id]['servers']; + $pconfig['serversdisabled'] = &$a_pool[$id]['serversdisabled']; + $pconfig['monitor'] = $a_pool[$id]['monitor']; +} + +$changedesc = gettext("Load Balancer: Pool:") . " "; +$changecount = 0; + +if ($_POST) { + $changecount++; + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "name mode port monitor servers"); + $reqdfieldsn = array(gettext("Name"), gettext("Mode"), gettext("Port"), gettext("Monitor"), gettext("Server List")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + /* Ensure that our pool names are unique */ + for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) { + if (($_POST['name'] == $config['load_balancer']['lbpool'][$i]['name']) && ($i != $id)) { + $input_errors[] = gettext("This pool name has already been used. Pool names must be unique."); + } + } + + if (preg_match('/[ \/]/', $_POST['name'])) { + $input_errors[] = gettext("You cannot use spaces or slashes in the 'name' field."); + } + + if (strlen($_POST['name']) > 16) { + $input_errors[] = gettext("The 'name' field must be 16 characters or less."); + } + + if (in_array($_POST['name'], $reserved_table_names)) { + $input_errors[] = sprintf(gettext("The name '%s' is a reserved word and cannot be used."), $_POST['name']); + } + + if (is_alias($_POST['name'])) { + $input_errors[] = sprintf(gettext("Sorry, an alias is already named %s."), $_POST['name']); + } + + if (!is_portoralias($_POST['port'])) { + $input_errors[] = gettext("The port must be an integer between 1 and 65535, or a port alias."); + } + + // May as well use is_port as we want a positive integer and such. + if (!empty($_POST['retry']) && !is_port($_POST['retry'])) { + $input_errors[] = gettext("The retry value must be an integer between 1 and 65535."); + } + + if (is_array($_POST['servers'])) { + foreach ($pconfig['servers'] as $svrent) { + if (!is_ipaddr($svrent) && !is_subnetv4($svrent)) { + $input_errors[] = sprintf(gettext("%s is not a valid IP address or IPv4 subnet (in \"enabled\" list)."), $svrent); + } else if (is_subnetv4($svrent) && subnet_size($svrent) > 64) { + $input_errors[] = sprintf(gettext("%s is a subnet containing more than 64 IP addresses (in \"enabled\" list)."), $svrent); + } + } + } + if (is_array($_POST['serversdisabled'])) { + foreach ($pconfig['serversdisabled'] as $svrent) { + if (!is_ipaddr($svrent) && !is_subnetv4($svrent)) { + $input_errors[] = sprintf(gettext("%s is not a valid IP address or IPv4 subnet (in \"disabled\" list)."), $svrent); + } else if (is_subnetv4($svrent) && subnet_size($svrent) > 64) { + $input_errors[] = sprintf(gettext("%s is a subnet containing more than 64 IP addresses (in \"disabled\" list)."), $svrent); + } + } + } + $m = array(); + for ($i = 0; isset($config['load_balancer']['monitor_type'][$i]); $i++) { + $m[$config['load_balancer']['monitor_type'][$i]['name']] = $config['load_balancer']['monitor_type'][$i]; + } + + if (!isset($m[$_POST['monitor']])) { + $input_errors[] = gettext("Invalid monitor chosen."); + } + + if (!$input_errors) { + $poolent = array(); + if (isset($id) && $a_pool[$id]) { + $poolent = $a_pool[$id]; + } + if ($poolent['name'] != "") { + $changedesc .= sprintf(gettext(" modified '%s' pool:"), $poolent['name']); + } + + update_if_changed("name", $poolent['name'], $_POST['name']); + update_if_changed("mode", $poolent['mode'], $_POST['mode']); + update_if_changed("description", $poolent['descr'], $_POST['descr']); + update_if_changed("port", $poolent['port'], $_POST['port']); + update_if_changed("retry", $poolent['retry'], $_POST['retry']); + update_if_changed("servers", $poolent['servers'], $_POST['servers']); + update_if_changed("serversdisabled", $poolent['serversdisabled'], $_POST['serversdisabled']); + update_if_changed("monitor", $poolent['monitor'], $_POST['monitor']); + + if (isset($id) && $a_pool[$id]) { + /* modify all virtual servers with this name */ + for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) { + if ($config['load_balancer']['virtual_server'][$i]['lbpool'] == $a_pool[$id]['name']) { + $config['load_balancer']['virtual_server'][$i]['lbpool'] = $poolent['name']; + } + } + $a_pool[$id] = $poolent; + } else { + $a_pool[] = $poolent; + } + + if ($changecount > 0) { + /* Mark pool dirty */ + mark_subsystem_dirty('loadbalancer'); + write_config($changedesc); + } + + header("Location: load_balancer_pool.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Pool"), gettext("Edit")); +$shortcut_section = "relayd"; + +include("head.inc"); + +?> + + + + + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + size="16" maxlength="16" /> +
                            + +
                            + size="64" /> +
                            + size="16" maxlength="16" />
                            +
                            +
                            + +
                            + +
                            + size="16" maxlength="16" />
                            +
                            +
                             
                            + + + + : + +
                            + + " onclick="AddServerToPool(document.iform); enforceFailover(); checkPoolControls();" />
                            +
                             
                            + + + + + + + + + + +
                            + +
                            + + " onclick="RemoveServerFromPool(document.iform, 'serversdisabled[]');" /> +
                            +
                            + +
                            + +
                            + + " onclick="RemoveServerFromPool(document.iform, 'servers[]');" /> +
                            +
                              +
                            + " onclick="AllServers('serversSelect', true); AllServers('serversDisabledSelect', true);" /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/load_balancer_setting.php b/src/usr/local/www/load_balancer_setting.php new file mode 100644 index 0000000..d82f341 --- /dev/null +++ b/src/usr/local/www/load_balancer_setting.php @@ -0,0 +1,173 @@ +. + Copyright (C) 2012 Pierre POMES . + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-services-loadbalancer-setting +##|*NAME=Services: Load Balancer: setting page +##|*DESCR=Allow access to the 'Settings: Load Balancer: Settings' page. +##|*MATCH=load_balancer_setting.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("util.inc"); + +if (!is_array($config['load_balancer']['setting'])) { + $config['load_balancer']['setting'] = array(); +} +$lbsetting = &$config['load_balancer']['setting']; + +if ($_POST) { + + if ($_POST['apply']) { + $retval = 0; + $retval |= filter_configure(); + $retval |= relayd_configure(); + + $savemsg = get_std_save_message($retval); + clear_subsystem_dirty('loadbalancer'); + } else { + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if ($_POST['timeout'] && !is_numeric($_POST['timeout'])) { + $input_errors[] = gettext("Timeout must be a numeric value"); + } + + if ($_POST['interval'] && !is_numeric($_POST['interval'])) { + $input_errors[] = gettext("Interval must be a numeric value"); + } + + if ($_POST['prefork']) { + if (!is_numeric($_POST['prefork'])) { + $input_errors[] = gettext("Prefork must be a numeric value"); + } else { + if (($_POST['prefork'] <= 0) || ($_POST['prefork'] > 32)) { + $input_errors[] = gettext("Prefork value must be between 1 and 32"); + } + } + } + + /* update config if user entry is valid */ + if (!$input_errors) { + $lbsetting['timeout'] = $_POST['timeout']; + $lbsetting['interval'] = $_POST['interval']; + $lbsetting['prefork'] = $_POST['prefork']; + + write_config(); + mark_subsystem_dirty('loadbalancer'); + } + } +} + +$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Settings")); +$shortcut_section = "relayd"; + +include("head.inc"); + +?> + + +
                            + + +
                            +" . gettext("You must apply the changes in order for them to take effect."));?>
                            + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + +
                            + " class="formfld unknown" /> +
                            + +
                            + " class="formfld unknown" /> +
                            + +
                            + " class="formfld unknown" /> +
                            + +
                              + " /> +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/load_balancer_virtual_server.php b/src/usr/local/www/load_balancer_virtual_server.php new file mode 100644 index 0000000..dec55f1 --- /dev/null +++ b/src/usr/local/www/load_balancer_virtual_server.php @@ -0,0 +1,152 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-services-loadbalancer-virtualservers +##|*NAME=Services: Load Balancer: Virtual Servers page +##|*DESCR=Allow access to the 'Services: Load Balancer: Virtual Servers' page. +##|*MATCH=load_balancer_virtual_server.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("vslb.inc"); + +if (!is_array($config['load_balancer']['virtual_server'])) { + $config['load_balancer']['virtual_server'] = array(); +} +$a_vs = &$config['load_balancer']['virtual_server']; + +if ($_POST) { + $pconfig = $_POST; + + if ($_POST['apply']) { + $retval = 0; + $retval |= filter_configure(); + $retval |= relayd_configure(); + $savemsg = get_std_save_message($retval); + /* Wipe out old relayd anchors no longer in use. */ + cleanup_lb_marked(); + clear_subsystem_dirty('loadbalancer'); + } +} + +if ($_GET['act'] == "del") { + if (array_key_exists($_GET['id'], $a_vs)) { + + if (!$input_errors) { + cleanup_lb_mark_anchor($a_vs[$_GET['id']]['name']); + unset($a_vs[$_GET['id']]); + write_config(); + mark_subsystem_dirty('loadbalancer'); + header("Location: load_balancer_virtual_server.php"); + exit; + } + } +} + +/* Index lbpool array for easy hyperlinking */ +$poodex = array(); +for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) { + $poodex[$config['load_balancer']['lbpool'][$i]['name']] = $i; +} +for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) { + if ($a_vs[$i]) { + $a_vs[$i]['poolname'] = "" . htmlspecialchars($a_vs[$i]['poolname']) . ""; + if ($a_vs[$i]['sitedown'] != '') { + $a_vs[$i]['sitedown'] = "" . htmlspecialchars($a_vs[$i]['sitedown']) . ""; + } else { + $a_vs[$i]['sitedown'] = 'none'; + } + } +} + +$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Virtual Servers")); +$shortcut_section = "relayd-virtualservers"; + +include("head.inc"); + +?> + + +
                            + + +
                            +" . gettext("You must apply the changes in order for them to take effect."));?>
                            + + + + + + +
                            + +
                            +
                            +edit_uri('load_balancer_virtual_server_edit.php'); + $t->my_uri('load_balancer_virtual_server.php'); + $t->add_column(gettext('Name'), 'name', 10); + $t->add_column(gettext('Protocol'), 'relay_protocol', 10); + $t->add_column(gettext('IP Address'), 'ipaddr', 15); + $t->add_column(gettext('Port'), 'port', 10); + $t->add_column(gettext('Pool'), 'poolname', 15); + $t->add_column(gettext('Fall Back Pool'), 'sitedown', 15); + $t->add_column(gettext('Description'), 'descr', 30); + $t->add_button('edit'); + $t->add_button('dup'); + $t->add_button('del'); + $t->add_content_array($a_vs); + $t->display(); +?> +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/load_balancer_virtual_server_edit.php b/src/usr/local/www/load_balancer_virtual_server_edit.php new file mode 100644 index 0000000..39bc6c9 --- /dev/null +++ b/src/usr/local/www/load_balancer_virtual_server_edit.php @@ -0,0 +1,315 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-loadbalancer-virtualserver-edit +##|*NAME=Load Balancer: Virtual Server: Edit page +##|*DESCR=Allow access to the 'Load Balancer: Virtual Server: Edit' page. +##|*MATCH=load_balancer_virtual_server_edit.php* +##|-PRIV + +require("guiconfig.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/load_balancer_virtual_server.php'); +} + +if (!is_array($config['load_balancer']['virtual_server'])) { + $config['load_balancer']['virtual_server'] = array(); +} +$a_vs = &$config['load_balancer']['virtual_server']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_vs[$id]) { + $pconfig = $a_vs[$id]; +} else { + // Sane defaults + $pconfig['mode'] = 'redirect_mode'; +} + +$changedesc = gettext("Load Balancer: Virtual Server:") . " "; +$changecount = 0; + +if ($_POST) { + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + switch ($pconfig['mode']) { + case "redirect_mode": { + $reqdfields = explode(" ", "ipaddr name mode"); + $reqdfieldsn = array(gettext("IP Address"), gettext("Name"), gettext("Mode")); + break; + } + case "relay_mode": { + $reqdfields = explode(" ", "ipaddr name mode relay_protocol"); + $reqdfieldsn = array(gettext("IP Address"), gettext("Name"), gettext("Mode"), gettext("Relay Protocol")); + break; + } + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) { + if (($_POST['name'] == $config['load_balancer']['virtual_server'][$i]['name']) && ($i != $id)) { + $input_errors[] = gettext("This virtual server name has already been used. Virtual server names must be unique."); + } + } + + if (preg_match('/[ \/]/', $_POST['name'])) { + $input_errors[] = gettext("You cannot use spaces or slashes in the 'name' field."); + } + + if (strlen($_POST['name']) > 32) { + $input_errors[] = gettext("The 'name' field must be 32 characters or less."); + } + + if ($_POST['port'] != "" && !is_portoralias($_POST['port'])) { + $input_errors[] = gettext("The port must be an integer between 1 and 65535, a port alias, or left blank."); + } + + if (!is_ipaddroralias($_POST['ipaddr']) && !is_subnetv4($_POST['ipaddr'])) { + $input_errors[] = sprintf(gettext("%s is not a valid IP address, IPv4 subnet, or alias."), $_POST['ipaddr']); + } else if (is_subnetv4($_POST['ipaddr']) && subnet_size($_POST['ipaddr']) > 64) { + $input_errors[] = sprintf(gettext("%s is a subnet containing more than 64 IP addresses."), $_POST['ipaddr']); + } + + if ((strtolower($_POST['relay_protocol']) == "dns") && !empty($_POST['sitedown'])) { + $input_errors[] = gettext("You cannot select a Fall Back Pool when using the DNS relay protocol."); + } + + if (!$input_errors) { + $vsent = array(); + if (isset($id) && $a_vs[$id]) { + $vsent = $a_vs[$id]; + } + if ($vsent['name'] != "") { + $changedesc .= " " . sprintf(gettext("modified '%s' vs:"), $vsent['name']); + } else { + $changedesc .= " " . sprintf(gettext("created '%s' vs:"), $_POST['name']); + } + + update_if_changed("name", $vsent['name'], $_POST['name']); + update_if_changed("descr", $vsent['descr'], $_POST['descr']); + update_if_changed("poolname", $vsent['poolname'], $_POST['poolname']); + update_if_changed("port", $vsent['port'], $_POST['port']); + update_if_changed("sitedown", $vsent['sitedown'], $_POST['sitedown']); + update_if_changed("ipaddr", $vsent['ipaddr'], $_POST['ipaddr']); + update_if_changed("mode", $vsent['mode'], $_POST['mode']); + update_if_changed("relay protocol", $vsent['relay_protocol'], $_POST['relay_protocol']); + + if ($_POST['sitedown'] == "") { + unset($vsent['sitedown']); + } + + if (isset($id) && $a_vs[$id]) { + if ($a_vs[$id]['name'] != $_POST['name']) { + /* Because the VS name changed, mark the old name for cleanup. */ + cleanup_lb_mark_anchor($a_vs[$id]['name']); + } + $a_vs[$id] = $vsent; + } else { + $a_vs[] = $vsent; + } + + if ($changecount > 0) { + /* Mark virtual server dirty */ + mark_subsystem_dirty('loadbalancer'); + write_config($changedesc); + } + + header("Location: load_balancer_virtual_server.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Virtual Server"), gettext("Edit")); +$shortcut_section = "relayd-virtualservers"; + +include("head.inc"); + +?> + + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + size="32" maxlength="32" /> +
                            + size="64" /> +
                            + size="39" maxlength="39" /> +
                            +
                            + +
                            + size="16" maxlength="16" /> +
                            +
                            +
                            + +
                            + + + + + +
                            + + + + +
                            +
                            + +
                            + +
                            +
                              + " /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            +
                            + + + + diff --git a/src/usr/local/www/logobig.jpg b/src/usr/local/www/logobig.jpg new file mode 100755 index 0000000..2ef196d Binary files /dev/null and b/src/usr/local/www/logobig.jpg differ diff --git a/src/usr/local/www/niftycssCode.css b/src/usr/local/www/niftycssCode.css new file mode 100755 index 0000000..ec4af80 --- /dev/null +++ b/src/usr/local/www/niftycssCode.css @@ -0,0 +1,21 @@ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 0px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} \ No newline at end of file diff --git a/src/usr/local/www/niftycssprintCode.css b/src/usr/local/www/niftycssprintCode.css new file mode 100755 index 0000000..e856b5b --- /dev/null +++ b/src/usr/local/www/niftycssprintCode.css @@ -0,0 +1 @@ +.rtop,.rbottom,.artop,.arbottom{display: none} diff --git a/src/usr/local/www/pkg.php b/src/usr/local/www/pkg.php new file mode 100755 index 0000000..c56ece5 --- /dev/null +++ b/src/usr/local/www/pkg.php @@ -0,0 +1,582 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: pkgs +*/ + +##|+PRIV +##|*IDENT=page-package-settings +##|*NAME=Package: Settings page +##|*DESCR=Allow access to the 'Package: Settings' page. +##|*MATCH=pkg.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("pkg-utils.inc"); + +function gentitle_pkg($pgname) { + global $config; + return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pgname; +} + +function domTT_title($title_msg) { + print "onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\" onmouseover=\"domTT_activate(this, event, 'content', '".gettext($title_msg)."', 'trail', true, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle');\""; +} + +$xml = $_REQUEST['xml']; + +if ($xml == "") { + print_info_box_np(gettext("ERROR: No package defined.")); + exit; +} else { + if (file_exists("/usr/local/pkg/" . $xml)) { + $pkg = parse_xml_config_pkg("/usr/local/pkg/" . $xml, "packagegui"); + } else { + echo "File not found " . htmlspecialchars($xml); + exit; + } +} + +if ($pkg['donotsave'] <> "") { + header("Location: pkg_edit.php?xml=" . $xml); + exit; +} + +if ($pkg['include_file'] != "") { + require_once($pkg['include_file']); +} + +$package_name = $pkg['menu'][0]['name']; +$section = $pkg['menu'][0]['section']; +$config_path = $pkg['configpath']; +$title = $pkg['title']; + +if ($_REQUEST['startdisplayingat']) { + $startdisplayingat = $_REQUEST['startdisplayingat']; +} + +if ($_REQUEST['display_maximum_rows']) { + if ($_REQUEST['display_maximum_rows']) { + $display_maximum_rows = $_REQUEST['display_maximum_rows']; + } +} + +$evaledvar = $config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']; + +if ($_GET['act'] == "update") { + + if (is_array($config['installedpackages'][$pkg['name']]) && $pkg['name'] != "" && $_REQUEST['ids'] !="") { + #get current values + $current_values=$config['installedpackages'][$pkg['name']]['config']; + #get updated ids + parse_str($_REQUEST['ids'], $update_list); + #sort ids to know what to change + #useful to do not lose data when using sorting and paging + $sort_list=$update_list['ids']; + sort($sort_list); + #apply updates + foreach ($update_list['ids'] as $key=> $value) { + $config['installedpackages'][$pkg['name']]['config'][$sort_list[$key]]=$current_values[$update_list['ids'][$key]]; + } + #save current config + write_config(); + #sync package + eval ("{$pkg['custom_php_resync_config_command']}"); + } + #function called via jquery, no need to continue after save changes. + exit; +} +if ($_GET['act'] == "del") { + // loop through our fieldnames and automatically setup the fieldnames + // in the environment. ie: a fieldname of username with a value of + // testuser would automatically eval $username = "testuser"; + foreach ($evaledvar as $ip) { + if ($pkg['adddeleteeditpagefields']['columnitem']) { + foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) { + ${xml_safe_fieldname($column['fielddescr'])} = $ip[xml_safe_fieldname($column['fieldname'])]; + } + } + } + + $a_pkg = &$config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']; + + if ($a_pkg[$_GET['id']]) { + unset($a_pkg[$_GET['id']]); + write_config(); + if ($pkg['custom_delete_php_command'] <> "") { + if ($pkg['custom_php_command_before_form'] <> "") { + eval($pkg['custom_php_command_before_form']); + } + eval($pkg['custom_delete_php_command']); + } + header("Location: pkg.php?xml=" . $xml); + exit; + } +} + +ob_start(); + +$iflist = get_configured_interface_with_descr(false, true); +$evaledvar = $config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']; + +if ($pkg['custom_php_global_functions'] <> "") { + eval($pkg['custom_php_global_functions']); +} + +if ($pkg['custom_php_command_before_form'] <> "") { + eval($pkg['custom_php_command_before_form']); +} + +$pgtitle = array($title); +include("head.inc"); + +?> + + + + + + + + +
                            +' /> + "") $savemsg = htmlspecialchars($_GET['savemsg']); ?> +
                            + + + "") { + $tab_array = array(); + foreach ($pkg['tabs']['tab'] as $tab) { + if ($tab['tab_level']) { + $tab_level = $tab['tab_level']; + } else { + $tab_level = 1; + } + if (isset($tab['active'])) { + $active = true; + } else { + $active = false; + } + if (isset($tab['no_drop_down'])) { + $no_drop_down = true; + } + $urltmp = ""; + if ($tab['url'] <> "") { + $urltmp = $tab['url']; + } + if ($tab['xml'] <> "") { + $urltmp = "pkg_edit.php?xml=" . $tab['xml']; + } + + $addresswithport = getenv("HTTP_HOST"); + $colonpos = strpos($addresswithport, ":"); + if ($colonpos !== False) { + //my url is actually just the IP address of the pfsense box + $myurl = substr($addresswithport, 0, $colonpos); + } else { + $myurl = $addresswithport; + } + // eval url so that above $myurl item can be processed if need be. + $url = str_replace('$myurl', $myurl, $urltmp); + + $tab_array[$tab_level][] = array( + $tab['text'], + $active, + $url + ); + } + + ksort($tab_array); + foreach ($tab_array as $tab) { + echo ''; + } + } +?> + +
                            '; + display_top_tabs($tab, $no_drop_down); + echo '
                            + + + +
                            + + "") { + foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) { + $colspan++; + } + } + if ($pkg['fields']['field']) { + // First find the sorting type field if it exists + foreach ($pkg['fields']['field'] as $field) { + if ($field['type'] == "sorting") { + if (isset($field['include_filtering_inputbox'])) { + $include_filtering_inputbox = true; + } + if ($display_maximum_rows < 1) { + if ($field['display_maximum_rows']) { + $display_maximum_rows = $field['display_maximum_rows']; + } + } + echo ""; + echo ""; + } + } + } +?> + +"; + } + $cols = 0; + if ($pkg['adddeleteeditpagefields']['columnitem'] <> "") { + foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) { + echo ""; + $cols++; + } + } +?> + + "") { + foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) { + $fieldname = $ip[xml_safe_fieldname($column['fieldname'])]; + if ($column['fieldname'] == $filter_fieldname) { + if ($filter_regex) { + //echo "$filter_regex - $fieldname

                            "; + preg_match($filter_regex, $fieldname, $filter_matches); + break; + } + } + } + } + if (!$filter_matches) { + $i++; + continue; + } + } + if ($pkg['adddeleteeditpagefields']['movable']) { + echo "

                            \n"; + } else { + echo "\n"; + } + if ($pkg['adddeleteeditpagefields']['columnitem'] <> "") { + foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) { + if ($column['fieldname'] == "description") { + $class = "listbg"; + } else { + $class = "listlr"; + } +?> + + + +\n"; // Pairs with an echo tr some way above + // Handle pagination and display_maximum_rows + if ($display_maximum_rows) { + if ($pagination_counter == ($display_maximum_rows-1) or + $i == (count($evaledvar)-1)) { + $colcount = count($pkg['adddeleteeditpagefields']['columnitem']); + $final_footer = ""; + $final_footer .= ""; + $i = count($evaledvar); + break; + } + } + $i++; + $pagination_counter++; + } // foreach evaledvar + } // if evaledvar +?> + + + + + + + + + + +
                            "; + echo "Filter by: "; + $isfirst = true; + for ($char = 65; $char < 91; $char++) { + if (!$isfirst) { + echo " | "; + } + echo "" . chr($char) . ""; + $isfirst = false; + } + echo "
                            "; + if ($field['sortablefields']) { + echo "Filter field: "; + } + if ($include_filtering_inputbox) { + echo "  Filter text: "; + } + echo "
                             
                            "; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
                            Displaying page $page of $totalpagesRows per page:
                            "; + echo "
                            " . $column['fielddescr'] . "
                            + + + + + + + + + +
                            alt="edit" />')"> alt="delete" />
                            +
                            "; + $final_footer .= ""; + $final_footer .= "
                            "; + $startingat = $startdisplayingat - $display_maximum_rows; + if ($startingat > -1) { + $final_footer .= ""; + } else if ($startdisplayingat > 1) { + $final_footer .= ""; + } + $final_footer .= "<< Previous page"; + if ($tmppp + $display_maximum_rows > count($evaledvar)) { + $endingrecord = count($evaledvar); + } else { + $endingrecord = $tmppp + $display_maximum_rows; + } + $final_footer .= ""; + $tmppp++; + $final_footer .= "Displaying {$tmppp} - {$endingrecord} / " . count($evaledvar) . " records"; + $final_footer .= " "; + if (($i+1) < count($evaledvar)) { + $final_footer .= ""; + } + $final_footer .= "Next page >>"; + $final_footer .= "
                            + + + + + + + + +
                            alt="add" /> alt="info" />
                            +
                            +
                            + +
                            + + +"; + echo ""; +?> + + + diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php new file mode 100644 index 0000000..0b01a28 --- /dev/null +++ b/src/usr/local/www/pkg_edit.php @@ -0,0 +1,1267 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/ifconfig + pfSense_MODULE: pkgs +*/ + +##|+PRIV +##|*IDENT=page-package-edit +##|*NAME=Package: Edit page +##|*DESCR=Allow access to the 'Package: Edit' page. +##|*MATCH=pkg_edit.php* +##|-PRIV + +ini_set('max_execution_time', '0'); + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("pkg-utils.inc"); + +/* dummy stubs needed by some code that was MFC'd */ +function pfSenseHeader($location) { + header("Location: " . $location); +} + +function gentitle_pkg($pgname) { + global $pfSense_config; + return $pfSense_config['system']['hostname'] . "." . $pfSense_config['system']['domain'] . " - " . $pgname; +} + +function domTT_title($title_msg) { + if (!empty($title_msg)) { + $title_msg = preg_replace("/\s+/", " ", $title_msg); + $title_msg = preg_replace("/'/", "\'", $title_msg); + return "onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\" onmouseover=\"domTT_activate(this, event, 'content', '{$title_msg}', 'trail', true, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'delay', 300, 'styleClass', 'niceTitle');\""; + } +} + +$xml = htmlspecialchars($_GET['xml']); +if ($_POST['xml']) { + $xml = htmlspecialchars($_POST['xml']); +} + +$xml_fullpath = realpath('/usr/local/pkg/' . $xml); + +if ($xml == "" || $xml_fullpath === false || + substr($xml_fullpath, 0, strlen('/usr/local/pkg/')) != '/usr/local/pkg/') { + print_info_box_np(gettext("ERROR: No valid package defined.")); + die; +} else { + $pkg = parse_xml_config_pkg($xml_fullpath, "packagegui"); +} + +if ($pkg['include_file'] <> "") { + require_once($pkg['include_file']); +} + +if (!isset($pkg['adddeleteeditpagefields'])) { + $only_edit = true; +} else { + $only_edit = false; +} + +$package_name = $pkg['menu'][0]['name']; +$section = $pkg['menu'][0]['section']; +$config_path = $pkg['configpath']; +$name = $pkg['name']; +$title = $pkg['title']; +$pgtitle = $title; + +$id = $_GET['id']; +if (isset($_POST['id'])) { + $id = htmlspecialchars($_POST['id']); +} + +// Not posting? Then user is editing a record. There must be a valid id +// when editing a record. +if (!$id && !$_POST) { + $id = "0"; +} + +if (!is_numeric($id)) { + header("Location: /"); + exit; +} + +if ($pkg['custom_php_global_functions'] <> "") { + eval($pkg['custom_php_global_functions']); +} + +// grab the installedpackages->package_name section. +if ($config['installedpackages'] && !is_array($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'])) { + $config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'] = array(); +} + +// If the first entry in the array is an empty tag, kill it. +if ($config['installedpackages'] && (count($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']) > 0) + && ($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'][0] == "")) { + array_shift($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']); +} + +$a_pkg = &$config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']; + +if ($_GET['savemsg'] <> "") { + $savemsg = htmlspecialchars($_GET['savemsg']); +} + +if ($pkg['custom_php_command_before_form'] <> "") { + eval($pkg['custom_php_command_before_form']); +} + +if ($_POST) { + $firstfield = ""; + $rows = 0; + + $input_errors = array(); + $reqfields = array(); + $reqfieldsn = array(); + foreach ($pkg['fields']['field'] as $field) { + if (($field['type'] == 'input') && isset($field['required'])) { + if ($field['fieldname']) { + $reqfields[] = $field['fieldname']; + } + if ($field['fielddescr']) { + $reqfieldsn[] = $field['fielddescr']; + } + } + } + do_input_validation($_POST, $reqfields, $reqfieldsn, $input_errors); + + if ($pkg['custom_php_validation_command']) { + eval($pkg['custom_php_validation_command']); + } + + if ($_POST['act'] == "del") { + if ($pkg['custom_delete_php_command']) { + if ($pkg['custom_php_command_before_form'] <> "") { + eval($pkg['custom_php_command_before_form']); + } + eval($pkg['custom_delete_php_command']); + } + write_config($pkg['delete_string']); + // resync the configuration file code if defined. + if ($pkg['custom_php_resync_config_command'] <> "") { + if ($pkg['custom_php_command_before_form'] <> "") { + eval($pkg['custom_php_command_before_form']); + } + eval($pkg['custom_php_resync_config_command']); + } + } else { + if (!$input_errors && $pkg['custom_add_php_command']) { + if ($pkg['donotsave'] <> "" or $pkg['preoutput'] <> "") { + ?> + + + + +"; + } + eval($pkg['custom_add_php_command']); + if ($pkg['preoutput']) { + echo ""; + } + } + } + + // donotsave is enabled. lets simply exit. + if (empty($pkg['donotsave'])) { + + // store values in xml configuration file. + if (!$input_errors) { + $pkgarr = array(); + foreach ($pkg['fields']['field'] as $fields) { + switch ($fields['type']) { + case "rowhelper": + // save rowhelper items. + #$rowhelpername=($fields['fieldname'] ? $fields['fieldname'] : "row"); + $rowhelpername="row"; + foreach ($fields['rowhelper']['rowhelperfield'] as $rowhelperfield) { + foreach ($_POST as $key => $value) { + if (preg_match("/^{$rowhelperfield['fieldname']}(\d+)$/", $key, $matches)) { + $pkgarr[$rowhelpername][$matches[1]][$rowhelperfield['fieldname']] = $value; + } + } + } + break; + default: + $fieldname = $fields['fieldname']; + if ($fieldname == "interface_array") { + $fieldvalue = $_POST[$fieldname]; + } elseif (is_array($_POST[$fieldname])) { + $fieldvalue = implode(',', $_POST[$fieldname]); + } else { + $fieldvalue = trim($_POST[$fieldname]); + if ($fields['encoding'] == 'base64') { + $fieldvalue = base64_encode($fieldvalue); + } + } + if ($fieldname) { + $pkgarr[$fieldname] = $fieldvalue; + } + } + } + + if (isset($id) && $a_pkg[$id]) { + $a_pkg[$id] = $pkgarr; + } else { + $a_pkg[] = $pkgarr; + } + + write_config($pkg['addedit_string']); + // late running code + if ($pkg['custom_add_php_command_late'] <> "") { + eval($pkg['custom_add_php_command_late']); + } + + if (isset($pkg['filter_rules_needed'])) { + filter_configure(); + } + + // resync the configuration file code if defined. + if ($pkg['custom_php_resync_config_command'] <> "") { + eval($pkg['custom_php_resync_config_command']); + } + + parse_package_templates(); + + /* if start_command is defined, restart w/ this */ + if ($pkg['start_command'] <> "") { + exec($pkg['start_command'] . ">/dev/null 2&>1"); + } + + /* if restart_command is defined, restart w/ this */ + if ($pkg['restart_command'] <> "") { + exec($pkg['restart_command'] . ">/dev/null 2&>1"); + } + + if ($pkg['aftersaveredirect'] <> "") { + pfSenseHeader($pkg['aftersaveredirect']); + } elseif (!$pkg['adddeleteeditpagefields']) { + pfSenseHeader("pkg_edit.php?xml={$xml}&id=0"); + } elseif (!$pkg['preoutput']) { + pfSenseHeader("pkg.php?xml=" . $xml); + } + exit; + } else { + $get_from_post = true; + } + } elseif (!$input_errors) { + exit; + } +} + +if ($pkg['title'] <> "") { + $edit = ($only_edit ? '' : ": " . gettext("Edit")); + $title = $pkg['title'] . $edit; +} else { + $title = gettext("Package Editor"); +} + +$pgtitle = $title; + +if ($pkg['custom_php_after_head_command']) { + $closehead = false; + include("head.inc"); + eval($pkg['custom_php_after_head_command']); + echo "\n"; +} else { + include("head.inc"); +} + +?> + + + + + + + + + "") { ?> + + + + + + + + + +
                            + + + + "") { + $tab_array = array(); + foreach ($pkg['tabs']['tab'] as $tab) { + if ($tab['tab_level']) { + $tab_level = $tab['tab_level']; + } else { + $tab_level = 1; + } + if (isset($tab['active'])) { + $active = true; + } else { + $active = false; + } + if (isset($tab['no_drop_down'])) { + $no_drop_down = true; + } + $urltmp = ""; + if ($tab['url'] <> "") { + $urltmp = $tab['url']; + } + if ($tab['xml'] <> "") { + $urltmp = "pkg_edit.php?xml=" . $tab['xml']; + } + + $addresswithport = getenv("HTTP_HOST"); + $colonpos = strpos($addresswithport, ":"); + if ($colonpos !== False) { + //my url is actually just the IP address of the pfsense box + $myurl = substr($addresswithport, 0, $colonpos); + } else { + $myurl = $addresswithport; + } + // eval url so that above $myurl item can be processed if need be. + $url = str_replace('$myurl', $myurl, $urltmp); + + $tab_array[$tab_level][] = array( + $tab['text'], + $active, + $url + ); + } + + ksort($tab_array); + foreach ($tab_array as $tabid => $tab) { + echo ''; + } +} + +?> + +
                            '; + display_top_tabs($tab, $no_drop_down, $tabid); + echo '
                            + "") { + $savevalue = $pkg['savetext']; + } + /* If a package's XML has configured, then setup + * the table rows for the fields that have set. + * These fields will be placed below other fields in a separate area titled 'Advanced Features'. + * These advanced fields are not normally configured and generally left to default to 'default settings'. + */ + + if ($pkg['advanced_options'] == "enabled") { + $adv_filed_count = 0; + $advanced = ""; + $advanced .= "\n"; + } + foreach ($pkg['fields']['field'] as $pkga) { + if ($pkga['type'] == "sorting") { + continue; + } + + if ($pkga['type'] == "listtopic") { + $input = ""; + $input .= "\n"; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $advanced .= $input; + $adv_filed_count++; + } else { + echo $input; + } + continue; + } + + if ($pkga['combinefields'] == "begin") { + $input=""; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $advanced .= $input; + } else { + echo $input; + } + } + + $size = ""; + $colspan=""; + if (isset($pkga['dontdisplayname'])) { + $input=""; + // If this is in a set of combined fields and; + // - it is a "begin" (case already handled above) or + // - usecolspan2 is in effect (so we want to spread all the combined fields horizontally) + // then we do not want this "tr" to be inserted. + // Thus only insert the "tr" if the not (!) of the above condition. + if (!((isset($pkga['combinefields'])) && (($pkga['combinefields'] == "begin") || (isset($pkga['usecolspan2']))))) { + $input .= ""; + } + if (isset($pkga['usecolspan2'])) { + $colspan="colspan='2'"; + } else { + $input .= ""; + } + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $advanced .= $input; + $adv_filed_count++; + } else { + echo $input; + } + } else if (!isset($pkga['placeonbottom'])) { + unset($req); + if (isset($pkga['required'])) { + $req = 'req'; + } + $input=""; + // If this is in a set of combined fields and; + // - it is a "begin" (case already handled above) or + // - usecolspan2 is in effect (so we want to spread all the combined fields horizontally) + // then we do not want this "tr" to be inserted. + // Thus only insert the "tr" if the not (!) of the above condition. + if (!((isset($pkga['combinefields'])) && (($pkga['combinefields'] == "begin") || (isset($pkga['usecolspan2']))))) { + $input .= ""; + } + $input .= ""; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $advanced .= $input; + $adv_filed_count++; + } else { + echo $input; + } + } + if ($pkga['combinefields'] == "begin") { + $input=""; + } + } else { + $input = ""; + if ($pkga['usecolspan2']) { + $input .= "
                            "; + } + } + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $advanced .= "{$input}\n"; + } else { + echo "{$input}\n"; + } + #increment counter + $i++; + } + + #print advanced settings if any after reading all fields + if (isset($advanced) && $adv_filed_count > 0) { + echo $advanced; + } + + ?> + + + + + + + + +
                             
                            ". gettext("Advanced features") . "
                             
                            {$pkga['name']}
                             
                            "; + $input .= fixup_string($pkga['fielddescr']); + $input .= ""; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $advanced .= $input; + } else { + echo $input; + } + } + + $class=(isset($pkga['combinefields']) ? '' : 'class="vtable"'); + if (!isset($pkga['placeonbottom'])) { + $input=""; + } + // At the end of the combined fields we finish up the table that encloses the combined fields... + if ($pkga['combinefields'] == "end") { + $input .= "
                            "; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $advanced .= $input; + $adv_filed_count++; + } else { + echo $input; + } + } + + // if user is editing a record, load in the data. + $fieldname = $pkga['fieldname']; + if ($get_from_post) { + $value = $_POST[$fieldname]; + if (is_array($value)) { + $value = implode(',', $value); + } + } else { + if (isset($id) && $a_pkg[$id]) { + $value = $a_pkg[$id][$fieldname]; + } else { + $value = $pkga['default_value']; + } + } + switch ($pkga['type']) { + case "input": + $size = ($pkga['size'] ? " size='{$pkga['size']}' " : ""); + $input = "\n"; + $input .= "
                            " . fixup_string($pkga['description']) . "\n"; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $js_array[] = $pkga['fieldname']; + $advanced .= display_advanced_field($pkga['fieldname']).$input ."\n"; + } else { + echo $input; + } + break; + + case "password": + $size = ($pkga['size'] ? " size='{$pkga['size']}' " : ""); + $input = "\n"; + $input .= "
                            " . fixup_string($pkga['description']) . "\n"; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $js_array[] = $pkga['fieldname']; + $advanced .= display_advanced_field($pkga['fieldname']).$input ."\n"; + } else { + echo $input; + } + break; + + case "info": + $input = fixup_string($pkga['description']) . "\n"; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $js_array[] = $pkga['fieldname']; + $advanced .= display_advanced_field($pkga['fieldname']).$input ."\n"; + } else { + echo $input; + } + break; + + case "select": + $fieldname = $pkga['fieldname']; + if (isset($pkga['multiple'])) { + $multiple = 'multiple="multiple"'; + $items = explode(',', $value); + $fieldname .= "[]"; + } else { + $multiple = ''; + $items = array($value); + } + $size = ($pkga['size'] ? " size='{$pkga['size']}' " : ""); + $onchange = (isset($pkga['onchange']) ? "onchange=\"{$pkga['onchange']}\"" : ''); + $input = "\n
                            \n" . fixup_string($pkga['description']) . "\n"; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $js_array[] = $pkga['fieldname']; + $advanced .= display_advanced_field($pkga['fieldname']).$input; + $advanced .= "\n"; + } else { + echo $input; + } + break; + + case "select_source": + $fieldname = $pkga['fieldname']; + if (isset($pkga['multiple'])) { + $multiple = 'multiple="multiple"'; + $items = explode(',', $value); + $fieldname .= "[]"; + } else { + $multiple = ''; + $items = array($value); + } + $size = (isset($pkga['size']) ? "size=\"{$pkga['size']}\"" : ''); + $onchange = (isset($pkga['onchange']) ? "onchange=\"{$pkga['onchange']}\"" : ''); + $input = "\n
                            \n" . fixup_string($pkga['description']) . "\n"; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $advanced .= $input; + } else { + echo $input; + } + break; + + case "vpn_selection" : + $input = "\n"; + $input .= "
                            " . fixup_string($pkga['description']) . "\n"; + + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $js_array[] = $pkga['fieldname']; + $advanced .= display_advanced_field($pkga['fieldname']).$input; + $advanced .= "\n"; + } else { + echo $input; + } + break; + + case "checkbox": + $checkboxchecked =($value == "on" ? " checked=\"checked\"" : ""); + $onchange = (isset($pkga['onchange']) ? "onchange=\"{$pkga['onchange']}\"" : ''); + if (isset($pkga['enablefields']) || isset($pkga['checkenablefields'])) { + $onclick = ' onclick="javascript:enablechange();"'; + } + $input = "\n"; + $input .= "
                            " . fixup_string($pkga['description']) . "\n"; + + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $js_array[] = $pkga['fieldname']; + $advanced .= display_advanced_field($pkga['fieldname']).$input; + $advanced .= "\n"; + } else { + echo $input; + } + break; + + case "textarea": + if ($pkga['rows']) { + $rows = " rows='{$pkga['rows']}' "; + } + if ($pkga['cols']) { + $cols = " cols='{$pkga['cols']}' "; + } + if (($pkga['encoding'] == 'base64') && !$get_from_post && !empty($value)) { + $value = base64_decode($value); + } + $wrap =($pkga['wrap'] == "off" ? 'wrap="off" style="white-space:nowrap;"' : ''); + $input = "\n"; + $input .= "
                            " . fixup_string($pkga['description']) . "\n"; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $js_array[] = $pkga['fieldname']; + $advanced .= display_advanced_field($pkga['fieldname']).$input; + $advanced .= "\n"; + } else { + echo $input; + } + break; + + case "aliases": + // Use xml tag to filter type aliases + $size = ($pkga['size'] ? "size=\"{$pkga['size']}\"" : ''); + $fieldname = $pkga['fieldname']; + $a_aliases = &$config['aliases']['alias']; + $addrisfirst = 0; + $aliasesaddr = ""; + $value = "value='{$value}'"; + + if (isset($a_aliases)) { + if (!empty($pkga['typealiases'])) { + foreach ($a_aliases as $alias) { + if ($alias['type'] == $pkga['typealiases']) { + if ($addrisfirst == 1) { + $aliasesaddr .= ","; + } + $aliasesaddr .= "'" . $alias['name'] . "'"; + $addrisfirst = 1; + } + } + } else { + foreach ($a_aliases as $alias) { + if ($addrisfirst == 1) { + $aliasesaddr .= ","; + } + $aliasesaddr .= "'" . $alias['name'] . "'"; + $addrisfirst = 1; + } + } + } + + $input = "\n
                            "; + $input .= fixup_string($pkga['description']) . "\n"; + + $script = ""; + + echo $input; + echo $script; + break; + + case "interfaces_selection": + $ips = array(); + $interface_regex=(isset($pkga['hideinterfaceregex']) ? $pkga['hideinterfaceregex'] : "nointerfacestohide"); + if (is_array($config['interfaces'])) { + foreach ($config['interfaces'] as $iface_key=>$iface_value) { + if (isset($iface_value['enable']) && !preg_match("/$interface_regex/", $iface_key)) { + $iface_description=($iface_value['descr'] !="" ? strtoupper($iface_value['descr']) : strtoupper($iface_key)); + if (isset($pkga['showips'])) { + $iface_description .= " address"; + } + $ips[] = array('ip'=> $iface_key, 'description'=> $iface_description); + } + } + } + if (is_array($config['virtualip']) && isset($pkga['showvirtualips'])) { + foreach ($config['virtualip']['vip'] as $vip) { + if (!preg_match("/$interface_regex/", $vip['interface'])) { + $vip_description=($vip['descr'] !="" ? " ({$vip['descr']}) " : " "); + } + switch ($vip['mode']) { + case "ipalias": + case "carp": + $ips[] = array('ip' => $vip['subnet'], 'description' => "{$vip['subnet']} $vip_description"); + break; + case "proxyarp": + if ($vip['type'] == "network") { + $start = ip2long32(gen_subnet($vip['subnet'], $vip['subnet_bits'])); + $end = ip2long32(gen_subnet_max($vip['subnet'], $vip['subnet_bits'])); + $len = $end - $start; + for ($i = 0; $i <= $len; $i++) { + $ips[]= array('ip' => long2ip32($start+$i), 'description' => long2ip32($start+$i)." from {$vip['subnet']}/{$vip['subnet_bits']} {$vip_description}"); + } + } else { + $ips[]= array('ip' => $vip['subnet'], 'description' => "{$vip['subnet']} $vip_description"); + } + break; + } + } + } + sort($ips); + if (isset($pkga['showlistenall'])) { + array_unshift($ips, array('ip' => 'All', 'description' => 'Listen on All interfaces/ip addresses ')); + } + if (!preg_match("/$interface_regex/", "loopback")) { + $iface_description=(isset($pkga['showips']) ? "127.0.0.1 (loopback)" : "loopback"); + array_push($ips, array('ip' => 'lo0', 'description' => $iface_description)); + } + + #show interfaces array on gui + $size = ($pkga['size'] ? "size=\"{$pkga['size']}\"" : ''); + $multiple = ''; + $fieldname = $pkga['fieldname']; + if (isset($pkga['multiple'])) { + $fieldname .= '[]'; + $multiple = 'multiple="multiple"'; + } + $input = "\n
                            " . fixup_string($pkga['description']) . "\n"; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $advanced .= $input; + } else { + echo $input; + } + break; + + case "radio": + $input = ""; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $advanced .= $input; + } else { + echo $input; + } + break; + + case "button": + $input = "\n"; + if (isset($pkga['placeonbottom'])) { + $pkg_buttons .= $input; + } else { + echo $input ."\n
                            " . fixup_string($pkga['description']) . "\n"; + } + break; + + case "schedule_selection": + $input = "\n
                            \n" . fixup_string($pkga['description']) . "\n"; + if (isset($pkga['advancedfield']) && isset($adv_filed_count)) { + $js_array[] = $pkga['fieldname']; + $advanced .= display_advanced_field($pkga['fieldname']).$input; + $advanced .= "\n"; + } else { + echo $input; + } + break; + + case "rowhelper": + #$rowhelpername=($fields['fieldname'] ? $fields['fieldname'] : "row"); + $rowhelpername="row"; + ?> + + + '> + " . fixup_string($rowhelper['fielddescr']) . "\n"; + } + + $rowcounter = 0; + $trc = 0; + + //Use assigned $a_pkg or create an empty array to enter loop + if (isset($a_pkg[$id][$rowhelpername])) { + $saved_rows=$a_pkg[$id][$rowhelpername]; + } else { + $saved_rows[] = array(); + } + + foreach ($saved_rows as $row) { + echo "\n\n"; + foreach ($pkga['rowhelper']['rowhelperfield'] as $rowhelper) { + unset($value); + if ($rowhelper['value'] <> "") { + $value = $rowhelper['value']; + } + $fieldname = $rowhelper['fieldname']; + // if user is editing a record, load in the data. + if (isset($id) && $a_pkg[$id]) { + $value = $row[$fieldname]; + } + $options = ""; + $type = $rowhelper['type']; + $description = $rowhelper['description']; + $fieldname = $rowhelper['fieldname']; + if ($type == "option") { + $options = &$rowhelper['options']['option']; + } + if ($rowhelper['size']) { + $size = $rowhelper['size']; + } else if ($pkga['size']) { + $size = $pkga['size']; + } else { + $size = "8"; + } + display_row($rowcounter, $value, $fieldname, $type, $rowhelper, $size); + + $text = ""; + $trc++; + } + $rowcounter++; + echo "\n"; + } + ?> + + +
                            "; + #echo "\"remove\""; + echo "delete"; + echo "
                            + + +
                            add +
                            + + + "; + // The tr tag end is used to end the whole set of combined fields, + // but also if usecolspan2 is not in effect then we also put each combined field in its own tr. + if (($pkga['combinefields'] == "end") || (!isset($pkga['usecolspan2']))) { + $input .= "
                             
                              +
                            + " . gettext("Note") . ": {$pkg['note']}

                            "; + } + //if (isset($id) && $a_pkg[$id]) // We'll always have a valid ID in our hands + echo ""; + echo "\n{$pkg_buttons}\n"; + if (!$only_edit) { + echo ""; + } + ?> +
                            +
                            +
                            +
                            + + + +\n"; + echo "//\n"; + echo "\n"; + } +?> + + + + + +\n"; + switch ($type) { + case "input": + echo "\n"; + break; + case "checkbox": + echo "\n"; + break; + case "password": + echo "\n"; + break; + case "textarea": + echo "\n"; + case "select": + echo "\n"; + break; + case "interfaces_selection": + $size = ($size ? "size=\"{$size}\"" : ''); + $multiple = ''; + if (isset($rowhelper['multiple'])) { + $fieldname .= '[]'; + $multiple = "multiple=\"multiple\""; + } + echo "\n"; + break; + case "select_source": + echo "\n"; + break; + } + echo "
                            + + + + + +
                            + +
                            + $c_count) { + if ($c_count >= $categories_min_count && $cm_count <= $categories_max_display) { + $tab_array[] = array(gettext($category) , $menu_category == $category ? true : false, "pkg_mgr.php?category={$category}"); + $visible_categories[]=$category; + $cm_count++; + } + } + $tab_array[] = array(gettext("Other Categories"), $menu_category == "Other" ? true : false, "pkg_mgr.php?category=Other"); + if (count($categories) > 1) { + display_top_tabs($tab_array); + } + } +?> +
                            +
                            + + + +'.gettext("Category").''."\n"; + } +?> + + + + +"; + } else { + if (is_array($pkg_info)) { + foreach ($pkg_info as $index): + if (get_package_id($index['name']) >= 0) { + continue; + } + + $shortname = $index['name']; + pkg_remove_prefix($shortname); + + /* Check package info link */ + if ($index['www'] && $index['www'] != 'UNKNOWN') { + $pkginfolink = $index['www']; + $pkginfo=gettext("Package info"); + } else { + $pkginfolink = "https://forum.pfsense.org/index.php/board,15.0.html"; + $pkginfo=gettext("No package info, check the forum"); + } + + if ($menu_category == "All" || $index['categories'][0] == $menu_category || ($menu_category == "Other" && !in_array($index['categories'][0], $visible_categories))): +?> + + +'.gettext($index['categories'][0]).''."\n"; + } + +?> + + + + +"; + } /* if (is_array($pkg_info)) */ + } /* if (!$pkg_info) */ +?> +
                            " class="listhdr">" class="listhdr"> 
                            " . gettext("There are currently no packages available for installation.") . "
                            > + + > + ', $index['desc']);?> + +

                            + + +
                            + src="./themes//images/icons/icon_plus.gif" width="17" height="17" border="0" alt="add" /> +
                            " . gettext("There are currently no packages available for installation.") . "
                            +
                            +
                            + + + diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php new file mode 100644 index 0000000..1de2a40 --- /dev/null +++ b/src/usr/local/www/pkg_mgr_install.php @@ -0,0 +1,323 @@ + + Copyright (C) 2005 Colin Smith + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /bin/rm + pfSense_MODULE: pkgs +*/ + +##|+PRIV +##|*IDENT=page-system-packagemanager-installpackage +##|*NAME=System: Package Manager: Install Package page +##|*DESCR=Allow access to the 'System: Package Manager: Install Package' page. +##|*MATCH=pkg_mgr_install.php* +##|-PRIV + +ini_set('max_execution_time', '0'); + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("pkg-utils.inc"); + +global $static_output; + +$static_output = ""; +$static_status = ""; +$sendto = "output"; + +$pgtitle = array(gettext("System"), gettext("Package Manager"), gettext("Install Package")); +include("head.inc"); + +if ($_POST) { + if (isset($_POST['pkgcancel']) || (empty($_POST['id']) && $_POST['mode'] != 'reinstallall')) { + header("Location: pkg_mgr_installed.php"); + return; + } +} else if ($_GET) { + switch ($_GET['mode']) { + case 'reinstallall': + case 'showlog': + break; + case 'installedinfo': + case 'reinstallxml': + case 'reinstallpkg': + case 'delete': + if (empty($_GET['pkg'])) { + header("Location: pkg_mgr_installed.php"); + return; + } + break; + default: + if (empty($_GET['id'])) { + header("Location: pkg_mgr_installed.php"); + return; + } + break; + } +} + +?> + + + +
                            +
                            + + + + +", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_GET['id'], ENT_QUOTES | ENT_HTML401)); + $pkgmode = 'installed'; + } else if (!empty($_GET['mode']) && !empty($_GET['pkg'])) { + $pkgname = str_replace(array("<", ">", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_GET['pkg'], ENT_QUOTES | ENT_HTML401)); + $pkgmode = str_replace(array("<", ">", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_GET['mode'], ENT_QUOTES | ENT_HTML401)); + } else if ($_GET['mode'] == 'reinstallall') { + $pkgmode = 'reinstallall'; + } + $pkg_gui_xml_text = ""; + switch ($pkgmode) { + case 'reinstallall': + $pkgname = 'All packages'; + $pkgtxt = 'reinstalled'; + break; + case 'reinstallxml': + $pkg_gui_xml_text = " GUI XML components"; + case 'reinstallpkg': + $pkgtxt = 'reinstalled'; + break; + case 'delete': + $pkgtxt = 'deleted'; + break; + default: + $pkgtxt = $pkgmode; + break; + } +?> + + + + + + + + +
                            + +
                            + + + + + +
                            Package: will be .
                            + Please confirm the action.
                            +
                            + + + + +
                            +
                            + + + + + + +
                            + + + + +
                            + /images/misc/bar_blue.gif' width="0" height="15" name="progressbar" id="progressbar" alt="progress bar" /> +
                            +
                            +
                            +
                            + + +
                            + + +
                            +
                            +
                            + + + +", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_GET['pkg'], ENT_QUOTES | ENT_HTML401)); + switch ($_GET['mode']) { + case 'showlog': + if (strpos($pkgname, ".")) { + update_output_window(gettext("Something is wrong on the request.")); + } else if (file_exists("/tmp/pkg_mgr_{$pkgname}.log")) { + update_output_window(@file_get_contents("/tmp/pkg_mgr_{$pkgname}.log")); + } else { + update_output_window(gettext("Log was not retrievable.")); + } + break; + case 'installedinfo': + if (file_exists("/tmp/{$pkgname}.info")) { + $status = @file_get_contents("/tmp/{$pkgname}.info"); + update_status("{$pkgname} " . gettext("installation completed.")); + update_output_window($status); + } else { + update_output_window(sprintf(gettext("Could not find %s."), $pkgname)); + } + break; + default: + break; + } +} else if ($_POST) { + $pkgid = str_replace(array("<", ">", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_POST['id'], ENT_QUOTES | ENT_HTML401)); + + /* All other cases make changes, so mount rw fs */ + conf_mount_rw(); + /* Write out configuration to create a backup prior to pkg install. */ + write_config(gettext("Creating restore point before package installation.")); + + switch ($_POST['mode']) { + case 'delete': + uninstall_package($pkgid); + update_status(gettext("Package deleted.")); + $static_output .= "\n" . gettext("Package deleted."); + update_output_window($static_output); + filter_configure(); + break; + case 'reinstallxml': + pkg_fetch_config_file($pkgid); + pkg_fetch_additional_files($pkgid); + break; + case 'reinstallpkg': + delete_package_xml($pkgid); + if (install_package($pkgid) != 0) { + update_status(gettext("Package reinstallation failed.")); + $static_output .= "\n" . gettext("Package reinstallation failed."); + update_output_window($static_output); + } else { + update_status(gettext("Package reinstalled.")); + $static_output .= "\n" . gettext("Package reinstalled."); + update_output_window($static_output); + filter_configure(); + } + @file_put_contents("/tmp/{$pkgid}.info", $static_output); + $pkgid = htmlspecialchars($pkgid); + echo ""; + send_event("service restart packages"); + break; + case 'reinstallall': + if (is_array($config['installedpackages']) && is_array($config['installedpackages']['package'])) { + $todo = array(); + foreach ($config['installedpackages']['package'] as $package) { + $todo[] = array('name' => $package['name'], 'version' => $package['version']); + } + foreach ($todo as $pkgtodo) { + $static_output = ""; + if ($pkgtodo['name']) { + update_output_window($static_output); + uninstall_package($pkgtodo['name']); + install_package($pkgtodo['name']); + } + } + update_status(gettext("All packages reinstalled.")); + $static_output .= "\n" . gettext("All packages reinstalled."); + update_output_window($static_output); + filter_configure(); + send_event("service restart packages"); + } else { + update_output_window(gettext("No packages are installed.")); + } + break; + case 'installed': + default: + $status = install_package($pkgid); + if ($status != 0) { + update_status(gettext("Installation of") . " {$pkgid} " . gettext("FAILED!")); + $static_output .= "\n" . gettext("Installation halted."); + update_output_window($static_output); + } else { + $status_a = gettext(sprintf("Installation of %s completed.", $pkgid)); + update_status($status_a); + $status = get_after_install_info($pkgid); + if ($status) { + $static_output .= "\n" . gettext("Installation completed.") . "\n{$pkgid} " . gettext("setup instructions") . ":\n{$status}"; + } else { + $static_output .= "\n" . gettext("Installation completed. Please check to make sure that the package is configured from the respective menu then start the package."); + } + + @file_put_contents("/tmp/{$pkgid}.info", $static_output); + echo ""; + } + filter_configure(); + break; + } + + // Delete all temporary package tarballs and staging areas. + unlink_if_exists("/tmp/apkg_*"); + rmdir_recursive("/var/tmp/instmp*"); + + // close log + if ($fd_log) { + fclose($fd_log); + } + + /* Restore to read only fs */ + conf_mount_ro(); +} +?> + + + diff --git a/src/usr/local/www/pkg_mgr_installed.php b/src/usr/local/www/pkg_mgr_installed.php new file mode 100644 index 0000000..3801271 --- /dev/null +++ b/src/usr/local/www/pkg_mgr_installed.php @@ -0,0 +1,259 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: pkgs +*/ + +##|+PRIV +##|*IDENT=page-system-packagemanager-installed +##|*NAME=System: Package Manager: Installed page +##|*DESCR=Allow access to the 'System: Package Manager: Installed' page. +##|*MATCH=pkg_mgr_installed.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("pkg-utils.inc"); + +$timezone = $config['system']['timezone']; +if (!$timezone) { + $timezone = "Etc/UTC"; +} + +date_default_timezone_set($timezone); + +/* if upgrade in progress, alert user */ +if (is_subsystem_dirty('packagelock')) { + $pgtitle = array(gettext("System"), gettext("Package Manager")); + include("head.inc"); + echo "\n"; + include("fbegin.inc"); + echo "Please wait while packages are reinstalled in the background."; + include("fend.inc"); + echo ""; + echo ""; + exit; +} + +function domTT_title($title_msg, $return="echo") { + if (!empty($title_msg)) { + $title_msg = preg_replace("/\s+/", " ", $title_msg); + $title_msg = preg_replace("/'/", "\'", $title_msg); + $title= "onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\" onmouseover=\"domTT_activate(this, event, 'content', '{$title_msg}', 'trail', true, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle');\""; + if ($return =="echo") { + echo $title; + } else { + return $title; + } + } +} +if (is_array($config['installedpackages']['package'])) { + foreach ($config['installedpackages']['package'] as $instpkg) { + $tocheck[] = $instpkg['name']; + } + $currentvers = get_pkg_info($tocheck, array('version', 'xmlver', 'pkginfolink', 'descr')); +} +$closehead = false; +$pgtitle = array(gettext("System"), gettext("Package Manager")); +include("head.inc"); + +?> + + + + + + + + + + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + $pkgname): + + $pkg = $config['installedpackages']['package'][$index]; + if (!$pkg['name']) { + continue; + } + + // get history/changelog git dir + $commit_dir = explode("/", $pkg['config_file']); + $changeloglink = "https://github.com/pfsense/pfsense-packages/commits/master/config/" . $commit_dir[(count($commit_dir)-2)]; + #check package version + $latest_package = $currentvers[$pkg['name']]['version']; + if ($latest_package) { + // we're running a newer version of the package + if (strcmp($pkg['version'], $latest_package) > 0) { + $tdclass = "listbggrey"; + if ($g['disablepackagehistory']) { + $pkgver = "" . gettext("Available") . ": " . $latest_package . "
                            "; + } else { + $pkgver = "
                            " . gettext("Available") . ": " . $latest_package . "
                            "; + } + $pkgver .= gettext("Installed") . ": " . $pkg['version'] . "
                            "; + } + // we're running an older version of the package + if (strcmp($pkg['version'], $latest_package) < 0) { + $tdclass = "listbg"; + if ($g['disablepackagehistory']) { + $pkgver = "" . gettext("Available") . ": " . $latest_package . "
                            "; + } else { + $pkgver = "
                            " . gettext("Available") . ": " . $latest_package . "
                            "; + } + $pkgver .= gettext("Installed") . ": " . $pkg['version'] . "
                            "; + } + // we're running the current version + if (!strcmp($pkg['version'], $latest_package)) { + $tdclass = "listr"; + if ($g['disablepackagehistory']) { + $pkgver = "{$pkg['version']}"; + } else { + $pkgver = "{$pkg['version']}"; + } + } + $pkgdescr = $currentvers[$pkg['name']]['descr']; + } else { + // unknown available package version + $tdclass = "listbg"; + if ($g['disablepackagehistory']) { + $pkgver = "" . gettext("Latest") . ": " . gettext("N/A") . "
                            "; + } else { + $pkgver = "
                            " . gettext("Latest") . ": " . gettext("N/A") . "
                            "; + } + $pkgver .= gettext("Installed") . ": " . $pkg['version'] . "
                            "; + $pkgdescr = $pkg['descr']; + } + /* Check package info link */ + if ($pkg['pkginfolink']) { + $pkginfolink = $pkg['pkginfolink']; + $pkginfo=gettext("Package info"); + } else { + $pkginfolink = "https://forum.pfsense.org/index.php/board,15.0.html"; + $pkginfo=gettext("No package info, check the forum"); + } + + ?> + + + + {$pkgver}"; + } else { + echo ""; + } + ?> + + + + + + + + +
                             
                            + + + + {$pkgver}> + + +

                            + + +
                            + + src="./themes//images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" /> + +
                            + + src="./themes//images/icons/icon_reinstall_pkg.gif" width="17" height="17" border="0" alt="reinstall" /> + + + src="./themes//images/icons/icon_reinstall_xml.gif" width="17" height="17" border="0" alt="reinstall" /> + +
                            + +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/pkg_mgr_settings.php b/src/usr/local/www/pkg_mgr_settings.php new file mode 100644 index 0000000..04a5151 --- /dev/null +++ b/src/usr/local/www/pkg_mgr_settings.php @@ -0,0 +1,163 @@ + + Copyright (C) 2004-2010 Scott Ullrich + Copyright (C) 2005 Colin Smith + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: pkgs +*/ + +##|+PRIV +##|*IDENT=page-pkg-mgr-settings +##|*NAME=Packages: Settings page +##|*DESCR=Allow access to the 'Packages: Settings' page. +##|*MATCH=pkg_mgr_settings.php* +##|-PRIV + +ini_set('max_execution_time', '0'); + +require_once("globals.inc"); +require_once("guiconfig.inc"); +require_once("pkg-utils.inc"); + +if ($_POST) { + if (!$input_errors) { + if ($_POST['alturlenable'] == "yes") { + $config['system']['altpkgrepo']['enable'] = true; + $config['system']['altpkgrepo']['xmlrpcbaseurl'] = $_POST['pkgrepourl']; + } else { + unset($config['system']['altpkgrepo']['enable']); + } + write_config(); + } +} + +$curcfg = $config['system']['altpkgrepo']; +$closehead = false; +$pgtitle = array(gettext("System"), gettext("Package Settings")); +include("head.inc"); +?> + + + + + + + +
                            + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + +
                            + + + +

                            + +

                            +
                            + />
                            + + + + + +
                            + +
                            + + + +
                              + " /> +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/protochart/ProtoChart.js b/src/usr/local/www/protochart/ProtoChart.js new file mode 100644 index 0000000..4e60f18 --- /dev/null +++ b/src/usr/local/www/protochart/ProtoChart.js @@ -0,0 +1,2653 @@ +/** + * Class: ProtoChart + * Version: v0.5 beta + * + * ProtoChart is a charting lib on top of Prototype. + * This library is heavily motivated by excellent work done by: + * * Flot + * * Flotr + * + * Complete examples can be found at: + */ + +/** + * Events: + * ProtoChart:mousemove - Fired when mouse is moved over the chart + * ProtoChart:plotclick - Fired when graph is clicked + * ProtoChart:dataclick - Fired when graph is clicked AND the click is on a data point + * ProtoChart:selected - Fired when certain region on the graph is selected + * ProtoChart:hit - Fired when mouse is moved near or over certain data point on the graph + */ + + +if(!Proto) var Proto = {}; + +Proto.Chart = Class.create({ + /** + * Function: + * {Object} elem + * {Object} data + * {Object} options + */ + initialize: function(elem, data, options) + { + options = options || {}; + this.graphData = []; + /** + * Property: options + * + * Description: Various options can be set. More details in description. + * + * colors: + * {Array} - pass in a array which contains strings of colors you want to use. Default has 6 color set. + * + * legend: + * {BOOL} - show - if you want to show the legend. Default is false + * {integer} - noColumns - Number of columns for the legend. Default is 1 + * {function} - labelFormatter - A function that returns a string. The function is called with a string and is expected to return a string. Default = null + * {string} - labelBoxBorderColor - border color for the little label boxes. Default #CCC + * {HTMLElem} - container - an HTML id or HTML element where the legend should be rendered. If left null means to put the legend on top of the Chart + * {string} - position - position for the legend on the Chart. Default value 'ne' + * {integer} - margin - default valud of 5 + * {string} - backgroundColor - default to null (which means auto-detect) + * {float} - backgroundOpacity - leave it 0 to avoid background + * + * xaxis (yaxis) options: + * {string} - mode - default is null but you can pass a string "time" to indicate time series + * {integer} - min + * {integer} - max + * {float} - autoscaleMargin - in % to add if auto-setting min/max + * {mixed} - ticks - either [1, 3] or [[1, "a"], 3] or a function which gets axis info and returns ticks + * {function} - tickFormatter - A function that returns a string as a tick label. Default is null + * {float} - tickDecimals + * {integer} - tickSize + * {integer} - minTickSize + * {array} - monthNames + * {string} - timeformat + * + * Points / Lines / Bars options: + * {bool} - show, default is false + * {integer} - radius: default is 3 + * {integer} - lineWidth : default is 2 + * {bool} - fill : default is true + * {string} - fillColor: default is #ffffff + * + * Grid options: + * {string} - color + * {string} - backgroundColor - defualt is *null* + * {string} - tickColor - default is *#dddddd* + * {integer} - labelMargin - should be in pixels default is 3 + * {integer} - borderWidth - default *1* + * {bool} - clickable - default *null* - pass in TRUE if you wish to monitor click events + * {mixed} - coloredAreas - default *null* - pass in mixed object eg. {x1, x2} + * {string} - coloredAreasColor - default *#f4f4f4* + * {bool} - drawXAxis - default *true* + * {bool} - drawYAxis - default *true* + * + * selection options: + * {string} - mode : either "x", "y" or "xy" + * {string} - color : string + */ + this.options = this.merge(options,{ + colors: ["#edc240", "#00A8F0", "#C0D800", "#cb4b4b", "#4da74d", "#9440ed"], + legend: { + show: false, + noColumns: 1, + labelFormatter: null, + labelBoxBorderColor: "#ccc", + container: null, + position: "ne", + margin: 5, + backgroundColor: null, + backgroundOpacity: 0.85 + }, + xaxis: { + mode: null, + min: null, + max: null, + autoscaleMargin: null, + ticks: null, + tickFormatter: null, + tickDecimals: null, + tickSize: null, + minTickSize: null, + monthNames: null, + timeformat: null + }, + yaxis: { + mode: null, + min: null, + max: null, + ticks: null, + tickFormatter: null, + tickDecimals: null, + tickSize: null, + minTickSize: null, + monthNames: null, + timeformat: null, + autoscaleMargin: 0.02 + }, + + points: { + show: false, + radius: 3, + lineWidth: 2, + fill: true, + fillColor: "#ffffff" + }, + lines: { + show: false, + lineWidth: 2, + fill: false, + fillColor: null + }, + bars: { + show: false, + lineWidth: 2, + barWidth: 1, + fill: true, + fillColor: null, + showShadow: false, + fillOpacity: 0.4, + autoScale: true + }, + pies: { + show: false, + radius: 50, + borderWidth: 1, + fill: true, + fillColor: null, + fillOpacity: 0.90, + labelWidth: 30, + fontSize: 11, + autoScale: true + }, + grid: { + color: "#545454", + backgroundColor: null, + tickColor: "#dddddd", + labelMargin: 3, + borderWidth: 1, + clickable: null, + coloredAreas: null, + coloredAreasColor: "#f4f4f4", + drawXAxis: true, + drawYAxis: true + }, + mouse: { + track: false, + position: 'se', + fixedPosition: true, + clsName: 'mouseValHolder', + trackFormatter: this.defaultTrackFormatter, + margin: 3, + color: '#ff3f19', + trackDecimals: 1, + sensibility: 2, + radius: 5, + lineColor: '#cb4b4b' + }, + selection: { + mode: null, + color: "#97CBFF" + }, + allowDataClick: true, + makeRandomColor: false, + shadowSize: 4 + }); + + /* + * Local variables. + */ + this.canvas = null; + this.overlay = null; + this.eventHolder = null; + this.context = null; + this.overlayContext = null; + + this.domObj = $(elem); + + this.xaxis = {}; + this.yaxis = {}; + this.chartOffset = {left: 0, right: 0, top: 0, bottom: 0}; + this.yLabelMaxWidth = 0; + this.yLabelMaxHeight = 0; + this.xLabelBoxWidth = 0; + this.canvasWidth = 0; + this.canvasHeight = 0; + this.chartWidth = 0; + this.chartHeight = 0; + this.hozScale = 0; + this.vertScale = 0; + this.workarounds = {}; + + this.domObj = $(elem); + + this.barDataRange = []; + + this.lastMousePos = { pageX: null, pageY: null }; + this.selection = { first: { x: -1, y: -1}, second: { x: -1, y: -1} }; + this.prevSelection = null; + this.selectionInterval = null; + this.ignoreClick = false; + this.prevHit = null; + + if(this.options.makeRandomColor) + this.options.color = this.makeRandomColor(this.options.colors); + + this.setData(data); + this.constructCanvas(); + this.setupGrid(); + this.draw(); + }, + /** + * Private function internally used. + */ + merge: function(src, dest) + { + var result = dest || {}; + for(var i in src){ + result[i] = (typeof(src[i]) == 'object' && !(src[i].constructor == Array || src[i].constructor == RegExp)) ? this.merge(src[i], dest[i]) : result[i] = src[i]; + } + return result; + }, + /** + * Function: setData + * {Object} data + * + * Description: + * Sets datasoruces properly then sets the Bar Width accordingly, then copies the default data options and then processes the graph data + * + * Returns: none + * + */ + setData: function(data) + { + this.graphData = this.parseData(data); + this.setBarWidth(); + this.copyGraphDataOptions(); + this.processGraphData(); + }, + /** + * Function: parseData + * {Object} data + * + * Return: + * {Object} result + * + * Description: + * Takes the provided data object and converts it into generic data that we can understand. User can pass in data in 3 different ways: + * - [d1, d2] + * - [{data: d1, label: "data1"}, {data: d2, label: "data2"}] + * - [d1, {data: d1, label: "data1"}] + * + * This function parses these senarios and makes it readable + */ + parseData: function(data) + { + var res = []; + data.each(function(d){ + var s; + if(d.data) { + s = {}; + for(var v in d) { + s[v] = d[v]; + } + } + else { + s = {data: d}; + } + res.push(s); + }.bind(this)); + return res; + }, + /** + * function: makeRandomColor + * {Object} colorSet + * + * Return: + * {Array} result - array containing random colors + */ + makeRandomColor: function(colorSet) + { + var randNum = Math.floor(Math.random() * colorSet.length); + var randArr = []; + var newArr = []; + randArr.push(randNum); + + while(randArr.length < colorSet.length) + { + var tempNum = Math.floor(Math.random() * colorSet.length); + + while(checkExisted(tempNum, randArr)) + tempNum = Math.floor(Math.random() * colorSet.length); + + randArr.push(tempNum); + } + + randArr.each(function(ra){ + newArr.push(colorSet[ra]); + + }.bind(this)); + return newArr; + }, + /** + * function: checkExisted + * {Object} needle + * {Object} haystack + * + * return: + * {bool} existed - true if it finds needle in the haystack + */ + checkExisted: function(needle, haystack) + { + var existed = false; + haystack.each(function(aNeedle){ + if(aNeedle == needle) { + existed = true; + throw $break; + } + }.bind(this)); + return existed; + }, + /** + * function: setBarWidth + * + * Description: sets the bar width for Bar Graph, you should enable *autoScale* property for bar graph + */ + setBarWidth: function() + { + if(this.options.bars.show && this.options.bars.autoScale) + { + this.options.bars.barWidth = 1 / this.graphData.length / 1.2; + } + }, + /** + * Function: copyGraphDataOptions + * + * Description: Private function that goes through each graph data (series) and assigned the graph + * properties to it. + */ + copyGraphDataOptions: function() + { + var i, neededColors = this.graphData.length, usedColors = [], assignedColors = []; + + this.graphData.each(function(gd){ + var sc = gd.color; + if(sc) { + --neededColors; + if(Object.isNumber(sc)) { + assignedColors.push(sc); + } + else { + usedColors.push(this.parseColor(sc)); + } + } + }.bind(this)); + + + assignedColors.each(function(ac){ + neededColors = Math.max(neededColors, ac + 1); + }); + + var colors = []; + var variation = 0; + i = 0; + while (colors.length < neededColors) { + var c; + if (this.options.colors.length == i) { + c = new Proto.Color(100, 100, 100); + } + else { + c = this.parseColor(this.options.colors[i]); + } + + var sign = variation % 2 == 1 ? -1 : 1; + var factor = 1 + sign * Math.ceil(variation / 2) * 0.2; + c.scale(factor, factor, factor); + + colors.push(c); + + ++i; + if (i >= this.options.colors.length) { + i = 0; + ++variation; + } + } + + var colorIndex = 0, s; + + this.graphData.each(function(gd){ + if(gd.color == null) + { + gd.color = colors[colorIndex].toString(); + ++colorIndex; + } + else if(Object.isNumber(gd.color)) { + gd.color = colors[gd.color].toString(); + } + + gd.lines = Object.extend(Object.clone(this.options.lines), gd.lines); + gd.points = Object.extend(Object.clone(this.options.points), gd.points); + gd.bars = Object.extend(Object.clone(this.options.bars), gd.bars); + gd.mouse = Object.extend(Object.clone(this.options.mouse), gd.mouse); + if (gd.shadowSize == null) { + gd.shadowSize = this.options.shadowSize; + } + }.bind(this)); + + }, + /** + * Function: processGraphData + * + * Description: processes graph data, setup xaxis and yaxis min and max points. + */ + processGraphData: function() { + + this.xaxis.datamin = this.yaxis.datamin = Number.MAX_VALUE; + this.xaxis.datamax = this.yaxis.datamax = Number.MIN_VALUE; + + this.graphData.each(function(gd) { + var data = gd.data; + data.each(function(d){ + if(d == null) { + return; + } + + var x = d[0], y = d[1]; + if(!x || !y || isNaN(x = +x) || isNaN(y = +y)) { + d = null; + return; + } + + if (x < this.xaxis.datamin) + this.xaxis.datamin = x; + if (x > this.xaxis.datamax) + this.xaxis.datamax = x; + if (y < this.yaxis.datamin) + this.yaxis.datamin = y; + if (y > this.yaxis.datamax) + this.yaxis.datamax = y; + }.bind(this)); + }.bind(this)); + + + if (this.xaxis.datamin == Number.MAX_VALUE) + this.xaxis.datamin = 0; + if (this.yaxis.datamin == Number.MAX_VALUE) + this.yaxis.datamin = 0; + if (this.xaxis.datamax == Number.MIN_VALUE) + this.xaxis.datamax = 1; + if (this.yaxis.datamax == Number.MIN_VALUE) + this.yaxis.datamax = 1; + }, + /** + * Function: constructCanvas + * + * Description: constructs the main canvas for drawing. It replicates the HTML elem (usually DIV) passed + * in via constructor. If there is no height/width assigned to the HTML elem then we take a default size + * of 400px (width) and 300px (height) + */ + constructCanvas: function() { + + this.canvasWidth = this.domObj.getWidth(); + this.canvasHeight = this.domObj.getHeight(); + this.domObj.update(""); // clear target + this.domObj.setStyle({ + "position": "relative" + }); + + if (this.canvasWidth <= 0) { + this.canvasWdith = 400; + } + if(this.canvasHeight <= 0) { + this.canvasHeight = 300; + } + + this.canvas = (Prototype.Browser.IE) ? document.createElement("canvas") : new Element("CANVAS", {'width': this.canvasWidth, 'height': this.canvasHeight}); + Element.extend(this.canvas); + this.canvas.style.width = this.canvasWidth + "px"; + this.canvas.style.height = this.canvasHeight + "px"; + + this.domObj.appendChild(this.canvas); + + if (Prototype.Browser.IE) // excanvas hack + { + this.canvas = $(window.G_vmlCanvasManager.initElement(this.canvas)); + } + this.canvas = $(this.canvas); + + this.context = this.canvas.getContext("2d"); + + this.overlay = (Prototype.Browser.IE) ? document.createElement("canvas") : new Element("CANVAS", {'width': this.canvasWidth, 'height': this.canvasHeight}); + Element.extend(this.overlay); + this.overlay.style.width = this.canvasWidth + "px"; + this.overlay.style.height = this.canvasHeight + "px"; + this.overlay.style.position = "absolute"; + this.overlay.style.left = "0px"; + this.overlay.style.right = "0px"; + + this.overlay.setStyle({ + 'position': 'absolute', + 'left': '0px', + 'right': '0px' + }); + this.domObj.appendChild(this.overlay); + + if (Prototype.Browser.IE) { + this.overlay = $(window.G_vmlCanvasManager.initElement(this.overlay)); + } + + this.overlay = $(this.overlay); + this.overlayContext = this.overlay.getContext("2d"); + + if(this.options.selection.mode) + { + this.overlay.observe('mousedown', this.onMouseDown.bind(this)); + this.overlay.observe('mousemove', this.onMouseMove.bind(this)); + } + if(this.options.grid.clickable) { + this.overlay.observe('click', this.onClick.bind(this)); + } + if(this.options.mouse.track) + { + this.overlay.observe('mousemove', this.onMouseMove.bind(this)); + } + }, + /** + * function: setupGrid + * + * Description: a container function that does a few interesting things. + * + * 1. calls function which makes sure that our axis are expanded if needed + * + * 2. calls function providing xaxis options which fixes the ranges according to data points + * + * 3. calls function for xaxis which generates ticks according to options provided by user + * + * 4. calls function for xaxis that sets the ticks + * + * similar sequence is called for y-axis. + * + * At the end if this is a pie chart than we insert Labels (around the pie chart) via and we also call + */ + setupGrid: function() + { + if(this.options.bars.show) + { + this.xaxis.max += 0.5; + this.xaxis.min -= 0.5; + } + //x-axis + this.extendXRangeIfNeededByBar(); + this.setRange(this.xaxis, this.options.xaxis); + this.prepareTickGeneration(this.xaxis, this.options.xaxis); + this.setTicks(this.xaxis, this.options.xaxis); + + + //y-axis + this.setRange(this.yaxis, this.options.yaxis); + this.prepareTickGeneration(this.yaxis, this.options.yaxis); + this.setTicks(this.yaxis, this.options.yaxis); + this.setSpacing(); + + if(!this.options.pies.show) + { + this.insertLabels(); + } + this.insertLegend(); + }, + /** + * function: setRange + * + * parameters: + * {Object} axis + * {Object} axisOptions + */ + setRange: function(axis, axisOptions) { + var min = axisOptions.min != null ? axisOptions.min : axis.datamin; + var max = axisOptions.max != null ? axisOptions.max : axis.datamax; + + if (max - min == 0.0) { + // degenerate case + var widen; + if (max == 0.0) + widen = 1.0; + else + widen = 0.01; + + min -= widen; + max += widen; + } + else { + // consider autoscaling + var margin = axisOptions.autoscaleMargin; + if (margin != null) { + if (axisOptions.min == null) { + min -= (max - min) * margin; + // make sure we don't go below zero if all values + // are positive + if (min < 0 && axis.datamin >= 0) + min = 0; + } + if (axisOptions.max == null) { + max += (max - min) * margin; + if (max > 0 && axis.datamax <= 0) + max = 0; + } + } + } + axis.min = min; + axis.max = max; + }, + /** + * function: prepareTickGeneration + * + * Parameters: + * {Object} axis + * {Object} axisOptions + */ + prepareTickGeneration: function(axis, axisOptions) { + // estimate number of ticks + var noTicks; + if (Object.isNumber(axisOptions.ticks) && axisOptions.ticks > 0) + noTicks = axisOptions.ticks; + else if (axis == this.xaxis) + noTicks = this.canvasWidth / 100; + else + noTicks = this.canvasHeight / 60; + + var delta = (axis.max - axis.min) / noTicks; + var size, generator, unit, formatter, i, magn, norm; + + if (axisOptions.mode == "time") { + function formatDate(d, fmt, monthNames) { + var leftPad = function(n) { + n = "" + n; + return n.length == 1 ? "0" + n : n; + }; + + var r = []; + var escape = false; + if (monthNames == null) + monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + for (var i = 0; i < fmt.length; ++i) { + var c = fmt.charAt(i); + + if (escape) { + switch (c) { + case 'h': c = "" + d.getHours(); break; + case 'H': c = leftPad(d.getHours()); break; + case 'M': c = leftPad(d.getMinutes()); break; + case 'S': c = leftPad(d.getSeconds()); break; + case 'd': c = "" + d.getDate(); break; + case 'm': c = "" + (d.getMonth() + 1); break; + case 'y': c = "" + d.getFullYear(); break; + case 'b': c = "" + monthNames[d.getMonth()]; break; + } + r.push(c); + escape = false; + } + else { + if (c == "%") + escape = true; + else + r.push(c); + } + } + return r.join(""); + } + + + // map of app. size of time units in milliseconds + var timeUnitSize = { + "second": 1000, + "minute": 60 * 1000, + "hour": 60 * 60 * 1000, + "day": 24 * 60 * 60 * 1000, + "month": 30 * 24 * 60 * 60 * 1000, + "year": 365.2425 * 24 * 60 * 60 * 1000 + }; + + + // the allowed tick sizes, after 1 year we use + // an integer algorithm + var spec = [ + [1, "second"], [2, "second"], [5, "second"], [10, "second"], + [30, "second"], + [1, "minute"], [2, "minute"], [5, "minute"], [10, "minute"], + [30, "minute"], + [1, "hour"], [2, "hour"], [4, "hour"], + [8, "hour"], [12, "hour"], + [1, "day"], [2, "day"], [3, "day"], + [0.25, "month"], [0.5, "month"], [1, "month"], + [2, "month"], [3, "month"], [6, "month"], + [1, "year"] + ]; + + var minSize = 0; + if (axisOptions.minTickSize != null) { + if (typeof axisOptions.tickSize == "number") + minSize = axisOptions.tickSize; + else + minSize = axisOptions.minTickSize[0] * timeUnitSize[axisOptions.minTickSize[1]]; + } + + for (i = 0; i < spec.length - 1; ++i) { + if (delta < (spec[i][0] * timeUnitSize[spec[i][1]] + spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2 && spec[i][0] * timeUnitSize[spec[i][1]] >= minSize) { + break; + } + } + + size = spec[i][0]; + unit = spec[i][1]; + + // special-case the possibility of several years + if (unit == "year") { + magn = Math.pow(10, Math.floor(Math.log(delta / timeUnitSize.year) / Math.LN10)); + norm = (delta / timeUnitSize.year) / magn; + if (norm < 1.5) + size = 1; + else if (norm < 3) + size = 2; + else if (norm < 7.5) + size = 5; + else + size = 10; + + size *= magn; + } + + if (axisOptions.tickSize) { + size = axisOptions.tickSize[0]; + unit = axisOptions.tickSize[1]; + } + + var floorInBase = this.floorInBase; //gives us a reference to a global function.. + + generator = function(axis) { + var ticks = [], + tickSize = axis.tickSize[0], unit = axis.tickSize[1], + d = new Date(axis.min); + + var step = tickSize * timeUnitSize[unit]; + + + + if (unit == "second") + d.setSeconds(floorInBase(d.getSeconds(), tickSize)); + if (unit == "minute") + d.setMinutes(floorInBase(d.getMinutes(), tickSize)); + if (unit == "hour") + d.setHours(floorInBase(d.getHours(), tickSize)); + if (unit == "month") + d.setMonth(floorInBase(d.getMonth(), tickSize)); + if (unit == "year") + d.setFullYear(floorInBase(d.getFullYear(), tickSize)); + + // reset smaller components + d.setMilliseconds(0); + if (step >= timeUnitSize.minute) + d.setSeconds(0); + if (step >= timeUnitSize.hour) + d.setMinutes(0); + if (step >= timeUnitSize.day) + d.setHours(0); + if (step >= timeUnitSize.day * 4) + d.setDate(1); + if (step >= timeUnitSize.year) + d.setMonth(0); + + + var carry = 0, v; + do { + v = d.getTime(); + ticks.push({ v: v, label: axis.tickFormatter(v, axis) }); + if (unit == "month") { + if (tickSize < 1) { + d.setDate(1); + var start = d.getTime(); + d.setMonth(d.getMonth() + 1); + var end = d.getTime(); + d.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize); + carry = d.getHours(); + d.setHours(0); + } + else + d.setMonth(d.getMonth() + tickSize); + } + else if (unit == "year") { + d.setFullYear(d.getFullYear() + tickSize); + } + else + d.setTime(v + step); + } while (v < axis.max); + + return ticks; + }; + + formatter = function (v, axis) { + var d = new Date(v); + + // first check global format + if (axisOptions.timeformat != null) + return formatDate(d, axisOptions.timeformat, axisOptions.monthNames); + + var t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]]; + var span = axis.max - axis.min; + + if (t < timeUnitSize.minute) + fmt = "%h:%M:%S"; + else if (t < timeUnitSize.day) { + if (span < 2 * timeUnitSize.day) + fmt = "%h:%M"; + else + fmt = "%b %d %h:%M"; + } + else if (t < timeUnitSize.month) + fmt = "%b %d"; + else if (t < timeUnitSize.year) { + if (span < timeUnitSize.year) + fmt = "%b"; + else + fmt = "%b %y"; + } + else + fmt = "%y"; + + return formatDate(d, fmt, axisOptions.monthNames); + }; + } + else { + // pretty rounding of base-10 numbers + var maxDec = axisOptions.tickDecimals; + var dec = -Math.floor(Math.log(delta) / Math.LN10); + if (maxDec != null && dec > maxDec) + dec = maxDec; + + magn = Math.pow(10, -dec); + norm = delta / magn; // norm is between 1.0 and 10.0 + + if (norm < 1.5) + size = 1; + else if (norm < 3) { + size = 2; + // special case for 2.5, requires an extra decimal + if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) { + size = 2.5; + ++dec; + } + } + else if (norm < 7.5) + size = 5; + else + size = 10; + + size *= magn; + + if (axisOptions.minTickSize != null && size < axisOptions.minTickSize) + size = axisOptions.minTickSize; + + if (axisOptions.tickSize != null) + size = axisOptions.tickSize; + + axis.tickDecimals = Math.max(0, (maxDec != null) ? maxDec : dec); + + var floorInBase = this.floorInBase; + + generator = function (axis) { + var ticks = []; + var start = floorInBase(axis.min, axis.tickSize); + // then spew out all possible ticks + var i = 0, v; + do { + v = start + i * axis.tickSize; + ticks.push({ v: v, label: axis.tickFormatter(v, axis) }); + ++i; + } while (v < axis.max); + return ticks; + }; + + formatter = function (v, axis) { + if(v) { + return v.toFixed(axis.tickDecimals); + } + return 0; + }; + } + + axis.tickSize = unit ? [size, unit] : size; + axis.tickGenerator = generator; + if (Object.isFunction(axisOptions.tickFormatter)) + axis.tickFormatter = function (v, axis) { return "" + axisOptions.tickFormatter(v, axis); }; + else + axis.tickFormatter = formatter; + }, + /** + * function: extendXRangeIfNeededByBar + */ + extendXRangeIfNeededByBar: function() { + + if (this.options.xaxis.max == null) { + // great, we're autoscaling, check if we might need a bump + var newmax = this.xaxis.max; + this.graphData.each(function(gd){ + if(gd.bars.show && gd.bars.barWidth + this.xaxis.datamax > newmax) + { + newmax = this.xaxis.datamax + gd.bars.barWidth; + } + }.bind(this)); + this.xaxis.nax = newmax; + + } + }, + /** + * function: setTicks + * + * parameters: + * {Object} axis + * {Object} axisOptions + */ + setTicks: function(axis, axisOptions) { + axis.ticks = []; + + if (axisOptions.ticks == null) + axis.ticks = axis.tickGenerator(axis); + else if (typeof axisOptions.ticks == "number") { + if (axisOptions.ticks > 0) + axis.ticks = axis.tickGenerator(axis); + } + else if (axisOptions.ticks) { + var ticks = axisOptions.ticks; + + if (Object.isFunction(ticks)) + // generate the ticks + ticks = ticks({ min: axis.min, max: axis.max }); + + // clean up the user-supplied ticks, copy them over + //var i, v; + ticks.each(function(t, i){ + var v = null; + var label = null; + if(typeof t == 'object') { + v = t[0]; + if(t.length > 1) { label = t[1]; } + } + else { + v = t; + } + if(!label) { + label = axis.tickFormatter(v, axis); + } + axis.ticks[i] = {v: v, label: label} + }.bind(this)); + + } + + if (axisOptions.autoscaleMargin != null && axis.ticks.length > 0) { + if (axisOptions.min == null) + axis.min = Math.min(axis.min, axis.ticks[0].v); + if (axisOptions.max == null && axis.ticks.length > 1) + axis.max = Math.min(axis.max, axis.ticks[axis.ticks.length - 1].v); + } + }, + /** + * Function: setSpacing + * + * Parameters: none + */ + setSpacing: function() { + // calculate y label dimensions + var i, labels = [], l; + for (i = 0; i < this.yaxis.ticks.length; ++i) { + l = this.yaxis.ticks[i].label; + + if (l) + labels.push('
                            ' + l + '
                            '); + } + + if (labels.length > 0) { + var dummyDiv = new Element('div', {'style': 'position:absolute;top:-10000px;font-size:smaller'}); + dummyDiv.update(labels.join("")); + this.domObj.insert(dummyDiv); + this.yLabelMaxWidth = dummyDiv.getWidth(); + this.yLabelMaxHeight = dummyDiv.select('div')[0].getHeight(); + dummyDiv.remove(); + } + + var maxOutset = this.options.grid.borderWidth; + if (this.options.points.show) + maxOutset = Math.max(maxOutset, this.options.points.radius + this.options.points.lineWidth/2); + for (i = 0; i < this.graphData.length; ++i) { + if (this.graphData[i].points.show) + maxOutset = Math.max(maxOutset, this.graphData[i].points.radius + this.graphData[i].points.lineWidth/2); + } + + this.chartOffset.left = this.chartOffset.right = this.chartOffset.top = this.chartOffset.bottom = maxOutset; + + this.chartOffset.left += this.yLabelMaxWidth + this.options.grid.labelMargin; + this.chartWidth = this.canvasWidth - this.chartOffset.left - this.chartOffset.right; + + this.xLabelBoxWidth = this.chartWidth / 6; + labels = []; + + for (i = 0; i < this.xaxis.ticks.length; ++i) { + l = this.xaxis.ticks[i].label; + if (l) { + labels.push('' + l + ''); + } + } + + var xLabelMaxHeight = 0; + if (labels.length > 0) { + var dummyDiv = new Element('div', {'style': 'position:absolute;top:-10000px;font-size:smaller'}); + dummyDiv.update(labels.join("")); + this.domObj.appendChild(dummyDiv); + xLabelMaxHeight = dummyDiv.getHeight(); + dummyDiv.remove(); + } + + this.chartOffset.bottom += xLabelMaxHeight + this.options.grid.labelMargin; + this.chartHeight = this.canvasHeight - this.chartOffset.bottom - this.chartOffset.top; + this.hozScale = this.chartWidth / (this.xaxis.max - this.xaxis.min); + this.vertScale = this.chartHeight / (this.yaxis.max - this.yaxis.min); + }, + /** + * function: draw + */ + draw: function() { + if(this.options.bars.show) + { + this.extendXRangeIfNeededByBar(); + this.setSpacing(); + this.drawGrid(); + this.drawBarGraph(this.graphData, this.barDataRange); + } + else if(this.options.pies.show) + { + this.preparePieData(this.graphData); + this.drawPieGraph(this.graphData); + } + else + { + this.drawGrid(); + for (var i = 0; i < this.graphData.length; i++) { + this.drawGraph(this.graphData[i]); + } + } + }, + /** + * function: translateHoz + * + * Paramters: + * {Object} x + * + * Description: Given a value this function translate it to relative x coord on canvas + */ + translateHoz: function(x) { + return (x - this.xaxis.min) * this.hozScale; + }, + /** + * function: translateVert + * + * parameters: + * {Object} y + * + * Description: Given a value this function translate it to relative y coord on canvas + */ + translateVert: function(y) { + return this.chartHeight - (y - this.yaxis.min) * this.vertScale; + }, + /** + * function: drawGrid + * + * parameters: none + * + * description: draws the actual grid on the canvas + */ + drawGrid: function() { + var i; + + this.context.save(); + this.context.clearRect(0, 0, this.canvasWidth, this.canvasHeight); + this.context.translate(this.chartOffset.left, this.chartOffset.top); + + // draw background, if any + if (this.options.grid.backgroundColor != null) { + this.context.fillStyle = this.options.grid.backgroundColor; + this.context.fillRect(0, 0, this.chartWidth, this.chartHeight); + } + + // draw colored areas + if (this.options.grid.coloredAreas) { + var areas = this.options.grid.coloredAreas; + if (Object.isFunction(areas)) { + areas = areas({ xmin: this.xaxis.min, xmax: this.xaxis.max, ymin: this.yaxis.min, ymax: this.yaxis.max }); + } + + areas.each(function(a){ + // clip + if (a.x1 == null || a.x1 < this.xaxis.min) + a.x1 = this.xaxis.min; + if (a.x2 == null || a.x2 > this.xaxis.max) + a.x2 = this.xaxis.max; + if (a.y1 == null || a.y1 < this.yaxis.min) + a.y1 = this.yaxis.min; + if (a.y2 == null || a.y2 > this.yaxis.max) + a.y2 = this.yaxis.max; + + var tmp; + if (a.x1 > a.x2) { + tmp = a.x1; + a.x1 = a.x2; + a.x2 = tmp; + } + if (a.y1 > a.y2) { + tmp = a.y1; + a.y1 = a.y2; + a.y2 = tmp; + } + + if (a.x1 >= this.xaxis.max || a.x2 <= this.xaxis.min || a.x1 == a.x2 + || a.y1 >= this.yaxis.max || a.y2 <= this.yaxis.min || a.y1 == a.y2) + return; + + this.context.fillStyle = a.color || this.options.grid.coloredAreasColor; + this.context.fillRect(Math.floor(this.translateHoz(a.x1)), Math.floor(this.translateVert(a.y2)), + Math.floor(this.translateHoz(a.x2) - this.translateHoz(a.x1)), Math.floor(this.translateVert(a.y1) - this.translateVert(a.y2))); + }.bind(this)); + + + } + + // draw the inner grid + this.context.lineWidth = 1; + this.context.strokeStyle = this.options.grid.tickColor; + this.context.beginPath(); + var v; + if (this.options.grid.drawXAxis) { + this.xaxis.ticks.each(function(aTick){ + v = aTick.v; + if(v <= this.xaxis.min || v >= this.xaxis.max) { + return; + } + this.context.moveTo(Math.floor(this.translateHoz(v)) + this.context.lineWidth / 2, 0); + this.context.lineTo(Math.floor(this.translateHoz(v)) + this.context.lineWidth / 2, this.chartHeight); + }.bind(this)); + + } + + if (this.options.grid.drawYAxis) { + this.yaxis.ticks.each(function(aTick){ + v = aTick.v; + if(v <= this.yaxis.min || v >= this.yaxis.max) { + return; + } + this.context.moveTo(0, Math.floor(this.translateVert(v)) + this.context.lineWidth / 2); + this.context.lineTo(this.chartWidth, Math.floor(this.translateVert(v)) + this.context.lineWidth / 2); + }.bind(this)); + + } + this.context.stroke(); + + if (this.options.grid.borderWidth) { + // draw border + this.context.lineWidth = this.options.grid.borderWidth; + this.context.strokeStyle = this.options.grid.color; + this.context.lineJoin = "round"; + this.context.strokeRect(0, 0, this.chartWidth, this.chartHeight); + this.context.restore(); + } + }, + /** + * function: insertLabels + * + * parameters: none + * + * description: inserts the label with proper spacing. Both on X and Y axis + */ + insertLabels: function() { + this.domObj.select(".tickLabels").invoke('remove'); + + var i, tick; + var html = '
                            '; + + // do the x-axis + this.xaxis.ticks.each(function(tick){ + if (!tick.label || tick.v < this.xaxis.min || tick.v > this.xaxis.max) + return; + html += '
                            ' + tick.label + "
                            "; + + }.bind(this)); + + // do the y-axis + this.yaxis.ticks.each(function(tick){ + if (!tick.label || tick.v < this.yaxis.min || tick.v > this.yaxis.max) + return; + html += '
                            ' + tick.label + "
                            "; + }.bind(this)); + + html += '
                            '; + + this.domObj.insert(html); + }, + /** + * function: drawGraph + * + * Paramters: + * {Object} graphData + * + * Description: given a graphData (series) this function calls a proper lower level method to draw it. + */ + drawGraph: function(graphData) { + if (graphData.lines.show || (!graphData.bars.show && !graphData.points.show)) + this.drawGraphLines(graphData); + if (graphData.bars.show) + this.drawGraphBar(graphData); + if (graphData.points.show) + this.drawGraphPoints(graphData); + }, + /** + * function: plotLine + * + * parameters: + * {Object} data + * {Object} offset + * + * description: + * Helper function that plots a line based on the data provided + */ + plotLine: function(data, offset) { + var prev, cur = null, drawx = null, drawy = null; + + this.context.beginPath(); + for (var i = 0; i < data.length; ++i) { + prev = cur; + cur = data[i]; + + if (prev == null || cur == null) + continue; + + var x1 = prev[0], y1 = prev[1], + x2 = cur[0], y2 = cur[1]; + + // clip with ymin + if (y1 <= y2 && y1 < this.yaxis.min) { + if (y2 < this.yaxis.min) + continue; // line segment is outside + // compute new intersection point + x1 = (this.yaxis.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = this.yaxis.min; + } + else if (y2 <= y1 && y2 < this.yaxis.min) { + if (y1 < this.yaxis.min) + continue; + x2 = (this.yaxis.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = this.yaxis.min; + } + + // clip with ymax + if (y1 >= y2 && y1 > this.yaxis.max) { + if (y2 > this.yaxis.max) + continue; + x1 = (this.yaxis.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = this.yaxis.max; + } + else if (y2 >= y1 && y2 > this.yaxis.max) { + if (y1 > this.yaxis.max) + continue; + x2 = (this.yaxis.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = this.yaxis.max; + } + + // clip with xmin + if (x1 <= x2 && x1 < this.xaxis.min) { + if (x2 < this.xaxis.min) + continue; + y1 = (this.xaxis.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = this.xaxis.min; + } + else if (x2 <= x1 && x2 < this.xaxis.min) { + if (x1 < this.xaxis.min) + continue; + y2 = (this.xaxis.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = this.xaxis.min; + } + + // clip with xmax + if (x1 >= x2 && x1 > this.xaxis.max) { + if (x2 > this.xaxis.max) + continue; + y1 = (this.xaxis.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = this.xaxis.max; + } + else if (x2 >= x1 && x2 > this.xaxis.max) { + if (x1 > this.xaxis.max) + continue; + y2 = (this.xaxis.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = this.xaxis.max; + } + + if (drawx != this.translateHoz(x1) || drawy != this.translateVert(y1) + offset) + this.context.moveTo(this.translateHoz(x1), this.translateVert(y1) + offset); + + drawx = this.translateHoz(x2); + drawy = this.translateVert(y2) + offset; + this.context.lineTo(drawx, drawy); + } + this.context.stroke(); + }, + /** + * function: plotLineArea + * + * parameters: + * {Object} data + * + * description: + * Helper functoin that plots a colored line graph. This function + * takes the data nad then fill in the area on the graph properly + */ + plotLineArea: function(data) { + var prev, cur = null; + + var bottom = Math.min(Math.max(0, this.yaxis.min), this.yaxis.max); + var top, lastX = 0; + + var areaOpen = false; + + for (var i = 0; i < data.length; ++i) { + prev = cur; + cur = data[i]; + + if (areaOpen && prev != null && cur == null) { + // close area + this.context.lineTo(this.translateHoz(lastX), this.translateVert(bottom)); + this.context.fill(); + areaOpen = false; + continue; + } + + if (prev == null || cur == null) + continue; + + var x1 = prev[0], y1 = prev[1], + x2 = cur[0], y2 = cur[1]; + + // clip x values + + // clip with xmin + if (x1 <= x2 && x1 < this.xaxis.min) { + if (x2 < this.xaxis.min) + continue; + y1 = (this.xaxis.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = this.xaxis.min; + } + else if (x2 <= x1 && x2 < this.xaxis.min) { + if (x1 < this.xaxis.min) + continue; + y2 = (this.xaxis.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = this.xaxis.min; + } + + // clip with xmax + if (x1 >= x2 && x1 > this.xaxis.max) { + if (x2 > this.xaxis.max) + continue; + y1 = (this.xaxis.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = this.xaxis.max; + } + else if (x2 >= x1 && x2 > this.xaxis.max) { + if (x1 > this.xaxis.max) + continue; + y2 = (this.xaxis.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = this.xaxis.max; + } + + if (!areaOpen) { + // open area + this.context.beginPath(); + this.context.moveTo(this.translateHoz(x1), this.translateVert(bottom)); + areaOpen = true; + } + + // now first check the case where both is outside + if (y1 >= this.yaxis.max && y2 >= this.yaxis.max) { + this.context.lineTo(this.translateHoz(x1), this.translateVert(this.yaxis.max)); + this.context.lineTo(this.translateHoz(x2), this.translateVert(this.yaxis.max)); + continue; + } + else if (y1 <= this.yaxis.min && y2 <= this.yaxis.min) { + this.context.lineTo(this.translateHoz(x1), this.translateVert(this.yaxis.min)); + this.context.lineTo(this.translateHoz(x2), this.translateVert(this.yaxis.min)); + continue; + } + + var x1old = x1, x2old = x2; + + // clip with ymin + if (y1 <= y2 && y1 < this.yaxis.min && y2 >= this.yaxis.min) { + x1 = (this.yaxis.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = this.yaxis.min; + } + else if (y2 <= y1 && y2 < this.yaxis.min && y1 >= this.yaxis.min) { + x2 = (this.yaxis.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = this.yaxis.min; + } + + // clip with ymax + if (y1 >= y2 && y1 > this.yaxis.max && y2 <= this.yaxis.max) { + x1 = (this.yaxis.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = this.yaxis.max; + } + else if (y2 >= y1 && y2 > this.yaxis.max && y1 <= this.yaxis.max) { + x2 = (this.yaxis.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = this.yaxis.max; + } + + + // if the x value was changed we got a rectangle + // to fill + if (x1 != x1old) { + if (y1 <= this.yaxis.min) + top = this.yaxis.min; + else + top = this.yaxis.max; + + this.context.lineTo(this.translateHoz(x1old), this.translateVert(top)); + this.context.lineTo(this.translateHoz(x1), this.translateVert(top)); + } + + // fill the triangles + this.context.lineTo(this.translateHoz(x1), this.translateVert(y1)); + this.context.lineTo(this.translateHoz(x2), this.translateVert(y2)); + + // fill the other rectangle if it's there + if (x2 != x2old) { + if (y2 <= this.yaxis.min) + top = this.yaxis.min; + else + top = this.yaxis.max; + + this.context.lineTo(this.translateHoz(x2old), this.translateVert(top)); + this.context.lineTo(this.translateHoz(x2), this.translateVert(top)); + } + + lastX = Math.max(x2, x2old); + } + + if (areaOpen) { + this.context.lineTo(this.translateHoz(lastX), this.translateVert(bottom)); + this.context.fill(); + } + }, + /** + * function: drawGraphLines + * + * parameters: + * {Object} graphData + * + * description: + * Main function that daws the line graph. This function is called + * if lines property is set to show or no other type of + * graph is specified. This function depends on and + * functions. + */ + drawGraphLines: function(graphData) { + this.context.save(); + this.context.translate(this.chartOffset.left, this.chartOffset.top); + this.context.lineJoin = "round"; + + var lw = graphData.lines.lineWidth; + var sw = graphData.shadowSize; + // FIXME: consider another form of shadow when filling is turned on + if (sw > 0) { + // draw shadow in two steps + this.context.lineWidth = sw / 2; + this.context.strokeStyle = "rgba(0,0,0,0.1)"; + this.plotLine(graphData.data, lw/2 + sw/2 + this.context.lineWidth/2); + + this.context.lineWidth = sw / 2; + this.context.strokeStyle = "rgba(0,0,0,0.2)"; + this.plotLine(graphData.data, lw/2 + this.context.lineWidth/2); + } + + this.context.lineWidth = lw; + this.context.strokeStyle = graphData.color; + if (graphData.lines.fill) { + this.context.fillStyle = graphData.lines.fillColor != null ? graphData.lines.fillColor : this.parseColor(graphData.color).scale(null, null, null, 0.4).toString(); + this.plotLineArea(graphData.data, 0); + } + + this.plotLine(graphData.data, 0); + this.context.restore(); + }, + /** + * function: plotPoints + * + * parameters: + * {Object} data + * {Object} radius + * {Object} fill + * + * description: + * Helper function that draws the point graph according to the data provided. Size of each + * point is provided by radius variable and fill specifies if points + * are filled + */ + plotPoints: function(data, radius, fill) { + for (var i = 0; i < data.length; ++i) { + if (data[i] == null) + continue; + + var x = data[i][0], y = data[i][1]; + if (x < this.xaxis.min || x > this.xaxis.max || y < this.yaxis.min || y > this.yaxis.max) + continue; + + this.context.beginPath(); + this.context.arc(this.translateHoz(x), this.translateVert(y), radius, 0, 2 * Math.PI, true); + if (fill) + this.context.fill(); + this.context.stroke(); + } + }, + /** + * function: plotPointShadows + * + * parameters: + * {Object} data + * {Object} offset + * {Object} radius + * + * description: + * Helper function that draws the shadows for the points. + */ + plotPointShadows: function(data, offset, radius) { + for (var i = 0; i < data.length; ++i) { + if (data[i] == null) + continue; + + var x = data[i][0], y = data[i][1]; + if (x < this.xaxis.min || x > this.xaxis.max || y < this.yaxis.min || y > this.yaxis.max) + continue; + this.context.beginPath(); + this.context.arc(this.translateHoz(x), this.translateVert(y) + offset, radius, 0, Math.PI, false); + this.context.stroke(); + } + }, + /** + * function: drawGraphPoints + * + * paramters: + * {Object} graphData + * + * description: + * Draws the point graph onto the canvas. This function depends on helper + * functions and + */ + drawGraphPoints: function(graphData) { + this.context.save(); + this.context.translate(this.chartOffset.left, this.chartOffset.top); + + var lw = graphData.lines.lineWidth; + var sw = graphData.shadowSize; + if (sw > 0) { + // draw shadow in two steps + this.context.lineWidth = sw / 2; + this.context.strokeStyle = "rgba(0,0,0,0.1)"; + this.plotPointShadows(graphData.data, sw/2 + this.context.lineWidth/2, graphData.points.radius); + + this.context.lineWidth = sw / 2; + this.context.strokeStyle = "rgba(0,0,0,0.2)"; + this.plotPointShadows(graphData.data, this.context.lineWidth/2, graphData.points.radius); + } + + this.context.lineWidth = graphData.points.lineWidth; + this.context.strokeStyle = graphData.color; + this.context.fillStyle = graphData.points.fillColor != null ? graphData.points.fillColor : graphData.color; + this.plotPoints(graphData.data, graphData.points.radius, graphData.points.fill); + this.context.restore(); + }, + /** + * function: preparePieData + * + * parameters: + * {Object} graphData + * + * Description: + * Helper function that manipulates the given data stream so that it can + * be plotted as a Pie Chart + */ + preparePieData: function(graphData) + { + for(i = 0; i < graphData.length; i++) + { + var data = 0; + for(j = 0; j < graphData[i].data.length; j++){ + data += parseInt(graphData[i].data[j][1]); + } + graphData[i].data = data; + } + }, + /** + * function: drawPieShadow + * + * {Object} anchorX + * {Object} anchorY + * {Object} radius + * + * description: + * Helper function that draws a shadow for the Pie Chart. This just draws + * a circle with offset that simulates shadow. We do not give each piece + * of the pie an individual shadow. + */ + drawPieShadow: function(anchorX, anchorY, radius) + { + this.context.beginPath(); + this.context.moveTo(anchorX, anchorY); + this.context.fillStyle = 'rgba(0,0,0,' + 0.1 + ')'; + startAngle = 0; + endAngle = (Math.PI/180)*360; + this.context.arc(anchorX + 2, anchorY +2, radius + (this.options.shadowSize/2), startAngle, endAngle, false); + this.context.fill(); + this.context.closePath(); + }, + /** + * function: drawPieGraph + * + * parameters: + * {Object} graphData + * + * description: + * Draws the actual pie chart. This function depends on helper function + * to draw the actual shadow + */ + drawPieGraph: function(graphData) + { + var sumData = 0; + var radius = 0; + var centerX = this.chartWidth/2; + var centerY = this.chartHeight/2; + var startAngle = 0; + var endAngle = 0; + var fontSize = this.options.pies.fontSize; + var labelWidth = this.options.pies.labelWidth; + + //determine Pie Radius + if(!this.options.pies.autoScale) + radius = this.options.pies.radius; + else + radius = (this.chartHeight * 0.85)/2; + + var labelRadius = radius * 1.05; + + for(i = 0; i < graphData.length; i++) + sumData += graphData[i].data; + + // used to adjust labels so that everything adds up to 100% + totalPct = 0; + + //lets draw the shadow first.. we don't need an individual shadow to every pie rather we just + //draw a circle underneath to simulate the shadow... + this.drawPieShadow(centerX, centerY, radius, 0, 0); + + //lets draw the actual pie chart now. + graphData.each(function(gd, j){ + var pct = gd.data / sumData; + startAngle = endAngle; + endAngle += pct * (2 * Math.PI); + var sliceMiddle = (endAngle - startAngle) / 2 + startAngle; + var labelX = centerX + Math.cos(sliceMiddle) * labelRadius; + var labelY = centerY + Math.sin(sliceMiddle) * labelRadius; + var anchorX = centerX; + var anchorY = centerY; + var textAlign = null; + var verticalAlign = null; + var left = 0; + var top = 0; + + //draw pie: + //drawing pie + this.context.beginPath(); + this.context.moveTo(anchorX, anchorY); + this.context.arc(anchorX, anchorY, radius, startAngle, endAngle, false); + this.context.closePath(); + this.context.fillStyle = this.parseColor(gd.color).scale(null, null, null, this.options.pies.fillOpacity).toString(); + + if(this.options.pies.fill) { this.context.fill(); } + + // drawing labels + if (sliceMiddle <= 0.25 * (2 * Math.PI)) + { + // text on top and align left + textAlign = "left"; + verticalAlign = "top"; + left = labelX; + top = labelY + fontSize; + } + else if (sliceMiddle > 0.25 * (2 * Math.PI) && sliceMiddle <= 0.5 * (2 * Math.PI)) + { + // text on bottom and align left + textAlign = "left"; + verticalAlign = "bottom"; + left = labelX - labelWidth; + top = labelY; + } + else if (sliceMiddle > 0.5 * (2 * Math.PI) && sliceMiddle <= 0.75 * (2 * Math.PI)) + { + // text on bottom and align right + textAlign = "right"; + verticalAlign = "bottom"; + left = labelX - labelWidth; + top = labelY - fontSize; + } + else + { + // text on top and align right + textAlign = "right"; + verticalAlign = "bottom"; + left = labelX; + top = labelY - fontSize; + } + + left = left + "px"; + top = top + "px"; + var textVal = Math.round(pct * 100); + + if (j == graphData.length - 1) { + if (textVal + totalPct < 100) { + textVal = textVal + 1; + } else if (textVal + totalPct > 100) { + textVal = textVal - 1; + }; + } + + var html = "
                            " + textVal + "%
                            "; + //$(html).appendTo(target); + this.domObj.insert(html); + + totalPct = totalPct + textVal; + }.bind(this)); + + }, + /** + * function: drawBarGraph + * + * parameters: + * {Object} graphData + * {Object} barDataRange + * + * description: + * Goes through each series in graphdata and passes it onto function + */ + drawBarGraph: function(graphData, barDataRange) + { + graphData.each(function(gd, i){ + this.drawGraphBars(gd, i, graphData.size(), barDataRange); + }.bind(this)); + }, + /** + * function: drawGraphBar + * + * parameters: + * {Object} graphData + * + * description: + * This function is called when an individual series in GraphData is bar graph and plots it + */ + drawGraphBar: function(graphData) + { + this.drawGraphBars(graphData, 0, this.graphData.length, this.barDataRange); + }, + /** + * function: plotBars + * + * parameters: + * {Object} graphData + * {Object} data + * {Object} barWidth + * {Object} offset + * {Object} fill + * {Object} counter + * {Object} total + * {Object} barDataRange + * + * description: + * Helper function that draws the bar graph based on data. + */ + plotBars: function(graphData, data, barWidth, offset, fill,counter, total, barDataRange) { + var shift = 0; + + if(total % 2 == 0) + { + shift = (1 + ((counter - total /2 ) - 1)) * barWidth; + } + else + { + var interval = 0.5; + if(counter == (total/2 - interval )) { + shift = - barWidth * interval; + } + else { + shift = (interval + (counter - Math.round(total/2))) * barWidth; + } + } + + var rangeData = []; + data.each(function(d){ + if(!d) return; + + var x = d[0], y = d[1]; + var drawLeft = true, drawTop = true, drawRight = true; + var left = x + shift, right = x + barWidth + shift, bottom = 0, top = y; + var rangeDataPoint = {}; + rangeDataPoint.left = left; + rangeDataPoint.right = right; + rangeDataPoint.value = top; + rangeData.push(rangeDataPoint); + + if (right < this.xaxis.min || left > this.xaxis.max || top < this.yaxis.min || bottom > this.yaxis.max) + return; + + // clip + if (left < this.xaxis.min) { + left = this.xaxis.min; + drawLeft = false; + } + + if (right > this.xaxis.max) { + right = this.xaxis.max; + drawRight = false; + } + + if (bottom < this.yaxis.min) + bottom = this.yaxis.min; + + if (top > this.yaxis.max) { + top = this.yaxis.max; + drawTop = false; + } + + if(graphData.bars.showShadow && graphData.shadowSize > 0) + this.plotShadowOutline(graphData, this.context.strokeStyle, left, bottom, top, right, drawLeft, drawRight, drawTop); + + // fill the bar + if (fill) { + this.context.beginPath(); + this.context.moveTo(this.translateHoz(left), this.translateVert(bottom) + offset); + this.context.lineTo(this.translateHoz(left), this.translateVert(top) + offset); + this.context.lineTo(this.translateHoz(right), this.translateVert(top) + offset); + this.context.lineTo(this.translateHoz(right), this.translateVert(bottom) + offset); + this.context.fill(); + } + + // draw outline + if (drawLeft || drawRight || drawTop) { + this.context.beginPath(); + this.context.moveTo(this.translateHoz(left), this.translateVert(bottom) + offset); + if (drawLeft) + this.context.lineTo(this.translateHoz(left), this.translateVert(top) + offset); + else + this.context.moveTo(this.translateHoz(left), this.translateVert(top) + offset); + + if (drawTop) + this.context.lineTo(this.translateHoz(right), this.translateVert(top) + offset); + else + this.context.moveTo(this.translateHoz(right), this.translateVert(top) + offset); + if (drawRight) + this.context.lineTo(this.translateHoz(right), this.translateVert(bottom) + offset); + else + this.context.moveTo(this.translateHoz(right), this.translateVert(bottom) + offset); + this.context.stroke(); + } + }.bind(this)); + + barDataRange.push(rangeData); + }, + /** + * function: plotShadowOutline + * + * parameters: + * {Object} graphData + * {Object} orgStrokeStyle + * {Object} left + * {Object} bottom + * {Object} top + * {Object} right + * {Object} drawLeft + * {Object} drawRight + * {Object} drawTop + * + * description: + * Helper function that draws a outline simulating shadow for bar chart + */ + plotShadowOutline: function(graphData, orgStrokeStyle, left, bottom, top, right, drawLeft, drawRight, drawTop) + { + var orgOpac = 0.3; + + for(var n = 1; n <= this.options.shadowSize/2; n++) + { + var opac = orgOpac * n; + this.context.beginPath(); + this.context.strokeStyle = "rgba(0,0,0," + opac + ")"; + + this.context.moveTo(this.translateHoz(left) + n, this.translateVert(bottom)); + + if(drawLeft) + this.context.lineTo(this.translateHoz(left) + n, this.translateVert(top) - n); + else + this.context.moveTo(this.translateHoz(left) + n, this.translateVert(top) - n); + + if(drawTop) + this.context.lineTo(this.translateHoz(right) + n, this.translateVert(top) - n); + else + this.context.moveTo(this.translateHoz(right) + n, this.translateVert(top) - n); + + if(drawRight) + this.context.lineTo(this.translateHoz(right) + n, this.translateVert(bottom)); + else + this.context.lineTo(this.translateHoz(right) + n, this.translateVert(bottom)); + + this.context.stroke(); + this.context.closePath(); + } + + this.context.strokeStyle = orgStrokeStyle; + }, + /** + * function: drawGraphBars + * + * parameters: + * {Object} graphData + * {Object} counter + * {Object} total + * {Object} barDataRange + * + * description: + * Draws the actual bar graphs. Calls to draw the individual bar + */ + drawGraphBars: function(graphData, counter, total, barDataRange){ + this.context.save(); + this.context.translate(this.chartOffset.left, this.chartOffset.top); + this.context.lineJoin = "round"; + + var bw = graphData.bars.barWidth; + var lw = Math.min(graphData.bars.lineWidth, bw); + + + this.context.lineWidth = lw; + this.context.strokeStyle = graphData.color; + if (graphData.bars.fill) { + this.context.fillStyle = graphData.bars.fillColor != null ? graphData.bars.fillColor : this.parseColor(graphData.color).scale(null, null, null, this.options.bars.fillOpacity).toString(); + } + this.plotBars(graphData, graphData.data, bw, 0, graphData.bars.fill, counter, total, barDataRange); + this.context.restore(); + }, + /** + * function: insertLegend + * + * description: + * inserts legend onto the graph. *legend: {show: true}* must be set in + * for for this to work. + */ + insertLegend: function() { + this.domObj.select(".legend").invoke('remove'); + + if (!this.options.legend.show) + return; + + var fragments = []; + var rowStarted = false; + this.graphData.each(function(gd, index){ + if(!gd.label) { + return; + } + if(index % this.options.legend.noColumns == 0) { + if(rowStarted) { + fragments.push(''); + } + fragments.push(''); + rowStarted = true; + } + var label = gd.label; + if(this.options.legend.labelFormatter != null) { + label = this.options.legend.labelFormatter(label); + } + + fragments.push( + '
                            ' + + '' + label + ''); + + }.bind(this)); + + if (rowStarted) + fragments.push(''); + + if(fragments.length > 0){ + var table = '' + fragments.join("") + '
                            '; + if($(this.options.legend.container) != null){ + $(this.options.legend.container).insert(table); + }else{ + var pos = ''; + var p = this.options.legend.position, m = this.options.legend.margin; + + if(p.charAt(0) == 'n') pos += 'top:' + (m + this.chartOffset.top) + 'px;'; + else if(p.charAt(0) == 's') pos += 'bottom:' + (m + this.chartOffset.bottom) + 'px;'; + if(p.charAt(1) == 'e') pos += 'right:' + (m + this.chartOffset.right) + 'px;'; + else if(p.charAt(1) == 'w') pos += 'left:' + (m + this.chartOffset.bottom) + 'px;'; + var div = this.domObj.insert('
                            ' + table + '
                            ').getElementsBySelector('div.ProtoChart-legend').first(); + + if(this.options.legend.backgroundOpacity != 0.0){ + var c = this.options.legend.backgroundColor; + if(c == null){ + var tmp = (this.options.grid.backgroundColor != null) ? this.options.grid.backgroundColor : this.extractColor(div); + c = this.parseColor(tmp).adjust(null, null, null, 1).toString(); + } + this.domObj.insert('
                            ').select('div.ProtoChart-legend-bg').first().setStyle({ + 'opacity': this.options.legend.backgroundOpacity + }); + } + } + } + }, + /** + * Function: onMouseMove + * + * parameters: + * event: {Object} ev + * + * Description: + * Called whenever the mouse is moved on the graph. This takes care of the mousetracking. + * This event also fires event, which gets current position of the + * mouse as a parameters. + */ + onMouseMove: function(ev) { + var e = ev || window.event; + if (e.pageX == null && e.clientX != null) { + var de = document.documentElement, b = $(document.body); + this.lastMousePos.pageX = e.clientX + (de && de.scrollLeft || b.scrollLeft || 0); + this.lastMousePos.pageY = e.clientY + (de && de.scrollTop || b.scrollTop || 0); + } + else { + this.lastMousePos.pageX = e.pageX; + this.lastMousePos.pageY = e.pageY; + } + + var offset = this.overlay.cumulativeOffset(); + var pos = { + x: this.xaxis.min + (e.pageX - offset.left - this.chartOffset.left) / this.hozScale, + y: this.yaxis.max - (e.pageY - offset.top - this.chartOffset.top) / this.vertScale + }; + + if(this.options.mouse.track && this.selectionInterval == null) { + this.hit(ev, pos); + } + this.domObj.fire("ProtoChart:mousemove", [ pos ]); + }, + /** + * Function: onMouseDown + * + * Parameters: + * Event - {Object} e + * + * Description: + * Called whenever the mouse is clicked. + */ + onMouseDown: function(e) { + if (e.which != 1) // only accept left-click + return; + + document.body.focus(); + + if (document.onselectstart !== undefined && this.workarounds.onselectstart == null) { + this.workarounds.onselectstart = document.onselectstart; + document.onselectstart = function () { return false; }; + } + if (document.ondrag !== undefined && this.workarounds.ondrag == null) { + this.workarounds.ondrag = document.ondrag; + document.ondrag = function () { return false; }; + } + + this.setSelectionPos(this.selection.first, e); + + if (this.selectionInterval != null) + clearInterval(this.selectionInterval); + this.lastMousePos.pageX = null; + this.selectionInterval = setInterval(this.updateSelectionOnMouseMove.bind(this), 200); + + this.overlay.observe("mouseup", this.onSelectionMouseUp.bind(this)); + }, + /** + * Function: onClick + * parameters: + * Event - {Object} e + * Description: + * Handles the "click" event on the chart. This function fires event. If + * is enabled then it also fires event which gives + * you access to exact data point where user clicked. + */ + onClick: function(e) { + if (this.ignoreClick) { + this.ignoreClick = false; + return; + } + var offset = this.overlay.cumulativeOffset(); + var pos ={ + x: this.xaxis.min + (e.pageX - offset.left - this.chartOffset.left) / this.hozScale, + y: this.yaxis.max - (e.pageY - offset.top - this.chartOffset.top) / this.vertScale + }; + this.domObj.fire("ProtoChart:plotclick", [ pos ]); + + if(this.options.allowDataClick) + { + var dataPoint = {}; + if(this.options.points.show) + { + dataPoint = this.getDataClickPoint(pos, this.options); + this.domObj.fire("ProtoChart:dataclick", [dataPoint]); + } + else if(this.options.lines.show && this.options.points.show) + { + dataPoint = this.getDataClickPoint(pos, this.options); + this.domObj.fire("ProtoChart:dataclick", [dataPoint]); + } + else if(this.options.bars.show) + { + if(this.barDataRange.length > 0) + { + dataPoint = this.getDataClickPoint(pos, this.options, this.barDataRange); + this.domObj.fire("ProtoChart:dataclick", [dataPoint]); + } + } + } + }, + /** + * Internal function used by onClick method. + */ + getDataClickPoint: function(pos, options, barDataRange) + { + pos.x = parseInt(pos.x); + pos.y = parseInt(pos.y); + var yClick = pos.y.toFixed(0); + var dataVal = {}; + + dataVal.position = pos; + dataVal.value = ''; + + if(options.points.show) + { + this.graphData.each(function(gd){ + var temp = gd.data; + var xClick = parseInt(pos.x.toFixed(0)); + if(xClick < 0) { xClick = 0; } + if(temp[xClick] && yClick >= temp[xClick][1] - (this.options.points.radius * 10) && yClick <= temp[xClick][1] + (this.options.points.radius * 10)) { + dataVal.value = temp[xClick][1]; + throw $break; + } + + }.bind(this)); + } + else if(options.bars.show) + { + xClick = pos.x; + this.barDataRange.each(function(barData){ + barData.each(function(data){ + var temp = data; + if(xClick > temp.left && xClick < temp.right) { + dataVal.value = temp.value; + throw $break; + } + }.bind(this)); + }.bind(this)); + + } + + return dataVal; + }, + /** + * Function: triggerSelectedEvent + * + * Description: + * Internal function called when a selection on the graph is made. This function + * fires event which has a parameter representing the selection + * { + * x1: {int}, y1: {int}, + * x2: {int}, y2: {int} + * } + */ + triggerSelectedEvent: function() { + var x1, x2, y1, y2; + if (this.selection.first.x <= this.selection.second.x) { + x1 = this.selection.first.x; + x2 = this.selection.second.x; + } + else { + x1 = this.selection.second.x; + x2 = this.selection.first.x; + } + + if (this.selection.first.y >= this.selection.second.y) { + y1 = this.selection.first.y; + y2 = this.selection.second.y; + } + else { + y1 = this.selection.second.y; + y2 = this.selection.first.y; + } + + x1 = this.xaxis.min + x1 / this.hozScale; + x2 = this.xaxis.min + x2 / this.hozScale; + + y1 = this.yaxis.max - y1 / this.vertScale; + y2 = this.yaxis.max - y2 / this.vertScale; + + this.domObj.fire("ProtoChart:selected", [ { x1: x1, y1: y1, x2: x2, y2: y2 } ]); + }, + /** + * Internal function + */ + onSelectionMouseUp: function(e) { + if (document.onselectstart !== undefined) + document.onselectstart = this.workarounds.onselectstart; + if (document.ondrag !== undefined) + document.ondrag = this.workarounds.ondrag; + + if (this.selectionInterval != null) { + clearInterval(this.selectionInterval); + this.selectionInterval = null; + } + + this.setSelectionPos(this.selection.second, e); + this.clearSelection(); + if (!this.selectionIsSane() || e.which != 1) + return false; + + this.drawSelection(); + this.triggerSelectedEvent(); + this.ignoreClick = true; + + return false; + }, + setSelectionPos: function(pos, e) { + var offset = $(this.overlay).cumulativeOffset(); + if (this.options.selection.mode == "y") { + if (pos == this.selection.first) + pos.x = 0; + else + pos.x = this.chartWidth; + } + else { + pos.x = e.pageX - offset.left - this.chartOffset.left; + pos.x = Math.min(Math.max(0, pos.x), this.chartWidth); + } + + if (this.options.selection.mode == "x") { + if (pos == this.selection.first) + pos.y = 0; + else + pos.y = this.chartHeight; + } + else { + pos.y = e.pageY - offset.top - this.chartOffset.top; + pos.y = Math.min(Math.max(0, pos.y), this.chartHeight); + } + }, + updateSelectionOnMouseMove: function() { + if (this.lastMousePos.pageX == null) + return; + + this.setSelectionPos(this.selection.second, this.lastMousePos); + this.clearSelection(); + if (this.selectionIsSane()) + this.drawSelection(); + }, + clearSelection: function() { + if (this.prevSelection == null) + return; + + var x = Math.min(this.prevSelection.first.x, this.prevSelection.second.x), + y = Math.min(this.prevSelection.first.y, this.prevSelection.second.y), + w = Math.abs(this.prevSelection.second.x - this.prevSelection.first.x), + h = Math.abs(this.prevSelection.second.y - this.prevSelection.first.y); + + this.overlayContext.clearRect(x + this.chartOffset.left - this.overlayContext.lineWidth, + y + this.chartOffset.top - this.overlayContext.lineWidth, + w + this.overlayContext.lineWidth*2, + h + this.overlayContext.lineWidth*2); + + this.prevSelection = null; + }, + /** + * Function: setSelection + * + * Parameters: + * Area - {Object} area represented as a range like: {x1: 3, y1: 3, x2: 4, y2: 8} + * + * Description: + * Sets the current graph selection to the provided range. Calls and + * functions internally. + */ + setSelection: function(area) { + this.clearSelection(); + + if (this.options.selection.mode == "x") { + this.selection.first.y = 0; + this.selection.second.y = this.chartHeight; + } + else { + this.selection.first.y = (this.yaxis.max - area.y1) * this.vertScale; + this.selection.second.y = (this.yaxis.max - area.y2) * this.vertScale; + } + if (this.options.selection.mode == "y") { + this.selection.first.x = 0; + this.selection.second.x = this.chartWidth; + } + else { + this.selection.first.x = (area.x1 - this.xaxis.min) * this.hozScale; + this.selection.second.x = (area.x2 - this.xaxis.min) * this.hozScale; + } + + this.drawSelection(); + this.triggerSelectedEvent(); + }, + /** + * Function: drawSelection + * Description: Internal function called to draw the selection made on the graph. + */ + drawSelection: function() { + if (this.prevSelection != null && + this.selection.first.x == this.prevSelection.first.x && + this.selection.first.y == this.prevSelection.first.y && + this.selection.second.x == this.prevSelection.second.x && + this.selection.second.y == this.prevSelection.second.y) + { + return; + } + + this.overlayContext.strokeStyle = this.parseColor(this.options.selection.color).scale(null, null, null, 0.8).toString(); + this.overlayContext.lineWidth = 1; + this.context.lineJoin = "round"; + this.overlayContext.fillStyle = this.parseColor(this.options.selection.color).scale(null, null, null, 0.4).toString(); + + this.prevSelection = { first: { x: this.selection.first.x, + y: this.selection.first.y }, + second: { x: this.selection.second.x, + y: this.selection.second.y } }; + + var x = Math.min(this.selection.first.x, this.selection.second.x), + y = Math.min(this.selection.first.y, this.selection.second.y), + w = Math.abs(this.selection.second.x - this.selection.first.x), + h = Math.abs(this.selection.second.y - this.selection.first.y); + + this.overlayContext.fillRect(x + this.chartOffset.left, y + this.chartOffset.top, w, h); + this.overlayContext.strokeRect(x + this.chartOffset.left, y + this.chartOffset.top, w, h); + }, + /** + * Internal function + */ + selectionIsSane: function() { + var minSize = 5; + return Math.abs(this.selection.second.x - this.selection.first.x) >= minSize && + Math.abs(this.selection.second.y - this.selection.first.y) >= minSize; + }, + /** + * Internal function that formats the track. This is the format the text is shown when mouse + * tracking is enabled. + */ + defaultTrackFormatter: function(val) + { + return '['+val.x+', '+val.y+']'; + }, + /** + * Function: clearHit + */ + clearHit: function(){ + if(this.prevHit){ + this.overlayContext.clearRect( + this.translateHoz(this.prevHit.x) + this.chartOffset.left - this.options.mouse.radius*2, + this.translateVert(this.prevHit.y) + this.chartOffset.top - this.options.mouse.radius*2, + this.options.mouse.radius*3 + this.options.points.lineWidth*3, + this.options.mouse.radius*3 + this.options.points.lineWidth*3 + ); + this.prevHit = null; + } + }, + /** + * Function: hit + * + * Parameters: + * event - {Object} event object + * mouse - {Object} mouse object that is used to keep track of mouse movement + * + * Description: + * If hit occurs this function will fire a ProtoChart:hit event. + */ + hit: function(event, mouse){ + /** + * Nearest data element. + */ + var n = { + dist:Number.MAX_VALUE, + x:null, + y:null, + mouse:null + }; + + + for(var i = 0, data, xsens, ysens; i < this.graphData.length; i++){ + if(!this.graphData[i].mouse.track) continue; + data = this.graphData[i].data; + xsens = (this.hozScale*this.graphData[i].mouse.sensibility); + ysens = (this.vertScale*this.graphData[i].mouse.sensibility); + for(var j = 0, xabs, yabs; j < data.length; j++){ + xabs = this.hozScale*Math.abs(data[j][0] - mouse.x); + yabs = this.vertScale*Math.abs(data[j][1] - mouse.y); + + if(xabs < xsens && yabs < ysens && (xabs+yabs) < n.dist){ + n.dist = (xabs+yabs); + n.x = data[j][0]; + n.y = data[j][1]; + n.mouse = this.graphData[i].mouse; + } + } + } + + if(n.mouse && n.mouse.track && !this.prevHit || (this.prevHit && n.x != this.prevHit.x && n.y != this.prevHit.y)){ + var el = this.domObj.select('.'+this.options.mouse.clsName).first(); + if(!el){ + var pos = '', p = this.options.mouse.position, m = this.options.mouse.margin; + if(p.charAt(0) == 'n') pos += 'top:' + (m + this.chartOffset.top) + 'px;'; + else if(p.charAt(0) == 's') pos += 'bottom:' + (m + this.chartOffset.bottom) + 'px;'; + if(p.charAt(1) == 'e') pos += 'right:' + (m + this.chartOffset.right) + 'px;'; + else if(p.charAt(1) == 'w') pos += 'left:' + (m + this.chartOffset.bottom) + 'px;'; + + this.domObj.insert(''); + return; + } + if(n.x !== null && n.y !== null){ + el.setStyle({display:'block'}); + + this.clearHit(); + if(n.mouse.lineColor != null){ + this.overlayContext.save(); + this.overlayContext.translate(this.chartOffset.left, this.chartOffset.top); + this.overlayContext.lineWidth = this.options.points.lineWidth; + this.overlayContext.strokeStyle = n.mouse.lineColor; + this.overlayContext.fillStyle = '#ffffff'; + this.overlayContext.beginPath(); + + + this.overlayContext.arc(this.translateHoz(n.x), this.translateVert(n.y), this.options.mouse.radius, 0, 2 * Math.PI, true); + this.overlayContext.fill(); + this.overlayContext.stroke(); + this.overlayContext.restore(); + } + this.prevHit = n; + + var decimals = n.mouse.trackDecimals; + if(decimals == null || decimals < 0) decimals = 0; + if(!this.options.mouse.fixedPosition) + { + el.setStyle({ + left: (this.translateHoz(n.x) + this.options.mouse.radius + 10) + "px", + top: (this.translateVert(n.y) + this.options.mouse.radius + 10) + "px" + }); + } + el.innerHTML = n.mouse.trackFormatter({x: n.x.toFixed(decimals), y: n.y.toFixed(decimals)}); + this.domObj.fire( 'ProtoChart:hit', [n] ) + }else if(this.options.prevHit){ + el.setStyle({display:'none'}); + this.clearHit(); + } + } + }, + /** + * Internal function + */ + floorInBase: function(n, base) { + return base * Math.floor(n / base); + }, + /** + * Function: extractColor + * + * Parameters: + * element - HTML element or ID of an HTML element + * + * Returns: + * color in string format + */ + extractColor: function(element) + { + var color; + do + { + color = $(element).getStyle('background-color').toLowerCase(); + if(color != '' && color != 'transparent') + { + break; + } + element = element.up(0); //or else just get the parent .... + } while(element.nodeName.toLowerCase() != 'body'); + + //safari fix + if(color == 'rgba(0, 0, 0, 0)') + return 'transparent'; + return color; + }, + /** + * Function: parseColor + * + * Parameters: + * str - color string in different formats + * + * Returns: + * a Proto.Color Object - use toString() function to retreive the color in rgba/rgb format + */ + parseColor: function(str) + { + var result; + + /** + * rgb(num,num,num) + */ + if((result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))) + return new Proto.Color(parseInt(result[1]), parseInt(result[2]), parseInt(result[3])); + + /** + * rgba(num,num,num,num) + */ + if((result = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))) + return new Proto.Color(parseInt(result[1]), parseInt(result[2]), parseInt(result[3]), parseFloat(result[4])); + + /** + * rgb(num%,num%,num%) + */ + if((result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))) + return new Proto.Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55); + + /** + * rgba(num%,num%,num%,num) + */ + if((result = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))) + return new Proto.Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55, parseFloat(result[4])); + + /** + * #a0b1c2 + */ + if((result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))) + return new Proto.Color(parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)); + + /** + * #fff + */ + if((result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))) + return new Proto.Color(parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)); + + /** + * Otherwise, check if user wants transparent .. or we just return a standard color; + */ + var name = str.strip().toLowerCase(); + if(name == 'transparent'){ + return new Proto.Color(255, 255, 255, 0); + } + + return new Proto.Color(100,100,100, 1); + + } +}); + +if(!Proto) var Proto = {}; + +/** + * Class: Proto.Color + * + * Helper class that manipulates colors using RGBA values. + * + */ + +Proto.Color = Class.create({ + initialize: function(r, g, b, a) { + this.rgba = ['r', 'g', 'b', 'a']; + var x = 4; + while(-1<--x) { + this[this.rgba[x]] = arguments[x] || ((x==3) ? 1.0 : 0); + } + }, + toString: function() { + if(this.a >= 1.0) { + return "rgb(" + [this.r, this.g, this.b].join(",") +")"; + } + else { + return "rgba("+[this.r, this.g, this.b, this.a].join(",")+")"; + } + }, + scale: function(rf, gf, bf, af) { + x = 4; + while(-1<--x) { + if(arguments[x] != null) { + this[this.rgba[x]] *= arguments[x]; + } + } + return this.normalize(); + }, + adjust: function(rd, gd, bd, ad) { + x = 4; //rgba.length + while (-1<--x) { + if (arguments[x] != null) + this[this.rgba[x]] += arguments[x]; + } + return this.normalize(); + }, + clone: function() { + return new Proto.Color(this.r, this.b, this.g, this.a); + }, + limit: function(val,minVal,maxVal) { + return Math.max(Math.min(val, maxVal), minVal); + }, + normalize: function() { + this.r = this.limit(parseInt(this.r), 0, 255); + this.g = this.limit(parseInt(this.g), 0, 255); + this.b = this.limit(parseInt(this.b), 0, 255); + this.a = this.limit(this.a, 0, 1); + return this; + } +}); \ No newline at end of file diff --git a/src/usr/local/www/protochart/excanvas-compressed.js b/src/usr/local/www/protochart/excanvas-compressed.js new file mode 100644 index 0000000..9d71658 --- /dev/null +++ b/src/usr/local/www/protochart/excanvas-compressed.js @@ -0,0 +1,19 @@ +if(!window.CanvasRenderingContext2D){(function(){var I=Math,i=I.round,L=I.sin,M=I.cos,m=10,A=m/2,Q={init:function(a){var b=a||document;if(/MSIE/.test(navigator.userAgent)&&!window.opera){var c=this;b.attachEvent("onreadystatechange",function(){c.r(b)})}},r:function(a){if(a.readyState=="complete"){if(!a.namespaces["s"]){a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml")}var b=a.createStyleSheet();b.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}"; +var c=a.getElementsByTagName("canvas");for(var d=0;d"){var d="/"+a.tagName,e;while((e=a.nextSibling)&&e.tagName!=d){e.removeNode()}if(e){e.removeNode()}}a.parentNode.replaceChild(c,a);return c},initElement:function(a){a=this.q(a);a.getContext=function(){if(this.l){return this.l}return this.l=new K(this)};a.attachEvent("onpropertychange",V);a.attachEvent("onresize", +W);var b=a.attributes;if(b.width&&b.width.specified){a.style.width=b.width.nodeValue+"px"}else{a.width=a.clientWidth}if(b.height&&b.height.specified){a.style.height=b.height.nodeValue+"px"}else{a.height=a.clientHeight}return a}};function V(a){var b=a.srcElement;switch(a.propertyName){case "width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case "height":b.style.height=b.attributes.height.nodeValue+"px";b.getContext().clearRect();break}}function W(a){var b=a.srcElement; +if(b.firstChild){b.firstChild.style.width=b.clientWidth+"px";b.firstChild.style.height=b.clientHeight+"px"}}Q.init();var R=[];for(var E=0;E<16;E++){for(var F=0;F<16;F++){R[E*16+F]=E.toString(16)+F.toString(16)}}function J(){return[[1,0,0],[0,1,0],[0,0,1]]}function G(a,b){var c=J();for(var d=0;d<3;d++){for(var e=0;e<3;e++){var g=0;for(var h=0;h<3;h++){g+=a[d][h]*b[h][e]}c[d][e]=g}}return c}function N(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit= +a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.d=a.d;b.e=a.e}function O(a){var b,c=1;a=String(a);if(a.substring(0,3)=="rgb"){var d=a.indexOf("(",3),e=a.indexOf(")",d+1),g=a.substring(d+1,e).split(",");b="#";for(var h=0;h<3;h++){b+=R[Number(g[h])]}if(g.length==4&&a.substr(3,1)=="a"){c=g[3]}}else{b=a}return[b,c]}function S(a){switch(a){case "butt":return"flat";case "round":return"round"; +case "square":default:return"square"}}function K(a){this.a=J();this.m=[];this.k=[];this.c=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=m*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.j=b;this.d=1;this.e=1}var j=K.prototype;j.clearRect=function(){this.j.innerHTML= +"";this.c=[]};j.beginPath=function(){this.c=[]};j.moveTo=function(a,b){this.c.push({type:"moveTo",x:a,y:b});this.f=a;this.g=b};j.lineTo=function(a,b){this.c.push({type:"lineTo",x:a,y:b});this.f=a;this.g=b};j.bezierCurveTo=function(a,b,c,d,e,g){this.c.push({type:"bezierCurveTo",cp1x:a,cp1y:b,cp2x:c,cp2y:d,x:e,y:g});this.f=e;this.g=g};j.quadraticCurveTo=function(a,b,c,d){var e=this.f+0.6666666666666666*(a-this.f),g=this.g+0.6666666666666666*(b-this.g),h=e+(c-this.f)/3,l=g+(d-this.g)/3;this.bezierCurveTo(e, +g,h,l,c,d)};j.arc=function(a,b,c,d,e,g){c*=m;var h=g?"at":"wa",l=a+M(d)*c-A,n=b+L(d)*c-A,o=a+M(e)*c-A,f=b+L(e)*c-A;if(l==o&&!g){l+=0.125}this.c.push({type:h,x:a,y:b,radius:c,xStart:l,yStart:n,xEnd:o,yEnd:f})};j.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()};j.strokeRect=function(a,b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke()};j.fillRect=function(a, +b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.fill()};j.createLinearGradient=function(a,b,c,d){var e=new H("gradient");return e};j.createRadialGradient=function(a,b,c,d,e,g){var h=new H("gradientradial");h.n=c;h.o=g;h.i.x=a;h.i.y=b;return h};j.drawImage=function(a,b){var c,d,e,g,h,l,n,o,f=a.runtimeStyle.width,k=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var q=a.width,r=a.height;a.runtimeStyle.width= +f;a.runtimeStyle.height=k;if(arguments.length==3){c=arguments[1];d=arguments[2];h=(l=0);n=(e=q);o=(g=r)}else if(arguments.length==5){c=arguments[1];d=arguments[2];e=arguments[3];g=arguments[4];h=(l=0);n=q;o=r}else if(arguments.length==9){h=arguments[1];l=arguments[2];n=arguments[3];o=arguments[4];c=arguments[5];d=arguments[6];e=arguments[7];g=arguments[8]}else{throw"Invalid number of arguments";}var s=this.b(c,d),t=[],v=10,w=10;t.push(" ','","");this.j.insertAdjacentHTML("BeforeEnd",t.join(""))};j.stroke=function(a){var b=[],c=O(a?this.fillStyle:this.strokeStyle),d=c[0],e=c[1]*this.globalAlpha,g=10,h=10;b.push("n.x){n.x=k.x}if(l.y== +null||k.yn.y){n.y=k.y}}}b.push(' ">');if(typeof this.fillStyle=="object"){var v={x:"50%",y:"50%"},w=n.x-l.x,x=n.y-l.y,p=w>x?w:x;v.x=i(this.fillStyle.i.x/w*100+50)+"%";v.y=i(this.fillStyle.i.y/x*100+50)+"%";var y=[];if(this.fillStyle.p=="gradientradial"){var z=this.fillStyle.n/p*100,B=this.fillStyle.o/p*100-z}else{var z=0,B=100}var C={offset:null,color:null},D={offset:null,color:null};this.fillStyle.h.sort(function(T,U){return T.offset-U.offset});for(var o=0;oC.offset||C.offset==null){C.offset=u.offset;C.color=u.color}if(u.offset')}else if(a){b.push('')}else{b.push("')}b.push("");this.j.insertAdjacentHTML("beforeEnd",b.join(""));this.c=[]};j.fill=function(){this.stroke(true)};j.closePath=function(){this.c.push({type:"close"})};j.b=function(a,b){return{x:m*(a*this.a[0][0]+b*this.a[1][0]+this.a[2][0])-A,y:m*(a*this.a[0][1]+b*this.a[1][1]+this.a[2][1])-A}};j.save=function(){var a={};N(this,a); +this.k.push(a);this.m.push(this.a);this.a=G(J(),this.a)};j.restore=function(){N(this.k.pop(),this);this.a=this.m.pop()};j.translate=function(a,b){var c=[[1,0,0],[0,1,0],[a,b,1]];this.a=G(c,this.a)};j.rotate=function(a){var b=M(a),c=L(a),d=[[b,c,0],[-c,b,0],[0,0,1]];this.a=G(d,this.a)};j.scale=function(a,b){this.d*=a;this.e*=b;var c=[[a,0,0],[0,b,0],[0,0,1]];this.a=G(c,this.a)};j.clip=function(){};j.arcTo=function(){};j.createPattern=function(){return new P};function H(a){this.p=a;this.n=0;this.o= +0;this.h=[];this.i={x:0,y:0}}H.prototype.addColorStop=function(a,b){b=O(b);this.h.push({offset:1-a,color:b})};function P(){}G_vmlCanvasManager=Q;CanvasRenderingContext2D=K;CanvasGradient=H;CanvasPattern=P})()}; diff --git a/src/usr/local/www/protochart/excanvas.js b/src/usr/local/www/protochart/excanvas.js new file mode 100644 index 0000000..f8780b6 --- /dev/null +++ b/src/usr/local/www/protochart/excanvas.js @@ -0,0 +1,785 @@ +// Copyright 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// Known Issues: +// +// * Patterns are not implemented. +// * Radial gradient are not implemented. The VML version of these look very +// different from the canvas one. +// * Clipping paths are not implemented. +// * Coordsize. The width and height attribute have higher priority than the +// width and height style values which isn't correct. +// * Painting mode isn't implemented. +// * Canvas width/height should is using content-box by default. IE in +// Quirks mode will draw the canvas using border-box. Either change your +// doctype to HTML5 +// (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype) +// or use Box Sizing Behavior from WebFX +// (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html) +// * Optimize. There is always room for speed improvements. + +// only add this code if we do not already have a canvas implementation +if (!window.CanvasRenderingContext2D) { + +(function () { + + // alias some functions to make (compiled) code shorter + var m = Math; + var mr = m.round; + var ms = m.sin; + var mc = m.cos; + + // this is used for sub pixel precision + var Z = 10; + var Z2 = Z / 2; + + var G_vmlCanvasManager_ = { + init: function (opt_doc) { + var doc = opt_doc || document; + if (/MSIE/.test(navigator.userAgent) && !window.opera) { + var self = this; + doc.attachEvent("onreadystatechange", function () { + self.init_(doc); + }); + } + }, + + init_: function (doc) { + if (doc.readyState == "complete") { + // create xmlns + if (!doc.namespaces["g_vml_"]) { + doc.namespaces.add("g_vml_", "urn:schemas-microsoft-com:vml"); + } + + // setup default css + var ss = doc.createStyleSheet(); + ss.cssText = "canvas{display:inline-block;overflow:hidden;" + + // default size is 300x150 in Gecko and Opera + "text-align:left;width:300px;height:150px}" + + "g_vml_\\:*{behavior:url(#default#VML)}"; + + // find all canvas elements + var els = doc.getElementsByTagName("canvas"); + for (var i = 0; i < els.length; i++) { + if (!els[i].getContext) { + this.initElement(els[i]); + } + } + } + }, + + fixElement_: function (el) { + // in IE before version 5.5 we would need to add HTML: to the tag name + // but we do not care about IE before version 6 + var outerHTML = el.outerHTML; + + var newEl = el.ownerDocument.createElement(outerHTML); + // if the tag is still open IE has created the children as siblings and + // it has also created a tag with the name "/FOO" + if (outerHTML.slice(-2) != "/>") { + var tagName = "/" + el.tagName; + var ns; + // remove content + while ((ns = el.nextSibling) && ns.tagName != tagName) { + ns.removeNode(); + } + // remove the incorrect closing tag + if (ns) { + ns.removeNode(); + } + } + el.parentNode.replaceChild(newEl, el); + return newEl; + }, + + /** + * Public initializes a canvas element so that it can be used as canvas + * element from now on. This is called automatically before the page is + * loaded but if you are creating elements using createElement you need to + * make sure this is called on the element. + * @param {HTMLElement} el The canvas element to initialize. + * @return {HTMLElement} the element that was created. + */ + initElement: function (el) { + el = this.fixElement_(el); + el.getContext = function () { + if (this.context_) { + return this.context_; + } + return this.context_ = new CanvasRenderingContext2D_(this); + }; + + // do not use inline function because that will leak memory + el.attachEvent('onpropertychange', onPropertyChange); + el.attachEvent('onresize', onResize); + + var attrs = el.attributes; + if (attrs.width && attrs.width.specified) { + // TODO: use runtimeStyle and coordsize + // el.getContext().setWidth_(attrs.width.nodeValue); + el.style.width = attrs.width.nodeValue + "px"; + } else { + el.width = el.clientWidth; + } + if (attrs.height && attrs.height.specified) { + // TODO: use runtimeStyle and coordsize + // el.getContext().setHeight_(attrs.height.nodeValue); + el.style.height = attrs.height.nodeValue + "px"; + } else { + el.height = el.clientHeight; + } + //el.getContext().setCoordsize_() + return el; + } + }; + + function onPropertyChange(e) { + var el = e.srcElement; + + switch (e.propertyName) { + case 'width': + el.style.width = el.attributes.width.nodeValue + "px"; + el.getContext().clearRect(); + break; + case 'height': + el.style.height = el.attributes.height.nodeValue + "px"; + el.getContext().clearRect(); + break; + } + } + + function onResize(e) { + var el = e.srcElement; + if (el.firstChild) { + el.firstChild.style.width = el.clientWidth + 'px'; + el.firstChild.style.height = el.clientHeight + 'px'; + } + } + + G_vmlCanvasManager_.init(); + + // precompute "00" to "FF" + var dec2hex = []; + for (var i = 0; i < 16; i++) { + for (var j = 0; j < 16; j++) { + dec2hex[i * 16 + j] = i.toString(16) + j.toString(16); + } + } + + function createMatrixIdentity() { + return [ + [1, 0, 0], + [0, 1, 0], + [0, 0, 1] + ]; + } + + function matrixMultiply(m1, m2) { + var result = createMatrixIdentity(); + + for (var x = 0; x < 3; x++) { + for (var y = 0; y < 3; y++) { + var sum = 0; + + for (var z = 0; z < 3; z++) { + sum += m1[x][z] * m2[z][y]; + } + + result[x][y] = sum; + } + } + return result; + } + + function copyState(o1, o2) { + o2.fillStyle = o1.fillStyle; + o2.lineCap = o1.lineCap; + o2.lineJoin = o1.lineJoin; + o2.lineWidth = o1.lineWidth; + o2.miterLimit = o1.miterLimit; + o2.shadowBlur = o1.shadowBlur; + o2.shadowColor = o1.shadowColor; + o2.shadowOffsetX = o1.shadowOffsetX; + o2.shadowOffsetY = o1.shadowOffsetY; + o2.strokeStyle = o1.strokeStyle; + o2.arcScaleX_ = o1.arcScaleX_; + o2.arcScaleY_ = o1.arcScaleY_; + } + + function processStyle(styleString) { + var str, alpha = 1; + + styleString = String(styleString); + if (styleString.substring(0, 3) == "rgb") { + var start = styleString.indexOf("(", 3); + var end = styleString.indexOf(")", start + 1); + var guts = styleString.substring(start + 1, end).split(","); + + str = "#"; + for (var i = 0; i < 3; i++) { + str += dec2hex[Number(guts[i])]; + } + + if ((guts.length == 4) && (styleString.substr(3, 1) == "a")) { + alpha = guts[3]; + } + } else { + str = styleString; + } + + return [str, alpha]; + } + + function processLineCap(lineCap) { + switch (lineCap) { + case "butt": + return "flat"; + case "round": + return "round"; + case "square": + default: + return "square"; + } + } + + /** + * This class implements CanvasRenderingContext2D interface as described by + * the WHATWG. + * @param {HTMLElement} surfaceElement The element that the 2D context should + * be associated with + */ + function CanvasRenderingContext2D_(surfaceElement) { + this.m_ = createMatrixIdentity(); + + this.mStack_ = []; + this.aStack_ = []; + this.currentPath_ = []; + + // Canvas context properties + this.strokeStyle = "#000"; + this.fillStyle = "#000"; + + this.lineWidth = 1; + this.lineJoin = "miter"; + this.lineCap = "butt"; + this.miterLimit = Z * 1; + this.globalAlpha = 1; + this.canvas = surfaceElement; + + var el = surfaceElement.ownerDocument.createElement('div'); + el.style.width = surfaceElement.clientWidth + 'px'; + el.style.height = surfaceElement.clientHeight + 'px'; + el.style.overflow = 'hidden'; + el.style.position = 'absolute'; + surfaceElement.appendChild(el); + + this.element_ = el; + this.arcScaleX_ = 1; + this.arcScaleY_ = 1; + } + + var contextPrototype = CanvasRenderingContext2D_.prototype; + contextPrototype.clearRect = function() { + this.element_.innerHTML = ""; + this.currentPath_ = []; + }; + + contextPrototype.beginPath = function() { + // TODO: Branch current matrix so that save/restore has no effect + // as per safari docs. + + this.currentPath_ = []; + }; + + contextPrototype.moveTo = function(aX, aY) { + this.currentPath_.push({type: "moveTo", x: aX, y: aY}); + this.currentX_ = aX; + this.currentY_ = aY; + }; + + contextPrototype.lineTo = function(aX, aY) { + this.currentPath_.push({type: "lineTo", x: aX, y: aY}); + this.currentX_ = aX; + this.currentY_ = aY; + }; + + contextPrototype.bezierCurveTo = function(aCP1x, aCP1y, + aCP2x, aCP2y, + aX, aY) { + this.currentPath_.push({type: "bezierCurveTo", + cp1x: aCP1x, + cp1y: aCP1y, + cp2x: aCP2x, + cp2y: aCP2y, + x: aX, + y: aY}); + this.currentX_ = aX; + this.currentY_ = aY; + }; + + contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) { + // the following is lifted almost directly from + // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes + var cp1x = this.currentX_ + 2.0 / 3.0 * (aCPx - this.currentX_); + var cp1y = this.currentY_ + 2.0 / 3.0 * (aCPy - this.currentY_); + var cp2x = cp1x + (aX - this.currentX_) / 3.0; + var cp2y = cp1y + (aY - this.currentY_) / 3.0; + this.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, aX, aY); + }; + + contextPrototype.arc = function(aX, aY, aRadius, + aStartAngle, aEndAngle, aClockwise) { + aRadius *= Z; + var arcType = aClockwise ? "at" : "wa"; + + var xStart = aX + (mc(aStartAngle) * aRadius) - Z2; + var yStart = aY + (ms(aStartAngle) * aRadius) - Z2; + + var xEnd = aX + (mc(aEndAngle) * aRadius) - Z2; + var yEnd = aY + (ms(aEndAngle) * aRadius) - Z2; + + // IE won't render arches drawn counter clockwise if xStart == xEnd. + if (xStart == xEnd && !aClockwise) { + xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something + // that can be represented in binary + } + + this.currentPath_.push({type: arcType, + x: aX, + y: aY, + radius: aRadius, + xStart: xStart, + yStart: yStart, + xEnd: xEnd, + yEnd: yEnd}); + + }; + + contextPrototype.rect = function(aX, aY, aWidth, aHeight) { + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + }; + + contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) { + // Will destroy any existing path (same as FF behaviour) + this.beginPath(); + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + this.stroke(); + }; + + contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) { + // Will destroy any existing path (same as FF behaviour) + this.beginPath(); + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + this.fill(); + }; + + contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) { + var gradient = new CanvasGradient_("gradient"); + return gradient; + }; + + contextPrototype.createRadialGradient = function(aX0, aY0, + aR0, aX1, + aY1, aR1) { + var gradient = new CanvasGradient_("gradientradial"); + gradient.radius1_ = aR0; + gradient.radius2_ = aR1; + gradient.focus_.x = aX0; + gradient.focus_.y = aY0; + return gradient; + }; + + contextPrototype.drawImage = function (image, var_args) { + var dx, dy, dw, dh, sx, sy, sw, sh; + + // to find the original width we overide the width and height + var oldRuntimeWidth = image.runtimeStyle.width; + var oldRuntimeHeight = image.runtimeStyle.height; + image.runtimeStyle.width = 'auto'; + image.runtimeStyle.height = 'auto'; + + // get the original size + var w = image.width; + var h = image.height; + + // and remove overides + image.runtimeStyle.width = oldRuntimeWidth; + image.runtimeStyle.height = oldRuntimeHeight; + + if (arguments.length == 3) { + dx = arguments[1]; + dy = arguments[2]; + sx = sy = 0; + sw = dw = w; + sh = dh = h; + } else if (arguments.length == 5) { + dx = arguments[1]; + dy = arguments[2]; + dw = arguments[3]; + dh = arguments[4]; + sx = sy = 0; + sw = w; + sh = h; + } else if (arguments.length == 9) { + sx = arguments[1]; + sy = arguments[2]; + sw = arguments[3]; + sh = arguments[4]; + dx = arguments[5]; + dy = arguments[6]; + dw = arguments[7]; + dh = arguments[8]; + } else { + throw "Invalid number of arguments"; + } + + var d = this.getCoords_(dx, dy); + + var w2 = sw / 2; + var h2 = sh / 2; + + var vmlStr = []; + + var W = 10; + var H = 10; + + // For some reason that I've now forgotten, using divs didn't work + vmlStr.push(' ' , + '', + ''); + + this.element_.insertAdjacentHTML("BeforeEnd", + vmlStr.join("")); + }; + + contextPrototype.stroke = function(aFill) { + var lineStr = []; + var lineOpen = false; + var a = processStyle(aFill ? this.fillStyle : this.strokeStyle); + var color = a[0]; + var opacity = a[1] * this.globalAlpha; + + var W = 10; + var H = 10; + + lineStr.push(' max.x) { + max.x = c.x; + } + if (min.y == null || c.y < min.y) { + min.y = c.y; + } + if (max.y == null || c.y > max.y) { + max.y = c.y; + } + } + } + lineStr.push(' ">'); + + if (typeof this.fillStyle == "object") { + var focus = {x: "50%", y: "50%"}; + var width = (max.x - min.x); + var height = (max.y - min.y); + var dimension = (width > height) ? width : height; + + focus.x = mr((this.fillStyle.focus_.x / width) * 100 + 50) + "%"; + focus.y = mr((this.fillStyle.focus_.y / height) * 100 + 50) + "%"; + + var colors = []; + + // inside radius (%) + if (this.fillStyle.type_ == "gradientradial") { + var inside = (this.fillStyle.radius1_ / dimension * 100); + + // percentage that outside radius exceeds inside radius + var expansion = (this.fillStyle.radius2_ / dimension * 100) - inside; + } else { + var inside = 0; + var expansion = 100; + } + + var insidecolor = {offset: null, color: null}; + var outsidecolor = {offset: null, color: null}; + + // We need to sort 'colors' by percentage, from 0 > 100 otherwise ie + // won't interpret it correctly + this.fillStyle.colors_.sort(function (cs1, cs2) { + return cs1.offset - cs2.offset; + }); + + for (var i = 0; i < this.fillStyle.colors_.length; i++) { + var fs = this.fillStyle.colors_[i]; + + colors.push( (fs.offset * expansion) + inside, "% ", fs.color, ","); + + if (fs.offset > insidecolor.offset || insidecolor.offset == null) { + insidecolor.offset = fs.offset; + insidecolor.color = fs.color; + } + + if (fs.offset < outsidecolor.offset || outsidecolor.offset == null) { + outsidecolor.offset = fs.offset; + outsidecolor.color = fs.color; + } + } + colors.pop(); + + lineStr.push(''); + } else if (aFill) { + lineStr.push(''); + } else { + lineStr.push( + '' + ); + } + + lineStr.push(""); + + this.element_.insertAdjacentHTML("beforeEnd", lineStr.join("")); + + //this.currentPath_ = []; + }; + + contextPrototype.fill = function() { + this.stroke(true); + }; + + contextPrototype.closePath = function() { + this.currentPath_.push({type: "close"}); + }; + + /** + * @private + */ + contextPrototype.getCoords_ = function(aX, aY) { + return { + x: Z * (aX * this.m_[0][0] + aY * this.m_[1][0] + this.m_[2][0]) - Z2, + y: Z * (aX * this.m_[0][1] + aY * this.m_[1][1] + this.m_[2][1]) - Z2 + }; + }; + + contextPrototype.save = function() { + var o = {}; + copyState(this, o); + this.aStack_.push(o); + this.mStack_.push(this.m_); + this.m_ = matrixMultiply(createMatrixIdentity(), this.m_); + }; + + contextPrototype.restore = function() { + copyState(this.aStack_.pop(), this); + this.m_ = this.mStack_.pop(); + }; + + contextPrototype.translate = function(aX, aY) { + var m1 = [ + [1, 0, 0], + [0, 1, 0], + [aX, aY, 1] + ]; + + this.m_ = matrixMultiply(m1, this.m_); + }; + + contextPrototype.rotate = function(aRot) { + var c = mc(aRot); + var s = ms(aRot); + + var m1 = [ + [c, s, 0], + [-s, c, 0], + [0, 0, 1] + ]; + + this.m_ = matrixMultiply(m1, this.m_); + }; + + contextPrototype.scale = function(aX, aY) { + this.arcScaleX_ *= aX; + this.arcScaleY_ *= aY; + var m1 = [ + [aX, 0, 0], + [0, aY, 0], + [0, 0, 1] + ]; + + this.m_ = matrixMultiply(m1, this.m_); + }; + + /******** STUBS ********/ + contextPrototype.clip = function() { + // TODO: Implement + }; + + contextPrototype.arcTo = function() { + // TODO: Implement + }; + + contextPrototype.createPattern = function() { + return new CanvasPattern_; + }; + + // Gradient / Pattern Stubs + function CanvasGradient_(aType) { + this.type_ = aType; + this.radius1_ = 0; + this.radius2_ = 0; + this.colors_ = []; + this.focus_ = {x: 0, y: 0}; + } + + CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) { + aColor = processStyle(aColor); + this.colors_.push({offset: 1-aOffset, color: aColor}); + }; + + function CanvasPattern_() {} + + // set up externs + G_vmlCanvasManager = G_vmlCanvasManager_; + CanvasRenderingContext2D = CanvasRenderingContext2D_; + CanvasGradient = CanvasGradient_; + CanvasPattern = CanvasPattern_; + +})(); + +} // if diff --git a/src/usr/local/www/reboot.php b/src/usr/local/www/reboot.php new file mode 100755 index 0000000..3a986ac --- /dev/null +++ b/src/usr/local/www/reboot.php @@ -0,0 +1,72 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-rebootsystem +##|*NAME=Diagnostics: Reboot System page +##|*DESCR=Allow access to the 'Diagnostics: Reboot System' page. +##|*MATCH=reboot.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require("captiveportal.inc"); + +if ($_POST['Submit'] == " " . gettext("No") . " ") { + header("Location: index.php"); + exit; +} + +$pgtitle = array(gettext("Diagnostics"), gettext("Reboot System")); +include("head.inc"); + +?> + + + + + +
                            +
                            +
                            + +
                            +

                            +

                            + " /> + " /> +

                            +
                            + + + + diff --git a/src/usr/local/www/restart_httpd.php b/src/usr/local/www/restart_httpd.php new file mode 100644 index 0000000..2f59bbf --- /dev/null +++ b/src/usr/local/www/restart_httpd.php @@ -0,0 +1,68 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /bin/chmod + pfSense_MODULE: pkgs +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-restart-httpd +##|*NAME=Diagnostics: Restart HTTPD : System page +##|*DESCR=Allow access to the 'Diagnostics: Restart HTTPD: System' page. +##|*MATCH=restart_httpd.php* +##|-PRIV + +require_once("guiconfig.inc"); + +$pgtitle = array(gettext("Restarting httpd")); +include("head.inc"); +?> + + +
                            + + +... + +.
                            +... + +.
                            +... + +.
                            +... + +.
                            + + diff --git a/src/usr/local/www/services_captiveportal.php b/src/usr/local/www/services_captiveportal.php new file mode 100644 index 0000000..515bcbb --- /dev/null +++ b/src/usr/local/www/services_captiveportal.php @@ -0,0 +1,1253 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-services-captiveportal +##|*NAME=Services: Captive portal page +##|*DESCR=Allow access to the 'Services: Captive portal' page. +##|*MATCH=services_captiveportal.php* +##|-PRIV + +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("captiveportal.inc"); + +if (substr($_GET['act'], 0, 3) == "get") { + $nocsrf = true; +} + +require_once("guiconfig.inc"); + +global $cpzone; +global $cpzoneid; + +$cpzoneid = 1; /* Just a default */ +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +$pgtitle = array(gettext("Services"), gettext("Captive portal"), $a_cp[$cpzone]['zone']); +$shortcut_section = "captiveportal"; + +if ($_GET['act'] == "viewhtml") { + if ($a_cp[$cpzone] && $a_cp[$cpzone]['page']['htmltext']) { + echo base64_decode($a_cp[$cpzone]['page']['htmltext']); + } + exit; +} else if ($_GET['act'] == "gethtmlhtml" && $a_cp[$cpzone] && $a_cp[$cpzone]['page']['htmltext']) { + $file_data = base64_decode($a_cp[$cpzone]['page']['htmltext']); + $file_size = strlen($file_data); + + header("Content-Type: text/html"); + header("Content-Disposition: attachment; filename=portal.html"); + header("Content-Length: $file_size"); + echo $file_data; + + exit; +} else if ($_GET['act'] == "delhtmlhtml" && $a_cp[$cpzone] && $a_cp[$cpzone]['page']['htmltext']) { + unset($a_cp[$cpzone]['page']['htmltext']); + write_config(sprintf(gettext("Captive Portal: zone %s: Restore default portal page"), $cpzone)); + header("Location: services_captiveportal.php?zone={$cpzone}"); + exit; +} else if ($_GET['act'] == "viewerrhtml") { + if ($a_cp[$cpzone] && $a_cp[$cpzone]['page']['errtext']) { + echo base64_decode($a_cp[$cpzone]['page']['errtext']); + } + exit; +} else if ($_GET['act'] == "geterrhtml" && $a_cp[$cpzone] && $a_cp[$cpzone]['page']['errtext']) { + $file_data = base64_decode($a_cp[$cpzone]['page']['errtext']); + $file_size = strlen($file_data); + + header("Content-Type: text/html"); + header("Content-Disposition: attachment; filename=err.html"); + header("Content-Length: $file_size"); + echo $file_data; + + exit; +} else if ($_GET['act'] == "delerrhtml" && $a_cp[$cpzone] && $a_cp[$cpzone]['page']['errtext']) { + unset($a_cp[$cpzone]['page']['errtext']); + write_config(sprintf(gettext("Captive Portal: zone %s: Restore default error page"), $cpzone)); + header("Location: services_captiveportal.php?zone={$cpzone}"); + exit; +} else if ($_GET['act'] == "viewlogouthtml") { + if ($a_cp[$cpzone] && $a_cp[$cpzone]['page']['logouttext']) { + echo base64_decode($a_cp[$cpzone]['page']['logouttext']); + } + exit; +} else if ($_GET['act'] == "getlogouthtml" && $a_cp[$cpzone] && $a_cp[$cpzone]['page']['logouttext']) { + $file_data = base64_decode($a_cp[$cpzone]['page']['logouttext']); + $file_size = strlen($file_data); + + header("Content-Type: text/html"); + header("Content-Disposition: attachment; filename=logout.html"); + header("Content-Length: $file_size"); + echo $file_data; + + exit; +} else if ($_GET['act'] == "dellogouthtml" && $a_cp[$cpzone] && $a_cp[$cpzone]['page']['logouttext']) { + unset($a_cp[$cpzone]['page']['logouttext']); + write_config(sprintf(gettext("Captive Portal: zone %s: Restore default logout page"), $cpzone)); + header("Location: services_captiveportal.php?zone={$cpzone}"); + exit; +} + +if (!is_array($config['ca'])) { + $config['ca'] = array(); +} + +$a_ca =& $config['ca']; + +if (!is_array($config['cert'])) { + $config['cert'] = array(); +} + +$a_cert =& $config['cert']; + +if ($a_cp[$cpzone]) { + $cpzoneid = $pconfig['zoneid'] = $a_cp[$cpzone]['zoneid']; + $pconfig['cinterface'] = $a_cp[$cpzone]['interface']; + $pconfig['maxproc'] = $a_cp[$cpzone]['maxproc']; + $pconfig['maxprocperip'] = $a_cp[$cpzone]['maxprocperip']; + $pconfig['timeout'] = $a_cp[$cpzone]['timeout']; + $pconfig['idletimeout'] = $a_cp[$cpzone]['idletimeout']; + $pconfig['freelogins_count'] = $a_cp[$cpzone]['freelogins_count']; + $pconfig['freelogins_resettimeout'] = $a_cp[$cpzone]['freelogins_resettimeout']; + $pconfig['freelogins_updatetimeouts'] = isset($a_cp[$cpzone]['freelogins_updatetimeouts']); + $pconfig['enable'] = isset($a_cp[$cpzone]['enable']); + $pconfig['auth_method'] = $a_cp[$cpzone]['auth_method']; + $pconfig['localauth_priv'] = isset($a_cp[$cpzone]['localauth_priv']); + $pconfig['radacct_enable'] = isset($a_cp[$cpzone]['radacct_enable']); + $pconfig['radmac_enable'] = isset($a_cp[$cpzone]['radmac_enable']); + $pconfig['radmac_secret'] = $a_cp[$cpzone]['radmac_secret']; + $pconfig['reauthenticate'] = isset($a_cp[$cpzone]['reauthenticate']); + $pconfig['reauthenticateacct'] = $a_cp[$cpzone]['reauthenticateacct']; + $pconfig['httpslogin_enable'] = isset($a_cp[$cpzone]['httpslogin']); + $pconfig['httpsname'] = $a_cp[$cpzone]['httpsname']; + $pconfig['preauthurl'] = strtolower($a_cp[$cpzone]['preauthurl']); + $pconfig['blockedmacsurl'] = strtolower($a_cp[$cpzone]['blockedmacsurl']); + $pconfig['certref'] = $a_cp[$cpzone]['certref']; + $pconfig['nohttpsforwards'] = isset($a_cp[$cpzone]['nohttpsforwards']); + $pconfig['logoutwin_enable'] = isset($a_cp[$cpzone]['logoutwin_enable']); + $pconfig['peruserbw'] = isset($a_cp[$cpzone]['peruserbw']); + $pconfig['bwdefaultdn'] = $a_cp[$cpzone]['bwdefaultdn']; + $pconfig['bwdefaultup'] = $a_cp[$cpzone]['bwdefaultup']; + $pconfig['nomacfilter'] = isset($a_cp[$cpzone]['nomacfilter']); + $pconfig['noconcurrentlogins'] = isset($a_cp[$cpzone]['noconcurrentlogins']); + $pconfig['radius_protocol'] = $a_cp[$cpzone]['radius_protocol']; + $pconfig['redirurl'] = $a_cp[$cpzone]['redirurl']; + $pconfig['radiusip'] = $a_cp[$cpzone]['radiusip']; + $pconfig['radiusip2'] = $a_cp[$cpzone]['radiusip2']; + $pconfig['radiusip3'] = $a_cp[$cpzone]['radiusip3']; + $pconfig['radiusip4'] = $a_cp[$cpzone]['radiusip4']; + $pconfig['radiusport'] = $a_cp[$cpzone]['radiusport']; + $pconfig['radiusport2'] = $a_cp[$cpzone]['radiusport2']; + $pconfig['radiusport3'] = $a_cp[$cpzone]['radiusport3']; + $pconfig['radiusport4'] = $a_cp[$cpzone]['radiusport4']; + $pconfig['radiusacctport'] = $a_cp[$cpzone]['radiusacctport']; + $pconfig['radiuskey'] = $a_cp[$cpzone]['radiuskey']; + $pconfig['radiuskey2'] = $a_cp[$cpzone]['radiuskey2']; + $pconfig['radiuskey3'] = $a_cp[$cpzone]['radiuskey3']; + $pconfig['radiuskey4'] = $a_cp[$cpzone]['radiuskey4']; + $pconfig['radiusvendor'] = $a_cp[$cpzone]['radiusvendor']; + $pconfig['radiussession_timeout'] = isset($a_cp[$cpzone]['radiussession_timeout']); + $pconfig['radiussrcip_attribute'] = $a_cp[$cpzone]['radiussrcip_attribute']; + $pconfig['passthrumacadd'] = isset($a_cp[$cpzone]['passthrumacadd']); + $pconfig['passthrumacaddusername'] = isset($a_cp[$cpzone]['passthrumacaddusername']); + $pconfig['radmac_format'] = $a_cp[$cpzone]['radmac_format']; + $pconfig['reverseacct'] = isset($a_cp[$cpzone]['reverseacct']); + $pconfig['radiusnasid'] = $a_cp[$cpzone]['radiusnasid']; + $pconfig['page'] = array(); + if ($a_cp[$cpzone]['page']['htmltext']) { + $pconfig['page']['htmltext'] = $a_cp[$cpzone]['page']['htmltext']; + } + if ($a_cp[$cpzone]['page']['errtext']) { + $pconfig['page']['errtext'] = $a_cp[$cpzone]['page']['errtext']; + } + if ($a_cp[$cpzone]['page']['logouttext']) { + $pconfig['page']['logouttext'] = $a_cp[$cpzone]['page']['logouttext']; + } +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if ($_POST['enable']) { + $reqdfields = explode(" ", "zone cinterface"); + $reqdfieldsn = array(gettext("Zone name"), gettext("Interface")); + + if (isset($_POST['auth_method']) && $_POST['auth_method'] == "radius") { + $reqdfields[] = "radius_protocol"; + $reqdfieldsn[] = gettext("RADIUS Protocol"); + $reqdfields[] = "radiusip"; + $reqdfieldsn[] = gettext("Primary RADIUS server IP address"); + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + /* make sure no interfaces are bridged or used on other zones */ + if (is_array($_POST['cinterface'])) { + foreach ($pconfig['cinterface'] as $cpbrif) { + if (link_interface_to_bridge($cpbrif)) { + $input_errors[] = sprintf(gettext("The captive portal cannot be used on interface %s since it is part of a bridge."), $cpbrif); + } + foreach ($a_cp as $cpkey => $cp) { + if ($cpkey != $cpzone || empty($cpzone)) { + if (in_array($cpbrif, explode(",", $cp['interface']))) { + $input_errors[] = sprintf(gettext("The captive portal cannot be used on interface %s since it is used already on %s instance."), $cpbrif, $cp['zone']); + } + } + } + } + } + + if ($_POST['httpslogin_enable']) { + if (!$_POST['certref']) { + $input_errors[] = gettext("Certificate must be specified for HTTPS login."); + } + if (!$_POST['httpsname'] || !is_domain($_POST['httpsname'])) { + $input_errors[] = gettext("The HTTPS server name must be specified for HTTPS login."); + } + } + } + + if ($_POST['timeout']) { + if (!is_numeric($_POST['timeout']) || ($_POST['timeout'] < 1)) { + $input_errors[] = gettext("The timeout must be at least 1 minute."); + } else if (isset($config['dhcpd']) && is_array($config['dhcpd'])) { + foreach ($config['dhcpd'] as $dhcpd_if => $dhcpd_data) { + if (!isset($dhcpd_data['enable'])) { + continue; + } + if (!is_array($_POST['cinterface']) || !in_array($dhcpd_if, $_POST['cinterface'])) { + continue; + } + + $deftime = 7200; // Default lease time + if (isset($dhcpd_data['defaultleasetime']) && is_numeric($dhcpd_data['defaultleasetime'])) { + $deftime = $dhcpd_data['defaultleasetime']; + } + + if ($_POST['timeout'] > $deftime) { + $input_errors[] = gettext("Hard timeout must be less or equal Default lease time set on DHCP Server"); + } + } + } + } + if ($_POST['idletimeout'] && (!is_numeric($_POST['idletimeout']) || ($_POST['idletimeout'] < 1))) { + $input_errors[] = gettext("The idle timeout must be at least 1 minute."); + } + if ($_POST['freelogins_count'] && (!is_numeric($_POST['freelogins_count']))) { + $input_errors[] = gettext("The pass-through credit count must be a number or left blank."); + } else if ($_POST['freelogins_count'] && is_numeric($_POST['freelogins_count']) && ($_POST['freelogins_count'] >= 1)) { + if (empty($_POST['freelogins_resettimeout']) || !is_numeric($_POST['freelogins_resettimeout']) || ($_POST['freelogins_resettimeout'] <= 0)) { + $input_errors[] = gettext("The waiting period to restore pass-through credits must be above 0 hours."); + } + } + if (($_POST['radiusip'] && !is_ipaddr($_POST['radiusip']))) { + $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip']); + } + if (($_POST['radiusip2'] && !is_ipaddr($_POST['radiusip2']))) { + $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip2']); + } + if (($_POST['radiusip3'] && !is_ipaddr($_POST['radiusip3']))) { + $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip3']); + } + if (($_POST['radiusip4'] && !is_ipaddr($_POST['radiusip4']))) { + $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip4']); + } + if (($_POST['radiusport'] && !is_port($_POST['radiusport']))) { + $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport']); + } + if (($_POST['radiusport2'] && !is_port($_POST['radiusport2']))) { + $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport2']); + } + if (($_POST['radiusport3'] && !is_port($_POST['radiusport3']))) { + $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport3']); + } + if (($_POST['radiusport4'] && !is_port($_POST['radiusport4']))) { + $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport4']); + } + if (($_POST['radiusacctport'] && !is_port($_POST['radiusacctport']))) { + $input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusacctport']); + } + if ($_POST['maxproc'] && (!is_numeric($_POST['maxproc']) || ($_POST['maxproc'] < 4) || ($_POST['maxproc'] > 100))) { + $input_errors[] = gettext("The maximum number of concurrent connections per client IP address may not be larger than the global maximum."); + } + if (trim($_POST['radiusnasid']) !== "" && !preg_match("/^[\x21-\x7e]{3,253}$/i", trim($_POST['radiusnasid']))) { + $input_errors[] = gettext("The NAS-Identifier must be 3-253 characters long and should only contain ASCII characters."); + } + + if (!$input_errors) { + $newcp =& $a_cp[$cpzone]; + //$newcp['zoneid'] = $a_cp[$cpzone]['zoneid']; + if (empty($newcp['zoneid'])) { + $newcp['zoneid'] = 2; + foreach ($a_cp as $keycpzone => $cp) { + if ($cp['zoneid'] == $newcp['zoneid'] && $keycpzone != $cpzone) { + $newcp['zoneid'] += 2; /* Reserve space for SSL config if needed */ + } + } + $cpzoneid = $newcp['zoneid']; + } + $oldifaces = explode(",", $newcp['interface']); + if (is_array($_POST['cinterface'])) { + $newcp['interface'] = implode(",", $_POST['cinterface']); + } + $newcp['maxproc'] = $_POST['maxproc']; + $newcp['maxprocperip'] = $_POST['maxprocperip'] ? $_POST['maxprocperip'] : false; + $newcp['timeout'] = $_POST['timeout']; + $newcp['idletimeout'] = $_POST['idletimeout']; + $newcp['freelogins_count'] = $_POST['freelogins_count']; + $newcp['freelogins_resettimeout'] = $_POST['freelogins_resettimeout']; + $newcp['freelogins_updatetimeouts'] = $_POST['freelogins_updatetimeouts'] ? true : false; + if ($_POST['enable']) { + $newcp['enable'] = true; + } else { + unset($newcp['enable']); + } + $newcp['auth_method'] = $_POST['auth_method']; + $newcp['localauth_priv'] = isset($_POST['localauth_priv']); + $newcp['radacct_enable'] = $_POST['radacct_enable'] ? true : false; + $newcp['reauthenticate'] = $_POST['reauthenticate'] ? true : false; + $newcp['radmac_enable'] = $_POST['radmac_enable'] ? true : false; + $newcp['radmac_secret'] = $_POST['radmac_secret'] ? $_POST['radmac_secret'] : false; + $newcp['reauthenticateacct'] = $_POST['reauthenticateacct']; + if ($_POST['httpslogin_enable']) { + $newcp['httpslogin'] = true; + } else { + unset($newcp['httpslogin']); + } + $newcp['httpsname'] = $_POST['httpsname']; + $newcp['preauthurl'] = $_POST['preauthurl']; + $newcp['blockedmacsurl'] = $_POST['blockedmacsurl']; + $newcp['peruserbw'] = $_POST['peruserbw'] ? true : false; + if (isset($_POST['bwdefaultdn'])) { + $newcp['bwdefaultdn'] = $_POST['bwdefaultdn']; + } else { + unset($newcp['bwdefaultdn']); + } + if (isset($_POST['bwdefaultup'])) { + $newcp['bwdefaultup'] = $_POST['bwdefaultup']; + } else { + unset($newcp['bwdefaultup']); + } + $newcp['certref'] = $_POST['certref']; + $newcp['nohttpsforwards'] = $_POST['nohttpsforwards'] ? true : false; + $newcp['logoutwin_enable'] = $_POST['logoutwin_enable'] ? true : false; + $newcp['nomacfilter'] = $_POST['nomacfilter'] ? true : false; + $newcp['noconcurrentlogins'] = $_POST['noconcurrentlogins'] ? true : false; + $newcp['radius_protocol'] = $_POST['radius_protocol']; + $newcp['redirurl'] = $_POST['redirurl']; + if (isset($_POST['radiusip'])) { + $newcp['radiusip'] = $_POST['radiusip']; + } else { + unset($newcp['radiusip']); + } + if (isset($_POST['radiusip2'])) { + $newcp['radiusip2'] = $_POST['radiusip2']; + } else { + unset($newcp['radiusip2']); + } + if (isset($_POST['radiusip3'])) { + $newcp['radiusip3'] = $_POST['radiusip3']; + } else { + unset($newcp['radiusip3']); + } + if (isset($_POST['radiusip4'])) { + $newcp['radiusip4'] = $_POST['radiusip4']; + } else { + unset($newcp['radiusip4']); + } + $newcp['radiusport'] = $_POST['radiusport']; + $newcp['radiusport2'] = $_POST['radiusport2']; + if (isset($_POST['radiusport3'])) { + $newcp['radiusport3'] = $_POST['radiusport3']; + } + if (isset($_POST['radiusport4'])) { + $newcp['radiusport4'] = $_POST['radiusport4']; + } + $newcp['radiusacctport'] = $_POST['radiusacctport']; + $newcp['radiuskey'] = $_POST['radiuskey']; + $newcp['radiuskey2'] = $_POST['radiuskey2']; + $newcp['radiuskey3'] = $_POST['radiuskey3']; + $newcp['radiuskey4'] = $_POST['radiuskey4']; + $newcp['radiusvendor'] = $_POST['radiusvendor'] ? $_POST['radiusvendor'] : false; + $newcp['radiussession_timeout'] = $_POST['radiussession_timeout'] ? true : false; + $newcp['radiussrcip_attribute'] = $_POST['radiussrcip_attribute']; + $newcp['passthrumacadd'] = $_POST['passthrumacadd'] ? true : false; + $newcp['passthrumacaddusername'] = $_POST['passthrumacaddusername'] ? true : false; + $newcp['radmac_format'] = $_POST['radmac_format'] ? $_POST['radmac_format'] : false; + $newcp['reverseacct'] = $_POST['reverseacct'] ? true : false; + $newcp['radiusnasid'] = trim($_POST['radiusnasid']); + if (!is_array($newcp['page'])) { + $newcp['page'] = array(); + } + + /* file upload? */ + if (is_uploaded_file($_FILES['htmlfile']['tmp_name'])) { + $newcp['page']['htmltext'] = base64_encode(file_get_contents($_FILES['htmlfile']['tmp_name'])); + } + if (is_uploaded_file($_FILES['errfile']['tmp_name'])) { + $newcp['page']['errtext'] = base64_encode(file_get_contents($_FILES['errfile']['tmp_name'])); + } + if (is_uploaded_file($_FILES['logoutfile']['tmp_name'])) { + $newcp['page']['logouttext'] = base64_encode(file_get_contents($_FILES['logoutfile']['tmp_name'])); + } + + write_config(); + + /* Clear up unselected interfaces */ + $newifaces = explode(",", $newcp['interface']); + $toremove = array_diff($oldifaces, $newifaces); + if (!empty($toremove)) { + foreach ($toremove as $removeif) { + $removeif = get_real_interface($removeif); + mwexec("/sbin/ipfw zone {$cpzoneid} mdel {$removeif}"); + } + } + captiveportal_configure_zone($newcp); + unset($newcp, $newifaces, $toremove); + filter_configure(); + header("Location: services_captiveportal_zones.php"); + exit; + } else { + if (is_array($_POST['cinterface'])) { + $pconfig['cinterface'] = implode(",", $_POST['cinterface']); + } + } +} +$closehead = false; +include("head.inc"); +?> + + + + + + + + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + onclick="enable_change(false)" /> + +
                            + +
                            + + + +
                            + + + + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            + +
                            + /> +
                            + +
                            + /> +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + /> +
                            + +
                            + /> +
                            + + +
                            + /> +
                            + + + +

                            + /> +
                            + + +
                            + /> +

                            + + + + + + + + + +
                            + +
                            + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + /> + +
                            + /> + / +
                              
                              + /> + +
                            + /> + +
                              
                            + + + + + + + + + + + + + + + + + +
                            + /> + +
                            + /> + +
                            + /> + +
                            + /> + +
                              
                            +
                              
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            Primary Authentication Source
                            +
                            + +
                            +
                            + +
                               +
                            + +
                            +
                            + +
                            + +
                               + +
                            Secondary Authentication Source
                            +
                            + +
                            + +
                               + +
                            +
                            + +
                            + +
                               + +
                              + /> +
                            + +
                            +
                            + +
                            + />
                            + />
                            + /> +
                            + /> +
                            + +
                            + />
                            + +
                            + +
                            +
                            + +
                            + />
                            + +
                            +
                            + +
                            + />
                            + +
                            +
                            + +
                            +
                            + +
                            + 00:11:22:33:44:55
                            + 001122-334455
                            + 00-11-22-33-44-55
                            + 0011.2233.4455
                            + 001122334455 +
                            +
                            + /> +
                            + +
                            +
                            + +
                            + + + +
                            Create one under System > Cert Manager. + +
                            + /> +
                            + +
                            +
                            + + + +
                            + +
                            + + + +
                            +
                            + + +
                            +
                            + <form method="post" action="$PORTAL_ACTION$">
                            +    <input name="auth_user" type="text">
                            +    <input name="auth_pass" type="password">
                            +    <input name="auth_voucher" type="text">
                            +    <input name="redirurl" type="hidden" value="$PORTAL_REDIRURL$">
                            +    <input name="accept" type="submit" value="Continue">
                            + </form>
                            +

                            +
                            + +
                            +
                            + + +
                            + +
                            + + + +
                            +
                            + + "$PORTAL_MESSAGE$", +

                            +
                            +
                            +
                            + + +
                            + +
                            + + + +
                            +
                            + + +
                              + "; ?> + " onclick="enable_change(true)" /> + " onclick="enable_change(true)" /> +
                              + + + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            + + + + diff --git a/src/usr/local/www/services_captiveportal_filemanager.php b/src/usr/local/www/services_captiveportal_filemanager.php new file mode 100644 index 0000000..f672938 --- /dev/null +++ b/src/usr/local/www/services_captiveportal_filemanager.php @@ -0,0 +1,267 @@ + $g['captiveportal_element_sizelimit']) { + $input_errors[] = gettext("The total size of all files uploaded may not exceed ") . + format_bytes($g['captiveportal_element_sizelimit']) . "."; + } + + if (!$input_errors) { + $element = array(); + $element['name'] = $name; + $element['size'] = $size; + $element['content'] = base64_encode(file_get_contents($_FILES['new']['tmp_name'])); + + $a_element[] = $element; + cpelements_sort(); + + write_config(); + captiveportal_write_elements(); + header("Location: services_captiveportal_filemanager.php?zone={$cpzone}"); + exit; + } + } +} else if (($_GET['act'] == "del") && !empty($cpzone) && $a_element[$_GET['id']]) { + conf_mount_rw(); + @unlink("{$g['captiveportal_element_path']}/" . $a_element[$_GET['id']]['name']); + @unlink("{$g['captiveportal_path']}/" . $a_element[$_GET['id']]['name']); + conf_mount_ro(); + unset($a_element[$_GET['id']]); + write_config(); + header("Location: services_captiveportal_filemanager.php?zone={$cpzone}"); + exit; +} + +include("head.inc"); + +?> + + +
                            + + + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + + 0): +?> + + + + + + + + + + + + + + + + +
                            + + + + + +
                            + " width="17" height="17" border="0" alt="add" /> +
                            +
                            + ')">" width="17" height="17" border="0" alt="delete" /> +
                            + + " /> + + " width="17" height="17" border="0" alt="delete" /> +
                            + + + + + +
                            + " width="17" height="17" border="0" alt="add" /> +
                            +
                            + + + +
                            +
                            +
                            + +

                            + <img src="captiveportal-test.jpg" width=... height=...> +

                            + +

                            + <a href="/captiveportal-aup.php?zone=$PORTAL_ZONE$&redirurl=$PORTAL_REDIRURL$"></a> +

                            + +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/services_captiveportal_hostname.php b/src/usr/local/www/services_captiveportal_hostname.php new file mode 100644 index 0000000..939fb23 --- /dev/null +++ b/src/usr/local/www/services_captiveportal_hostname.php @@ -0,0 +1,232 @@ + + All rights reserved. + + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2004 Dinesh Nair + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/ipfw + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-services-captiveportal-allowedhostnames +##|*NAME=Services: Captive portal: Allowed Hostnames page +##|*DESCR=Allow access to the 'Services: Captive portal: Allowed Hostnames' page. +##|*MATCH=services_captiveportal_hostname.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +if (isset($cpzone) && !empty($cpzone) && isset($a_cp[$cpzone]['zoneid'])) { + $cpzoneid = $a_cp[$cpzone]['zoneid']; +} + +$pgtitle = array(gettext("Services"), gettext("Captive portal"), $a_cp[$cpzone]['zone']); +$shortcut_section = "captiveportal"; + +if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) { + $a_allowedhostnames =& $a_cp[$cpzone]['allowedhostname']; + if ($a_allowedhostnames[$_GET['id']]) { + $ipent = $a_allowedhostnames[$_GET['id']]; + + if (isset($a_cp[$cpzone]['enable'])) { + if (is_ipaddr($ipent['hostname'])) { + $ip = $ipent['hostname']; + } else { + $ip = gethostbyname($ipent['hostname']); + } + $sn = (is_ipaddrv6($ip)) ? 128 : 32; + if (is_ipaddr($ip)) { + $ipfw = pfSense_ipfw_getTablestats($cpzoneid, IP_FW_TABLE_XLISTENTRY, 3, $ip); + if (is_array($ipfw)) { + captiveportal_free_dn_ruleno($ipfw['dnpipe']); + pfSense_pipe_action("pipe delete {$ipfw['dnpipe']}"); + pfSense_pipe_action("pipe delete " . ($ipfw['dnpipe']+1)); + } + pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XDEL, 3, $ip, $sn); + pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XDEL, 4, $ip, $sn); + } + } + + unset($a_allowedhostnames[$_GET['id']]); + write_config(); + captiveportal_allowedhostname_configure(); + header("Location: services_captiveportal_hostname.php?zone={$cpzone}"); + exit; + } +} + + +include("head.inc"); +?> + + +
                            + + + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                            + " width="17" height="17" border="0" alt="add" /> +
                            +
                            + "; + } + if ($ip['dir'] == "both") { + echo "\"pass\" "; + } + echo strtolower($ip['hostname']); + if ($ip['dir'] == "from") { + echo "\"in\" any"; + } +?> + +   + + " width="17" height="17" border="0" alt="add" /> +  ')">" width="17" height="17" border="0" alt="delete" /> +
                              + + + + + +
                            + " width="17" height="17" border="0" alt="add" /> +
                            +
                            +

                            + + +
                            +
                            +
                            + from addresses, it may be used to always allow pass-through access from a client behind the captive portal."); ?> +

                            + + + + + + + + + + + + + + + + +
                            + in x.x.x.x + + +
                            x.x.x.x in    
                            pass     All connections to and from the Hostname are allowed
                            +
                             
                            +
                            +
                            + + + diff --git a/src/usr/local/www/services_captiveportal_hostname_edit.php b/src/usr/local/www/services_captiveportal_hostname_edit.php new file mode 100644 index 0000000..674e220 --- /dev/null +++ b/src/usr/local/www/services_captiveportal_hostname_edit.php @@ -0,0 +1,244 @@ + + All rights reserved. + + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2004 Dinesh Nair + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/ipfw + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-services-captiveportal-editallowedhostnames +##|*NAME=Services: Captive portal: Edit Allowed Hostnames page +##|*DESCR=Allow access to the 'Services: Captive portal: Edit Allowed Hostnames' page. +##|*MATCH=services_captiveportal_hostname_edit.php* +##|-PRIV + +function allowedhostnamescmp($a, $b) { + return strcmp($a['hostname'], $b['hostname']); +} + +function allowedhostnames_sort() { + global $g, $config, $cpzone; + usort($config['captiveportal'][$cpzone]['allowedhostname'], "allowedhostnamescmp"); +} + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); + +global $cpzone, $cpzoneid; + +$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit allowed Hostname")); +$shortcut_section = "captiveportal"; + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} +$cpzoneid = $config['captiveportal'][$cpzone]['zoneid']; + +if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (!is_array($a_cp[$cpzone]['allowedhostname'])) { + $a_cp[$cpzone]['allowedhostname'] = array(); +} +$a_allowedhostnames = &$a_cp[$cpzone]['allowedhostname']; + +if (isset($id) && $a_allowedhostnames[$id]) { + $pconfig['zone'] = $a_allowedhostnames[$id]['zone']; + $pconfig['hostname'] = $a_allowedhostnames[$id]['hostname']; + $pconfig['sn'] = $a_allowedhostnames[$id]['sn']; + $pconfig['dir'] = $a_allowedhostnames[$id]['dir']; + $pconfig['bw_up'] = $a_allowedhostnames[$id]['bw_up']; + $pconfig['bw_down'] = $a_allowedhostnames[$id]['bw_down']; + $pconfig['descr'] = $a_allowedhostnames[$id]['descr']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "hostname"); + $reqdfieldsn = array(gettext("Allowed Hostname")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (($_POST['hostname'] && !is_hostname($_POST['hostname']))) { + $input_errors[] = sprintf(gettext("A valid Hostname must be specified. [%s]"), $_POST['hostname']); + } + + if ($_POST['bw_up'] && !is_numeric($_POST['bw_up'])) { + $input_errors[] = gettext("Upload speed needs to be an integer"); + } + if ($_POST['bw_down'] && !is_numeric($_POST['bw_down'])) { + $input_errors[] = gettext("Download speed needs to be an integer"); + } + + foreach ($a_allowedhostnames as $ipent) { + if (isset($id) && ($a_allowedhostnames[$id]) && ($a_allowedhostnames[$id] === $ipent)) { + continue; + } + + if ($ipent['hostname'] == $_POST['hostname']) { + $input_errors[] = sprintf("[%s] %s.", $_POST['hostname'], gettext("already allowed")) ; + break ; + } + } + + if (!$input_errors) { + $ip = array(); + $ip['hostname'] = $_POST['hostname']; + $ip['sn'] = $_POST['sn']; + $ip['dir'] = $_POST['dir']; + $ip['descr'] = $_POST['descr']; + if ($_POST['bw_up']) { + $ip['bw_up'] = $_POST['bw_up']; + } + if ($_POST['bw_down']) { + $ip['bw_down'] = $_POST['bw_down']; + } + if (isset($id) && $a_allowedhostnames[$id]) { + $a_allowedhostnames[$id] = $ip; + } else { + $a_allowedhostnames[] = $ip; + } + + allowedhostnames_sort(); + + write_config(); + + $rules = captiveportal_allowedhostname_configure(); + @file_put_contents("{$g['tmp_path']}/hostname_rules", $rules); + mwexec("/sbin/ipfw -x {$cpzoneid} {$g['tmp_path']}/hostname_rules", true); + unset($rules); + + header("Location: services_captiveportal_hostname.php?zone={$cpzone}"); + exit; + } +} + +include("head.inc"); + +?> + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + + . + . + +
                            + +
                            + . +
                            + +
                            + . +
                            + +
                            + +
                            + +
                            + +
                              + " /> + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/services_captiveportal_ip.php b/src/usr/local/www/services_captiveportal_ip.php new file mode 100644 index 0000000..c475aeb --- /dev/null +++ b/src/usr/local/www/services_captiveportal_ip.php @@ -0,0 +1,208 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/ipfw + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-services-captiveportal-allowedips +##|*NAME=Services: Captive portal: Allowed IPs page +##|*DESCR=Allow access to the 'Services: Captive portal: Allowed IPs' page. +##|*MATCH=services_captiveportal_ip.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +if (isset($cpzone) && !empty($cpzone) && isset($a_cp[$cpzone]['zoneid'])) { + $cpzoneid = $a_cp[$cpzone]['zoneid']; +} + +$pgtitle = array(gettext("Services"), gettext("Captive portal"), $a_cp[$cpzone]['zone']); +$shortcut_section = "captiveportal"; + +if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) { + $a_allowedips =& $config['captiveportal'][$cpzone]['allowedip']; + if ($a_allowedips[$_GET['id']]) { + $ipent = $a_allowedips[$_GET['id']]; + + if (isset($config['captiveportal'][$cpzone]['enable'])) { + $mask = (!empty($ipent['sn'])) ? $ipent['sn'] : 32; + + $ipfw = pfSense_ipfw_getTablestats($cpzoneid, IP_FW_TABLE_XLISTENTRY, 3, $ipent['ip']); + pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XDEL, 3, $ipent['ip'], $mask); + pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XDEL, 4, $ipent['ip'], $mask); + + if (is_array($ipfw)) { + captiveportal_free_dn_ruleno($ipfw['dnpipe']); + pfSense_pipe_action("pipe delete {$ipfw['dnpipe']}"); + pfSense_pipe_action("pipe delete " . ($ipfw['dnpipe']+1)); + } + } + + unset($a_allowedips[$_GET['id']]); + write_config(); + header("Location: services_captiveportal_ip.php?zone={$cpzone}"); + exit; + } +} + + +include("head.inc"); +?> + + +
                            + + + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                            + " width="17" height="17" border="0" alt="add" /> +
                            +
                            + "; + } + if ($ip['dir'] == "both") { + echo "\"pass\" "; + } + echo strtolower($ip['ip']); + if ($ip['sn'] != "32" && is_numeric($ip['sn'])) { + $sn = $ip['sn']; + echo "/$sn"; + } + if ($ip['dir'] == "from") { + echo "\"any\" any"; + } +?> + +   + + " width="17" height="17" border="0" alt="edit" /> +   + ')">" width="17" height="17" border="0" alt="delete" /> +
                              + + + + + +
                            + " width="17" height="17" border="0" alt="add" /> +
                            +
                            +

                            + + +
                            +
                            +
                            + +

                            +
                             
                            +
                            +
                            + + + diff --git a/src/usr/local/www/services_captiveportal_ip_edit.php b/src/usr/local/www/services_captiveportal_ip_edit.php new file mode 100644 index 0000000..c5e5544 --- /dev/null +++ b/src/usr/local/www/services_captiveportal_ip_edit.php @@ -0,0 +1,253 @@ + + All rights reserved. + + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2004 Dinesh Nair + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/ipfw + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-services-captiveportal-editallowedips +##|*NAME=Services: Captive portal: Edit Allowed IPs page +##|*DESCR=Allow access to the 'Services: Captive portal: Edit Allowed IPs' page. +##|*MATCH=services_captiveportal_ip_edit.php* +##|-PRIV + +function allowedipscmp($a, $b) { + return strcmp($a['ip'], $b['ip']); +} + +function allowedips_sort() { + global $g, $config, $cpzone; + + usort($config['captiveportal'][$cpzone]['allowedip'], "allowedipscmp"); +} + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); + +$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit allowed IP address")); +$shortcut_section = "captiveportal"; + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (!is_array($config['captiveportal'][$cpzone]['allowedip'])) { + $config['captiveportal'][$cpzone]['allowedip'] = array(); +} +$a_allowedips =& $config['captiveportal'][$cpzone]['allowedip']; + +if (isset($id) && $a_allowedips[$id]) { + $pconfig['ip'] = $a_allowedips[$id]['ip']; + $pconfig['sn'] = $a_allowedips[$id]['sn']; + $pconfig['bw_up'] = $a_allowedips[$id]['bw_up']; + $pconfig['bw_down'] = $a_allowedips[$id]['bw_down']; + $pconfig['descr'] = $a_allowedips[$id]['descr']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "ip sn"); + $reqdfieldsn = array(gettext("Allowed IP address"), gettext("Subnet mask")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($_POST['ip'] && !is_ipaddr($_POST['ip'])) { + $input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['ip']); + } + + if ($_POST['sn'] && (!is_numeric($_POST['sn']) || ($_POST['sn'] < 1) || ($_POST['sn'] > 32))) { + $input_errors[] = gettext("A valid subnet mask must be specified"); + } + + if ($_POST['bw_up'] && !is_numeric($_POST['bw_up'])) { + $input_errors[] = gettext("Upload speed needs to be an integer"); + } + + if ($_POST['bw_down'] && !is_numeric($_POST['bw_down'])) { + $input_errors[] = gettext("Download speed needs to be an integer"); + } + + foreach ($a_allowedips as $ipent) { + if (isset($id) && ($a_allowedips[$id]) && ($a_allowedips[$id] === $ipent)) { + continue; + } + + if ($ipent['ip'] == $_POST['ip']) { + $input_errors[] = sprintf("[%s] %s.", $_POST['ip'], gettext("already allowed")) ; + break ; + } + } + + if (!$input_errors) { + $ip = array(); + $ip['ip'] = $_POST['ip']; + $ip['sn'] = $_POST['sn']; + $ip['descr'] = $_POST['descr']; + if ($_POST['bw_up']) { + $ip['bw_up'] = $_POST['bw_up']; + } + if ($_POST['bw_down']) { + $ip['bw_down'] = $_POST['bw_down']; + } + if (isset($id) && $a_allowedips[$id]) { + $oldip = $a_allowedips[$id]['ip']; + if (!empty($a_allowedips[$id]['sn'])) { + $oldmask = $a_allowedips[$id]['sn']; + } else { + $oldmask = 32; + } + $a_allowedips[$id] = $ip; + } else { + $a_allowedips[] = $ip; + } + allowedips_sort(); + + write_config(); + + if (isset($a_cp[$cpzone]['enable']) && is_module_loaded("ipfw.ko")) { + $rules = ""; + $cpzoneid = $a_cp[$cpzone]['zoneid']; + unset($ipfw); + if (isset($oldip) && isset($oldmask)) { + $ipfw = pfSense_ipfw_getTablestats($cpzoneid, IP_FW_TABLE_XLISTENTRY, 3, $oldip); + $rules .= "table 3 delete {$oldip}/{$oldmask}\n"; + $rules .= "table 4 delete {$oldip}/{$oldmask}\n"; + if (is_array($ipfw)) { + $rules .= "pipe delete {$ipfw['dnpipe']}\n"; + $rules .= "pipe delete " . ($ipfw['dnpipe']+1 . "\n"); + } + } + $rules .= captiveportal_allowedip_configure_entry($ip); + if (is_array($ipfw)) { + captiveportal_free_dn_ruleno($ipfw['dnpipe']); + } + $uniqid = uniqid("{$cpzone}_allowed"); + @file_put_contents("{$g['tmp_path']}/{$uniqid}_tmp", $rules); + mwexec("/sbin/ipfw -x {$cpzoneid} -q {$g['tmp_path']}/{$uniqid}_tmp"); + @unlink("{$g['tmp_path']}/{$uniqid}_tmp"); + } + + header("Location: services_captiveportal_ip.php?zone={$cpzone}"); + exit; + } +} + +include("head.inc"); + +?> + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + / +
                            + . +
                            + +
                            + . +
                            + +
                            + +
                            + +
                            + +
                              + " /> + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/services_captiveportal_mac.php b/src/usr/local/www/services_captiveportal_mac.php new file mode 100644 index 0000000..d6c1af3 --- /dev/null +++ b/src/usr/local/www/services_captiveportal_mac.php @@ -0,0 +1,244 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-services-captiveportal-macaddresses +##|*NAME=Services: Captive portal: Mac Addresses page +##|*DESCR=Allow access to the 'Services: Captive portal: Mac Addresses' page. +##|*MATCH=services_captiveportal_mac.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); + +global $cpzone; +global $cpzoneid; + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +$pgtitle = array(gettext("Services"), gettext("Captive portal"), $a_cp[$cpzone]['zone']); +$shortcut_section = "captiveportal"; + +if ($_POST) { + + $pconfig = $_POST; + + if ($_POST['apply']) { + $retval = 0; + + if (is_array($a_cp[$cpzone]['passthrumac'])) { + $cpzoneid = $a_cp[$cpzone]['cpzoneid']; + $rules = captiveportal_passthrumac_configure(); + if (!empty($rules)) { + @file_put_contents("{$g['tmp_path']}/passthrumac_gui", $rules); + mwexec("/sbin/ipfw -x {$cpzoneid} {$g['tmp_path']}/passthrumac_gui"); + @unlink("{$g['tmp_path']}/passthrumac_gui"); + } + $savemsg = get_std_save_message($retval); + if ($retval == 0) { + clear_subsystem_dirty('passthrumac'); + } + } + } + + if ($_POST['postafterlogin']) { + if (!is_array($a_passthrumacs)) { + echo gettext("No entry exists yet!") ."\n"; + exit; + } + if (empty($_POST['zone'])) { + echo gettext("Please set the zone on which the operation should be allowed"); + exit; + } + if (!is_array($a_cp[$cpzone]['passthrumac'])) { + $a_cp[$cpzone]['passthrumac'] = array(); + } + $a_passthrumacs =& $a_cp[$cpzone]['passthrumac']; + + if ($_POST['username']) { + $mac = captiveportal_passthrumac_findbyname($_POST['username']); + if (!empty($mac)) { + $_POST['delmac'] = $mac['mac']; + } else { + echo gettext("No entry exists for this username:") . " " . $_POST['username'] . "\n"; + } + } + if ($_POST['delmac']) { + $found = false; + foreach ($a_passthrumacs as $idx => $macent) { + if ($macent['mac'] == $_POST['delmac']) { + $found = true; + break; + } + } + if ($found == true) { + $cpzoneid = $a_cp[$cpzone]['zoneid']; + $rules = captiveportal_passthrumac_delete_entry($a_passthrumacs[$idx]); + $uniqid = uniqid("{$cpzone}_mac"); + file_put_contents("{$g['tmp_path']}/{$uniqid}_tmp", $rules); + mwexec("/sbin/ipfw -x {$cpzoneid} -q {$g['tmp_path']}/{$uniqid}_tmp"); + @unlink("{$g['tmp_path']}/{$uniqid}_tmp"); + unset($a_passthrumacs[$idx]); + write_config(); + echo gettext("The entry was successfully deleted") . "\n"; + } else { + echo gettext("No entry exists for this mac address:") . " " . $_POST['delmac'] . "\n"; + } + } + exit; + } +} + +if ($_GET['act'] == "del") { + $a_passthrumacs =& $a_cp[$cpzone]['passthrumac']; + if ($a_passthrumacs[$_GET['id']]) { + $cpzoneid = $a_cp[$cpzone]['zoneid']; + $rules = captiveportal_passthrumac_delete_entry($a_passthrumacs[$_GET['id']]); + $uniqid = uniqid("{$cpzone}_mac"); + file_put_contents("{$g['tmp_path']}/{$uniqid}_tmp", $rules); + mwexec("/sbin/ipfw -x {$cpzoneid} -q {$g['tmp_path']}/{$uniqid}_tmp"); + @unlink("{$g['tmp_path']}/{$uniqid}_tmp"); + unset($a_passthrumacs[$_GET['id']]); + write_config(); + header("Location: services_captiveportal_mac.php?zone={$cpzone}"); + exit; + } +} + +include("head.inc"); + +?> + + +
                            + + +

                            +You must apply the changes in order for them to take effect."));?>
                            + + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + +
                            + icon + + + +   + + + " width="17" height="17" border="0" alt="edit" /> + +   + ')"> + " width="17" height="17" border="0" alt="delte" /> + +
                              + + " width="17" height="17" border="0" alt="add" /> + +
                            + +
                            + +
                            +
                             
                            +
                            +

                            + + + diff --git a/src/usr/local/www/services_captiveportal_mac_edit.php b/src/usr/local/www/services_captiveportal_mac_edit.php new file mode 100644 index 0000000..191c9bb --- /dev/null +++ b/src/usr/local/www/services_captiveportal_mac_edit.php @@ -0,0 +1,270 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-services-captiveportal-editmacaddresses +##|*NAME=Services: Captive portal: Edit MAC Addresses page +##|*DESCR=Allow access to the 'Services: Captive portal: Edit MAC Addresses' page. +##|*MATCH=services_captiveportal_mac_edit.php* +##|-PRIV + +function passthrumacscmp($a, $b) { + return strcmp($a['mac'], $b['mac']); +} + +function passthrumacs_sort() { + global $config, $cpzone; + + usort($config['captiveportal'][$cpzone]['passthrumac'], "passthrumacscmp"); +} + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); + +global $cpzone; +global $cpzoneid; + +$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit MAC address rules")); +$shortcut_section = "captiveportal"; + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (!is_array($a_cp[$cpzone]['passthrumac'])) { + $a_cp[$cpzone]['passthrumac'] = array(); +} +$a_passthrumacs = &$a_cp[$cpzone]['passthrumac']; + +if (isset($id) && $a_passthrumacs[$id]) { + $pconfig['action'] = $a_passthrumacs[$id]['action']; + $pconfig['mac'] = $a_passthrumacs[$id]['mac']; + $pconfig['bw_up'] = $a_passthrumacs[$id]['bw_up']; + $pconfig['bw_down'] = $a_passthrumacs[$id]['bw_down']; + $pconfig['descr'] = $a_passthrumacs[$id]['descr']; + $pconfig['username'] = $a_passthrumacs[$id]['username']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "action mac"); + $reqdfieldsn = array(gettext("Action"), gettext("MAC address")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + $_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac'])); + + if ($_POST['mac']) { + if (is_macaddr($_POST['mac'])) { + $iflist = get_interface_list(); + foreach ($iflist as $if) { + if ($_POST['mac'] == strtolower($if['mac'])) { + $input_errors[] = sprintf(gettext("The MAC address %s belongs to a local interface, you cannot use it here."), $_POST['mac']); + break; + } + } + } else { + $input_errors[] = sprintf("%s. [%s]", gettext("A valid MAC address must be specified"), $_POST['mac']); + } + } + if ($_POST['bw_up'] && !is_numeric($_POST['bw_up'])) { + $input_errors[] = gettext("Upload speed needs to be an integer"); + } + if ($_POST['bw_down'] && !is_numeric($_POST['bw_down'])) { + $input_errors[] = gettext("Download speed needs to be an integer"); + } + + foreach ($a_passthrumacs as $macent) { + if (isset($id) && ($a_passthrumacs[$id]) && ($a_passthrumacs[$id] === $macent)) { + continue; + } + + if ($macent['mac'] == $_POST['mac']) { + $input_errors[] = sprintf("[%s] %s.", $_POST['mac'], gettext("already exists")); + break; + } + } + + if (!$input_errors) { + $mac = array(); + $mac['action'] = $_POST['action']; + $mac['mac'] = $_POST['mac']; + if ($_POST['bw_up']) { + $mac['bw_up'] = $_POST['bw_up']; + } + if ($_POST['bw_down']) { + $mac['bw_down'] = $_POST['bw_down']; + } + if ($_POST['username']) { + $mac['username'] = $_POST['username']; + } + + $mac['descr'] = $_POST['descr']; + + if (isset($id) && $a_passthrumacs[$id]) { + $oldmac = $a_passthrumacs[$id]; + $a_passthrumacs[$id] = $mac; + } else { + $oldmac = $mac; + $a_passthrumacs[] = $mac; + } + passthrumacs_sort(); + + write_config(); + + if (isset($config['captiveportal'][$cpzone]['enable'])) { + $cpzoneid = $config['captiveportal'][$cpzone]['zoneid']; + $rules = captiveportal_passthrumac_delete_entry($oldmac); + $rules .= captiveportal_passthrumac_configure_entry($mac); + $uniqid = uniqid("{$cpzone}_macedit"); + file_put_contents("{$g['tmp_path']}/{$uniqid}_tmp", $rules); + mwexec("/sbin/ipfw -x {$cpzoneid} -q {$g['tmp_path']}/{$uniqid}_tmp"); + @unlink("{$g['tmp_path']}/{$uniqid}_tmp"); + unset($cpzoneid); + } + + header("Location: services_captiveportal_mac.php?zone={$cpzone}"); + exit; + } +} +include("head.inc"); +?> + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + . +
                            + + + +
                            + +
                            + +
                            + . +
                            + +
                            + +
                            + +
                            + +
                              + " /> + + + + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/services_captiveportal_vouchers.php b/src/usr/local/www/services_captiveportal_vouchers.php new file mode 100644 index 0000000..0bc7dae --- /dev/null +++ b/src/usr/local/www/services_captiveportal_vouchers.php @@ -0,0 +1,715 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/local/bin/voucher /usr/bin/openssl + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-services-captiveportal-vouchers +##|*NAME=Services: Captive portal Vouchers page +##|*DESCR=Allow access to the 'Services: Captive portal Vouchers' page. +##|*MATCH=services_captiveportal_vouchers.php* +##|-PRIV + +if ($_POST['postafterlogin']) { + $nocsrf= true; +} + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); +require_once("voucher.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_captiveportal_vouchers.php'); +} + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone)) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if ($_REQUEST['generatekey']) { + exec("/usr/bin/openssl genrsa 64 > /tmp/key64.private"); + exec("/usr/bin/openssl rsa -pubout < /tmp/key64.private > /tmp/key64.public"); + $privatekey = str_replace("\n", "\\n", file_get_contents("/tmp/key64.private")); + $publickey = str_replace("\n", "\\n", file_get_contents("/tmp/key64.public")); + exec("rm /tmp/key64.private /tmp/key64.public"); + $alertmessage = gettext("You will need to recreate any existing Voucher Rolls due to the public and private key changes. Click cancel if you do not wish to recreate the vouchers."); + echo << 0)) { + $input_errors[] = gettext("Double quotes aren't allowed."); + } + if ($_POST['charset'] && (strpos($_POST['charset'], ",") > 0)) { + $input_errors[] = "',' " . gettext("aren't allowed."); + } + if ($_POST['rollbits'] && (!is_numeric($_POST['rollbits']) || ($_POST['rollbits'] < 1) || ($_POST['rollbits'] > 31))) { + $input_errors[] = gettext("# of Bits to store Roll Id needs to be between 1..31."); + } + if ($_POST['ticketbits'] && (!is_numeric($_POST['ticketbits']) || ($_POST['ticketbits'] < 1) || ($_POST['ticketbits'] > 16))) { + $input_errors[] = gettext("# of Bits to store Ticket Id needs to be between 1..16."); + } + if ($_POST['checksumbits'] && (!is_numeric($_POST['checksumbits']) || ($_POST['checksumbits'] < 1) || ($_POST['checksumbits'] > 31))) { + $input_errors[] = gettext("# of Bits to store checksum needs to be between 1..31."); + } + if ($_POST['publickey'] && (!strstr($_POST['publickey'], "BEGIN PUBLIC KEY"))) { + $input_errors[] = gettext("This doesn't look like an RSA Public key."); + } + if ($_POST['privatekey'] && (!strstr($_POST['privatekey'], "BEGIN RSA PRIVATE KEY"))) { + $input_errors[] = gettext("This doesn't look like an RSA Private key."); + } + if ($_POST['vouchersyncdbip'] && (is_ipaddr_configured($_POST['vouchersyncdbip']))) { + $input_errors[] = gettext("You cannot sync the voucher database to this host (itself)."); + } + } + + if (!$input_errors) { + if (empty($config['voucher'][$cpzone])) { + $newvoucher = array(); + } else { + $newvoucher = $config['voucher'][$cpzone]; + } + if ($_POST['enable'] == "yes") { + $newvoucher['enable'] = true; + } else { + unset($newvoucher['enable']); + } + if (empty($_POST['vouchersyncusername'])) { + unset($newvoucher['vouchersyncdbip']); + unset($newvoucher['vouchersyncport']); + unset($newvoucher['vouchersyncusername']); + unset($newvoucher['vouchersyncpass']); + $newvoucher['charset'] = $_POST['charset']; + $newvoucher['rollbits'] = $_POST['rollbits']; + $newvoucher['ticketbits'] = $_POST['ticketbits']; + $newvoucher['checksumbits'] = $_POST['checksumbits']; + $newvoucher['magic'] = $_POST['magic']; + $newvoucher['exponent'] = $_POST['exponent']; + $newvoucher['publickey'] = base64_encode($_POST['publickey']); + $newvoucher['privatekey'] = base64_encode($_POST['privatekey']); + $newvoucher['descrmsgnoaccess'] = $_POST['msgnoaccess']; + $newvoucher['descrmsgexpired'] = $_POST['msgexpired']; + $config['voucher'][$cpzone] = $newvoucher; + write_config(); + voucher_configure_zone(); + } else { + $newvoucher['vouchersyncdbip'] = $_POST['vouchersyncdbip']; + $newvoucher['vouchersyncport'] = $_POST['vouchersyncport']; + $newvoucher['vouchersyncusername'] = $_POST['vouchersyncusername']; + $newvoucher['vouchersyncpass'] = $_POST['vouchersyncpass']; + if ($newvoucher['vouchersyncpass'] && $newvoucher['vouchersyncusername'] && + $newvoucher['vouchersyncport'] && $newvoucher['vouchersyncdbip']) { + // Synchronize the voucher DB from the master node + require_once("xmlrpc.inc"); + + $protocol = "http"; + if (is_array($config['system']) && is_array($config['system']['webgui']) && !empty($config['system']['webgui']['protocol']) && + $config['system']['webgui']['protocol'] == "https") { + $protocol = "https"; + } + if ($protocol == "https" || $newvoucher['vouchersyncport'] == "443") { + $url = "https://{$newvoucher['vouchersyncdbip']}"; + } else { + $url = "http://{$newvoucher['vouchersyncdbip']}"; + } + + $execcmd = <<setCredentials($newvoucher['vouchersyncusername'], $newvoucher['vouchersyncpass']); + $resp = $cli->send($msg, "250"); + if (!is_object($resp)) { + $error = "A communications error occurred while attempting CaptivePortalVoucherSync XMLRPC sync with {$url}:{$port} (pfsense.exec_php)."; + log_error($error); + file_notice("CaptivePortalVoucherSync", $error, "Communications error occurred", ""); + $input_errors[] = $error; + } elseif ($resp->faultCode()) { + $cli->setDebug(1); + $resp = $cli->send($msg, "250"); + $error = "An error code was received while attempting CaptivePortalVoucherSync XMLRPC sync with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString(); + log_error($error); + file_notice("CaptivePortalVoucherSync", $error, "Error code received", ""); + $input_errors[] = $error; + } else { + log_error("The Captive Portal voucher database has been synchronized with {$url}:{$port} (pfsense.exec_php)."); + } + if (!$input_errors) { + $toreturn = XML_RPC_Decode($resp->value()); + if (!is_array($toreturn)) { + if ($toreturn == "Authentication failed") { + $input_errors[] = "Could not synchronize the voucher database: Authentication Failed."; + } + } else { + // If we received back the voucher roll and other information then store it. + if ($toreturn['voucher']['roll']) { + $newvoucher['roll'] = $toreturn['voucher']['roll']; + } + if ($toreturn['voucher']['rollbits']) { + $newvoucher['rollbits'] = $toreturn['voucher']['rollbits']; + } + if ($toreturn['voucher']['ticketbits']) { + $newvoucher['ticketbits'] = $toreturn['voucher']['ticketbits']; + } + if ($toreturn['voucher']['checksumbits']) { + $newvoucher['checksumbits'] = $toreturn['voucher']['checksumbits']; + } + if ($toreturn['voucher']['magic']) { + $newvoucher['magic'] = $toreturn['voucher']['magic']; + } + if ($toreturn['voucher']['exponent']) { + $newvoucher['exponent'] = $toreturn['voucher']['exponent']; + } + if ($toreturn['voucher']['publickey']) { + $newvoucher['publickey'] = $toreturn['voucher']['publickey']; + } + if ($toreturn['voucher']['privatekey']) { + $newvoucher['privatekey'] = $toreturn['voucher']['privatekey']; + } + if ($toreturn['voucher']['descrmsgnoaccess']) { + $newvoucher['descrmsgnoaccess'] = $toreturn['voucher']['descrmsgnoaccess']; + } + if ($toreturn['voucher']['descrmsgexpired']) { + $newvoucher['descrmsgexpired'] = $toreturn['voucher']['descrmsgexpired']; + } + $savemsg = gettext("Voucher database has been synchronized from {$url}:{$port}"); + + $config['voucher'][$cpzone] = $newvoucher; + write_config(); + voucher_configure_zone(true); + } + } + } + } + if (!$input_errors) { + header("Location: services_captiveportal_vouchers.php?zone={$cpzone}"); + exit; + } + } +} +$closehead = false; +include("head.inc"); +?> + + + + + + +
                            + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + onclick="enable_change(false)" /> + +
                            + + (Synchronized from {$pconfig['vouchersyncdbip']})"; + } + ?> + + + + + + + + + + + + + + + + + + + + +
                            \""
                            "; + } + ?> + +
                            ##
                            +   + +   + +   + +   + + +
                            + + + + + +
                            + + + +
                            + . +
                            + +
                            + . +
                            + +
                            + +
                            # + +
                            + +
                            # + +
                            + +
                            # + +
                            + +
                            + +
                            + +
                            + +
                            ($PORTAL_MESSAGE$). +
                            + +
                            ($PORTAL_MESSAGE$). +
                              +   +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                              + + + " onclick="enable_change(true); before_save();" /> + " onclick="window.location.href=''" /> + +
                            +

                            +
                            + +
                            + +

                            +
                            +
                            +
                            + + + + diff --git a/src/usr/local/www/services_captiveportal_vouchers_edit.php b/src/usr/local/www/services_captiveportal_vouchers_edit.php new file mode 100644 index 0000000..0aa6a45 --- /dev/null +++ b/src/usr/local/www/services_captiveportal_vouchers_edit.php @@ -0,0 +1,230 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-services-captiveportal-voucher-edit +##|*NAME=Services: Captive portal Voucher Rolls page +##|*DESCR=Allow access to the 'Services: Captive portal Edit Voucher Rolls' page. +##|*MATCH=services_captiveportal_vouchers_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); +require_once("voucher.inc"); + +$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit Voucher Rolls")); +$shortcut_section = "captiveportal-vouchers"; + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +if (!is_array($config['voucher'])) { + $config['voucher'] = array(); +} + +if (!is_array($config['voucher'][$cpzone]['roll'])) { + $config['voucher'][$cpzone]['roll'] = array(); +} +$a_roll = &$config['voucher'][$cpzone]['roll']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_roll[$id]) { + $pconfig['zone'] = $a_roll[$id]['zone']; + $pconfig['number'] = $a_roll[$id]['number']; + $pconfig['count'] = $a_roll[$id]['count']; + $pconfig['minutes'] = $a_roll[$id]['minutes']; + $pconfig['descr'] = $a_roll[$id]['descr']; +} + +$maxnumber = (1<<$config['voucher'][$cpzone]['rollbits']) -1; // Highest Roll# +$maxcount = (1<<$config['voucher'][$cpzone]['ticketbits']) -1; // Highest Ticket# + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "number count minutes"); + $reqdfieldsn = array(gettext("Number"), gettext("Count"), gettext("minutes")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + // Look for duplicate roll # + foreach ($a_roll as $re) { + if ($re['number'] == $_POST['number']) { + $input_errors[] = sprintf(gettext("Roll number %s already exists."), $_POST['number']); + break; + } + } + + if (!is_numeric($_POST['number']) || $_POST['number'] >= $maxnumber) { + $input_errors[] = sprintf(gettext("Roll number must be numeric and less than %s"), $maxnumber); + } + + if (!is_numeric($_POST['count']) || $_POST['count'] < 1 || $_POST['count'] > $maxcount) { + $input_errors[] = sprintf(gettext("A roll has at least one voucher and less than %s."), $maxcount); + } + + if (!is_numeric($_POST['minutes']) || $_POST['minutes'] < 1) { + $input_errors[] = gettext("Each voucher must be good for at least 1 minute."); + } + + if (!$input_errors) { + + if (isset($id) && $a_roll[$id]) { + $rollent = $a_roll[$id]; + } + + $rollent['zone'] = $_POST['zone']; + $rollent['number'] = $_POST['number']; + $rollent['minutes'] = $_POST['minutes']; + $rollent['descr'] = $_POST['descr']; + + /* New Roll or modified voucher count: create bitmask */ + $voucherlck = lock("voucher{$cpzone}"); + if ($_POST['count'] != $rollent['count']) { + $rollent['count'] = $_POST['count']; + $len = ($rollent['count']>>3) + 1; // count / 8 +1 + $rollent['used'] = base64_encode(str_repeat("\000", $len)); // 4 bitmask + $rollent['active'] = array(); + voucher_write_used_db($rollent['number'], $rollent['used']); + voucher_write_active_db($rollent['number'], array()); // create empty DB + voucher_log(LOG_INFO, sprintf(gettext('All %1$s vouchers from Roll %2$s marked unused'), $rollent['count'], $rollent['number'])); + } else { + // existing roll has been modified but without changing the count + // read active and used DB from ramdisk and store it in XML config + $rollent['used'] = base64_encode(voucher_read_used_db($rollent['number'])); + $activent = array(); + $db = array(); + $active_vouchers = voucher_read_active_db($rollent['number'], $rollent['minutes']); + foreach ($active_vouchers as $voucher => $line) { + list($timestamp, $minutes) = explode(",", $line); + $activent['voucher'] = $voucher; + $activent['timestamp'] = $timestamp; + $activent['minutes'] = $minutes; + $db[] = $activent; + } + $rollent['active'] = $db; + } + unlock($voucherlck); + + if (isset($id) && $a_roll[$id]) { + $a_roll[$id] = $rollent; + } else { + $a_roll[] = $rollent; + } + + write_config(); + + header("Location: services_captiveportal_vouchers.php?zone={$cpzone}"); + exit; + } +} + +include("head.inc"); +?> + + + + +
                            + + + + + + + + + + + + + + + + + + + + + +
                            # + +
                            + # (0..) . +
                            + +
                            + . +
                            + +
                            + (1..) . +
                            + +
                            + . +
                              + " /> + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/services_captiveportal_zones.php b/src/usr/local/www/services_captiveportal_zones.php new file mode 100644 index 0000000..6d956b5 --- /dev/null +++ b/src/usr/local/www/services_captiveportal_zones.php @@ -0,0 +1,154 @@ + + + + +
                            + +

                            +" . gettext("You must apply the changes in order for them to take effect."));?> + + + + + + + + + + + $cpitem): + if (!is_array($cpitem)) { + continue; + } +?> + + + + + + + + + + + + +
                            + + + + + +
                              + " alt="add" /> +
                            +
                            + + + + + + +   + + + + + + +
                            " alt="edit" /> + ')">" alt="delete" /> +
                            +
                            + + + + + +
                              + " alt="add" /> +
                            +
                            +

                            + + + diff --git a/src/usr/local/www/services_captiveportal_zones_edit.php b/src/usr/local/www/services_captiveportal_zones_edit.php new file mode 100644 index 0000000..fa37c80 --- /dev/null +++ b/src/usr/local/www/services_captiveportal_zones_edit.php @@ -0,0 +1,124 @@ + $cpent) { + if ($cpent['zone'] == $_POST['zone']) { + $input_errors[] = sprintf("[%s] %s.", $_POST['zone'], gettext("already exists")); + break; + } + } + + if (!$input_errors) { + $cpzone = strtolower($_POST['zone']); + $a_cp[$cpzone] = array(); + $a_cp[$cpzone]['zone'] = str_replace(" ", "", $_POST['zone']); + $a_cp[$cpzone]['descr'] = $_POST['descr']; + $a_cp[$cpzone]['localauth_priv'] = true; + write_config(); + + header("Location: services_captiveportal.php?zone={$cpzone}"); + exit; + } +} +include("head.inc"); +?> + + + +
                            + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + +
                            + . +
                              + " /> +
                            +
                            + + + diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php new file mode 100644 index 0000000..3061812 --- /dev/null +++ b/src/usr/local/www/services_dhcp.php @@ -0,0 +1,1442 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /bin/rm + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-services-dhcpserver +##|*NAME=Services: DHCP server page +##|*DESCR=Allow access to the 'Services: DHCP server' page. +##|*MATCH=services_dhcp.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter.inc"); + +if (!$g['services_dhcp_server_enable']) { + header("Location: /"); + exit; +} + +$if = $_GET['if']; +if (!empty($_POST['if'])) { + $if = $_POST['if']; +} + +/* if OLSRD is enabled, allow WAN to house DHCP. */ +if ($config['installedpackages']['olsrd']) { + foreach ($config['installedpackages']['olsrd']['config'] as $olsrd) { + if ($olsrd['enable']) { + $is_olsr_enabled = true; + break; + } + } +} + +$iflist = get_configured_interface_with_descr(); + +/* set the starting interface */ +if (!$if || !isset($iflist[$if])) { + foreach ($iflist as $ifent => $ifname) { + $oc = $config['interfaces'][$ifent]; + if ((is_array($config['dhcpd'][$ifent]) && !isset($config['dhcpd'][$ifent]['enable']) && (!is_ipaddrv4($oc['ipaddr']))) || + (!is_array($config['dhcpd'][$ifent]) && (!is_ipaddrv4($oc['ipaddr'])))) { + continue; + } + $if = $ifent; + break; + } +} + +$act = $_GET['act']; +if (!empty($_POST['act'])) { + $act = $_POST['act']; +} + +$a_pools = array(); + +if (is_array($config['dhcpd'][$if])) { + $pool = $_GET['pool']; + if (is_numeric($_POST['pool'])) { + $pool = $_POST['pool']; + } + + // If we have a pool but no interface name, that's not valid. Redirect away. + if (is_numeric($pool) && empty($if)) { + header("Location: services_dhcp.php"); + exit; + } + + if (!is_array($config['dhcpd'][$if]['pool'])) { + $config['dhcpd'][$if]['pool'] = array(); + } + $a_pools = &$config['dhcpd'][$if]['pool']; + + if (is_numeric($pool) && $a_pools[$pool]) { + $dhcpdconf = &$a_pools[$pool]; + } elseif ($act == "newpool") { + $dhcpdconf = array(); + } else { + $dhcpdconf = &$config['dhcpd'][$if]; + } +} +if (is_array($dhcpdconf)) { + // Global Options + if (!is_numeric($pool) && !($act == "newpool")) { + $pconfig['enable'] = isset($dhcpdconf['enable']); + $pconfig['staticarp'] = isset($dhcpdconf['staticarp']); + // No reason to specify this per-pool, per the dhcpd.conf man page it needs to be in every + // pool and should be specified in every pool both nodes share, so we'll treat it as global + $pconfig['failover_peerip'] = $dhcpdconf['failover_peerip']; + + // dhcpleaseinlocaltime is global to all interfaces. So if it is selected on any interface, + // then show it true/checked. + foreach ($config['dhcpd'] as $dhcpdifitem) { + $dhcpleaseinlocaltime = $dhcpdifitem['dhcpleaseinlocaltime']; + if ($dhcpleaseinlocaltime) { + break; + } + } + + $pconfig['dhcpleaseinlocaltime'] = $dhcpleaseinlocaltime; + + if (!is_array($dhcpdconf['staticmap'])) { + $dhcpdconf['staticmap'] = array(); + } + $a_maps = &$dhcpdconf['staticmap']; + } else { + // Options that exist only in pools + $pconfig['descr'] = $dhcpdconf['descr']; + } + + // Options that can be global or per-pool. + if (is_array($dhcpdconf['range'])) { + $pconfig['range_from'] = $dhcpdconf['range']['from']; + $pconfig['range_to'] = $dhcpdconf['range']['to']; + } + $pconfig['deftime'] = $dhcpdconf['defaultleasetime']; + $pconfig['maxtime'] = $dhcpdconf['maxleasetime']; + $pconfig['gateway'] = $dhcpdconf['gateway']; + $pconfig['domain'] = $dhcpdconf['domain']; + $pconfig['domainsearchlist'] = $dhcpdconf['domainsearchlist']; + list($pconfig['wins1'], $pconfig['wins2']) = $dhcpdconf['winsserver']; + list($pconfig['dns1'], $pconfig['dns2'], $pconfig['dns3'], $pconfig['dns4']) = $dhcpdconf['dnsserver']; + $pconfig['denyunknown'] = isset($dhcpdconf['denyunknown']); + $pconfig['ddnsdomain'] = $dhcpdconf['ddnsdomain']; + $pconfig['ddnsdomainprimary'] = $dhcpdconf['ddnsdomainprimary']; + $pconfig['ddnsdomainkeyname'] = $dhcpdconf['ddnsdomainkeyname']; + $pconfig['ddnsdomainkey'] = $dhcpdconf['ddnsdomainkey']; + $pconfig['ddnsupdate'] = isset($dhcpdconf['ddnsupdate']); + $pconfig['mac_allow'] = $dhcpdconf['mac_allow']; + $pconfig['mac_deny'] = $dhcpdconf['mac_deny']; + list($pconfig['ntp1'], $pconfig['ntp2']) = $dhcpdconf['ntpserver']; + $pconfig['tftp'] = $dhcpdconf['tftp']; + $pconfig['ldap'] = $dhcpdconf['ldap']; + $pconfig['netboot'] = isset($dhcpdconf['netboot']); + $pconfig['nextserver'] = $dhcpdconf['nextserver']; + $pconfig['filename'] = $dhcpdconf['filename']; + $pconfig['filename32'] = $dhcpdconf['filename32']; + $pconfig['filename64'] = $dhcpdconf['filename64']; + $pconfig['rootpath'] = $dhcpdconf['rootpath']; + $pconfig['netmask'] = $dhcpdconf['netmask']; + $pconfig['numberoptions'] = $dhcpdconf['numberoptions']; +} + +$ifcfgip = $config['interfaces'][$if]['ipaddr']; +$ifcfgsn = $config['interfaces'][$if]['subnet']; + +function validate_partial_mac_list($maclist) { + $macs = explode(',', $maclist); + + // Loop through and look for invalid MACs. + foreach ($macs as $mac) { + if (!is_macaddr($mac, true)) { + return false; + } + } + return true; +} + +if (isset($_POST['submit'])) { + + unset($input_errors); + + $pconfig = $_POST; + + $numberoptions = array(); + for ($x = 0; $x < 99; $x++) { + if (isset($_POST["number{$x}"]) && ctype_digit($_POST["number{$x}"])) { + $numbervalue = array(); + $numbervalue['number'] = htmlspecialchars($_POST["number{$x}"]); + $numbervalue['type'] = htmlspecialchars($_POST["itemtype{$x}"]); + $numbervalue['value'] = str_replace('"', '"', htmlspecialchars($_POST["value{$x}"])); + $numberoptions['item'][] = $numbervalue; + } + } + // Reload the new pconfig variable that the form uses. + $pconfig['numberoptions'] = $numberoptions; + + /* input validation */ + if ($_POST['enable'] || is_numeric($pool) || $act == "newpool") { + $reqdfields = explode(" ", "range_from range_to"); + $reqdfieldsn = array(gettext("Range begin"), gettext("Range end")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (($_POST['range_from'] && !is_ipaddrv4($_POST['range_from']))) { + $input_errors[] = gettext("A valid range must be specified."); + } + if (($_POST['range_to'] && !is_ipaddrv4($_POST['range_to']))) { + $input_errors[] = gettext("A valid range must be specified."); + } + if (($_POST['gateway'] && $_POST['gateway'] != "none" && !is_ipaddrv4($_POST['gateway']))) { + $input_errors[] = gettext("A valid IP address must be specified for the gateway."); + } + if (($_POST['wins1'] && !is_ipaddrv4($_POST['wins1'])) || ($_POST['wins2'] && !is_ipaddrv4($_POST['wins2']))) { + $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary WINS servers."); + } + $parent_ip = get_interface_ip($_POST['if']); + if (is_ipaddrv4($parent_ip) && $_POST['gateway'] && $_POST['gateway'] != "none") { + $parent_sn = get_interface_subnet($_POST['if']); + if (!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['if'], $_POST['gateway'])) { + $input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']); + } + } + if (($_POST['dns1'] && !is_ipaddrv4($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddrv4($_POST['dns2'])) || ($_POST['dns3'] && !is_ipaddrv4($_POST['dns3'])) || ($_POST['dns4'] && !is_ipaddrv4($_POST['dns4']))) { + $input_errors[] = gettext("A valid IP address must be specified for each of the DNS servers."); + } + + if ($_POST['deftime'] && (!is_numeric($_POST['deftime']) || ($_POST['deftime'] < 60))) { + $input_errors[] = gettext("The default lease time must be at least 60 seconds."); + } + + if (isset($config['captiveportal']) && is_array($config['captiveportal'])) { + $deftime = 7200; // Default value if it's empty + if (is_numeric($_POST['deftime'])) { + $deftime = $_POST['deftime']; + } + + foreach ($config['captiveportal'] as $cpZone => $cpdata) { + if (!isset($cpdata['enable'])) { + continue; + } + if (!isset($cpdata['timeout']) || !is_numeric($cpdata['timeout'])) { + continue; + } + $cp_ifs = explode(',', $cpdata['interface']); + if (!in_array($if, $cp_ifs)) { + continue; + } + if ($cpdata['timeout'] > $deftime) { + $input_errors[] = sprintf(gettext( + "The Captive Portal zone '%s' has Hard Timeout parameter set to a value bigger than Default lease time (%s)."), $cpZone, $deftime); + } + } + } + + if ($_POST['maxtime'] && (!is_numeric($_POST['maxtime']) || ($_POST['maxtime'] < 60) || ($_POST['maxtime'] <= $_POST['deftime']))) { + $input_errors[] = gettext("The maximum lease time must be at least 60 seconds and higher than the default lease time."); + } + if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain']))) { + $input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration."); + } + if (($_POST['ddnsdomain'] && !is_ipaddrv4($_POST['ddnsdomainprimary']))) { + $input_errors[] = gettext("A valid primary domain name server IP address must be specified for the dynamic domain name."); + } + if (($_POST['ddnsdomainkey'] && !$_POST['ddnsdomainkeyname']) || + ($_POST['ddnsdomainkeyname'] && !$_POST['ddnsdomainkey'])) { + $input_errors[] = gettext("You must specify both a valid domain key and key name."); + } + if ($_POST['domainsearchlist']) { + $domain_array = preg_split("/[ ;]+/", $_POST['domainsearchlist']); + foreach ($domain_array as $curdomain) { + if (!is_domain($curdomain)) { + $input_errors[] = gettext("A valid domain search list must be specified."); + break; + } + } + } + + // Validate MACs + if (!empty($_POST['mac_allow']) && !validate_partial_mac_list($_POST['mac_allow'])) { + $input_errors[] = gettext("If you specify a mac allow list, it must contain only valid partial MAC addresses."); + } + if (!empty($_POST['mac_deny']) && !validate_partial_mac_list($_POST['mac_deny'])) { + $input_errors[] = gettext("If you specify a mac deny list, it must contain only valid partial MAC addresses."); + } + + if (($_POST['ntp1'] && !is_ipaddrv4($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddrv4($_POST['ntp2']))) { + $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary NTP servers."); + } + if (($_POST['domain'] && !is_domain($_POST['domain']))) { + $input_errors[] = gettext("A valid domain name must be specified for the DNS domain."); + } + if ($_POST['tftp'] && !is_ipaddrv4($_POST['tftp']) && !is_domain($_POST['tftp']) && !is_URL($_POST['tftp'])) { + $input_errors[] = gettext("A valid IP address or hostname must be specified for the TFTP server."); + } + if (($_POST['nextserver'] && !is_ipaddrv4($_POST['nextserver']))) { + $input_errors[] = gettext("A valid IP address must be specified for the network boot server."); + } + + if (gen_subnet($ifcfgip, $ifcfgsn) == $_POST['range_from']) { + $input_errors[] = gettext("You cannot use the network address in the starting subnet range."); + } + if (gen_subnet_max($ifcfgip, $ifcfgsn) == $_POST['range_to']) { + $input_errors[] = gettext("You cannot use the broadcast address in the ending subnet range."); + } + + // Disallow a range that includes the virtualip + if (is_array($config['virtualip']['vip'])) { + foreach ($config['virtualip']['vip'] as $vip) { + if ($vip['interface'] == $if) { + if ($vip['subnet'] && is_inrange_v4($vip['subnet'], $_POST['range_from'], $_POST['range_to'])) { + $input_errors[] = sprintf(gettext("The subnet range cannot overlap with virtual IP address %s."), $vip['subnet']); + } + } + } + } + + $noip = false; + if (is_array($a_maps)) { + foreach ($a_maps as $map) { + if (empty($map['ipaddr'])) { + $noip = true; + } + } + } + if ($_POST['staticarp'] && $noip) { + $input_errors[] = "Cannot enable static ARP when you have static map entries without IP addresses. Ensure all static maps have IP addresses and try again."; + } + + if (is_array($pconfig['numberoptions']['item'])) { + foreach ($pconfig['numberoptions']['item'] as $numberoption) { + if ($numberoption['type'] == 'text' && strstr($numberoption['value'], '"')) { + $input_errors[] = gettext("Text type cannot include quotation marks."); + } else if ($numberoption['type'] == 'string' && !preg_match('/^"[^"]*"$/', $numberoption['value']) && !preg_match('/^[0-9a-f]{2}(?:\:[0-9a-f]{2})*$/i', $numberoption['value'])) { + $input_errors[] = gettext("String type must be enclosed in quotes like \"this\" or must be a series of octets specified in hexadecimal, separated by colons, like 01:23:45:67:89:ab:cd:ef"); + } else if ($numberoption['type'] == 'boolean' && $numberoption['value'] != 'true' && $numberoption['value'] != 'false' && $numberoption['value'] != 'on' && $numberoption['value'] != 'off') { + $input_errors[] = gettext("Boolean type must be true, false, on, or off."); + } else if ($numberoption['type'] == 'unsigned integer 8' && (!is_numeric($numberoption['value']) || $numberoption['value'] < 0 || $numberoption['value'] > 255)) { + $input_errors[] = gettext("Unsigned 8-bit integer type must be a number in the range 0 to 255."); + } else if ($numberoption['type'] == 'unsigned integer 16' && (!is_numeric($numberoption['value']) || $numberoption['value'] < 0 || $numberoption['value'] > 65535)) { + $input_errors[] = gettext("Unsigned 16-bit integer type must be a number in the range 0 to 65535."); + } else if ($numberoption['type'] == 'unsigned integer 32' && (!is_numeric($numberoption['value']) || $numberoption['value'] < 0 || $numberoption['value'] > 4294967295)) { + $input_errors[] = gettext("Unsigned 32-bit integer type must be a number in the range 0 to 4294967295."); + } else if ($numberoption['type'] == 'signed integer 8' && (!is_numeric($numberoption['value']) || $numberoption['value'] < -128 || $numberoption['value'] > 127)) { + $input_errors[] = gettext("Signed 8-bit integer type must be a number in the range -128 to 127."); + } else if ($numberoption['type'] == 'signed integer 16' && (!is_numeric($numberoption['value']) || $numberoption['value'] < -32768 || $numberoption['value'] > 32767)) { + $input_errors[] = gettext("Signed 16-bit integer type must be a number in the range -32768 to 32767."); + } else if ($numberoption['type'] == 'signed integer 32' && (!is_numeric($numberoption['value']) || $numberoption['value'] < -2147483648 || $numberoption['value'] > 2147483647)) { + $input_errors[] = gettext("Signed 32-bit integer type must be a number in the range -2147483648 to 2147483647."); + } else if ($numberoption['type'] == 'ip-address' && !is_ipaddrv4($numberoption['value']) && !is_hostname($numberoption['value'])) { + $input_errors[] = gettext("IP address or host type must be an IP address or host name."); + } + } + } + + if (!$input_errors) { + /* make sure the range lies within the current subnet */ + $subnet_start = ip2ulong(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn))); + $subnet_end = ip2ulong(long2ip32(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn)))); + + if ((ip2ulong($_POST['range_from']) < $subnet_start) || (ip2ulong($_POST['range_from']) > $subnet_end) || + (ip2ulong($_POST['range_to']) < $subnet_start) || (ip2ulong($_POST['range_to']) > $subnet_end)) { + $input_errors[] = gettext("The specified range lies outside of the current subnet."); + } + + if (ip2ulong($_POST['range_from']) > ip2ulong($_POST['range_to'])) { + $input_errors[] = gettext("The range is invalid (first element higher than second element)."); + } + + if (is_numeric($pool) || ($act == "newpool")) { + $rfrom = $config['dhcpd'][$if]['range']['from']; + $rto = $config['dhcpd'][$if]['range']['to']; + + if (is_inrange_v4($_POST['range_from'], $rfrom, $rto) || is_inrange_v4($_POST['range_to'], $rfrom, $rto)) { + $input_errors[] = gettext("The specified range must not be within the DHCP range for this interface."); + } + } + + foreach ($a_pools as $id => $p) { + if (is_numeric($pool) && ($id == $pool)) { + continue; + } + + if (is_inrange_v4($_POST['range_from'], $p['range']['from'], $p['range']['to']) || + is_inrange_v4($_POST['range_to'], $p['range']['from'], $p['range']['to'])) { + $input_errors[] = gettext("The specified range must not be within the range configured on a DHCP pool for this interface."); + break; + } + } + + /* make sure that the DHCP Relay isn't enabled on this interface */ + if (isset($config['dhcrelay']['enable']) && (stristr($config['dhcrelay']['interface'], $if) !== false)) { + $input_errors[] = sprintf(gettext("You must disable the DHCP relay on the %s interface before enabling the DHCP server."), $iflist[$if]); + } + + $dynsubnet_start = ip2ulong($_POST['range_from']); + $dynsubnet_end = ip2ulong($_POST['range_to']); + if (is_array($a_maps)) { + foreach ($a_maps as $map) { + if (empty($map['ipaddr'])) { + continue; + } + if ((ip2ulong($map['ipaddr']) > $dynsubnet_start) && + (ip2ulong($map['ipaddr']) < $dynsubnet_end)) { + $input_errors[] = sprintf(gettext("The DHCP range cannot overlap any static DHCP mappings.")); + break; + } + } + } + } + } + + if (!$input_errors) { + if (!is_numeric($pool)) { + if ($act == "newpool") { + $dhcpdconf = array(); + } else { + if (!is_array($config['dhcpd'][$if])) { + $config['dhcpd'][$if] = array(); + } + $dhcpdconf = $config['dhcpd'][$if]; + } + } else { + if (is_array($a_pools[$pool])) { + $dhcpdconf = $a_pools[$pool]; + } else { + // Someone specified a pool but it doesn't exist. Punt. + header("Location: services_dhcp.php"); + exit; + } + } + if (!is_array($dhcpdconf['range'])) { + $dhcpdconf['range'] = array(); + } + + $dhcpd_enable_changed = false; + + // Global Options + if (!is_numeric($pool) && !($act == "newpool")) { + $old_dhcpd_enable = isset($dhcpdconf['enable']); + $new_dhcpd_enable = ($_POST['enable']) ? true : false; + if ($old_dhcpd_enable != $new_dhcpd_enable) { + /* DHCP has been enabled or disabled. The pf ruleset will need to be rebuilt to allow or disallow DHCP. */ + $dhcpd_enable_changed = true; + } + $dhcpdconf['enable'] = $new_dhcpd_enable; + $dhcpdconf['staticarp'] = ($_POST['staticarp']) ? true : false; + $previous = $dhcpdconf['failover_peerip']; + if ($previous <> $_POST['failover_peerip']) { + mwexec("/bin/rm -rf /var/dhcpd/var/db/*"); + } + $dhcpdconf['failover_peerip'] = $_POST['failover_peerip']; + // dhcpleaseinlocaltime is global to all interfaces. So update the setting on all interfaces. + foreach ($config['dhcpd'] as &$dhcpdifitem) { + $dhcpdifitem['dhcpleaseinlocaltime'] = $_POST['dhcpleaseinlocaltime']; + } + } else { + // Options that exist only in pools + $dhcpdconf['descr'] = $_POST['descr']; + } + + // Options that can be global or per-pool. + $dhcpdconf['range']['from'] = $_POST['range_from']; + $dhcpdconf['range']['to'] = $_POST['range_to']; + $dhcpdconf['defaultleasetime'] = $_POST['deftime']; + $dhcpdconf['maxleasetime'] = $_POST['maxtime']; + $dhcpdconf['netmask'] = $_POST['netmask']; + + unset($dhcpdconf['winsserver']); + if ($_POST['wins1']) { + $dhcpdconf['winsserver'][] = $_POST['wins1']; + } + if ($_POST['wins2']) { + $dhcpdconf['winsserver'][] = $_POST['wins2']; + } + + unset($dhcpdconf['dnsserver']); + if ($_POST['dns1']) { + $dhcpdconf['dnsserver'][] = $_POST['dns1']; + } + if ($_POST['dns2']) { + $dhcpdconf['dnsserver'][] = $_POST['dns2']; + } + if ($_POST['dns3']) { + $dhcpdconf['dnsserver'][] = $_POST['dns3']; + } + if ($_POST['dns4']) { + $dhcpdconf['dnsserver'][] = $_POST['dns4']; + } + + $dhcpdconf['gateway'] = $_POST['gateway']; + $dhcpdconf['domain'] = $_POST['domain']; + $dhcpdconf['domainsearchlist'] = $_POST['domainsearchlist']; + $dhcpdconf['denyunknown'] = ($_POST['denyunknown']) ? true : false; + $dhcpdconf['ddnsdomain'] = $_POST['ddnsdomain']; + $dhcpdconf['ddnsdomainprimary'] = $_POST['ddnsdomainprimary']; + $dhcpdconf['ddnsdomainkeyname'] = $_POST['ddnsdomainkeyname']; + $dhcpdconf['ddnsdomainkey'] = $_POST['ddnsdomainkey']; + $dhcpdconf['ddnsupdate'] = ($_POST['ddnsupdate']) ? true : false; + $dhcpdconf['mac_allow'] = $_POST['mac_allow']; + $dhcpdconf['mac_deny'] = $_POST['mac_deny']; + + unset($dhcpdconf['ntpserver']); + if ($_POST['ntp1']) { + $dhcpdconf['ntpserver'][] = $_POST['ntp1']; + } + if ($_POST['ntp2']) { + $dhcpdconf['ntpserver'][] = $_POST['ntp2']; + } + + $dhcpdconf['tftp'] = $_POST['tftp']; + $dhcpdconf['ldap'] = $_POST['ldap']; + $dhcpdconf['netboot'] = ($_POST['netboot']) ? true : false; + $dhcpdconf['nextserver'] = $_POST['nextserver']; + $dhcpdconf['filename'] = $_POST['filename']; + $dhcpdconf['filename32'] = $_POST['filename32']; + $dhcpdconf['filename64'] = $_POST['filename64']; + $dhcpdconf['rootpath'] = $_POST['rootpath']; + + // Handle the custom options rowhelper + if (isset($dhcpdconf['numberoptions']['item'])) { + unset($dhcpdconf['numberoptions']['item']); + } + + $dhcpdconf['numberoptions'] = $numberoptions; + + if (is_numeric($pool) && is_array($a_pools[$pool])) { + $a_pools[$pool] = $dhcpdconf; + } elseif ($act == "newpool") { + $a_pools[] = $dhcpdconf; + } else { + $config['dhcpd'][$if] = $dhcpdconf; + } + + write_config(); + } +} + +if ((isset($_POST['submit']) || isset($_POST['apply'])) && (!$input_errors)) { + $retval = 0; + $retvaldhcp = 0; + $retvaldns = 0; + /* dnsmasq_configure calls dhcpd_configure */ + /* no need to restart dhcpd twice */ + if (isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcpstatic'])) { + $retvaldns = services_dnsmasq_configure(); + if ($retvaldns == 0) { + clear_subsystem_dirty('hosts'); + clear_subsystem_dirty('staticmaps'); + } + } else if (isset($config['unbound']['enable']) && isset($config['unbound']['regdhcpstatic'])) { + $retvaldns = services_unbound_configure(); + if ($retvaldns == 0) { + clear_subsystem_dirty('unbound'); + clear_subsystem_dirty('hosts'); + clear_subsystem_dirty('staticmaps'); + } + } else { + $retvaldhcp = services_dhcpd_configure(); + if ($retvaldhcp == 0) { + clear_subsystem_dirty('staticmaps'); + } + } + if ($dhcpd_enable_changed) { + $retvalfc = filter_configure(); + } + + if ($retvaldhcp == 1 || $retvaldns == 1 || $retvalfc == 1) { + $retval = 1; + } + $savemsg = get_std_save_message($retval); +} + +if ($act == "delpool") { + if ($a_pools[$_GET['id']]) { + unset($a_pools[$_GET['id']]); + write_config(); + header("Location: services_dhcp.php?if={$if}"); + exit; + } +} + +if ($act == "del") { + if ($a_maps[$_GET['id']]) { + unset($a_maps[$_GET['id']]); + write_config(); + if (isset($config['dhcpd'][$if]['enable'])) { + mark_subsystem_dirty('staticmaps'); + if (isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcpstatic'])) { + mark_subsystem_dirty('hosts'); + } + } + header("Location: services_dhcp.php?if={$if}"); + exit; + } +} + +$closehead = false; +$pgtitle = array(gettext("Services"), gettext("DHCP server")); +$shortcut_section = "dhcp"; + +include("head.inc"); + +?> + + + + + + + + + + +
                            + + +"; + echo ""; + exit; + } +?> +
                            +" . gettext("You must apply the changes in order for them to take effect."));?>
                            + + + +
                            + $ifname) { + $oc = $config['interfaces'][$ifent]; + if ((is_array($config['dhcpd'][$ifent]) && !isset($config['dhcpd'][$ifent]['enable']) && (!is_ipaddrv4($oc['ipaddr']))) || + (!is_array($config['dhcpd'][$ifent]) && (!is_ipaddrv4($oc['ipaddr'])))) { + continue; + } + if ($ifent == $if) { + $active = true; + } else { + $active = false; + } + $tab_array[] = array($ifname, $active, "services_dhcp.php?if={$ifent}"); + $tabscounter++; + } + if ($tabscounter == 0) { + echo "" . gettext("The DHCP Server can only be enabled on interfaces configured with a static IPv4 address. This system has none.") . "

                            "; + echo "
                            "; + include("fend.inc"); + echo ""; + echo ""; + exit; + } + display_top_tabs($tab_array); +?> + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + onclick="enable_change(false)" /> + +
                              + /> +
                            + +
                            + +
                            + +
                            + +
                            + + - + +
                            In-use DHCP Pool Ranges: + +
                            + + - + + +
                            + + - + +
                            + +
                            + +    +
                            + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                            + plus +
                            +
                            + + +   + +   + + + + + + +
                            + edit + + ')">delete +
                            +
                            + + + + + +
                            + add +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + 20).");?> +
                            + + + + + + + + + +
                            + />  +
                              + + + + +
                            +
                            + + + + + + + + + +
                            + /> + + + + +
                              + + + + +
                            +
                            +
                            > + " /> - +
                            +
                            > + />  +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            > + " /> - +
                            +
                            > +
                            + 00:00:00,01:E5:FF
                            +
                            + 00:00:00,01:E5:FF +
                            +
                            +
                            > + " /> - +
                            +
                            > +
                            + +
                            +
                            +
                            > + " /> - +
                            +
                            > +
                            + +
                            +
                            +
                            > + " /> - +
                            +
                            > +
                            + +
                            +
                            +
                            > + " /> - +
                            +
                            > + />  + +
                            + + + + + + + + + + + + + + + + + +
                            + + +
                            +
                            + + +
                            +
                            + + +
                            +
                            + + +
                            +
                            + + + - +
                            + +
                            +
                            +
                            > + " /> - +
                            +
                            > + + + + + + + + + + + + + + + + + + + +
                            +
                            + +
                            +
                            + + + + + + + delete +
                            + + " /> + + +
                            +
                              + + + + + + + + " onclick="enable_change(true)" /> +
                              +

                            + + +
                            +
                            +
                            + + + , +
                            + + +
                            +
                            + + + +
                            +
                            +

                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                             
                            + + + + + +
                            + add +
                            +
                            + + ARP Table Static Entry + + + + +   + +   + +   + + + + + + +
                            edit')">delete
                            +
                            + + + + + +
                            add
                            +
                            + +
                            + + + + + + + + diff --git a/src/usr/local/www/services_dhcp_edit.php b/src/usr/local/www/services_dhcp_edit.php new file mode 100644 index 0000000..1fc947b --- /dev/null +++ b/src/usr/local/www/services_dhcp_edit.php @@ -0,0 +1,625 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/sbin/arp + pfSense_MODULE: dhcpserver +*/ + +##|+PRIV +##|*IDENT=page-services-dhcpserver-editstaticmapping +##|*NAME=Services: DHCP Server : Edit static mapping page +##|*DESCR=Allow access to the 'Services: DHCP Server : Edit static mapping' page. +##|*MATCH=services_dhcp_edit.php* +##|-PRIV + +function staticmapcmp($a, $b) { + return ipcmp($a['ipaddr'], $b['ipaddr']); +} + +function staticmaps_sort($ifgui) { + global $g, $config; + + usort($config['dhcpd'][$ifgui]['staticmap'], "staticmapcmp"); +} + +require_once('globals.inc'); + +if (!$g['services_dhcp_server_enable']) { + header("Location: /"); + exit; +} + +require("guiconfig.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_dhcp.php'); +} + +$if = $_GET['if']; +if ($_POST['if']) { + $if = $_POST['if']; +} + +if (!$if) { + header("Location: services_dhcp.php"); + exit; +} + +if (!is_array($config['dhcpd'])) { + $config['dhcpd'] = array(); +} +if (!is_array($config['dhcpd'][$if])) { + $config['dhcpd'][$if] = array(); +} +if (!is_array($config['dhcpd'][$if]['staticmap'])) { + $config['dhcpd'][$if]['staticmap'] = array(); +} + +if (!is_array($config['dhcpd'][$if]['pool'])) { + $config['dhcpd'][$if]['pool'] = array(); +} +$a_pools = &$config['dhcpd'][$if]['pool']; + +$static_arp_enabled=isset($config['dhcpd'][$if]['staticarp']); +$netboot_enabled=isset($config['dhcpd'][$if]['netboot']); +$a_maps = &$config['dhcpd'][$if]['staticmap']; +$ifcfgip = get_interface_ip($if); +$ifcfgsn = get_interface_subnet($if); +$ifcfgdescr = convert_friendly_interface_to_friendly_descr($if); + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_maps[$id]) { + $pconfig['mac'] = $a_maps[$id]['mac']; + $pconfig['cid'] = $a_maps[$id]['cid']; + $pconfig['hostname'] = $a_maps[$id]['hostname']; + $pconfig['ipaddr'] = $a_maps[$id]['ipaddr']; + $pconfig['filename'] = $a_maps[$id]['filename']; + $pconfig['rootpath'] = $a_maps[$id]['rootpath']; + $pconfig['descr'] = $a_maps[$id]['descr']; + $pconfig['arp_table_static_entry'] = isset($a_maps[$id]['arp_table_static_entry']); + $pconfig['deftime'] = $a_maps[$id]['defaultleasetime']; + $pconfig['maxtime'] = $a_maps[$id]['maxleasetime']; + $pconfig['gateway'] = $a_maps[$id]['gateway']; + $pconfig['domain'] = $a_maps[$id]['domain']; + $pconfig['domainsearchlist'] = $a_maps[$id]['domainsearchlist']; + list($pconfig['wins1'], $pconfig['wins2']) = $a_maps[$id]['winsserver']; + list($pconfig['dns1'], $pconfig['dns2'], $pconfig['dns3'], $pconfig['dns4']) = $a_maps[$id]['dnsserver']; + $pconfig['ddnsdomain'] = $a_maps[$id]['ddnsdomain']; + $pconfig['ddnsdomainprimary'] = $a_maps[$id]['ddnsdomainprimary']; + $pconfig['ddnsdomainkeyname'] = $a_maps[$id]['ddnsdomainkeyname']; + $pconfig['ddnsdomainkey'] = $a_maps[$id]['ddnsdomainkey']; + $pconfig['ddnsupdate'] = isset($a_maps[$id]['ddnsupdate']); + list($pconfig['ntp1'], $pconfig['ntp2']) = $a_maps[$id]['ntpserver']; + $pconfig['tftp'] = $a_maps[$id]['tftp']; +} else { + $pconfig['mac'] = $_GET['mac']; + $pconfig['cid'] = $_GET['cid']; + $pconfig['hostname'] = $_GET['hostname']; + $pconfig['filename'] = $_GET['filename']; + $pconfig['rootpath'] = $_GET['rootpath']; + $pconfig['descr'] = $_GET['descr']; + $pconfig['arp_table_static_entry'] = $_GET['arp_table_static_entry']; + $pconfig['deftime'] = $_GET['defaultleasetime']; + $pconfig['maxtime'] = $_GET['maxleasetime']; + $pconfig['gateway'] = $_GET['gateway']; + $pconfig['domain'] = $_GET['domain']; + $pconfig['domainsearchlist'] = $_GET['domainsearchlist']; + $pconfig['wins1'] = $_GET['wins1']; + $pconfig['wins2'] = $_GET['wins2']; + $pconfig['dns1'] = $_GET['dns1']; + $pconfig['dns2'] = $_GET['dns2']; + $pconfig['dns3'] = $_GET['dns3']; + $pconfig['dns4'] = $_GET['dns4']; + $pconfig['ddnsdomain'] = $_GET['ddnsdomain']; + $pconfig['ddnsdomainprimary'] = $_GET['ddnsdomainprimary']; + $pconfig['ddnsdomainkeyname'] = $_GET['ddnsdomainkeyname']; + $pconfig['ddnsdomainkey'] = $_GET['ddnsdomainkey']; + $pconfig['ddnsupdate'] = isset($_GET['ddnsupdate']); + $pconfig['ntp1'] = $_GET['ntp1']; + $pconfig['ntp2'] = $_GET['ntp2']; + $pconfig['tftp'] = $_GET['tftp']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = array(); + $reqdfieldsn = array(); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + /* either MAC or Client-ID must be specified */ + if (empty($_POST['mac']) && empty($_POST['cid'])) { + $input_errors[] = gettext("Either MAC address or Client identifier must be specified"); + } + + /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */ + $_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac'])); + + if ($_POST['hostname']) { + preg_match("/\-\$/", $_POST['hostname'], $matches); + if ($matches) { + $input_errors[] = gettext("The hostname cannot end with a hyphen according to RFC952"); + } + if (!is_hostname($_POST['hostname'])) { + $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'."); + } else { + if (!is_unqualified_hostname($_POST['hostname'])) { + $input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted"); + } + } + } + if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr']))) { + $input_errors[] = gettext("A valid IP address must be specified."); + } + if (($_POST['mac'] && !is_macaddr($_POST['mac']))) { + $input_errors[] = gettext("A valid MAC address must be specified."); + } + if ($static_arp_enabled && !$_POST['ipaddr']) { + $input_errors[] = gettext("Static ARP is enabled. You must specify an IP address."); + } + + /* check for overlaps */ + foreach ($a_maps as $mapent) { + if (isset($id) && ($a_maps[$id]) && ($a_maps[$id] === $mapent)) { + continue; + } + /* The fully qualified hostname (hostname + '.' + domainname) must be unique. + * The unqualified hostname does not have to be unique as long as the fully + * qualified hostname is unique. */ + $existingFqn = "{$mapent['hostname']}.{$mapent['domain']}"; + $candidateFqn = "{$_POST['hostname']}.{$_POST['domain']}"; + if ((($existingFqn == $candidateFqn) && $mapent['hostname']) || + (($mapent['mac'] == $_POST['mac']) && $mapent['mac']) || + (($mapent['ipaddr'] == $_POST['ipaddr']) && $mapent['ipaddr']) || + (($mapent['cid'] == $_POST['cid']) && $mapent['cid'])) { + $input_errors[] = gettext("This fully qualified hostname (Hostname + Domainname), IP, MAC address or Client identifier already exists."); + break; + } + } + + /* make sure it's not within the dynamic subnet */ + if ($_POST['ipaddr']) { + $dynsubnet_start = ip2ulong($config['dhcpd'][$if]['range']['from']); + $dynsubnet_end = ip2ulong($config['dhcpd'][$if]['range']['to']); + if ((ip2ulong($_POST['ipaddr']) >= $dynsubnet_start) && + (ip2ulong($_POST['ipaddr']) <= $dynsubnet_end)) { + $input_errors[] = sprintf(gettext("The IP address must not be within the DHCP range for this interface.")); + } + + foreach ($a_pools as $pidx => $p) { + if (is_inrange_v4($_POST['ipaddr'], $p['range']['from'], $p['range']['to'])) { + $input_errors[] = gettext("The IP address must not be within the range configured on a DHCP pool for this interface."); + break; + } + } + + $lansubnet_start = ip2ulong(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn))); + $lansubnet_end = ip2ulong(long2ip32(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn)))); + if ((ip2ulong($_POST['ipaddr']) < $lansubnet_start) || + (ip2ulong($_POST['ipaddr']) > $lansubnet_end)) { + $input_errors[] = sprintf(gettext("The IP address must lie in the %s subnet."), $ifcfgdescr); + } + } + + if (($_POST['gateway'] && !is_ipaddrv4($_POST['gateway']))) { + $input_errors[] = gettext("A valid IP address must be specified for the gateway."); + } + if (($_POST['wins1'] && !is_ipaddrv4($_POST['wins1'])) || ($_POST['wins2'] && !is_ipaddrv4($_POST['wins2']))) { + $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary WINS servers."); + } + + $parent_ip = get_interface_ip($POST['if']); + if (is_ipaddrv4($parent_ip) && $_POST['gateway']) { + $parent_sn = get_interface_subnet($_POST['if']); + if (!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['if'], $_POST['gateway'])) { + $input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']); + } + } + if (($_POST['dns1'] && !is_ipaddrv4($_POST['dns1'])) || + ($_POST['dns2'] && !is_ipaddrv4($_POST['dns2'])) || + ($_POST['dns3'] && !is_ipaddrv4($_POST['dns3'])) || + ($_POST['dns4'] && !is_ipaddrv4($_POST['dns4']))) { + $input_errors[] = gettext("A valid IP address must be specified for each of the DNS servers."); + } + + if ($_POST['deftime'] && (!is_numeric($_POST['deftime']) || ($_POST['deftime'] < 60))) { + $input_errors[] = gettext("The default lease time must be at least 60 seconds."); + } + if ($_POST['maxtime'] && (!is_numeric($_POST['maxtime']) || ($_POST['maxtime'] < 60) || ($_POST['maxtime'] <= $_POST['deftime']))) { + $input_errors[] = gettext("The maximum lease time must be at least 60 seconds and higher than the default lease time."); + } + if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain']))) { + $input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration."); + } + if (($_POST['ddnsdomain'] && !is_ipaddrv4($_POST['ddnsdomainprimary']))) { + $input_errors[] = gettext("A valid primary domain name server IP address must be specified for the dynamic domain name."); + } + if (($_POST['ddnsdomainkey'] && !$_POST['ddnsdomainkeyname']) || + ($_POST['ddnsdomainkeyname'] && !$_POST['ddnsdomainkey'])) { + $input_errors[] = gettext("You must specify both a valid domain key and key name."); + } + if ($_POST['domainsearchlist']) { + $domain_array=preg_split("/[ ;]+/", $_POST['domainsearchlist']); + foreach ($domain_array as $curdomain) { + if (!is_domain($curdomain)) { + $input_errors[] = gettext("A valid domain search list must be specified."); + break; + } + } + } + + if (($_POST['ntp1'] && !is_ipaddrv4($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddrv4($_POST['ntp2']))) { + $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary NTP servers."); + } + if ($_POST['tftp'] && !is_ipaddrv4($_POST['tftp']) && !is_domain($_POST['tftp']) && !is_URL($_POST['tftp'])) { + $input_errors[] = gettext("A valid IP address or hostname must be specified for the TFTP server."); + } + if (($_POST['nextserver'] && !is_ipaddrv4($_POST['nextserver']))) { + $input_errors[] = gettext("A valid IP address must be specified for the network boot server."); + } + + if (!$input_errors) { + $mapent = array(); + $mapent['mac'] = $_POST['mac']; + $mapent['cid'] = $_POST['cid']; + $mapent['ipaddr'] = $_POST['ipaddr']; + $mapent['hostname'] = $_POST['hostname']; + $mapent['descr'] = $_POST['descr']; + $mapent['arp_table_static_entry'] = ($_POST['arp_table_static_entry']) ? true : false; + $mapent['filename'] = $_POST['filename']; + $mapent['rootpath'] = $_POST['rootpath']; + $mapent['defaultleasetime'] = $_POST['deftime']; + $mapent['maxleasetime'] = $_POST['maxtime']; + + unset($mapent['winsserver']); + if ($_POST['wins1']) { + $mapent['winsserver'][] = $_POST['wins1']; + } + if ($_POST['wins2']) { + $mapent['winsserver'][] = $_POST['wins2']; + } + + unset($mapent['dnsserver']); + if ($_POST['dns1']) { + $mapent['dnsserver'][] = $_POST['dns1']; + } + if ($_POST['dns2']) { + $mapent['dnsserver'][] = $_POST['dns2']; + } + if ($_POST['dns3']) { + $mapent['dnsserver'][] = $_POST['dns3']; + } + if ($_POST['dns4']) { + $mapent['dnsserver'][] = $_POST['dns4']; + } + + $mapent['gateway'] = $_POST['gateway']; + $mapent['domain'] = $_POST['domain']; + $mapent['domainsearchlist'] = $_POST['domainsearchlist']; + $mapent['ddnsdomain'] = $_POST['ddnsdomain']; + $mapent['ddnsdomainprimary'] = $_POST['ddnsdomainprimary']; + $mapent['ddnsdomainkeyname'] = $_POST['ddnsdomainkeyname']; + $mapent['ddnsdomainkey'] = $_POST['ddnsdomainkey']; + $mapent['ddnsupdate'] = ($_POST['ddnsupdate']) ? true : false; + + unset($mapent['ntpserver']); + if ($_POST['ntp1']) { + $mapent['ntpserver'][] = $_POST['ntp1']; + } + if ($_POST['ntp2']) { + $mapent['ntpserver'][] = $_POST['ntp2']; + } + + $mapent['tftp'] = $_POST['tftp']; + $mapent['ldap'] = $_POST['ldap']; + + if (isset($id) && $a_maps[$id]) { + $a_maps[$id] = $mapent; + } else { + $a_maps[] = $mapent; + } + staticmaps_sort($if); + + write_config(); + + if (isset($config['dhcpd'][$if]['enable'])) { + mark_subsystem_dirty('staticmaps'); + if (isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcpstatic'])) { + mark_subsystem_dirty('hosts'); + } + if (isset($config['unbound']['enable']) && isset($config['unbound']['regdhcpstatic'])) { + mark_subsystem_dirty('unbound'); + } + } + + header("Location: services_dhcp.php?if={$if}"); + exit; + } +} + +$closehead = false; +$pgtitle = array(gettext("Services"), gettext("DHCP"), gettext("Edit static mapping")); +$shortcut_section = "dhcp"; + +include("head.inc"); + +?> + + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + +
                            + + + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + + + +
                            Netboot Filename + +
                            + Name of the file that should be loaded when this host boots off of the network, overrides setting on main page. +
                            Root Path + +
                            + + -, overrides setting on main page. + +
                            + +
                            + + + +
                            + /> +
                            + + + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + " /> - +
                            + +
                            +
                            + " /> - +
                            + +
                            +
                            + " /> - +
                            + +
                              + " /> + " onclick="window.location.href=''" /> + + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/services_dhcp_relay.php b/src/usr/local/www/services_dhcp_relay.php new file mode 100644 index 0000000..ae69c3a --- /dev/null +++ b/src/usr/local/www/services_dhcp_relay.php @@ -0,0 +1,216 @@ +. + Copyright (C) 2010 Ermal Luçi + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: dhcprelay +*/ + +##|+PRIV +##|*IDENT=page-services-dhcprelay +##|*NAME=Services: DHCP Relay page +##|*DESCR=Allow access to the 'Services: DHCP Relay' page. +##|*MATCH=services_dhcp_relay.php* +##|-PRIV + +require("guiconfig.inc"); + +$pconfig['enable'] = isset($config['dhcrelay']['enable']); +if (empty($config['dhcrelay']['interface'])) { + $pconfig['interface'] = array(); +} else { + $pconfig['interface'] = explode(",", $config['dhcrelay']['interface']); +} +$pconfig['server'] = $config['dhcrelay']['server']; +$pconfig['agentoption'] = isset($config['dhcrelay']['agentoption']); + +$iflist = get_configured_interface_with_descr(); + +/* set the enabled flag which will tell us if DHCP server is enabled + * on any interface. We will use this to disable dhcp-relay since + * the two are not compatible with each other. + */ +$dhcpd_enabled = false; +if (is_array($config['dhcpd'])) { + foreach ($config['dhcpd'] as $dhcpif => $dhcp) { + if (isset($dhcp['enable']) && isset($config['interfaces'][$dhcpif]['enable'])) { + $dhcpd_enabled = true; + break; + } + } +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if ($_POST['enable']) { + $reqdfields = explode(" ", "server interface"); + $reqdfieldsn = array(gettext("Destination Server"), gettext("Interface")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($_POST['server']) { + $checksrv = explode(",", $_POST['server']); + foreach ($checksrv as $srv) { + if (!is_ipaddr($srv)) { + $input_errors[] = gettext("A valid Destination Server IP address must be specified."); + } + } + } + } + + if (!$input_errors) { + $config['dhcrelay']['enable'] = $_POST['enable'] ? true : false; + $config['dhcrelay']['interface'] = implode(",", $_POST['interface']); + $config['dhcrelay']['agentoption'] = $_POST['agentoption'] ? true : false; + $config['dhcrelay']['server'] = $_POST['server']; + + write_config(); + + $retval = 0; + $retval = services_dhcrelay_configure(); + $savemsg = get_std_save_message($retval); + + } +} + +$closehead = false; +$pgtitle = array(gettext("Services"), gettext("DHCP Relay")); +$shortcut_section = "dhcp"; +include("head.inc"); + +?> + + + + + + +
                            + + + + + +
                            +
                            + + +DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface."; + echo "
                            "; + include("fend.inc"); + echo ""; + exit; + } +?> + + + + + Enable + + onclick="enable_change(false)" /> + + + + + Interface(s) + + +
                            Interfaces without an IP address will not be shown. + + + +   + + /> +
                            + + + + + + + +
                            + + + + +   + + " onclick="enable_change(true)" /> + + + + + + + + + + + + diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php new file mode 100644 index 0000000..51a6ada --- /dev/null +++ b/src/usr/local/www/services_dhcpv6.php @@ -0,0 +1,995 @@ +. + All rights reserved. + + part of pfSense (https://www.pfsense.org) + Copyright (C) 2010 Seth Mos . + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /bin/rm + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-services-dhcpv6server +##|*NAME=Services: DHCPv6 server page +##|*DESCR=Allow access to the 'Services: DHCPv6 server' page. +##|*MATCH=services_dhcpv6.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter.inc"); + +if (!$g['services_dhcp_server_enable']) { + header("Location: /"); + exit; +} + +/* Fix failover DHCP problem + * http://article.gmane.org/gmane.comp.security.firewalls.pfsense.support/18749 + */ +ini_set("memory_limit", "64M"); + +$if = $_GET['if']; +if ($_POST['if']) { + $if = $_POST['if']; +} + +/* if OLSRD is enabled, allow WAN to house DHCP. */ +if ($config['installedpackages']['olsrd']) { + foreach ($config['installedpackages']['olsrd']['config'] as $olsrd) { + if ($olsrd['enable']) { + $is_olsr_enabled = true; + break; + } + } +} + +$iflist = get_configured_interface_with_descr(); +$iflist = array_merge($iflist, get_configured_pppoe_server_interfaces()); + +/* set the starting interface */ +if (!$if || !isset($iflist[$if])) { + foreach ($iflist as $ifent => $ifname) { + $oc = $config['interfaces'][$ifent]; + if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) || + (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) { + continue; + } + $if = $ifent; + break; + } +} + +if (is_array($config['dhcpdv6'][$if])) { + /* DHCPv6 */ + if (is_array($config['dhcpdv6'][$if]['range'])) { + $pconfig['range_from'] = $config['dhcpdv6'][$if]['range']['from']; + $pconfig['range_to'] = $config['dhcpdv6'][$if]['range']['to']; + } + if (is_array($config['dhcpdv6'][$if]['prefixrange'])) { + $pconfig['prefixrange_from'] = $config['dhcpdv6'][$if]['prefixrange']['from']; + $pconfig['prefixrange_to'] = $config['dhcpdv6'][$if]['prefixrange']['to']; + $pconfig['prefixrange_length'] = $config['dhcpdv6'][$if]['prefixrange']['prefixlength']; + } + $pconfig['deftime'] = $config['dhcpdv6'][$if]['defaultleasetime']; + $pconfig['maxtime'] = $config['dhcpdv6'][$if]['maxleasetime']; + $pconfig['domain'] = $config['dhcpdv6'][$if]['domain']; + $pconfig['domainsearchlist'] = $config['dhcpdv6'][$if]['domainsearchlist']; + list($pconfig['wins1'], $pconfig['wins2']) = $config['dhcpdv6'][$if]['winsserver']; + list($pconfig['dns1'], $pconfig['dns2'], $pconfig['dns3'], $pconfig['dns4']) = $config['dhcpdv6'][$if]['dnsserver']; + $pconfig['enable'] = isset($config['dhcpdv6'][$if]['enable']); + $pconfig['ddnsdomain'] = $config['dhcpdv6'][$if]['ddnsdomain']; + $pconfig['ddnsdomainprimary'] = $config['dhcpdv6'][$if]['ddnsdomainprimary']; + $pconfig['ddnsdomainkeyname'] = $config['dhcpdv6'][$if]['ddnsdomainkeyname']; + $pconfig['ddnsdomainkey'] = $config['dhcpdv6'][$if]['ddnsdomainkey']; + $pconfig['ddnsupdate'] = isset($config['dhcpdv6'][$if]['ddnsupdate']); + list($pconfig['ntp1'], $pconfig['ntp2']) = $config['dhcpdv6'][$if]['ntpserver']; + $pconfig['tftp'] = $config['dhcpdv6'][$if]['tftp']; + $pconfig['ldap'] = $config['dhcpdv6'][$if]['ldap']; + $pconfig['netboot'] = isset($config['dhcpdv6'][$if]['netboot']); + $pconfig['bootfile_url'] = $config['dhcpdv6'][$if]['bootfile_url']; + $pconfig['netmask'] = $config['dhcpdv6'][$if]['netmask']; + $pconfig['numberoptions'] = $config['dhcpdv6'][$if]['numberoptions']; + $pconfig['dhcpv6leaseinlocaltime'] = $config['dhcpdv6'][$if]['dhcpv6leaseinlocaltime']; + if (!is_array($config['dhcpdv6'][$if]['staticmap'])) { + $config['dhcpdv6'][$if]['staticmap'] = array(); + } + $a_maps = &$config['dhcpdv6'][$if]['staticmap']; +} + +$ifcfgip = get_interface_ipv6($if); +$ifcfgsn = get_interface_subnetv6($if); + +/* set the enabled flag which will tell us if DHCP relay is enabled + * on any interface. We will use this to disable DHCP server since + * the two are not compatible with each other. + */ + +$dhcrelay_enabled = false; +$dhcrelaycfg = $config['dhcrelay6']; + +if (is_array($dhcrelaycfg)) { + foreach ($dhcrelaycfg as $dhcrelayif => $dhcrelayifconf) { + if (isset($dhcrelayifconf['enable']) && isset($iflist[$dhcrelayif]) && + (!link_interface_to_bridge($dhcrelayif))) { + $dhcrelay_enabled = true; + } + } +} + +if ($_POST) { + + unset($input_errors); + + $old_dhcpdv6_enable = ($pconfig['enable'] == true); + $new_dhcpdv6_enable = ($_POST['enable'] ? true : false); + $dhcpdv6_enable_changed = ($old_dhcpdv6_enable != $new_dhcpdv6_enable); + + $pconfig = $_POST; + + $numberoptions = array(); + for ($x = 0; $x < 99; $x++) { + if (isset($_POST["number{$x}"]) && ctype_digit($_POST["number{$x}"])) { + $numbervalue = array(); + $numbervalue['number'] = htmlspecialchars($_POST["number{$x}"]); + $numbervalue['value'] = htmlspecialchars($_POST["value{$x}"]); + $numberoptions['item'][] = $numbervalue; + } + } + // Reload the new pconfig variable that the forum uses. + $pconfig['numberoptions'] = $numberoptions; + + /* input validation */ + if ($_POST['enable']) { + $reqdfields = explode(" ", "range_from range_to"); + $reqdfieldsn = array(gettext("Range begin"), gettext("Range end")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (($_POST['prefixrange_from'] && !is_ipaddrv6($_POST['prefixrange_from']))) { + $input_errors[] = gettext("A valid range must be specified."); + } + if (($_POST['prefixrange_to'] && !is_ipaddrv6($_POST['prefixrange_to']))) { + $input_errors[] = gettext("A valid prefix range must be specified."); + } + if (($_POST['range_from'] && !is_ipaddrv6($_POST['range_from']))) { + $input_errors[] = gettext("A valid range must be specified."); + } + if (($_POST['range_to'] && !is_ipaddrv6($_POST['range_to']))) { + $input_errors[] = gettext("A valid range must be specified."); + } + if (($_POST['gateway'] && !is_ipaddrv6($_POST['gateway']))) { + $input_errors[] = gettext("A valid IPv6 address must be specified for the gateway."); + } + if (($_POST['dns1'] && !is_ipaddrv6($_POST['dns1'])) || + ($_POST['dns2'] && !is_ipaddrv6($_POST['dns2'])) || + ($_POST['dns3'] && !is_ipaddrv6($_POST['dns3'])) || + ($_POST['dns4'] && !is_ipaddrv6($_POST['dns4']))) { + $input_errors[] = gettext("A valid IPv6 address must be specified for each of the DNS servers."); + } + + if ($_POST['deftime'] && (!is_numeric($_POST['deftime']) || ($_POST['deftime'] < 60))) { + $input_errors[] = gettext("The default lease time must be at least 60 seconds."); + } + if ($_POST['maxtime'] && (!is_numeric($_POST['maxtime']) || ($_POST['maxtime'] < 60) || ($_POST['maxtime'] <= $_POST['deftime']))) { + $input_errors[] = gettext("The maximum lease time must be at least 60 seconds and higher than the default lease time."); + } + if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain']))) { + $input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration."); + } + if (($_POST['ddnsdomain'] && !is_ipaddrv4($_POST['ddnsdomainprimary']))) { + $input_errors[] = gettext("A valid primary domain name server IPv4 address must be specified for the dynamic domain name."); + } + if (($_POST['ddnsdomainkey'] && !$_POST['ddnsdomainkeyname']) || + ($_POST['ddnsdomainkeyname'] && !$_POST['ddnsdomainkey'])) { + $input_errors[] = gettext("You must specify both a valid domain key and key name."); + } + if ($_POST['domainsearchlist']) { + $domain_array=preg_split("/[ ;]+/", $_POST['domainsearchlist']); + foreach ($domain_array as $curdomain) { + if (!is_domain($curdomain)) { + $input_errors[] = gettext("A valid domain search list must be specified."); + break; + } + } + } + + if (($_POST['ntp1'] && !is_ipaddrv6($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddrv6($_POST['ntp2']))) { + $input_errors[] = gettext("A valid IPv6 address must be specified for the primary/secondary NTP servers."); + } + if (($_POST['domain'] && !is_domain($_POST['domain']))) { + $input_errors[] = gettext("A valid domain name must be specified for the DNS domain."); + } + if ($_POST['tftp'] && !is_ipaddr($_POST['tftp']) && !is_domain($_POST['tftp']) && !is_URL($_POST['tftp'])) { + $input_errors[] = gettext("A valid IPv6 address or hostname must be specified for the TFTP server."); + } + if (($_POST['bootfile_url'] && !is_URL($_POST['bootfile_url']))) { + $input_errors[] = gettext("A valid URL must be specified for the network bootfile."); + } + + // Disallow a range that includes the virtualip + if (is_array($config['virtualip']['vip'])) { + foreach ($config['virtualip']['vip'] as $vip) { + if ($vip['interface'] == $if) { + if ($vip['subnetv6'] && is_inrange_v6($vip['subnetv6'], $_POST['range_from'], $_POST['range_to'])) { + $input_errors[] = sprintf(gettext("The subnet range cannot overlap with virtual IPv6 address %s."), $vip['subnetv6']); + } + } + } + } + + $noip = false; + if (is_array($a_maps)) { + foreach ($a_maps as $map) { + if (empty($map['ipaddrv6'])) { + $noip = true; + } + } + } + if (!$input_errors) { + /* make sure the range lies within the current subnet */ + $subnet_start = gen_subnetv6($ifcfgip, $ifcfgsn); + $subnet_end = gen_subnetv6_max($ifcfgip, $ifcfgsn); + + if (is_ipaddrv6($ifcfgip)) { + if ((!is_inrange_v6($_POST['range_from'], $subnet_start, $subnet_end)) || + (!is_inrange_v6($_POST['range_to'], $subnet_start, $subnet_end))) { + $input_errors[] = gettext("The specified range lies outside of the current subnet."); + } + } + /* "from" cannot be higher than "to" */ + if (inet_pton($_POST['range_from']) > inet_pton($_POST['range_to'])) { + $input_errors[] = gettext("The range is invalid (first element higher than second element)."); + } + + /* make sure that the DHCP Relay isn't enabled on this interface */ + if (isset($config['dhcrelay'][$if]['enable'])) { + $input_errors[] = sprintf(gettext("You must disable the DHCP relay on the %s interface before enabling the DHCP server."), $iflist[$if]); + } + + + /* Verify static mappings do not overlap: + - available DHCP range + - prefix delegation range (FIXME: still need to be completed) */ + $dynsubnet_start = inet_pton($_POST['range_from']); + $dynsubnet_end = inet_pton($_POST['range_to']); + + if (is_array($a_maps)) { + foreach ($a_maps as $map) { + if (empty($map['ipaddrv6'])) { + continue; + } + if ((inet_pton($map['ipaddrv6']) > $dynsubnet_start) && + (inet_pton($map['ipaddrv6']) < $dynsubnet_end)) { + $input_errors[] = sprintf(gettext("The DHCP range cannot overlap any static DHCP mappings.")); + break; + } + } + } + } + } + + if (!$input_errors) { + if (!is_array($config['dhcpdv6'][$if])) { + $config['dhcpdv6'][$if] = array(); + } + if (!is_array($config['dhcpdv6'][$if]['range'])) { + $config['dhcpdv6'][$if]['range'] = array(); + } + if (!is_array($config['dhcpdv6'][$if]['prefixrange'])) { + $config['dhcpdv6'][$if]['prefixrange'] = array(); + } + + $config['dhcpdv6'][$if]['range']['from'] = $_POST['range_from']; + $config['dhcpdv6'][$if]['range']['to'] = $_POST['range_to']; + $config['dhcpdv6'][$if]['prefixrange']['from'] = $_POST['prefixrange_from']; + $config['dhcpdv6'][$if]['prefixrange']['to'] = $_POST['prefixrange_to']; + $config['dhcpdv6'][$if]['prefixrange']['prefixlength'] = $_POST['prefixrange_length']; + $config['dhcpdv6'][$if]['defaultleasetime'] = $_POST['deftime']; + $config['dhcpdv6'][$if]['maxleasetime'] = $_POST['maxtime']; + $config['dhcpdv6'][$if]['netmask'] = $_POST['netmask']; + + unset($config['dhcpdv6'][$if]['winsserver']); + + unset($config['dhcpdv6'][$if]['dnsserver']); + if ($_POST['dns1']) { + $config['dhcpdv6'][$if]['dnsserver'][] = $_POST['dns1']; + } + if ($_POST['dns2']) { + $config['dhcpdv6'][$if]['dnsserver'][] = $_POST['dns2']; + } + if ($_POST['dns3']) { + $config['dhcpdv6'][$if]['dnsserver'][] = $_POST['dns3']; + } + if ($_POST['dns4']) { + $config['dhcpdv6'][$if]['dnsserver'][] = $_POST['dns4']; + } + + $config['dhcpdv6'][$if]['domain'] = $_POST['domain']; + $config['dhcpdv6'][$if]['domainsearchlist'] = $_POST['domainsearchlist']; + $config['dhcpdv6'][$if]['enable'] = ($_POST['enable']) ? true : false; + $config['dhcpdv6'][$if]['ddnsdomain'] = $_POST['ddnsdomain']; + $config['dhcpdv6'][$if]['ddnsdomainprimary'] = $_POST['ddnsdomainprimary']; + $config['dhcpdv6'][$if]['ddnsdomainkeyname'] = $_POST['ddnsdomainkeyname']; + $config['dhcpdv6'][$if]['ddnsdomainkey'] = $_POST['ddnsdomainkey']; + $config['dhcpdv6'][$if]['ddnsupdate'] = ($_POST['ddnsupdate']) ? true : false; + + unset($config['dhcpdv6'][$if]['ntpserver']); + if ($_POST['ntp1']) { + $config['dhcpdv6'][$if]['ntpserver'][] = $_POST['ntp1']; + } + if ($_POST['ntp2']) { + $config['dhcpdv6'][$if]['ntpserver'][] = $_POST['ntp2']; + } + + $config['dhcpdv6'][$if]['tftp'] = $_POST['tftp']; + $config['dhcpdv6'][$if]['ldap'] = $_POST['ldap']; + $config['dhcpdv6'][$if]['netboot'] = ($_POST['netboot']) ? true : false; + $config['dhcpdv6'][$if]['bootfile_url'] = $_POST['bootfile_url']; + $config['dhcpdv6'][$if]['dhcpv6leaseinlocaltime'] = $_POST['dhcpv6leaseinlocaltime']; + + // Handle the custom options rowhelper + if (isset($config['dhcpdv6'][$if]['numberoptions']['item'])) { + unset($config['dhcpdv6'][$if]['numberoptions']['item']); + } + + $config['dhcpdv6'][$if]['numberoptions'] = $numberoptions; + + write_config(); + + $retval = 0; + $retvaldhcp = 0; + $retvaldns = 0; + /* Stop DHCPv6 so we can cleanup leases */ + killbypid("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpdv6.pid"); + // dhcp_clean_leases(); + /* dnsmasq_configure calls dhcpd_configure */ + /* no need to restart dhcpd twice */ + if (isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcpstatic'])) { + $retvaldns = services_dnsmasq_configure(); + if ($retvaldns == 0) { + clear_subsystem_dirty('hosts'); + clear_subsystem_dirty('staticmaps'); + } + } else if (isset($config['unbound']['enable']) && isset($config['unbound']['regdhcpstatic'])) { + $retvaldns = services_unbound_configure(); + if ($retvaldns == 0) { + clear_subsystem_dirty('unbound'); + clear_subsystem_dirty('staticmaps'); + } + } else { + $retvaldhcp = services_dhcpd_configure(); + if ($retvaldhcp == 0) { + clear_subsystem_dirty('staticmaps'); + } + } + if ($dhcpdv6_enable_changed) { + $retvalfc = filter_configure(); + } + if ($retvaldhcp == 1 || $retvaldns == 1 || $retvalfc == 1) { + $retval = 1; + } + $savemsg = get_std_save_message($retval); + } +} + +if ($_GET['act'] == "del") { + if ($a_maps[$_GET['id']]) { + unset($a_maps[$_GET['id']]); + write_config(); + if (isset($config['dhcpdv6'][$if]['enable'])) { + mark_subsystem_dirty('staticmapsv6'); + if (isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcpstaticv6'])) { + mark_subsystem_dirty('hosts'); + } + } + header("Location: services_dhcpv6.php?if={$if}"); + exit; + } +} + +$closehead = false; +$pgtitle = array(gettext("Services"), gettext("DHCPv6 server")); +$shortcut_section = "dhcp6"; + +include("head.inc"); + +?> + + + + + + + + + + +
                            + + +"; + echo ""; + exit; + } +?> +

                            +" . gettext("You must apply the changes in order for them to take effect."));?>
                            + + + +
                            + $ifname) { + $oc = $config['interfaces'][$ifent]; + if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) || + (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) { + continue; + } + if ($ifent == $if) { + $active = true; + } else { + $active = false; + } + $tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}"); + $tabscounter++; + } + /* tack on PPPoE or PPtP servers here */ + /* pppoe server */ + if (is_array($config['pppoes']['pppoe'])) { + foreach ($config['pppoes']['pppoe'] as $pppoe) { + if ($pppoe['mode'] == "server") { + $ifent = "poes". $pppoe['pppoeid']; + $ifname = strtoupper($ifent); + if ($ifent == $if) { + $active = true; + } else { + $active = false; + } + $tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}"); + $tabscounter++; + } + } + } + if ($tabscounter == 0) { + echo "" . gettext("The DHCPv6 Server can only be enabled on interfaces configured with a static IPv6 address. This system has none.") . "

                            "; + echo "

                            "; + include("fend.inc"); + echo ""; + echo ""; + exit; + } + display_top_tabs($tab_array); +?> + + + + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + onclick="enable_change(false);" /> + +
                            + +
                            + bits +
                            + + - + +
                            + +
                            + +    +
                            + +    +  
                            :  +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + + + + + + + + + +
                            + /> + + + + +
                              + + + + +
                            +
                            +
                            + " /> - +
                            + +
                            +
                            + " /> - +
                            + +
                            +
                            + " /> - +
                            + +
                            +
                            + " /> - +
                            + +
                            +
                            + " /> - +
                            + +
                              + + " onclick="enable_change(true)" /> +
                              +

                            + + + +
                            +
                            +
                            + \ + , +
                            + +
                            +
                            +
                            +
                            +

                            +
                            + + + + + + + + + + + + + "" or $mapent['ipaddrv6'] <> ""): +?> + + + + + + + + + + + + +
                             
                            + + + + + +
                            + add +
                            +
                            + + +   + +   + +   + + + + + + +
                            edit')">delete
                            +
                            + + + + + +
                            add
                            +
                            +
                            + + + + + + + + diff --git a/src/usr/local/www/services_dhcpv6_edit.php b/src/usr/local/www/services_dhcpv6_edit.php new file mode 100644 index 0000000..2034049 --- /dev/null +++ b/src/usr/local/www/services_dhcpv6_edit.php @@ -0,0 +1,285 @@ +. + Copyright (C) 2011 Seth Mos . + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/sbin/arp + pfSense_MODULE: dhcpserver +*/ + +##|+PRIV +##|*IDENT=page-services-dhcpserverv6-editstaticmapping +##|*NAME=Services: DHCPv6 Server : Edit static mapping page +##|*DESCR=Allow access to the 'Services: DHCPv6 Server : Edit static mapping' page. +##|*MATCH=services_dhcpv6_edit.php* +##|-PRIV + +function staticmapcmp($a, $b) { + return ipcmp($a['ipaddrv6'], $b['ipaddrv6']); +} + +function staticmaps_sort($ifgui) { + global $g, $config; + + usort($config['dhcpdv6'][$ifgui]['staticmap'], "staticmapcmp"); +} + +require_once('globals.inc'); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_dhcpv6.php'); +} + +if (!$g['services_dhcp_server_enable']) { + header("Location: /"); + exit; +} + +require("guiconfig.inc"); + +$if = $_GET['if']; +if ($_POST['if']) { + $if = $_POST['if']; +} + +if (!$if) { + header("Location: services_dhcpv6.php"); + exit; +} + +if (!is_array($config['dhcpdv6'])) { + $config['dhcpdv6'] = array(); +} +if (!is_array($config['dhcpdv6'][$if])) { + $config['dhcpdv6'][$if] = array(); +} +if (!is_array($config['dhcpdv6'][$if]['staticmap'])) { + $config['dhcpdv6'][$if]['staticmap'] = array(); +} + +$netboot_enabled = isset($config['dhcpdv6'][$if]['netboot']); +$a_maps = &$config['dhcpdv6'][$if]['staticmap']; +$ifcfgipv6 = get_interface_ipv6($if); +$ifcfgsnv6 = get_interface_subnetv6($if); +$ifcfgdescr = convert_friendly_interface_to_friendly_descr($if); + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_maps[$id]) { + $pconfig['duid'] = $a_maps[$id]['duid']; + $pconfig['hostname'] = $a_maps[$id]['hostname']; + $pconfig['ipaddrv6'] = $a_maps[$id]['ipaddrv6']; + $pconfig['filename'] = $a_maps[$id]['filename']; + $pconfig['rootpath'] = $a_maps[$id]['rootpath']; + $pconfig['descr'] = $a_maps[$id]['descr']; +} else { + $pconfig['duid'] = $_GET['duid']; + $pconfig['hostname'] = $_GET['hostname']; + $pconfig['filename'] = $_GET['filename']; + $pconfig['rootpath'] = $a_maps[$id]['rootpath']; + $pconfig['descr'] = $_GET['descr']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "duid"); + $reqdfieldsn = array(gettext("DUID")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($_POST['hostname']) { + preg_match("/\-\$/", $_POST['hostname'], $matches); + if ($matches) { + $input_errors[] = gettext("The hostname cannot end with a hyphen according to RFC952"); + } + if (!is_hostname($_POST['hostname'])) { + $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'."); + } else { + if (!is_unqualified_hostname($_POST['hostname'])) { + $input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted"); + } + } + } + if (($_POST['ipaddrv6'] && !is_ipaddrv6($_POST['ipaddrv6']))) { + $input_errors[] = gettext("A valid IPv6 address must be specified."); + } + if (empty($_POST['duid'])) { + $input_errors[] = gettext("A valid DUID must be specified."); + } + + /* check for overlaps */ + foreach ($a_maps as $mapent) { + if (isset($id) && ($a_maps[$id]) && ($a_maps[$id] === $mapent)) { + continue; + } + + if ((($mapent['hostname'] == $_POST['hostname']) && $mapent['hostname']) || ($mapent['duid'] == $_POST['duid'])) { + $input_errors[] = gettext("This Hostname, IP or DUID already exists."); + break; + } + } + + /* make sure it's not within the dynamic subnet */ + if ($_POST['ipaddrv6']) { + /* oh boy, we need to be able to somehow do this at some point. skip */ + } + + if (!$input_errors) { + $mapent = array(); + $mapent['duid'] = $_POST['duid']; + $mapent['ipaddrv6'] = $_POST['ipaddrv6']; + $mapent['hostname'] = $_POST['hostname']; + $mapent['descr'] = $_POST['descr']; + $mapent['filename'] = $_POST['filename']; + $mapent['rootpath'] = $_POST['rootpath']; + + if (isset($id) && $a_maps[$id]) { + $a_maps[$id] = $mapent; + } else { + $a_maps[] = $mapent; + } + staticmaps_sort($if); + + write_config(); + + if (isset($config['dhcpdv6'][$if]['enable'])) { + mark_subsystem_dirty('staticmaps'); + if (isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcpstatic'])) { + mark_subsystem_dirty('hosts'); + } + if (isset($config['unbound']['enable']) && isset($config['unbound']['regdhcpstatic'])) { + mark_subsystem_dirty('unbound'); + } + + } + + header("Location: services_dhcpv6.php?if={$if}"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("DHCPv6"), gettext("Edit static mapping")); +$shortcut_section = "dhcp6"; + +include("head.inc"); + +?> + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            +
                            +"DUID-LLT - ETH -- TIME --- ---- address ----"
                            +"xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            Netboot filename + +
                            Name of the file that should be loaded when this host boots off of the network, overrides setting on main page. +
                            Root Path + +
                            -, overrides setting on main page. +
                            + +
                            +
                              + " /> + " onclick="window.location.href=''" /> + + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/services_dhcpv6_relay.php b/src/usr/local/www/services_dhcpv6_relay.php new file mode 100644 index 0000000..c6e5daf --- /dev/null +++ b/src/usr/local/www/services_dhcpv6_relay.php @@ -0,0 +1,216 @@ +. + Copyright (C) 2010 Ermal Luçi + Copyright (C) 2010 Seth Mos + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: dhcpv6relay +*/ + +##|+PRIV +##|*IDENT=page-services-dhcpv6relay +##|*NAME=Services: DHCPv6 Relay page +##|*DESCR=Allow access to the 'Services: DHCPv6 Relay' page. +##|*MATCH=services_dhcpv6_relay.php* +##|-PRIV + +require("guiconfig.inc"); + +$pconfig['enable'] = isset($config['dhcrelay6']['enable']); +if (empty($config['dhcrelay6']['interface'])) { + $pconfig['interface'] = array(); +} else { + $pconfig['interface'] = explode(",", $config['dhcrelay6']['interface']); +} +$pconfig['server'] = $config['dhcrelay6']['server']; +$pconfig['agentoption'] = isset($config['dhcrelay6']['agentoption']); + +$iflist = get_configured_interface_with_descr(); + +/* set the enabled flag which will tell us if DHCP server is enabled + * on any interface. We will use this to disable dhcp-relay since + * the two are not compatible with each other. + */ +$dhcpd_enabled = false; +if (is_array($config['dhcpdv6'])) { + foreach ($config['dhcpdv6'] as $dhcp) { + if (isset($dhcp['enable']) && isset($config['interfaces'][$dhcpif]['enable'])) { + $dhcpd_enabled = true; + break; + } + } +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if ($_POST['enable']) { + $reqdfields = explode(" ", "server interface"); + $reqdfieldsn = array(gettext("Destination Server"), gettext("Interface")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($_POST['server']) { + $checksrv = explode(",", $_POST['server']); + foreach ($checksrv as $srv) { + if (!is_ipaddrv6($srv)) { + $input_errors[] = gettext("A valid Destination Server IPv6 address must be specified."); + } + } + } + } + + if (!$input_errors) { + $config['dhcrelay6']['enable'] = $_POST['enable'] ? true : false; + $config['dhcrelay6']['interface'] = implode(",", $_POST['interface']); + $config['dhcrelay6']['agentoption'] = $_POST['agentoption'] ? true : false; + $config['dhcrelay6']['server'] = $_POST['server']; + + write_config(); + + $retval = 0; + $retval = services_dhcrelay6_configure(); + $savemsg = get_std_save_message($retval); + } +} + +$closehead = false; +$pgtitle = array(gettext("Services"), gettext("DHCPv6 Relay")); +$shortcut_section = "dhcp6"; +include("head.inc"); + +?> + + + + + + +
                            + + + + + +
                            +
                            + + +DHCPv6 Server is currently enabled. Cannot enable the DHCPv6 Relay service while the DHCPv6 Server is enabled on any interface."; + echo "
                            "; + include("fend.inc"); + echo ""; + exit; + } +?> + + + + + Enable + + onclick="enable_change(false)" /> + + + + + Interface(s) + + +
                            + + + +   + + /> +
                            + + + + + + + +
                            + + + + +   + + " onclick="enable_change(true)" /> + + + + + + + + + + + + diff --git a/src/usr/local/www/services_dnsmasq.php b/src/usr/local/www/services_dnsmasq.php new file mode 100644 index 0000000..4abf4d7 --- /dev/null +++ b/src/usr/local/www/services_dnsmasq.php @@ -0,0 +1,582 @@ + and Manuel Kasper . + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: dnsforwarder +*/ + +##|+PRIV +##|*IDENT=page-services-dnsforwarder +##|*NAME=Services: DNS Forwarder page +##|*DESCR=Allow access to the 'Services: DNS Forwarder' page. +##|*MATCH=services_dnsmasq.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("system.inc"); + +$pconfig['enable'] = isset($config['dnsmasq']['enable']); +$pconfig['regdhcp'] = isset($config['dnsmasq']['regdhcp']); +$pconfig['regdhcpstatic'] = isset($config['dnsmasq']['regdhcpstatic']); +$pconfig['dhcpfirst'] = isset($config['dnsmasq']['dhcpfirst']); +$pconfig['strict_order'] = isset($config['dnsmasq']['strict_order']); +$pconfig['domain_needed'] = isset($config['dnsmasq']['domain_needed']); +$pconfig['no_private_reverse'] = isset($config['dnsmasq']['no_private_reverse']); +$pconfig['port'] = $config['dnsmasq']['port']; +$pconfig['custom_options'] = $config['dnsmasq']['custom_options']; + +$pconfig['strictbind'] = isset($config['dnsmasq']['strictbind']); +if (!empty($config['dnsmasq']['interface'])) { + $pconfig['interface'] = explode(",", $config['dnsmasq']['interface']); +} else { + $pconfig['interface'] = array(); +} + +if (!is_array($config['dnsmasq']['hosts'])) { + $config['dnsmasq']['hosts'] = array(); +} + +if (!is_array($config['dnsmasq']['domainoverrides'])) { + $config['dnsmasq']['domainoverrides'] = array(); +} + +$a_hosts = &$config['dnsmasq']['hosts']; +$a_domainOverrides = &$config['dnsmasq']['domainoverrides']; + +if ($_POST) { + + $pconfig = $_POST; + unset($input_errors); + + $config['dnsmasq']['enable'] = ($_POST['enable']) ? true : false; + $config['dnsmasq']['regdhcp'] = ($_POST['regdhcp']) ? true : false; + $config['dnsmasq']['regdhcpstatic'] = ($_POST['regdhcpstatic']) ? true : false; + $config['dnsmasq']['dhcpfirst'] = ($_POST['dhcpfirst']) ? true : false; + $config['dnsmasq']['strict_order'] = ($_POST['strict_order']) ? true : false; + $config['dnsmasq']['domain_needed'] = ($_POST['domain_needed']) ? true : false; + $config['dnsmasq']['no_private_reverse'] = ($_POST['no_private_reverse']) ? true : false; + $config['dnsmasq']['custom_options'] = str_replace("\r\n", "\n", $_POST['custom_options']); + $config['dnsmasq']['strictbind'] = ($_POST['strictbind']) ? true : false; + + if (isset($_POST['enable']) && isset($config['unbound']['enable'])) { + if ($_POST['port'] == $config['unbound']['port']) { + $input_errors[] = "The DNS Resolver is enabled using this port. Choose a non-conflicting port, or disable DNS Resolver."; + } + } + + if ($_POST['port']) { + if (is_port($_POST['port'])) { + $config['dnsmasq']['port'] = $_POST['port']; + } else { + $input_errors[] = gettext("You must specify a valid port number"); + } + } else if (isset($config['dnsmasq']['port'])) { + unset($config['dnsmasq']['port']); + } + + if (is_array($_POST['interface'])) { + $config['dnsmasq']['interface'] = implode(",", $_POST['interface']); + } elseif (isset($config['dnsmasq']['interface'])) { + unset($config['dnsmasq']['interface']); + } + + if ($config['dnsmasq']['custom_options']) { + $args = ''; + foreach (preg_split('/\s+/', $config['dnsmasq']['custom_options']) as $c) { + $args .= escapeshellarg("--{$c}") . " "; + } + exec("/usr/local/sbin/dnsmasq --test $args", $output, $rc); + if ($rc != 0) { + $input_errors[] = gettext("Invalid custom options"); + } + } + + if (!$input_errors) { + write_config(); + + $retval = 0; + $retval = services_dnsmasq_configure(); + $savemsg = get_std_save_message($retval); + + // Reload filter (we might need to sync to CARP hosts) + filter_configure(); + /* Update resolv.conf in case the interface bindings exclude localhost. */ + system_resolvconf_generate(); + /* Start or restart dhcpleases when it's necessary */ + system_dhcpleases_configure(); + + if ($retval == 0) { + clear_subsystem_dirty('hosts'); + } + } +} + +if ($_GET['act'] == "del") { + if ($_GET['type'] == 'host') { + if ($a_hosts[$_GET['id']]) { + unset($a_hosts[$_GET['id']]); + write_config(); + mark_subsystem_dirty('hosts'); + header("Location: services_dnsmasq.php"); + exit; + } + } + elseif ($_GET['type'] == 'doverride') { + if ($a_domainOverrides[$_GET['id']]) { + unset($a_domainOverrides[$_GET['id']]); + write_config(); + mark_subsystem_dirty('hosts'); + header("Location: services_dnsmasq.php"); + exit; + } + } +} + +$closehead = false; +$pgtitle = array(gettext("Services"), gettext("DNS forwarder")); +$shortcut_section = "forwarder"; +include("head.inc"); + +?> + + + + + +
                            + + +
                            +" . gettext("You must apply the changes in order for them to take effect."));?>
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            +

                            + onclick="enable_change(false)" /> + +
                            +
                            +

                            +
                            +

                            + /> + +
                            +
                            + ', '')?> +

                            +
                            +

                            + /> + +
                            +
                            + ', '');?> +

                            +
                            +

                            + /> + +
                            +
                            + +

                            +
                            +

                            + /> + +
                            +
                            + System - General Setup - DNS Servers), ". + "rather than all at once in parallel. "), $g['product_name']); ?> +

                            +
                            +

                            + /> + +
                            +
                            + +

                            +
                            +

                            + /> + +
                            +
                            + +

                            +
                            +

                            + /> +

                            + +

                            +
                            + + +

                            + +

                            +
                            +

                            + /> + +
                            + +

                            + +

                            +
                            +
                            > + " /> - +
                            +
                            > +
                            +
                            +
                            +
                            +
                            + " onclick="enable_change(true)" /> +
                            + +

                            + + + +
                            +
                            +
                            + ', '', '', '');?>
                            +
                            +

                            + + 
                            + + + + + + + +
                            +
                            + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                            + add +
                            +
                            + + + + + +
                            + add +
                            +
                            +   + +   + +   + +   + + + + + + +
                            edit + ')">delete +
                            +
                            +   + +   + + Alias for   + +   + + edit +
                            +
                            + + + + + + + +
                            +

                            + +

                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                            + add +
                            +
                            + + + + + +
                            + add +
                            +
                            +   + +   + +   + + edit +  ')">delete +
                            +
                            + + + + diff --git a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php new file mode 100644 index 0000000..ca66b49 --- /dev/null +++ b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php @@ -0,0 +1,197 @@ + and Manuel Kasper . + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: dnsforwarder +*/ + +##|+PRIV +##|*IDENT=page-services-dnsforwarder-editdomainoverride +##|*NAME=Services: DNS Forwarder: Edit Domain Override page +##|*DESCR=Allow access to the 'Services: DNS Forwarder: Edit Domain Override' page. +##|*MATCH=services_dnsmasq_domainoverride_edit.php* +##|-PRIV + +require("guiconfig.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_dnsmasq.php'); +} + +if (!is_array($config['dnsmasq']['domainoverrides'])) { + $config['dnsmasq']['domainoverrides'] = array(); +} +$a_domainOverrides = &$config['dnsmasq']['domainoverrides']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_domainOverrides[$id]) { + $pconfig['domain'] = $a_domainOverrides[$id]['domain']; + if (is_ipaddr($a_domainOverrides[$id]['ip']) && ($a_domainOverrides[$id]['ip'] != '#')) { + $pconfig['ip'] = $a_domainOverrides[$id]['ip']; + } else { + $dnsmasqpieces = explode('@', $a_domainOverrides[$id]['ip'], 2); + $pconfig['ip'] = $dnsmasqpieces[0]; + $pconfig['dnssrcip'] = $dnsmasqpieces[1]; + } + $pconfig['descr'] = $a_domainOverrides[$id]['descr']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "domain ip"); + $reqdfieldsn = array(gettext("Domain"), gettext("IP address")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + function String_Begins_With($needle, $haystack) { + return (substr($haystack, 0, strlen($needle)) == $needle); + } + + if (String_Begins_With(_msdcs, $_POST['domain'])) { + $subdomainstr = substr($_POST['domain'], 7); + if ($subdomainstr && !is_domain($subdomainstr)) { + $input_errors[] = gettext("A valid domain must be specified after _msdcs."); + } + } elseif ($_POST['domain'] && !is_domain($_POST['domain'])) { + $input_errors[] = gettext("A valid domain must be specified."); + } + if ($_POST['ip'] && !is_ipaddr($_POST['ip']) && ($_POST['ip'] != '#') && ($_POST['ip'] != '!')) { + $input_errors[] = gettext("A valid IP address must be specified, or # for an exclusion or ! to not forward at all."); + } + if ($_POST['dnssrcip'] && !in_array($_POST['dnssrcip'], get_configured_ip_addresses())) { + $input_errors[] = gettext("An interface IP address must be specified for the DNS query source."); + } + if (!$input_errors) { + $doment = array(); + $doment['domain'] = $_POST['domain']; + if (empty($_POST['dnssrcip'])) { + $doment['ip'] = $_POST['ip']; + } else { + $doment['ip'] = $_POST['ip'] . "@" . $_POST['dnssrcip']; + } + $doment['descr'] = $_POST['descr']; + + if (isset($id) && $a_domainOverrides[$id]) { + $a_domainOverrides[$id] = $doment; + } else { + $a_domainOverrides[] = $doment; + } + + $retval = services_dnsmasq_configure(); + + write_config(); + + header("Location: services_dnsmasq.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("DNS forwarder"), gettext("Edit Domain Override")); +$shortcut_section = "forwarder"; +include("head.inc"); + +?> + + + + +
                            + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + mycompany.localdomain 1.168.192.in-addr.arpa +
                            +
                            + +
                            + +
                            + 192.168.100.100

                            +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + + +
                              + " /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/services_dnsmasq_edit.php b/src/usr/local/www/services_dnsmasq_edit.php new file mode 100644 index 0000000..4b4c1c4 --- /dev/null +++ b/src/usr/local/www/services_dnsmasq_edit.php @@ -0,0 +1,345 @@ + and Manuel Kasper . + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: dnsforwarder +*/ + +##|+PRIV +##|*IDENT=page-services-dnsforwarder-edithost +##|*NAME=Services: DNS Forwarder: Edit host page +##|*DESCR=Allow access to the 'Services: DNS Forwarder: Edit host' page. +##|*MATCH=services_dnsmasq_edit.php* +##|-PRIV + +function hostcmp($a, $b) { + return strcasecmp($a['host'], $b['host']); +} + +function hosts_sort() { + global $g, $config; + + if (!is_array($config['dnsmasq']['hosts'])) { + return; + } + + usort($config['dnsmasq']['hosts'], "hostcmp"); +} + +require("guiconfig.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_dnsmasq.php'); +} + +if (!is_array($config['dnsmasq']['hosts'])) { + $config['dnsmasq']['hosts'] = array(); +} + +$a_hosts = &$config['dnsmasq']['hosts']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_hosts[$id]) { + $pconfig['host'] = $a_hosts[$id]['host']; + $pconfig['domain'] = $a_hosts[$id]['domain']; + $pconfig['ip'] = $a_hosts[$id]['ip']; + $pconfig['descr'] = $a_hosts[$id]['descr']; + $pconfig['aliases'] = $a_hosts[$id]['aliases']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "domain ip"); + $reqdfieldsn = array(gettext("Domain"), gettext("IP address")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($_POST['host']) { + if (!is_hostname($_POST['host'])) { + $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'. It may not start or end with '-'."); + } else { + if (!is_unqualified_hostname($_POST['host'])) { + $input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted"); + } + } + } + + if (($_POST['domain'] && !is_domain($_POST['domain']))) { + $input_errors[] = gettext("A valid domain must be specified."); + } + + if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) { + $input_errors[] = gettext("A valid IP address must be specified."); + } + + /* collect aliases */ + $aliases = array(); + foreach ($_POST as $key => $value) { + $entry = ''; + if (!substr_compare('aliashost', $key, 0, 9)) { + $entry = substr($key, 9); + $field = 'host'; + } + elseif (!substr_compare('aliasdomain', $key, 0, 11)) { + $entry = substr($key, 11); + $field = 'domain'; + } + elseif (!substr_compare('aliasdescription', $key, 0, 16)) { + $entry = substr($key, 16); + $field = 'description'; + } + if (ctype_digit($entry)) { + $aliases[$entry][$field] = $value; + } + } + $pconfig['aliases']['item'] = $aliases; + + /* validate aliases */ + foreach ($aliases as $idx => $alias) { + $aliasreqdfields = array('aliasdomain' . $idx); + $aliasreqdfieldsn = array(gettext("Alias Domain")); + + do_input_validation($_POST, $aliasreqdfields, $aliasreqdfieldsn, $input_errors); + if ($alias['host']) { + if (!is_hostname($alias['host'])) { + $input_errors[] = gettext("Hostnames in an alias list can only contain the characters A-Z, 0-9 and '-'. They may not start or end with '-'."); + } else { + if (!is_unqualified_hostname($alias['host'])) { + $input_errors[] = gettext("A valid alias hostname is specified, but the domain name part should be omitted"); + } + } + } + if (($alias['domain'] && !is_domain($alias['domain']))) { + $input_errors[] = gettext("A valid domain must be specified in alias list."); + } + } + + /* check for overlaps */ + foreach ($a_hosts as $hostent) { + if (isset($id) && ($a_hosts[$id]) && ($a_hosts[$id] === $hostent)) { + continue; + } + + if (($hostent['host'] == $_POST['host']) && + ($hostent['domain'] == $_POST['domain']) && + ((is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) || + (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])))) { + $input_errors[] = gettext("This host/domain already exists."); + break; + } + } + + if (!$input_errors) { + $hostent = array(); + $hostent['host'] = $_POST['host']; + $hostent['domain'] = $_POST['domain']; + $hostent['ip'] = $_POST['ip']; + $hostent['descr'] = $_POST['descr']; + $hostent['aliases']['item'] = $aliases; + + if (isset($id) && $a_hosts[$id]) { + $a_hosts[$id] = $hostent; + } else { + $a_hosts[] = $hostent; + } + hosts_sort(); + + mark_subsystem_dirty('hosts'); + + write_config(); + + header("Location: services_dnsmasq.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("DNS forwarder"), gettext("Edit host")); +$shortcut_section = "forwarder"; +include("head.inc"); + +?> + +"> + + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + 192.168.100.100 fd00:abcd::1 +
                            +
                            + +
                            + + + +
                            + + + + + + + + + + + + + + + + + + + +
                            +
                            + +
                            +
                            + + + + + + + " /> +
                            + + " /> + + +
                              + " /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/services_dyndns.php b/src/usr/local/www/services_dyndns.php new file mode 100644 index 0000000..5051f00 --- /dev/null +++ b/src/usr/local/www/services_dyndns.php @@ -0,0 +1,229 @@ + + + + +
                            + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + $ifdesc) { + if ($dyndns['interface'] == $if) { + if (!isset($dyndns['enable'])) { + echo "{$ifdesc}"; + } else { + echo "{$ifdesc}"; + } + break; + } + } + $groupslist = return_gateway_groups_array(); + foreach ($groupslist as $if => $group) { + if ($dyndns['interface'] == $if) { + if (!isset($dyndns['enable'])) { + echo "{$if}"; + } else { + echo "{$if}"; + } + break; + } + } +?> + +" . htmlspecialchars($types[$j]) . ""; + } else { + echo htmlspecialchars($types[$j]); + } + break; + } + } +?> + +" . htmlspecialchars($dyndns['host']) . ""; + } else { + echo htmlspecialchars($dyndns['host']); + } +?> + + $cached_ip) { + echo ""; + } else { + echo ""; + } + echo htmlspecialchars($cached_ip); + echo ""; + } else if (file_exists($filename_v6)) { + $ipv6addr = get_interface_ipv6($dyndns['interface']); + $cached_ipv6_s = explode("|", file_get_contents($filename_v6)); + $cached_ipv6 = $cached_ipv6_s[0]; + if ($ipv6addr <> $cached_ipv6) { + echo ""; + } else { + echo ""; + } + echo htmlspecialchars($cached_ipv6); + echo ""; + } else { + echo "N/A"; + } +?> + +".htmlspecialchars($dyndns['descr']).""; + } else { + echo htmlspecialchars($dyndns['descr']); + } +?> + + edit +  ')">delete +
                            + add +
                            +

                            + + +
                            +
                            +
                            +
                            + +

                            +
                             
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/services_dyndns_edit.php b/src/usr/local/www/services_dyndns_edit.php new file mode 100644 index 0000000..a619ce9 --- /dev/null +++ b/src/usr/local/www/services_dyndns_edit.php @@ -0,0 +1,485 @@ + + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + +
                            +
                            + " /> +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            + +
                            + +
                            + /> + +
                            + /> + +
                            + /> +
                            + /> + +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                              + " onclick="enable_change(true)" /> + " /> + + + " onclick="enable_change(true)" /> + +
                              + + + +
                            +
                            +
                            + ', '');?> +
                            +
                            +
                            + + + + + + diff --git a/src/usr/local/www/services_igmpproxy.php b/src/usr/local/www/services_igmpproxy.php new file mode 100644 index 0000000..8749b2d --- /dev/null +++ b/src/usr/local/www/services_igmpproxy.php @@ -0,0 +1,189 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: igmpproxy +*/ + +##|+PRIV +##|*IDENT=page-services-igmpproxy +##|*NAME=Services: Igmpproxy page +##|*DESCR=Allow access to the 'Services: Igmpproxy' page. +##|*MATCH=services_igmpproxy.php* +##|-PRIV + +require("guiconfig.inc"); + +if (!is_array($config['igmpproxy']['igmpentry'])) { + $config['igmpproxy']['igmpentry'] = array(); +} + +//igmpproxy_sort(); +$a_igmpproxy = &$config['igmpproxy']['igmpentry']; + +if ($_POST) { + + $pconfig = $_POST; + + $retval = 0; + /* reload all components that use igmpproxy */ + $retval = services_igmpproxy_configure(); + + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + + clear_subsystem_dirty('igmpproxy'); +} + +if ($_GET['act'] == "del") { + if ($a_igmpproxy[$_GET['id']]) { + unset($a_igmpproxy[$_GET['id']]); + write_config(); + mark_subsystem_dirty('igmpproxy'); + header("Location: services_igmpproxy.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("IGMP Proxy")); +include("head.inc"); + +?> + + + +
                            + +
                            +" . gettext("You must apply the changes in order for them to take effect."));?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                              + " alt="add" /> +
                            +
                            + + + + + + +   + + + + + + +
                            " alt="edit" /> + ')">" alt="delete" /> +
                            +
                            + + + + + +
                             " alt="add" />
                            +
                            +
                            + " /> +
                            +
                            +

                            + + + +
                            +
                            +
                            + +
                            +

                            +
                            +
                            + + + diff --git a/src/usr/local/www/services_igmpproxy_edit.php b/src/usr/local/www/services_igmpproxy_edit.php new file mode 100644 index 0000000..2d299c0 --- /dev/null +++ b/src/usr/local/www/services_igmpproxy_edit.php @@ -0,0 +1,312 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: igmpproxy +*/ + +##|+PRIV +##|*IDENT=page-services-igmpproxy-edit +##|*NAME=Firewall: Igmpproxy: Edit page +##|*DESCR=Allow access to the 'Services: Igmpproxy: Edit' page. +##|*MATCH=services_igmpproxy_edit.php* +##|-PRIV + +$pgtitle = array(gettext("Firewall"), gettext("IGMP Proxy"), gettext("Edit")); + +require("guiconfig.inc"); + +if (!is_array($config['igmpproxy']['igmpentry'])) { + $config['igmpproxy']['igmpentry'] = array(); +} + +//igmpproxy_sort(); +$a_igmpproxy = &$config['igmpproxy']['igmpentry']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_igmpproxy[$id]) { + $pconfig['ifname'] = $a_igmpproxy[$id]['ifname']; + $pconfig['threshold'] = $a_igmpproxy[$id]['threshold']; + $pconfig['type'] = $a_igmpproxy[$id]['type']; + $pconfig['address'] = $a_igmpproxy[$id]['address']; + $pconfig['descr'] = html_entity_decode($a_igmpproxy[$id]['descr']); + +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + if ($_POST['type'] == "upstream") { + foreach ($a_igmpproxy as $pid => $proxyentry) { + if (isset($id) && $id == $pid) { + continue; + } + if ($proxyentry['type'] == "upstream" && $proxyentry['ifname'] != $_POST['interface']) { + $input_errors[] = gettext("Only one 'upstream' interface can be configured."); + } + } + } + $igmpentry = array(); + $igmpentry['ifname'] = $_POST['ifname']; + $igmpentry['threshold'] = $_POST['threshold']; + $igmpentry['type'] = $_POST['type']; + $address = ""; + $isfirst = 0; + /* item is a normal igmpentry type */ + for ($x = 0; $x < 4999; $x++) { + if ($_POST["address{$x}"] <> "") { + if ($isfirst > 0) { + $address .= " "; + } + $address .= $_POST["address{$x}"]; + $address .= "/" . $_POST["address_subnet{$x}"]; + $isfirst++; + } + } + + if (!$input_errors) { + $igmpentry['address'] = $address; + $igmpentry['descr'] = $_POST['descr']; + + if (isset($id) && $a_igmpproxy[$id]) { + $a_igmpproxy[$id] = $igmpentry; + } else { + $a_igmpproxy[] = $igmpentry; + } + + write_config(); + + mark_subsystem_dirty('igmpproxy'); + header("Location: services_igmpproxy.php"); + exit; + } else { + //we received input errors, copy data to prevent retype + $pconfig['descr'] = $_POST['descr']; + $pconfig['address'] = $address; + $pconfig['type'] = $_POST['type']; + } +} + +include("head.inc"); + +?> + +"> + + + + + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + + + +
                            + +
                            + + upstream network interface is the outgoing interface which is" . + " responsible for communicating to available multicast data sources." . + " There can only be one upstream interface.");?> + +
                            + + + + +
                            + +
                            + + + +
                            + + + + + + + + "") { + $item = explode(" ", $address); + foreach ($item as $ww) { + $address = $item[$counter]; + $address_subnet = ""; + $item2 = explode("/", $address); + foreach ($item2 as $current) { + if ($item2[1] <> "") { + $address = $item2[0]; + $address_subnet = $item2[1]; + } + } + $item4 = $item3[$counter]; + $tracker = $counter; +?> + + + + + + + +
                            + + + + + delete +
                            + + add" /> + +
                              + " /> + " /> + + + +
                            +
                            + + + + + + diff --git a/src/usr/local/www/services_ntpd.php b/src/usr/local/www/services_ntpd.php new file mode 100644 index 0000000..1f4dd86 --- /dev/null +++ b/src/usr/local/www/services_ntpd.php @@ -0,0 +1,462 @@ + + + + + + + +
                            + + + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            Interface(s) + $carpip) { + $interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")"; + } + $aliaslist = get_configured_ip_aliases_list(); + foreach ($aliaslist as $aliasip => $aliasif) { + $interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")"; + } + $size = (count($interfaces) < 10) ? count($interfaces) : 10; +?> + +
                            +
                            +
                            +
                            +
                            +
                            Time servers + \n"; + + echo " "; + echo "\n prefer "; + echo "\n noselect\n
                            \n\n"; + } + ?> +
                            + " onclick="NewTimeServer()" alt="add" /> +
                            +
                            + +
                            + prefer option indicates that NTP should favor the use of this server more than all others.'); ?> +
                            + noselect option indicates that NTP should not use this server for time, but stats for this server will be collected and displayed.'); ?> +
                            Orphan mode +
                            + +
                            NTP graphs + /> + +
                            Syslog logging + ( System Logs > NTP"); ?>). +

                            + /> + +
                            + /> + +
                            Statistics logging +
                            + " /> - +
                            + +
                            Access restrictions +
                            + " /> - +
                            + +
                            Leap seconds +
                            + " /> - +
                            + +
                              + " /> +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/services_ntpd_gps.php b/src/usr/local/www/services_ntpd_gps.php new file mode 100644 index 0000000..c8098c1 --- /dev/null +++ b/src/usr/local/www/services_ntpd_gps.php @@ -0,0 +1,619 @@ + + + + + + +
                            + + + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + A GPS connected via a serial port may be used as a reference clock for NTP. If the GPS also supports PPS and is properly configured, and connected, that GPS may also be used as a Pulse Per Second clock reference. NOTE: a USB GPS may work, but is not recommended due to USB bus timing issues. +
                            +
                            NTP"); ?> +
                            + + + +
                            +
                            + +
                            + +
                            Serial port +   + +

                            +   +
                            +
                            + +
                            NMEA sentences +
                            + +
                            Fudge time 1 + ()
                            + (: 0.0). +
                            Fudge time 2 + ()
                            + (: 0.0). +
                            Stratum +
                            + (: 0). +
                            Flags + + + + +
                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + /> + + +
                            + /> + + +
                            + /> + + +
                            + /> + + +
                            + /> + + +
                            + /> + + +
                            + /> + + Note: enabling this will rapidly fill the log, but is useful for tuning Fudge time 2."); ?> +
                            +
                            Clock ID +
                            + (: GPS). +
                            GPS Initialization +
                            + " /> - +
                            + +
                              + " /> +
                            +
                            +
                            + +
                            + + + diff --git a/src/usr/local/www/services_ntpd_pps.php b/src/usr/local/www/services_ntpd_pps.php new file mode 100644 index 0000000..e4abce0 --- /dev/null +++ b/src/usr/local/www/services_ntpd_pps.php @@ -0,0 +1,251 @@ + + + + +
                            + + + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + +
                            +
                            : NTP"); ?> +
                            Serial port +   + +
                            Fudge time + ()
                            + (: 0.0). +
                            Stratum +
                            + (: 0). +
                            Flags + + + + +
                            +
                            +
                            + + + + + + + + + + + + + +
                            + /> + + +
                            + /> + + +
                            + /> + + +
                            +
                            Clock ID +
                            + (: PPS). +
                              + " /> +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/services_rfc2136.php b/src/usr/local/www/services_rfc2136.php new file mode 100644 index 0000000..87d4770 --- /dev/null +++ b/src/usr/local/www/services_rfc2136.php @@ -0,0 +1,206 @@ + + + + +
                            + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + $ifdesc) { + if ($rfc2136['interface'] == $if) { + if (!isset($rfc2136['enable'])) { + echo "{$ifdesc}"; + } else { + echo "{$ifdesc}"; + } + break; + } + } +?> + +" . htmlspecialchars($rfc2136['server']) . ""; + } else { + echo htmlspecialchars($rfc2136['server']); + } +?> + +" . htmlspecialchars($rfc2136['host']) . ""; + } else { + echo htmlspecialchars($rfc2136['host']); + } +?> + + $cached_ip) { + echo ""; + } else { + echo ""; + } + echo htmlspecialchars($cached_ip); + echo ""; + } else { + echo "IPv4: N/A"; + } + echo "
                            "; + if (file_exists("{$filename}.ipv6")) { + echo "IPv6: "; + $ipaddr = get_interface_ipv6($rfc2136['interface']); + $cached_ip_s = explode("|", file_get_contents("{$filename}.ipv6")); + $cached_ip = $cached_ip_s[0]; + if ($ipaddr <> $cached_ip) { + echo ""; + } else { + echo ""; + } + echo htmlspecialchars($cached_ip); + echo ""; + } else { + echo "IPv6: N/A"; + } +?> +
                            +" . htmlspecialchars($rfc2136['descr']) . ""; + } else { + echo htmlspecialchars($rfc2136['descr']); + } +?> + + edit +  ')">delete +
                              + add +
                            +


                            +
                             
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/services_rfc2136_edit.php b/src/usr/local/www/services_rfc2136_edit.php new file mode 100644 index 0000000..686ca27 --- /dev/null +++ b/src/usr/local/www/services_rfc2136_edit.php @@ -0,0 +1,276 @@ + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + +
                            + +
                            +
                            + /> +
                            + +
                            + +
                            Fully qualified hostname of the host to be updated +
                            + + +
                            + +
                            + +
                            + />   + />   + /> +
                            + +
                            + +
                            + +
                            + " /> + +
                            + " /> + +
                            + />   + />   + /> +
                            + +
                              + " onclick="enable_change(true)" /> + " /> + " onclick="enable_change(true)" /> + + + +
                              + + + +
                            +
                            +
                            + ', '');?> +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php new file mode 100644 index 0000000..3cf9dbb --- /dev/null +++ b/src/usr/local/www/services_router_advertisements.php @@ -0,0 +1,480 @@ +. + All rights reserved. + + part of pfSense (https://www.pfsense.org) + Copyright (C) 2010 Seth Mos . + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /bin/rm + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-services-router-advertisements +##|*NAME=Services: Router advertisementspage +##|*DESCR=Allow access to the 'Services: Router Advertisements' page. +##|*MATCH=services_router_advertisements.php* +##|-PRIV + +require("guiconfig.inc"); + +if (!$g['services_dhcp_server_enable']) { + header("Location: /"); + exit; +} + +/* Fix failover DHCP problem + * http://article.gmane.org/gmane.comp.security.firewalls.pfsense.support/18749 + */ +ini_set("memory_limit", "64M"); + +$if = $_GET['if']; +if ($_POST['if']) { + $if = $_POST['if']; +} + +/* if OLSRD is enabled, allow WAN to house DHCP. */ +if ($config['installedpackages']['olsrd']) { + foreach ($config['installedpackages']['olsrd']['config'] as $olsrd) { + if ($olsrd['enable']) { + $is_olsr_enabled = true; + break; + } + } +} + +if (!$_GET['if']) { + $savemsg = "

                            " . gettext("The DHCPv6 Server can only be enabled on interfaces configured with static IP addresses") . ".

                            " . + "

                            " . gettext("Only interfaces configured with a static IP will be shown") . ".

                            "; +} + +$iflist = get_configured_interface_with_descr(); + +/* set the starting interface */ +if (!$if || !isset($iflist[$if])) { + foreach ($iflist as $ifent => $ifname) { + $oc = $config['interfaces'][$ifent]; + if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) || + (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) { + continue; + } + $if = $ifent; + break; + } +} + +if (is_array($config['dhcpdv6'][$if])) { + /* RA specific */ + $pconfig['ramode'] = $config['dhcpdv6'][$if]['ramode']; + $pconfig['rapriority'] = $config['dhcpdv6'][$if]['rapriority']; + if ($pconfig['rapriority'] == "") { + $pconfig['rapriority'] = "medium"; + } + $pconfig['rainterface'] = $config['dhcpdv6'][$if]['rainterface']; + $pconfig['radomainsearchlist'] = $config['dhcpdv6'][$if]['radomainsearchlist']; + list($pconfig['radns1'], $pconfig['radns2'], $pconfig['radns3'], $pconfig['radns4']) = $config['dhcpdv6'][$if]['radnsserver']; + $pconfig['rasamednsasdhcp6'] = isset($config['dhcpdv6'][$if]['rasamednsasdhcp6']); + + $pconfig['subnets'] = $config['dhcpdv6'][$if]['subnets']['item']; +} +if (!is_array($pconfig['subnets'])) { + $pconfig['subnets'] = array(); +} + +$advertise_modes = array("disabled" => "Disabled", + "router" => "Router Only", + "unmanaged" => "Unmanaged", + "managed" => "Managed", + "assist" => "Assisted", + "stateless_dhcp" => "Stateless DHCP"); +$priority_modes = array("low" => "Low", + "medium" => "Normal", + "high" => "High"); +$carplist = get_configured_carp_interface_list(); + +$subnets_help = gettext("Subnets are specified in CIDR format. " . + "Select the CIDR mask that pertains to each entry. " . + "/128 specifies a single IPv6 host; /64 specifies a normal IPv6 network; etc. " . + "If no subnets are specified here, the Router Advertisement (RA) Daemon will advertise to the subnet to which the router's interface is assigned."); + +if ($_POST) { + unset($input_errors); + + $pconfig = $_POST; + + /* input validation */ + + $pconfig['subnets'] = array(); + for ($x = 0; $x < 5000; $x += 1) { + $address = trim($_POST['subnet_address' . $x]); + if ($address === "") { + continue; + } + + $bits = trim($_POST['subnet_bits' . $x]); + if ($bits === "") { + $bits = "128"; + } + + if (is_alias($address)) { + $pconfig['subnets'][] = $address; + } else { + $pconfig['subnets'][] = $address . "/" . $bits; + if (!is_ipaddrv6($address)) { + $input_errors[] = sprintf(gettext("An invalid subnet or alias was specified. [%s/%s]"), $address, $bits); + } + } + } + + if (($_POST['radns1'] && !is_ipaddrv6($_POST['radns1'])) || ($_POST['radns2'] && !is_ipaddrv6($_POST['radns2'])) || ($_POST['radns3'] && !is_ipaddrv6($_POST['radns3'])) || ($_POST['radns4'] && !is_ipaddrv6($_POST['radns4']))) { + $input_errors[] = gettext("A valid IPv6 address must be specified for each of the DNS servers."); + } + if ($_POST['radomainsearchlist']) { + $domain_array=preg_split("/[ ;]+/", $_POST['radomainsearchlist']); + foreach ($domain_array as $curdomain) { + if (!is_domain($curdomain)) { + $input_errors[] = gettext("A valid domain search list must be specified."); + break; + } + } + } + + if (!$input_errors) { + if (!is_array($config['dhcpdv6'][$if])) { + $config['dhcpdv6'][$if] = array(); + } + + $config['dhcpdv6'][$if]['ramode'] = $_POST['ramode']; + $config['dhcpdv6'][$if]['rapriority'] = $_POST['rapriority']; + $config['dhcpdv6'][$if]['rainterface'] = $_POST['rainterface']; + + $config['dhcpdv6'][$if]['radomainsearchlist'] = $_POST['radomainsearchlist']; + unset($config['dhcpdv6'][$if]['radnsserver']); + if ($_POST['radns1']) { + $config['dhcpdv6'][$if]['radnsserver'][] = $_POST['radns1']; + } + if ($_POST['radns2']) { + $config['dhcpdv6'][$if]['radnsserver'][] = $_POST['radns2']; + } + if ($_POST['radns3']) { + $config['dhcpdv6'][$if]['radnsserver'][] = $_POST['radns3']; + } + if ($_POST['radns4']) { + $config['dhcpdv6'][$if]['radnsserver'][] = $_POST['radns4']; + } + + $config['dhcpdv6'][$if]['rasamednsasdhcp6'] = ($_POST['rasamednsasdhcp6']) ? true : false; + + if (count($pconfig['subnets'])) { + $config['dhcpdv6'][$if]['subnets']['item'] = $pconfig['subnets']; + } else { + unset($config['dhcpdv6'][$if]['subnets']); + } + + write_config(); + $retval = services_radvd_configure(); + $savemsg = get_std_save_message($retval); + } +} + +$pgtitle = array(gettext("Services"), gettext("Router advertisements")); + +include("head.inc"); + +?> + + + + + + + + + +
                            + + + + +
                            + $ifname) { + $oc = $config['interfaces'][$ifent]; + if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) || + (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) { + continue; + } + if ($ifent == $if) { + $active = true; + } else { + $active = false; + } + $tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}"); + $tabscounter++; + } + if ($tabscounter == 0) { + echo "
                            "; + include("fend.inc"); + echo ""; + echo ""; + exit; + } + display_top_tabs($tab_array); +?> + + + + + + + + + +
                            + + + + + + + + + + 0) { + foreach ($carplist as $ifname => $vip) { + if ((preg_match("/^{$if}_/", $ifname)) && (is_ipaddrv6($vip))) { + $carplistif[$ifname] = $vip; + } + } + } + if (count($carplistif) > 0) { +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + + + +
                            + +
                            + +
                            + +
                            + +
                            +
                            + + + + + + + + + + + + + +
                            + + + + + " /> +
                            + +
                            + " /> +
                            +
                             
                            DNS
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                              + /> + +
                              + + " /> +
                            +
                            + + + + + + + + + + diff --git a/src/usr/local/www/services_snmp.php b/src/usr/local/www/services_snmp.php new file mode 100644 index 0000000..a29ade0 --- /dev/null +++ b/src/usr/local/www/services_snmp.php @@ -0,0 +1,443 @@ +. + All rights reserved. + + part of pfSense + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: snmp +*/ + +##|+PRIV +##|*IDENT=page-services-snmp +##|*NAME=Services: SNMP page +##|*DESCR=Allow access to the 'Services: SNMP' page. +##|*MATCH=services_snmp.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); + +if (!is_array($config['snmpd'])) { + $config['snmpd'] = array(); + $config['snmpd']['rocommunity'] = "public"; + $config['snmpd']['pollport'] = "161"; +} + +if (!is_array($config['snmpd']['modules'])) { + $config['snmpd']['modules'] = array(); + $config['snmpd']['modules']['mibii'] = true; + $config['snmpd']['modules']['netgraph'] = true; + $config['snmpd']['modules']['pf'] = true; + $config['snmpd']['modules']['hostres'] = true; + $config['snmpd']['modules']['bridge'] = true; + $config['snmpd']['modules']['ucd'] = true; + $config['snmpd']['modules']['regex'] = true; +} +$pconfig['enable'] = isset($config['snmpd']['enable']); +$pconfig['pollport'] = $config['snmpd']['pollport']; +$pconfig['syslocation'] = $config['snmpd']['syslocation']; +$pconfig['syscontact'] = $config['snmpd']['syscontact']; +$pconfig['rocommunity'] = $config['snmpd']['rocommunity']; +/* disabled until some docs show up on what this does. +$pconfig['rwenable'] = isset($config['snmpd']['rwenable']); +$pconfig['rwcommunity'] = $config['snmpd']['rwcommunity']; +*/ +$pconfig['trapenable'] = isset($config['snmpd']['trapenable']); +$pconfig['trapserver'] = $config['snmpd']['trapserver']; +$pconfig['trapserverport'] = $config['snmpd']['trapserverport']; +$pconfig['trapstring'] = $config['snmpd']['trapstring']; + +$pconfig['mibii'] = isset($config['snmpd']['modules']['mibii']); +$pconfig['netgraph'] = isset($config['snmpd']['modules']['netgraph']); +$pconfig['pf'] = isset($config['snmpd']['modules']['pf']); +$pconfig['hostres'] = isset($config['snmpd']['modules']['hostres']); +$pconfig['bridge'] = isset($config['snmpd']['modules']['bridge']); +$pconfig['ucd'] = isset($config['snmpd']['modules']['ucd']); +$pconfig['regex'] = isset($config['snmpd']['modules']['regex']); +$pconfig['bindip'] = $config['snmpd']['bindip']; + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if ($_POST['enable']) { + if (strstr($_POST['syslocation'], "#")) { + $input_errors[] = gettext("Invalid character '#' in system location"); + } + if (strstr($_POST['syscontact'], "#")) { + $input_errors[] = gettext("Invalid character '#' in system contact"); + } + if (strstr($_POST['rocommunity'], "#")) { + $input_errors[] = gettext("Invalid character '#' in read community string"); + } + + $reqdfields = explode(" ", "rocommunity"); + $reqdfieldsn = array(gettext("Community")); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + $reqdfields = explode(" ", "pollport"); + $reqdfieldsn = array(gettext("Polling Port")); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + + } + + if ($_POST['trapenable']) { + if (strstr($_POST['trapstring'], "#")) { + $input_errors[] = gettext("Invalid character '#' in SNMP trap string"); + } + + $reqdfields = explode(" ", "trapserver"); + $reqdfieldsn = array(gettext("Trap server")); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + $reqdfields = explode(" ", "trapserverport"); + $reqdfieldsn = array(gettext("Trap server port")); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + $reqdfields = explode(" ", "trapstring"); + $reqdfieldsn = array(gettext("Trap string")); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + } + + +/* disabled until some docs show up on what this does. + if ($_POST['rwenable']) { + $reqdfields = explode(" ", "rwcommunity"); + $reqdfieldsn = explode(",", "Write community string"); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + } +*/ + + + + if (!$input_errors) { + $config['snmpd']['enable'] = $_POST['enable'] ? true : false; + $config['snmpd']['pollport'] = $_POST['pollport']; + $config['snmpd']['syslocation'] = $_POST['syslocation']; + $config['snmpd']['syscontact'] = $_POST['syscontact']; + $config['snmpd']['rocommunity'] = $_POST['rocommunity']; + /* disabled until some docs show up on what this does. + $config['snmpd']['rwenable'] = $_POST['rwenable'] ? true : false; + $config['snmpd']['rwcommunity'] = $_POST['rwcommunity']; + */ + $config['snmpd']['trapenable'] = $_POST['trapenable'] ? true : false; + $config['snmpd']['trapserver'] = $_POST['trapserver']; + $config['snmpd']['trapserverport'] = $_POST['trapserverport']; + $config['snmpd']['trapstring'] = $_POST['trapstring']; + + $config['snmpd']['modules']['mibii'] = $_POST['mibii'] ? true : false; + $config['snmpd']['modules']['netgraph'] = $_POST['netgraph'] ? true : false; + $config['snmpd']['modules']['pf'] = $_POST['pf'] ? true : false; + $config['snmpd']['modules']['hostres'] = $_POST['hostres'] ? true : false; + $config['snmpd']['modules']['bridge'] = $_POST['bridge'] ? true : false; + $config['snmpd']['modules']['ucd'] = $_POST['ucd'] ? true : false; + $config['snmpd']['modules']['regex'] = $_POST['regex'] ? true : false; + $config['snmpd']['bindip'] = $_POST['bindip']; + + write_config(); + + $retval = 0; + $retval = services_snmpd_configure(); + $savemsg = get_std_save_message($retval); + } +} + +$closehead = false; +$pgtitle = array(gettext("Services"), gettext("SNMP")); +$shortcut_section = "snmp"; +include("head.inc"); + +?> + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                            + onclick="enable_change(this)" /> +
                            +
                            + +

                            +
                            + +
                            + +
                            + +

                            +
                             
                            + + + + + +
                            + onclick="enable_change(this)" /> +
                            +
                            + +

                            +
                            + +

                            +
                            + +

                            +
                             
                            + + + + + +
                             
                            +
                            + /> +
                            + /> +
                            + /> +
                            + /> +
                            + /> +
                            + /> +
                            +
                             
                            + + + + + +
                             
                            +
                            + +
                              + " onclick="enable_change(true)" /> +
                            +
                            + + + + diff --git a/src/usr/local/www/services_unbound.php b/src/usr/local/www/services_unbound.php new file mode 100644 index 0000000..a197c8c --- /dev/null +++ b/src/usr/local/www/services_unbound.php @@ -0,0 +1,626 @@ + + + + + + + +
                            + + +
                            +" . gettext("You must apply changes for them to take effect."));?>
                            + + + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            +

                            + onclick="enable_change(false)" /> + +
                            +
                            +

                            +
                            +

                            + /> +

                            + +

                            +
                            + + +

                            + +

                            +
                            + +

                            + +

                            +
                            +

                            + /> + +
                            +
                            +

                            +
                            +

                            + /> +
                            +

                            +
                            +

                            + /> + +
                            +
                            + ', '')?> +

                            +
                            +

                            + /> + +
                            +
                            + ', '');?> +

                            +
                            +

                            + /> + +
                            +
                            +

                            +
                            +
                            > + " /> - +
                            +
                            > +
                            +
                            +
                            +
                            +
                            + " onclick="enable_change(true)" /> +
                            +
                            +
                            + + +

                            + + + +
                            +
                            +
                            + ', '');?> +
                            +
                            +

                            + + 
                            + + + + + + + +
                            +
                            + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                            add
                            +
                            + + + + + +
                            add
                            +
                            +   + +   + +   + +   + + + + + + +
                            edit')">delete
                            +
                            +   + +   + + Alias for   + +   + + edit +
                            +
                            + + + + + + + +
                            +

                            + + +

                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                            add
                            +
                            + + + + + +
                            add
                            +
                            +   + +   + +   + + + + + + +
                            + + edit + + + ')"> + delete + +
                            +
                            +
                            + + + + diff --git a/src/usr/local/www/services_unbound_acls.php b/src/usr/local/www/services_unbound_acls.php new file mode 100644 index 0000000..3a51b3e --- /dev/null +++ b/src/usr/local/www/services_unbound_acls.php @@ -0,0 +1,421 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +require("guiconfig.inc"); +require("unbound.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_unbound_acls.php'); +} + +if (!is_array($config['unbound']['acls'])) { + $config['unbound']['acls'] = array(); +} + +$a_acls = &$config['unbound']['acls']; + +$id = $_GET['id']; +if (isset($_POST['aclid'])) { + $id = $_POST['aclid']; +} + +if (!empty($id) && !is_numeric($id)) { + pfSenseHeader("services_unbound_acls.php"); + exit; +} + +$act = $_GET['act']; +if (isset($_POST['act'])) { + $act = $_POST['act']; +} + +if ($act == "del") { + if (!$a_acls[$id]) { + pfSenseHeader("services_unbound_acls.php"); + exit; + } + + unset($a_acls[$id]); + write_config(); + mark_subsystem_dirty('unbound'); +} + +if ($act == "new") { + $id = unbound_get_next_id(); +} + +if ($act == "edit") { + if (isset($id) && $a_acls[$id]) { + $pconfig = $a_acls[$id]; + $networkacl = $a_acls[$id]['row']; + } +} + +if ($_POST) { + unset($input_errors); + $pconfig = $_POST; + + if ($_POST['apply']) { + $retval = services_unbound_configure(); + $savemsg = get_std_save_message($retval); + if ($retval == 0) { + clear_subsystem_dirty('unbound'); + } + } else { + + // input validation - only allow 50 entries in a single ACL + for ($x = 0; $x < 50; $x++) { + if (isset($pconfig["acl_network{$x}"])) { + $networkacl[$x] = array(); + $networkacl[$x]['acl_network'] = $pconfig["acl_network{$x}"]; + $networkacl[$x]['mask'] = $pconfig["mask{$x}"]; + $networkacl[$x]['description'] = $pconfig["description{$x}"]; + if (!is_ipaddr($networkacl[$x]['acl_network'])) { + $input_errors[] = gettext("You must enter a valid IP address for each row under Networks."); + } + + if (is_ipaddr($networkacl[$x]['acl_network'])) { + if (!is_subnet($networkacl[$x]['acl_network']."/".$networkacl[$x]['mask'])) { + $input_errors[] = gettext("You must enter a valid IPv4 netmask for each IPv4 row under Networks."); + } + } else if (function_exists("is_ipaddrv6")) { + if (!is_ipaddrv6($networkacl[$x]['acl_network'])) { + $input_errors[] = gettext("You must enter a valid IPv6 address for {$networkacl[$x]['acl_network']}."); + } else if (!is_subnetv6($networkacl[$x]['acl_network']."/".$networkacl[$x]['mask'])) { + $input_errors[] = gettext("You must enter a valid IPv6 netmask for each IPv6 row under Networks."); + } + } else { + $input_errors[] = gettext("You must enter a valid IP address for each row under Networks."); + } + } else if (isset($networkacl[$x])) { + unset($networkacl[$x]); + } + } + + if (!$input_errors) { + if ($pconfig['Submit'] == gettext("Save")) { + $acl_entry = array(); + $acl_entry['aclid'] = $pconfig['aclid']; + $acl_entry['aclname'] = $pconfig['aclname']; + $acl_entry['aclaction'] = $pconfig['aclaction']; + $acl_entry['description'] = $pconfig['description']; + $acl_entry['aclid'] = $pconfig['aclid']; + $acl_entry['row'] = array(); + foreach ($networkacl as $acl) { + $acl_entry['row'][] = $acl; + } + + if (isset($id) && $a_acls[$id]) { + $a_acls[$id] = $acl_entry; + } else { + $a_acls[] = $acl_entry; + } + + mark_subsystem_dirty("unbound"); + write_config(); + + pfSenseHeader("/services_unbound_acls.php"); + exit; + } + } + } +} + +$closehead = false; +$pgtitle = "Services: DNS Resolver: Access Lists"; +$shortcut_section = "resolver"; +include("head.inc"); + +?> + + + + + + + + + + +
                            + + +
                            +" . gettext("You must apply the changes in order for them to take effect."));?>
                            + + + + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + +
                            + +
                            + Deny: This action stops queries from hosts within the netblock defined below.");?>
                            + Refuse: This action also stops queries from hosts within the netblock defined below, but sends a DNS rcode REFUSED error message back to the client.");?>
                            + Allow: This action allows queries from hosts within the netblock defined below.");?>
                            + Allow Snoop: This action allows recursive and nonrecursive access from hosts within the netblock defined below. Used for cache snooping and ideally should only be configured for your administrative host.");?>
                            +
                            +
                            + + + + + + + + + + + + + + + + +
                            + + + + + + + delete +
                            + + " /> + + + +
                            + +
                            + +
                             
                              +  
                              + " /> + " onclick="window.location.href=''" /> + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                             
                              + + + + + +
                              + + " border="0" alt="add" /> + +
                            +
                            +

                            + +

                            +
                            + + + + + + + + + + + +
                            + + " width="17" height="17" border="0" alt="edit" /> + + + ')"> + " width="17" height="17" border="0" alt="delete" /> + +
                            +
                            + +
                            +
                            +
                            + + + + diff --git a/src/usr/local/www/services_unbound_advanced.php b/src/usr/local/www/services_unbound_advanced.php new file mode 100644 index 0000000..5fc4aed --- /dev/null +++ b/src/usr/local/www/services_unbound_advanced.php @@ -0,0 +1,469 @@ + + + + + + +
                            + + +
                            +" . gettext("You must apply the changes in order for them to take effect."));?>
                            + + + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + />
                            + +
                            + />
                            + +
                            + />
                            + +
                            + />
                            + ", "");?> +
                            + />
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            + /> + +
                            + />
                            + ", "");?> +
                            + +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/services_unbound_domainoverride_edit.php b/src/usr/local/www/services_unbound_domainoverride_edit.php new file mode 100644 index 0000000..28a8424 --- /dev/null +++ b/src/usr/local/www/services_unbound_domainoverride_edit.php @@ -0,0 +1,183 @@ + and Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: dnsresolver +*/ + +##|+PRIV +##|*IDENT=page-services-dnsresolver-editdomainoverride +##|*NAME=Services: DNS Resolver: Edit Domain Override page +##|*DESCR=Allow access to the 'Services: DNS Resolver: Edit Domain Override' page. +##|*MATCH=services_unbound_domainoverride_edit.php* +##|-PRIV + +require("guiconfig.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_unbound.php'); +} + +if (!is_array($config['unbound']['domainoverrides'])) { + $config['unbound']['domainoverrides'] = array(); +} + +$a_domainOverrides = &$config['unbound']['domainoverrides']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_domainOverrides[$id]) { + $pconfig['domain'] = $a_domainOverrides[$id]['domain']; + $pconfig['ip'] = $a_domainOverrides[$id]['ip']; + $pconfig['descr'] = $a_domainOverrides[$id]['descr']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "domain ip"); + $reqdfieldsn = array(gettext("Domain"), gettext("IP address")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + function String_Begins_With($needle, $haystack) { + return (substr($haystack, 0, strlen($needle)) == $needle); + } + + if (String_Begins_With(_msdcs, $_POST['domain'])) { + $subdomainstr = substr($_POST['domain'], 7); + if ($subdomainstr && !is_domain($subdomainstr)) { + $input_errors[] = gettext("A valid domain must be specified after _msdcs."); + } + } elseif ($_POST['domain'] && !is_domain($_POST['domain'])) { + $input_errors[] = gettext("A valid domain must be specified."); + } + + if ($_POST['ip']) { + if (strpos($_POST['ip'], '@') !== false) { + $ip_details = explode("@", $_POST['ip']); + if (!is_ipaddr($ip_details[0]) || !is_port($ip_details[1])) { + $input_errors[] = gettext("A valid IP address and port must be specified, for example 192.168.100.10@5353."); + } + } else if (!is_ipaddr($_POST['ip'])) { + $input_errors[] = gettext("A valid IP address must be specified, for example 192.168.100.10."); + } + } + + if (!$input_errors) { + $doment = array(); + $doment['domain'] = $_POST['domain']; + $doment['ip'] = $_POST['ip']; + $doment['descr'] = $_POST['descr']; + + if (isset($id) && $a_domainOverrides[$id]) { + $a_domainOverrides[$id] = $doment; + } else { + $a_domainOverrides[] = $doment; + } + + mark_subsystem_dirty('unbound'); + + write_config(); + + header("Location: services_unbound.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Edit Domain Override")); +$shortcut_section = "resolver"; +include("head.inc"); + +?> + + + + +
                            + + + + + + + + + + + + + + + + + +
                            +
                            + +
                            + mycompany.localdomain 1.168.192.in-addr.arpa +
                            +
                            +
                            + +
                            + 192.168.100.100
                            +
                            +
                            +
                            +
                            + + + +
                              + " /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/services_unbound_host_edit.php b/src/usr/local/www/services_unbound_host_edit.php new file mode 100644 index 0000000..6b365f2 --- /dev/null +++ b/src/usr/local/www/services_unbound_host_edit.php @@ -0,0 +1,337 @@ + and Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: dnsresolver +*/ + +##|+PRIV +##|*IDENT=page-services-dnsresolver-edithost +##|*NAME=Services: DNS Resolver: Edit host page +##|*DESCR=Allow access to the 'Services: DNS Resolver: Edit host' page. +##|*MATCH=services_unbound_host_edit.php* +##|-PRIV + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_unbound.php'); +} + +function hostcmp($a, $b) { + return strcasecmp($a['host'], $b['host']); +} + +function hosts_sort() { + global $g, $config; + + if (!is_array($config['unbound']['hosts'])) { + return; + } + + usort($config['unbound']['hosts'], "hostcmp"); +} + +require("guiconfig.inc"); + +if (!is_array($config['unbound']['hosts'])) { + $config['unbound']['hosts'] = array(); +} + +$a_hosts = &$config['unbound']['hosts']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_hosts[$id]) { + $pconfig['host'] = $a_hosts[$id]['host']; + $pconfig['domain'] = $a_hosts[$id]['domain']; + $pconfig['ip'] = $a_hosts[$id]['ip']; + $pconfig['descr'] = $a_hosts[$id]['descr']; + $pconfig['aliases'] = $a_hosts[$id]['aliases']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "domain ip"); + $reqdfieldsn = array(gettext("Domain"), gettext("IP address")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($_POST['host']) { + if (!is_hostname($_POST['host'])) { + $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9, '_' and '-'. It may not start or end with '-'."); + } else { + if (!is_unqualified_hostname($_POST['host'])) { + $input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted"); + } + } + } + + if (($_POST['domain'] && !is_domain($_POST['domain']))) { + $input_errors[] = gettext("A valid domain must be specified."); + } + + if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) { + $input_errors[] = gettext("A valid IP address must be specified."); + } + + /* collect aliases */ + $aliases = array(); + foreach ($_POST as $key => $value) { + $entry = ''; + if (!substr_compare('aliashost', $key, 0, 9)) { + $entry = substr($key, 9); + $field = 'host'; + } elseif (!substr_compare('aliasdomain', $key, 0, 11)) { + $entry = substr($key, 11); + $field = 'domain'; + } elseif (!substr_compare('aliasdescription', $key, 0, 16)) { + $entry = substr($key, 16); + $field = 'description'; + } + if (ctype_digit($entry)) { + $aliases[$entry][$field] = $value; + } + } + $pconfig['aliases']['item'] = $aliases; + + /* validate aliases */ + foreach ($aliases as $idx => $alias) { + $aliasreqdfields = array('aliasdomain' . $idx); + $aliasreqdfieldsn = array(gettext("Alias Domain")); + + do_input_validation($_POST, $aliasreqdfields, $aliasreqdfieldsn, $input_errors); + if ($alias['host']) { + if (!is_hostname($alias['host'])) { + $input_errors[] = gettext("Hostnames in an alias list can only contain the characters A-Z, 0-9 and '-'. They may not start or end with '-'."); + } else { + if (!is_unqualified_hostname($alias['host'])) { + $input_errors[] = gettext("A valid alias hostname is specified, but the domain name part should be omitted"); + } + } + } + if (($alias['domain'] && !is_domain($alias['domain']))) { + $input_errors[] = gettext("A valid domain must be specified in alias list."); + } + } + + /* check for overlaps */ + foreach ($a_hosts as $hostent) { + if (isset($id) && ($a_hosts[$id]) && ($a_hosts[$id] === $hostent)) { + continue; + } + + if (($hostent['host'] == $_POST['host']) && + ($hostent['domain'] == $_POST['domain']) && + ((is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) || (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])))) { + $input_errors[] = gettext("This host/domain already exists."); + break; + } + } + + if (!$input_errors) { + $hostent = array(); + $hostent['host'] = $_POST['host']; + $hostent['domain'] = $_POST['domain']; + $hostent['ip'] = $_POST['ip']; + $hostent['descr'] = $_POST['descr']; + $hostent['aliases']['item'] = $aliases; + + if (isset($id) && $a_hosts[$id]) { + $a_hosts[$id] = $hostent; + } else { + $a_hosts[] = $hostent; + } + hosts_sort(); + + mark_subsystem_dirty('unbound'); + + write_config(); + + header("Location: services_unbound.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Edit host")); +$shortcut_section = "resolver"; +include("head.inc"); + +?> + +"> + + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            + 192.168.100.100 fd00:abcd::1 +
                            +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + +
                            +
                            + +
                            +
                            + + + + + + + + " /> + +
                            + + " /> + + +
                              + " /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/services_wol.php b/src/usr/local/www/services_wol.php new file mode 100644 index 0000000..e443ab0 --- /dev/null +++ b/src/usr/local/www/services_wol.php @@ -0,0 +1,233 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/local/bin/wol + pfSense_MODULE: wol +*/ + +##|+PRIV +##|*IDENT=page-services-wakeonlan +##|*NAME=Services: Wake on LAN page +##|*DESCR=Allow access to the 'Services: Wake on LAN' page. +##|*MATCH=services_wol.php* +##|-PRIV + +require("guiconfig.inc"); + +if (!is_array($config['wol']['wolentry'])) { + $config['wol']['wolentry'] = array(); +} +$a_wol = &$config['wol']['wolentry']; + +if ($_GET['wakeall'] <> "") { + $i = 0; + $savemsg = ""; + foreach ($a_wol as $wolent) { + $mac = $wolent['mac']; + $if = $wolent['interface']; + $description = $wolent['descr']; + $ipaddr = get_interface_ip($if); + if (!is_ipaddr($ipaddr)) { + continue; + } + $bcip = gen_subnet_max($ipaddr, get_interface_subnet($if)); + /* Execute wol command and check return code. */ + if (!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")) { + $savemsg .= sprintf(gettext('Sent magic packet to %1$s (%2$s)%3$s'), $mac, $description, ".
                            "); + } else { + $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s (%4$s) did not complete successfully%5$s'), '', '', $description, $mac, ".
                            "); + } + } +} + +if ($_POST || $_GET['mac']) { + unset($input_errors); + + if ($_GET['mac']) { + /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */ + $_GET['mac'] = strtolower(str_replace("-", ":", $_GET['mac'])); + $mac = $_GET['mac']; + $if = $_GET['if']; + } else { + /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */ + $_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac'])); + $mac = $_POST['mac']; + $if = $_POST['interface']; + } + + /* input validation */ + if (!$mac || !is_macaddr($mac)) { + $input_errors[] = gettext("A valid MAC address must be specified."); + } + if (!$if) { + $input_errors[] = gettext("A valid interface must be specified."); + } + + if (!$input_errors) { + /* determine broadcast address */ + $ipaddr = get_interface_ip($if); + if (!is_ipaddr($ipaddr)) { + $input_errors[] = gettext("A valid ip could not be found!"); + } else { + $bcip = gen_subnet_max($ipaddr, get_interface_subnet($if)); + /* Execute wol command and check return code. */ + if (!mwexec("/usr/local/bin/wol -i {$bcip} " . escapeshellarg($mac))) { + $savemsg .= sprintf(gettext("Sent magic packet to %s."), $mac); + } else { + $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s did not complete successfully%4$s'), '', '', $mac, ".
                            "); + } + } + } +} + +if ($_GET['act'] == "del") { + if ($a_wol[$_GET['id']]) { + unset($a_wol[$_GET['id']]); + write_config(); + header("Location: services_wol.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("Wake on LAN")); +include("head.inc"); + +?> + + + + + +
                            + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + +
                            + +
                              + " /> +
                            +  
                            + wol all
                            + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                            add
                            +
                            + + + + + + + + + + + +
                            edit')">delete
                            +
                            + + + + + +
                            add
                            +
                            + + + +
                            +
                            +
                            + "". +
                            +
                            + + + diff --git a/src/usr/local/www/services_wol_edit.php b/src/usr/local/www/services_wol_edit.php new file mode 100644 index 0000000..031ba83 --- /dev/null +++ b/src/usr/local/www/services_wol_edit.php @@ -0,0 +1,180 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: wol +*/ + +##|+PRIV +##|*IDENT=page-services-wakeonlan-edit +##|*NAME=Services: Wake on LAN: Edit page +##|*DESCR=Allow access to the 'Services: Wake on LAN: Edit' page. +##|*MATCH=services_wol_edit.php* +##|-PRIV + +function wolcmp($a, $b) { + return strcmp($a['descr'], $b['descr']); +} + +function wol_sort() { + global $config; + + usort($config['wol']['wolentry'], "wolcmp"); +} + +require("guiconfig.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_wol.php'); +} + +if (!is_array($config['wol']['wolentry'])) { + $config['wol']['wolentry'] = array(); +} +$a_wol = &$config['wol']['wolentry']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_wol[$id]) { + $pconfig['interface'] = $a_wol[$id]['interface']; + $pconfig['mac'] = $a_wol[$id]['mac']; + $pconfig['descr'] = $a_wol[$id]['descr']; +} else { + $pconfig['interface'] = $_GET['if']; + $pconfig['mac'] = $_GET['mac']; + $pconfig['descr'] = $_GET['descr']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "interface mac"); + $reqdfieldsn = array(gettext("Interface"), gettext("MAC address")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */ + $_POST['mac'] = strtolower(str_replace("-", ":", $_POST['mac'])); + + if (($_POST['mac'] && !is_macaddr($_POST['mac']))) { + $input_errors[] = gettext("A valid MAC address must be specified."); + } + + if (!$input_errors) { + $wolent = array(); + $wolent['interface'] = $_POST['interface']; + $wolent['mac'] = $_POST['mac']; + $wolent['descr'] = $_POST['descr']; + + if (isset($id) && $a_wol[$id]) { + $a_wol[$id] = $wolent; + } else { + $a_wol[] = $wolent; + } + wol_sort(); + + write_config(); + + header("Location: services_wol.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("Wake on LAN"), gettext("Edit")); +include("head.inc"); + +?> + + + + +
                            + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            +
                              + " /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/shortcuts.inc b/src/usr/local/www/shortcuts.inc new file mode 100644 index 0000000..c4bf48e --- /dev/null +++ b/src/usr/local/www/shortcuts.inc @@ -0,0 +1,289 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +/* + pfSense_MODULE: system +*/ + +// On the page, add in like so: +// $shortcut_section = "relayd"; + +$shortcuts = array(); + +/* Load and process custom shortcuts. */ +function get_shortcut_files($directory) { + $dir_array = array(); + if (!is_dir($directory)) { + return; + } + if ($dh = opendir($directory)) { + while (($file = readdir($dh)) !== false) { + $canadd = 0; + if ($file == ".") { + $canadd = 1; + } + if ($file == "..") { + $canadd = 1; + } + if ($canadd == 0) { + array_push($dir_array, $file); + } + } + closedir($dh); + } + if (!is_array($dir_array)) { + return; + } + return $dir_array; +} + +function get_shortcut_by_service_name($servicename) { + global $shortcuts; + foreach ($shortcuts as $name => $shortcut) { + if (!empty($shortcut['service']) && ($shortcut['service'] == $servicename)) { + return $name; + } + } + return null; +} + +function get_shortcut_main_link($shortcut_section, $addspace = true, $service = array()) { + global $g, $shortcuts; + if (empty($shortcut_section)) { + return ""; + } + $space = ($addspace) ? " " : "" ; + switch ($shortcut_section) { + case "openvpn": + if (!empty($service['mode']) && is_numeric($service['id'])) { + $link = "vpn_openvpn_{$service['mode']}.php?act=edit&id={$service['id']}"; + } else { + $link = $shortcuts[$shortcut_section]['main']; + } + break; + case "captiveportal": + if (!empty($service['zone'])) { + $link = "services_captiveportal.php?zone={$service['zone']}"; + } else { + $link = $shortcuts[$shortcut_section]['main']; + } + break; + default: + $link = $shortcuts[$shortcut_section]['main']; + break; + } + if (!empty($link) && ($_SERVER['REQUEST_URI'] != "/{$link}")) { + return "{$space}\"plus\""; + } +} + +function get_shortcut_status_link($shortcut_section, $addspace = true, $service = array()) { + global $g, $shortcuts, $cpzone; + if (empty($shortcut_section)) { + return ""; + } + $space = ($addspace) ? " " : "" ; + if (!empty($cpzone)) { + $zone = $cpzone; + } elseif (!empty($service['zone'])) { + $zone = $service['zone']; + } + switch ($shortcut_section) { + case "captiveportal": + if (!empty($zone)) { + $link = "status_captiveportal.php?zone={$zone}"; + } else { + $link = $shortcuts[$shortcut_section]['status']; + } + break; + default: + $link = $shortcuts[$shortcut_section]['status']; + break; + } + if (!empty($link)) { + return "{$space}\"status\""; + } +} + +function get_shortcut_log_link($shortcut_section, $addspace = true) { + global $g, $shortcuts; + $space = ($addspace) ? " " : "" ; + if (!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['log'])) { + return "{$space}\"logs\""; + } +} + +// Load shortcuts +$dir_array = get_shortcut_files("/usr/local/www/shortcuts"); +foreach ($dir_array as $file) { + if (!is_dir("/usr/local/www/shortcuts/{$file}") && stristr($file, ".inc")) { + include("/usr/local/www/shortcuts/{$file}"); + } +} +if (is_dir("/usr/local/pkg/shortcuts")) { + $dir_array = get_shortcut_files("/usr/local/pkg/shortcuts"); + foreach ($dir_array as $file) { + if (!is_dir("/usr/local/pkg/shortcuts/{$file}") && stristr($file, ".inc")) { + include("/usr/local/pkg/shortcuts/{$file}"); + } + } +} + +$shortcuts['relayd'] = array(); +$shortcuts['relayd']['main'] = "load_balancer_pool.php"; +$shortcuts['relayd']['log'] = "diag_logs_relayd.php"; +$shortcuts['relayd']['status'] = "status_lb_pool.php"; +$shortcuts['relayd']['service'] = "relayd"; + +$shortcuts['relayd-virtualservers'] = array(); +$shortcuts['relayd-virtualservers']['main'] = "load_balancer_virtual_server.php"; +$shortcuts['relayd-virtualservers']['log'] = "diag_logs_relayd.php"; +$shortcuts['relayd-virtualservers']['status'] = "status_lb_vs.php"; +$shortcuts['relayd-virtualservers']['service'] = "relayd"; + +$shortcuts['captiveportal'] = array(); +$shortcuts['captiveportal']['main'] = "services_captiveportal_zones.php"; +$shortcuts['captiveportal']['log'] = "diag_logs_auth.php"; +$shortcuts['captiveportal']['status'] = "status_captiveportal.php"; +$shortcuts['captiveportal']['service'] = "captiveportal"; + +$shortcuts['captiveportal-vouchers'] = array(); +$shortcuts['captiveportal-vouchers']['log'] = "diag_logs_auth.php"; +$shortcuts['captiveportal-vouchers']['status'] = "status_captiveportal_vouchers.php"; +$shortcuts['captiveportal-vouchers']['service'] = "captiveportal"; + +$shortcuts['dhcp'] = array(); +$shortcuts['dhcp']['main'] = "services_dhcp.php"; +$shortcuts['dhcp']['log'] = "diag_logs_dhcp.php"; +$shortcuts['dhcp']['status'] = "status_dhcp_leases.php"; +$shortcuts['dhcp']['service'] = "dhcpd"; + +$shortcuts['dhcp6'] = array(); +$shortcuts['dhcp6']['main'] = "services_dhcpv6.php"; +$shortcuts['dhcp6']['log'] = "diag_logs_dhcp.php"; +$shortcuts['dhcp6']['status'] = "status_dhcpv6_leases.php"; + + +$shortcuts['ipsec'] = array(); +$shortcuts['ipsec']['main'] = "vpn_ipsec.php"; +$shortcuts['ipsec']['log'] = "diag_logs_ipsec.php"; +$shortcuts['ipsec']['status'] = "diag_ipsec.php"; +$shortcuts['ipsec']['service'] = "ipsec"; + +$shortcuts['openvpn'] = array(); +$shortcuts['openvpn']['main'] = "vpn_openvpn_server.php"; +$shortcuts['openvpn']['log'] = "diag_logs_openvpn.php"; +$shortcuts['openvpn']['status'] = "status_openvpn.php"; +$shortcuts['openvpn']['service'] = "openvpn"; + +$shortcuts['firewall'] = array(); +$shortcuts['firewall']['main'] = "firewall_rules.php"; +$shortcuts['firewall']['log'] = "diag_logs_filter.php"; +$shortcuts['firewall']['status'] = "status_filter_reload.php"; + +$shortcuts['routing'] = array(); +$shortcuts['routing']['main'] = "system_routes.php"; +$shortcuts['routing']['log'] = "diag_logs_routing.php"; +$shortcuts['routing']['status'] = "diag_routes.php"; + +$shortcuts['gateways'] = array(); +$shortcuts['gateways']['main'] = "system_gateways.php"; +$shortcuts['gateways']['log'] = "diag_logs_gateways.php"; +$shortcuts['gateways']['status'] = "status_gateways.php"; +$shortcuts['gateways']['service'] = "apinger"; + +$shortcuts['gateway-groups'] = array(); +$shortcuts['gateway-groups']['main'] = "system_gateway_groups.php"; +$shortcuts['gateway-groups']['log'] = "diag_logs_gateways.php"; +$shortcuts['gateway-groups']['status'] = "status_gateway_groups.php"; + +$shortcuts['interfaces'] = array(); +$shortcuts['interfaces']['main'] = "interfaces_assign.php"; +$shortcuts['interfaces']['status'] = "status_interfaces.php"; + +$shortcuts['trafficshaper'] = array(); +$shortcuts['trafficshaper']['main'] = "firewall_shaper.php"; +$shortcuts['trafficshaper']['status'] = "status_queues.php"; + +$shortcuts['trafficshaper-limiters'] = array(); +$shortcuts['trafficshaper-limiters']['main'] = "firewall_shaper_vinterface.php"; +$shortcuts['trafficshaper-limiters']['status'] = "diag_limiter_info.php"; + +$shortcuts['forwarder'] = array(); +$shortcuts['forwarder']['main'] = "services_dnsmasq.php"; +$shortcuts['forwarder']['log'] = "diag_logs_resolver.php"; +$shortcuts['forwarder']['service'] = "dnsmasq"; + +$shortcuts['resolver'] = array(); +$shortcuts['resolver']['main'] = "services_unbound.php"; +$shortcuts['resolver']['log'] = "diag_logs_resolver.php"; +$shortcuts['resolver']['service'] = "unbound"; + +$shortcuts['wireless'] = array(); +$shortcuts['wireless']['main'] = "interfaces_wireless.php"; +$shortcuts['wireless']['log'] = "diag_logs_wireless.php"; +$shortcuts['wireless']['status'] = "status_wireless.php"; + +$shortcuts['ntp'] = array(); +$shortcuts['ntp']['main'] = "services_ntpd.php"; +$shortcuts['ntp']['log'] = "diag_logs_ntpd.php"; +$shortcuts['ntp']['status'] = "status_ntpd.php"; +$shortcuts['ntp']['service'] = "ntpd"; + +$shortcuts['pptps'] = array(); +$shortcuts['pptps']['main'] = "vpn_pptp.php"; +$shortcuts['pptps']['log'] = "diag_logs_vpn.php"; + +$shortcuts['pppoes'] = array(); +$shortcuts['pppoes']['main'] = "vpn_pppoe.php"; +$shortcuts['pppoes']['log'] = "diag_logs_vpn.php?vpntype=poes"; + +$shortcuts['l2tps'] = array(); +$shortcuts['l2tps']['main'] = "vpn_l2tp.php"; +$shortcuts['l2tps']['log'] = "diag_logs_vpn.php?vpntype=l2tp"; + +$shortcuts['carp'] = array(); +$shortcuts['carp']['main'] = "system_hasync.php"; +$shortcuts['carp']['status'] = "carp_status.php"; + +$shortcuts['snmp'] = array(); +$shortcuts['snmp']['main'] = "services_snmp.php"; +$shortcuts['snmp']['service'] = "bsnmpd"; + +$shortcuts['authentication'] = array(); +$shortcuts['authentication']['main'] = "system_authservers.php"; +$shortcuts['authentication']['status'] = "diag_authentication.php"; + +$shortcuts['aliases'] = array(); +$shortcuts['aliases']['main'] = "firewall_aliases.php"; +$shortcuts['aliases']['status'] = "diag_tables.php"; +?> diff --git a/src/usr/local/www/shortcuts/pkg_upnp.inc b/src/usr/local/www/shortcuts/pkg_upnp.inc new file mode 100644 index 0000000..2b068a7 --- /dev/null +++ b/src/usr/local/www/shortcuts/pkg_upnp.inc @@ -0,0 +1,11 @@ + diff --git a/src/usr/local/www/stats.php b/src/usr/local/www/stats.php new file mode 100644 index 0000000..6f34673 --- /dev/null +++ b/src/usr/local/www/stats.php @@ -0,0 +1,46 @@ + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-cpuutilization +##|*NAME=Diagnostics: CPU Utilization page +##|*DESCR=Allow access to the 'Diagnostics: CPU Utilization' page. +##|*MATCH=stats.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("includes/functions.inc.php"); + +$cpu = cpu_usage(); + +echo $cpu; +exit; + +?> diff --git a/src/usr/local/www/status.php b/src/usr/local/www/status.php new file mode 100755 index 0000000..6561c98 --- /dev/null +++ b/src/usr/local/www/status.php @@ -0,0 +1,281 @@ + Nov 2003 + * + * (modified for m0n0wall by Manuel Kasper ) + * (modified for pfSense by Scott Ullrich geekgod@pfsense.com) + * + */ +/* + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/bin/vmstat /usr/bin/netstat /sbin/dmesg /sbin/mount /sbin/setkey /usr/local/sbin/pftop + pfSense_BUILDER_BINARIES: /sbin/pfctl /sbin/sysctl /usr/bin/top /usr/bin/netstat /sbin/pfctl /sbin/ifconfig + pfSense_MODULE: support +*/ + +##|+PRIV +##|*IDENT=page-hidden-detailedstatus +##|*NAME=Hidden: Detailed Status page +##|*DESCR=Allow access to the 'Hidden: Detailed Status' page. +##|*MATCH=status.php* +##|-PRIV + +/* Execute a command, with a title, and generate an HTML table + * showing the results. + */ + +/* include all configuration functions */ +require_once("guiconfig.inc"); +require_once("functions.inc"); +$output_path = "/tmp/status_output/"; +$output_file = "/tmp/status_output.tgz"; + +if (is_dir($output_path)) { + unlink_if_exists("{$output_path}/*"); + @rmdir($output_path); +} +unlink_if_exists($output_file); +mkdir($output_path); + +function doCmdT($title, $command) { + global $output_path, $output_file; + /* Fixup output directory */ + + $rubbish = array('|', '-', '/', '.', ' '); /* fixes the tag to be W3C compliant */ + echo "\n\n"; + echo "\n"; + echo "\t\n"; + echo "\t\n\t\t\n\t\n"; + echo "
                            " . $title . "
                            \n\t\t\t
                            ";		/* no newline after pre */
                            +
                            +	if ($command == "dumpconfigxml") {
                            +		$ofd = @fopen("{$output_path}/config-sanitized.xml", "w");
                            +		$fd = @fopen("/conf/config.xml", "r");
                            +		if ($fd) {
                            +			while (!feof($fd)) {
                            +				$line = fgets($fd);
                            +				/* remove sensitive contents */
                            +				$line = preg_replace("/.*?<\\/password>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/pre-shared-key>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/rocommunity>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/prv>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/shared_key>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/tls>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/ipsecpsk>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/md5-hash>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/md5password>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/radius_secret>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/ldap_bindpw>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/passwordagain>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/crypto_password>/", "xxxxx", $line);
                            +				$line = preg_replace("/.*?<\\/crypto_password2>/", "xxxxx", $line);
                            +				$line = str_replace("\t", "    ", $line);
                            +				echo htmlspecialchars($line, ENT_NOQUOTES);
                            +				fwrite($ofd, $line);
                            +			}
                            +		}
                            +		fclose($fd);
                            +		fclose($ofd);
                            +	} else {
                            +		$ofd = @fopen("{$output_path}/{$title}.txt", "w");
                            +		$execOutput = "";
                            +		$execStatus = "";
                            +		exec ($command . " 2>&1", $execOutput, $execStatus);
                            +		for ($i = 0; isset($execOutput[$i]); $i++) {
                            +			if ($i > 0) {
                            +				echo "\n";
                            +			}
                            +			echo htmlspecialchars($execOutput[$i], ENT_NOQUOTES);
                            +			fwrite($ofd, $execOutput[$i] . "\n");
                            +		}
                            +		fclose($ofd);
                            +	}
                            +    echo "\n\t\t\t
                            \n\t\t
                            \n"; +} + +/* Define a command, with a title, to be executed later. */ +function defCmdT($title, $command) { + global $commands; + $title = htmlspecialchars($title, ENT_NOQUOTES); + $commands[] = array($title, $command); +} + +/* List all of the commands as an index. */ +function listCmds() { + global $commands; + $rubbish = array('|', '-', '/', '.', ' '); /* fixes the tag to be W3C compliant */ + echo "\n

                            " . gettext("This status page includes the following information") . ":\n"; + echo "

                            \n"; +} + +/* Execute all of the commands which were defined by a call to defCmd. */ +function execCmds() { + global $commands; + for ($i = 0; isset($commands[$i]); $i++) { + doCmdT($commands[$i][0], $commands[$i][1]); + } +} + +global $g, $config; + +/* Set up all of the commands we want to execute. */ + +/* System stats/info */ +defCmdT("System uptime", "/usr/bin/uptime"); +defCmdT("Interfaces", "/sbin/ifconfig -a"); +defCmdT("Interface Statistics","/usr/bin/netstat -ni"); +defCmdT("Top Process Info", "/usr/bin/top | /usr/bin/head -n5"); +defCmdT("Processes", "/bin/ps xauww"); +defCmdT("Mounted Filesystems", "/sbin/mount"); +defCmdT("Free Disk Space", "/bin/df -hi"); +defCmdT("Routing tables", "/usr/bin/netstat -nWr"); +defCmdT("Mbuf Usage", "/usr/bin/netstat -mb"); +defCmdT("VMStat", "/usr/bin/vmstat -afimsz"); +defCmdT("Sockets", "/usr/bin/sockstat"); + +/* Firewall rules and info */ +defCmdT("Generated Ruleset", "/bin/cat {$g['tmp_path']}/rules.debug"); +defCmdT("Generated Ruleset Limiters", "/bin/cat {$g['tmp_path']}/rules.limiter"); +defCmdT("Generated Ruleset Limits", "/bin/cat {$g['tmp_path']}/rules.limits"); +defCmdT("pf NAT Rules", "/sbin/pfctl -vvsn"); +defCmdT("pf Firewall Rules", "/sbin/pfctl -vvsr"); +defCmdT("pf Tables", "/sbin/pfctl -vs Tables"); +defCmdT("pf State Table Contents", "/sbin/pfctl -ss"); +defCmdT("pf Info", "/sbin/pfctl -si"); +defCmdT("pf Show All", "/sbin/pfctl -sa"); +defCmdT("pf Queues", "/sbin/pfctl -s queue -v"); +defCmdT("pf OSFP", "/sbin/pfctl -s osfp"); +defCmdT("pfsync stats", "/usr/bin/netstat -s -ppfsync"); +defCmdT("pftop Default", "/usr/local/sbin/pftop -a -b"); +defCmdT("pftop Long", "/usr/local/sbin/pftop -w 150 -a -b -v long"); +defCmdT("pftop Queue", "/usr/local/sbin/pftop -w 150 -a -b -v queue"); +defCmdT("pftop Rules", "/usr/local/sbin/pftop -w 150 -a -b -v rules"); +defCmdT("pftop Size", "/usr/local/sbin/pftop -w 150 -a -b -v size"); +defCmdT("pftop Speed", "/usr/local/sbin/pftop -w 150 -a -b -v speed"); +if (isset($config['captiveportal']) && is_array($config['captiveportal'])) { + foreach ($config['captiveportal'] as $cpZone => $cpdata) { + if (isset($cpdata['enable'])) { + defCmdT("IPFW rules for {$cpdata['zoneid']}", "/sbin/ipfw -x " . escapeshellarg($cpdata['zoneid']) . " show"); + } + } +} + +/* Configuration Files */ +defCmdT("Contents of /var/run", "/bin/ls /var/run"); +defCmdT("Contents of /conf", "/bin/ls /conf"); +defCmdT("config.xml", "dumpconfigxml"); +defCmdT("resolv.conf", "/bin/cat /etc/resolv.conf"); +defCmdT("DHCP Configuration", "/bin/cat /var/dhcpd/etc/dhcpd.conf"); +defCmdT("DHCPv6 Configuration", "/bin/cat /var/dhcpd/etc/dhcpdv6.conf"); +defCmdT("strongSwan config", "/bin/cat /var/etc/ipsec/strongswan.conf"); +defCmdT("IPsec config", "/bin/cat /var/etc/ipsec/ipsec.conf"); +defCmdT("SPD", "/sbin/setkey -DP"); +defCmdT("SAD", "/sbin/setkey -D"); +if (file_exists("/cf/conf/upgrade_log.txt")) { + defCmdT("Upgrade Log", "/bin/cat /cf/conf/upgrade_log.txt"); +} +if (file_exists("/boot/loader.conf")) { + defCmdT("Loader Configuration", "/bin/cat /boot/loader.conf"); +} +if (file_exists("/boot/loader.conf.local")) { + defCmdT("Loader Configuration (Local)", "/bin/cat /boot/loader.conf.local"); +} +if (file_exists("/var/run/apinger.status")) { + defCmdT("Gateway Status", "/bin/cat /var/run/apinger.status"); +} +if (file_exists("/var/etc/apinger.conf")) { + defCmdT("Gateway Monitoring Config", "/bin/cat /var/etc/apinger.conf"); +} +if (file_exists("/var/etc/filterdns.conf")) { + defCmdT("Filter DNS Daemon Config", "/bin/cat /var/etc/filterdns.conf"); +} +if (isset($config['system']['usefifolog'])) { + defCmdT("last 200 system log entries", "/usr/sbin/fifolog_reader /var/log/system.log 2>&1 | tail -n 200"); + defCmdT("last 50 filter log entries", "/usr/sbin/fifolog_reader /var/log/filter.log 2>&1 | tail -n 50"); +} else { + defCmdT("last 200 system log entries", "/usr/local/sbin/clog /var/log/system.log 2>&1 | tail -n 200"); + defCmdT("last 50 filter log entries", "/usr/local/sbin/clog /var/log/filter.log 2>&1 | tail -n 50"); +} +if (file_exists("/tmp/PHP_errors.log")) { + defCmdT("PHP Error Log", "/bin/cat /tmp/PHP_errors.log"); +} +defCmdT("System Message Buffer", "/sbin/dmesg -a"); +defCmdT("System Message Buffer (Boot)", "/bin/cat /var/log/dmesg.boot"); +defCmdT("sysctl values", "/sbin/sysctl -a"); + +exec("/bin/date", $dateOutput, $dateStatus); +$currentDate = $dateOutput[0]; + +$pgtitle = array("{$g['product_name']}", "status"); +include("head.inc"); + +?> + + + + + +

                            !
                            +.

                            + + Command Prompt")?> + +

                            + + + +
                            +
                            + + + + + + + diff --git a/src/usr/local/www/status_captiveportal.php b/src/usr/local/www/status_captiveportal.php new file mode 100644 index 0000000..d88a452 --- /dev/null +++ b/src/usr/local/www/status_captiveportal.php @@ -0,0 +1,260 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-status-captiveportal +##|*NAME=Status: Captive portal page +##|*DESCR=Allow access to the 'Status: Captive portal' page. +##|*MATCH=status_captiveportal.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +$pgtitle = array(gettext("Status: Captive portal")); +$shortcut_section = "captiveportal"; + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +if (count($a_cp) == 1) { + $cpzone = current(array_keys($a_cp)); +} + +/* If the zone does not exist, do not display the invalid zone */ +if (!array_key_exists($cpzone, $a_cp)) { + $cpzone = ""; +} + +if (isset($cpzone) && !empty($cpzone) && isset($a_cp[$cpzone]['zoneid'])) { + $cpzoneid = $a_cp[$cpzone]['zoneid']; +} + +if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid) && isset($_GET['id'])) { + captiveportal_disconnect_client($_GET['id']); + header("Location: status_captiveportal.php?zone={$cpzone}"); + exit; +} + +include("head.inc"); + +?> + + + + + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            +


                            +
                            + 1) { +?> +
                            + +
                            +
                            + +

                            +{$mac_man[$mac_hi]}"; + } + } +?> +   +   + ')">"> +
                            + + +
                            + + +
                            + + + + + " /> + + + " /> + + + +
                            + + + + diff --git a/src/usr/local/www/status_captiveportal_expire.php b/src/usr/local/www/status_captiveportal_expire.php new file mode 100644 index 0000000..7d786b4 --- /dev/null +++ b/src/usr/local/www/status_captiveportal_expire.php @@ -0,0 +1,126 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-status-captiveportal-expire +##|*NAME=Status: Captive portal Expire Vouchers page +##|*DESCR=Allow access to the 'Status: Captive portal Expire Vouchers' page. +##|*MATCH=status_captiveportal_expire.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); +require_once("voucher.inc"); + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone)) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Expire Vouchers"), $a_cp[$cpzone]['zone']); + +include("head.inc"); +?> + + + +
                            + + + + + +
                            + +
                            + + + + + + + + + + +
                            + +
                            + . +
                              + + " /> +
                            +
                            +
                            +
                            +\n"; + if ($result) { + echo "\"pass\""; + echo "Success"; + } else { + echo "\"block\""; + echo "Error"; + } + echo ""; + } +} + +include("fend.inc"); +?> + + diff --git a/src/usr/local/www/status_captiveportal_test.php b/src/usr/local/www/status_captiveportal_test.php new file mode 100644 index 0000000..2a3dfc3 --- /dev/null +++ b/src/usr/local/www/status_captiveportal_test.php @@ -0,0 +1,128 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-status-captiveportal-test +##|*NAME=Status: Captive portal test Vouchers page +##|*DESCR=Allow access to the 'Status: Captive portal Test Vouchers' page. +##|*MATCH=status_captiveportal_test.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); +require_once("voucher.inc"); + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone)) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; + +$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Test Vouchers"), $a_cp[$cpzone]['zone']); +$shortcut_section = "captiveportal-vouchers"; + +include("head.inc"); +?> + + + +
                            + + + + + +
                            + +
                            + + + + + + + + + +
                            + +
                            + . +
                              + + " /> +
                            +
                            +
                            +
                            +\n"; + foreach ($test_results as $result) { + if (strpos($result, " good ") || strpos($result, " granted ")) { + echo "\"pass\""; + echo "$result"; + } else { + echo "\"block\""; + echo "$result"; + } + } + echo ""; + } +} + +include("fend.inc"); +?> + + diff --git a/src/usr/local/www/status_captiveportal_voucher_rolls.php b/src/usr/local/www/status_captiveportal_voucher_rolls.php new file mode 100644 index 0000000..512356b --- /dev/null +++ b/src/usr/local/www/status_captiveportal_voucher_rolls.php @@ -0,0 +1,147 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-status-captiveportal-voucher-rolls +##|*NAME=Status: Captive portal Voucher Rolls page +##|*DESCR=Allow access to the 'Status: Captive portal Voucher Rolls' page. +##|*MATCH=status_captiveportal_voucher_rolls.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); +require_once("voucher.inc"); + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone)) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; +$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Voucher Rolls"), $a_cp[$cpzone]['zone']); +$shortcut_section = "captiveportal-vouchers"; + +if (!is_array($config['voucher'][$cpzone]['roll'])) { + $config['voucher'][$cpzone]['roll'] = array(); +} +$a_roll = &$config['voucher'][$cpzone]['roll']; + +include("head.inc"); +?> + + + +
                            + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + +
                            +   + +   + +   + +   + +   + +   + +   +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/status_captiveportal_vouchers.php b/src/usr/local/www/status_captiveportal_vouchers.php new file mode 100644 index 0000000..a7ab959 --- /dev/null +++ b/src/usr/local/www/status_captiveportal_vouchers.php @@ -0,0 +1,150 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: captiveportal +*/ + +##|+PRIV +##|*IDENT=page-status-captiveportal-vouchers +##|*NAME=Status: Captive portal Vouchers page +##|*DESCR=Allow access to the 'Status: Captive portal Vouchers' page. +##|*MATCH=status_captiveportal_vouchers.php* +##|-PRIV + +require("guiconfig.inc"); +require("functions.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require("captiveportal.inc"); +require_once("voucher.inc"); + +$cpzone = $_GET['zone']; +if (isset($_POST['zone'])) { + $cpzone = $_POST['zone']; +} + +if (empty($cpzone)) { + header("Location: services_captiveportal_zones.php"); + exit; +} + +if (!is_array($config['captiveportal'])) { + $config['captiveportal'] = array(); +} +$a_cp =& $config['captiveportal']; +$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Vouchers"), $a_cp[$cpzone]['zone']); +$shortcut_section = "captiveportal-vouchers"; + +function clientcmp($a, $b) { + global $order; + return strcmp($a[$order], $b[$order]); +} + +if (!is_array($config['voucher'][$cpzone]['roll'])) { + $config['voucher'][$cpzone]['roll'] = array(); +} +$a_roll = $config['voucher'][$cpzone]['roll']; + +$db = array(); + +foreach ($a_roll as $rollent) { + $roll = $rollent['number']; + $minutes = $rollent['minutes']; + + if (!file_exists("{$g['vardb_path']}/voucher_{$cpzone}_active_$roll.db")) { + continue; + } + + $active_vouchers = file("{$g['vardb_path']}/voucher_{$cpzone}_active_$roll.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach ($active_vouchers as $voucher => $line) { + list($voucher, $timestamp, $minutes) = explode(",", $line); + $remaining = (($timestamp + 60*$minutes) - time()); + if ($remaining > 0) { + $dbent[0] = $voucher; + $dbent[1] = $roll; + $dbent[2] = $timestamp; + $dbent[3] = intval($remaining/60); + $dbent[4] = $timestamp + 60*$minutes; // expires at + $db[] = $dbent; + } + } +} + +if ($_GET['order']) { + $order = $_GET['order']; + usort($db, "clientcmp"); +} + +include("head.inc"); +?> + + + +
                            + + + + + +
                            + +
                            + + + + + + + + + + + + + + + + + + + +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/status_dhcp_leases.php b/src/usr/local/www/status_dhcp_leases.php new file mode 100644 index 0000000..4c37f21 --- /dev/null +++ b/src/usr/local/www/status_dhcp_leases.php @@ -0,0 +1,457 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /usr/bin/awk /bin/cat /usr/sbin/arp /usr/bin/wc /usr/bin/grep + pfSense_MODULE: dhcpserver +*/ + +##|+PRIV +##|*IDENT=page-status-dhcpleases +##|*NAME=Status: DHCP leases page +##|*DESCR=Allow access to the 'Status: DHCP leases' page. +##|*MATCH=status_dhcp_leases.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("config.inc"); + +$pgtitle = array(gettext("Status"), gettext("DHCP leases")); +$shortcut_section = "dhcp"; + +$leasesfile = "{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases"; + +if (($_GET['deleteip']) && (is_ipaddr($_GET['deleteip']))) { + /* Stop DHCPD */ + killbyname("dhcpd"); + + /* Read existing leases */ + /* $leases_contents has the lines of the file, including the newline char at the end of each line. */ + $leases_contents = file($leasesfile); + $newleases_contents = array(); + $i = 0; + while ($i < count($leases_contents)) { + /* Find the lease(s) we want to delete */ + if ($leases_contents[$i] == "lease {$_GET['deleteip']} {\n") { + /* Skip to the end of the lease declaration */ + do { + $i++; + } while ($leases_contents[$i] != "}\n"); + } else { + /* It's a line we want to keep, copy it over. */ + $newleases_contents[] = $leases_contents[$i]; + } + $i++; + } + + /* Write out the new leases file */ + $fd = fopen($leasesfile, 'w'); + fwrite($fd, implode("\n", $newleases_contents)); + fclose($fd); + + /* Restart DHCP Service */ + services_dhcpd_configure(); + header("Location: status_dhcp_leases.php?all={$_GET['all']}"); +} + +include("head.inc"); + +?> + + + + $rien) { + $new[] = $array[$k]; + } + return $new; +} + +$awk = "/usr/bin/awk"; +/* this pattern sticks comments into a single array item */ +$cleanpattern = "'{ gsub(\"#.*\", \"\");} { gsub(\";\", \"\"); print;}'"; +/* We then split the leases file by } */ +$splitpattern = "'BEGIN { RS=\"}\";} {for (i=1; i<=NF; i++) printf \"%s \", \$i; printf \"}\\n\";}'"; + +/* stuff the leases file in a proper format into a array by line */ +exec("/bin/cat {$leasesfile} | {$awk} {$cleanpattern} | {$awk} {$splitpattern}", $leases_content); +$leases_count = count($leases_content); +exec("/usr/sbin/arp -an", $rawdata); +$arpdata_ip = array(); +$arpdata_mac = array(); +foreach ($rawdata as $line) { + $elements = explode(' ', $line); + if ($elements[3] != "(incomplete)") { + $arpent = array(); + $arpdata_ip[] = trim(str_replace(array('(', ')'), '', $elements[1])); + $arpdata_mac[] = strtolower(trim($elements[3])); + } +} +unset($rawdata); +$pools = array(); +$leases = array(); +$i = 0; +$l = 0; +$p = 0; + +// Put everything together again +foreach ($leases_content as $lease) { + /* split the line by space */ + $data = explode(" ", $lease); + /* walk the fields */ + $f = 0; + $fcount = count($data); + /* with less than 20 fields there is nothing useful */ + if ($fcount < 20) { + $i++; + continue; + } + while ($f < $fcount) { + switch ($data[$f]) { + case "failover": + $pools[$p]['name'] = trim($data[$f+2], '"'); + $pools[$p]['name'] = "{$pools[$p]['name']} (" . convert_friendly_interface_to_friendly_descr(substr($pools[$p]['name'], 5)) . ")"; + $pools[$p]['mystate'] = $data[$f+7]; + $pools[$p]['peerstate'] = $data[$f+14]; + $pools[$p]['mydate'] = $data[$f+10]; + $pools[$p]['mydate'] .= " " . $data[$f+11]; + $pools[$p]['peerdate'] = $data[$f+17]; + $pools[$p]['peerdate'] .= " " . $data[$f+18]; + $p++; + $i++; + continue 3; + case "lease": + $leases[$l]['ip'] = $data[$f+1]; + $leases[$l]['type'] = "dynamic"; + $f = $f+2; + break; + case "starts": + $leases[$l]['start'] = $data[$f+2]; + $leases[$l]['start'] .= " " . $data[$f+3]; + $f = $f+3; + break; + case "ends": + if ($data[$f+1] == "never") { + // Quote from dhcpd.leases(5) man page: + // If a lease will never expire, date is never instead of an actual date. + $leases[$l]['end'] = gettext("Never"); + $f = $f+1; + } else { + $leases[$l]['end'] = $data[$f+2]; + $leases[$l]['end'] .= " " . $data[$f+3]; + $f = $f+3; + } + break; + case "tstp": + $f = $f+3; + break; + case "tsfp": + $f = $f+3; + break; + case "atsfp": + $f = $f+3; + break; + case "cltt": + $f = $f+3; + break; + case "binding": + switch ($data[$f+2]) { + case "active": + $leases[$l]['act'] = "active"; + break; + case "free": + $leases[$l]['act'] = "expired"; + $leases[$l]['online'] = "offline"; + break; + case "backup": + $leases[$l]['act'] = "reserved"; + $leases[$l]['online'] = "offline"; + break; + } + $f = $f+1; + break; + case "next": + /* skip the next binding statement */ + $f = $f+3; + break; + case "rewind": + /* skip the rewind binding statement */ + $f = $f+3; + break; + case "hardware": + $leases[$l]['mac'] = $data[$f+2]; + /* check if it's online and the lease is active */ + if (in_array($leases[$l]['ip'], $arpdata_ip)) { + $leases[$l]['online'] = 'online'; + } else { + $leases[$l]['online'] = 'offline'; + } + $f = $f+2; + break; + case "client-hostname": + if ($data[$f+1] <> "") { + $leases[$l]['hostname'] = preg_replace('/"/', '', $data[$f+1]); + } else { + $hostname = gethostbyaddr($leases[$l]['ip']); + if ($hostname <> "") { + $leases[$l]['hostname'] = $hostname; + } + } + $f = $f+1; + break; + case "uid": + $f = $f+1; + break; + } + $f++; + } + $l++; + $i++; + /* slowly chisel away at the source array */ + array_shift($leases_content); +} +/* remove the old array */ +unset($lease_content); + +/* remove duplicate items by mac address */ +if (count($leases) > 0) { + $leases = remove_duplicate($leases, "ip"); +} + +if (count($pools) > 0) { + $pools = remove_duplicate($pools, "name"); + asort($pools); +} + +foreach ($config['interfaces'] as $ifname => $ifarr) { + if (is_array($config['dhcpd'][$ifname]) && + is_array($config['dhcpd'][$ifname]['staticmap'])) { + $staticmap_array_index = 0; + foreach ($config['dhcpd'][$ifname]['staticmap'] as $static) { + $slease = array(); + $slease['ip'] = $static['ipaddr']; + $slease['type'] = "static"; + $slease['mac'] = $static['mac']; + $slease['if'] = $ifname; + $slease['start'] = ""; + $slease['end'] = ""; + $slease['hostname'] = htmlentities($static['hostname']); + $slease['act'] = "static"; + $slease['online'] = in_array(strtolower($slease['mac']), $arpdata_mac) ? 'online' : 'offline'; + $slease['staticmap_array_index'] = $staticmap_array_index; + $leases[] = $slease; + $staticmap_array_index++; + } + } +} + +if ($_GET['order']) { + usort($leases, "leasecmp"); +} + +/* only print pool status when we have one */ +if (count($pools) > 0) { +?> + + + + + + + + +\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } +?> +
                            {$fspans}{$data['name']}{$fspane}{$fspans}{$data['mystate']}{$fspane}{$fspans}" . adjust_gmt($data['mydate']) . "{$fspane}{$fspans}{$data['peerstate']}{$fspane}{$fspans}" . adjust_gmt($data['peerdate']) . "{$fspane}  
                            + + + +
                            + + + + + + + + + + + +"; + $fspane = " "; + } else { + $fspans = ""; + $fspane = " "; + } + $lip = ip2ulong($data['ip']); + if ($data['act'] != "static") { + foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) { + if (!is_array($dhcpifconf['range'])) { + continue; + } + if (($lip >= ip2ulong($dhcpifconf['range']['from'])) && ($lip <= ip2ulong($dhcpifconf['range']['to']))) { + $data['if'] = $dhcpif; + break; + } + // Check if the IP is in the range of any DHCP pools + if (is_array($dhcpifconf['pool'])) { + foreach ($dhcpifconf['pool'] as $dhcppool) { + if (is_array($dhcppool['range'])) { + if (($lip >= ip2ulong($dhcppool['range']['from'])) && ($lip <= ip2ulong($dhcppool['range']['to']))) { + $data['if'] = $dhcpif; + break 2; + } + } + } + } + } + } + echo "\n"; + echo "\n"; + $mac=$data['mac']; + $mac_hi = strtoupper($mac[0] . $mac[1] . $mac[3] . $mac[4] . $mac[6] . $mac[7]); + if ($data['online'] != "online") { + if (isset($mac_man[$mac_hi])) { // Manufacturer for this MAC is defined + echo "\n"; + } else { + echo "\n"; + } + } else { + if (isset($mac_man[$mac_hi])) { // Manufacturer for this MAC is defined + echo "\n"; + } else { + echo "\n"; + } + } + echo "\n"; + if ($data['type'] != "static") { + echo "\n"; + echo "\n"; + } else { + echo "\n"; + echo "\n"; + } + echo "\n"; + echo "\n"; + echo "\n"; + } +} + +?> +
                            {$fspans}{$data['ip']}{$fspane}{$fspans}{$mac}
                            {$mac_man[$mac_hi]}{$fspane}
                            {$fspans}{$data['mac']}{$fspane}{$fspans}{$mac}
                            {$mac_man[$mac_hi]}{$fspane}
                            {$fspans}{$data['mac']}{$fspane}{$fspans}" . htmlentities($data['hostname']) . "{$fspane}{$fspans}" . adjust_gmt($data['start']) . "{$fspane}{$fspans}" . adjust_gmt($data['end']) . "{$fspane}{$fspans} n/a {$fspane}{$fspans} n/a {$fspane}{$fspans}{$data['online']}{$fspane}{$fspans}{$data['act']}{$fspane} "; + if ($data['type'] == "dynamic") { + echo ""; + echo "\"add\" \n"; + } else { + echo ""; + echo "\"add\" \n"; + } + + echo ""; + echo "\"add\" \n"; + + /* Only show the button for offline dynamic leases */ + if (($data['type'] == "dynamic") && ($data['online'] != "online")) { + echo ""; + echo "\"delete\" \n"; + } + echo "
                            +
                            +
                            + + + + " /> + + + " /> + +
                            + +

                            ?

                            + + + + + diff --git a/src/usr/local/www/status_dhcpv6_leases.php b/src/usr/local/www/status_dhcpv6_leases.php new file mode 100644 index 0000000..63f1946 --- /dev/null +++ b/src/usr/local/www/status_dhcpv6_leases.php @@ -0,0 +1,581 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /usr/bin/awk /bin/cat /usr/sbin/ndp /usr/bin/wc /usr/bin/grep + pfSense_MODULE: dhcpserver +*/ + +##|+PRIV +##|*IDENT=page-status-dhcpv6leases +##|*NAME=Status: DHCPv6 leases page +##|*DESCR=Allow access to the 'Status: DHCPv6 leases' page. +##|*MATCH=status_dhcpv6_leases.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("config.inc"); + +$pgtitle = array(gettext("Status"), gettext("DHCPv6 leases")); +$shortcut_section = "dhcp6"; + +$leasesfile = "{$g['dhcpd_chroot_path']}/var/db/dhcpd6.leases"; + +if (($_GET['deleteip']) && (is_ipaddr($_GET['deleteip']))) { + /* Stop DHCPD */ + killbyname("dhcpd"); + + /* Read existing leases */ + $leases_contents = explode("\n", file_get_contents($leasesfile)); + $newleases_contents = array(); + $i = 0; + while ($i < count($leases_contents)) { + /* Find the lease(s) we want to delete */ + if ($leases_contents[$i] == " iaaddr {$_GET['deleteip']} {") { + /* The iaaddr line is two lines down from the start of the lease, so remove those two lines. */ + array_pop($newleases_contents); + array_pop($newleases_contents); + /* Skip to the end of the lease declaration */ + do { + $i++; + } while ($leases_contents[$i] != "}"); + } else { + /* It's a line we want to keep, copy it over. */ + $newleases_contents[] = $leases_contents[$i]; + } + $i++; + } + + /* Write out the new leases file */ + $fd = fopen($leasesfile, 'w'); + fwrite($fd, implode("\n", $newleases_contents)); + fclose($fd); + + /* Restart DHCP Service */ + services_dhcpd_configure(); + header("Location: status_dhcpv6_leases.php?all={$_GET['all']}"); +} + +// Load MAC-Manufacturer table +$mac_man = load_mac_manufacturer_table(); + +include("head.inc"); + +?> + + + +getOffset($dhcp_lt); + $ts = $ts + $offset; + return strftime("%Y/%m/%d %I:%M:%S%p", $ts); + } else { + return strftime("%Y/%m/%d %H:%M:%S", $ts); + } +} + +function remove_duplicate($array, $field) { + foreach ($array as $sub) { + $cmp[] = $sub[$field]; + } + $unique = array_unique(array_reverse($cmp, true)); + foreach ($unique as $k => $rien) { + $new[] = $array[$k]; + } + return $new; +} + +function parse_duid($duid_string) { + $parsed_duid = array(); + for ($i = 0; $i < strlen($duid_string); $i++) { + $s = substr($duid_string, $i, 1); + if ($s == '\\') { + $n = substr($duid_string, $i+1, 1); + if (($n == '\\') || ($n == '"')) { + $parsed_duid[] = sprintf("%02x", ord($n)); + } elseif (is_numeric($n)) { + $parsed_duid[] = sprintf("%02x", octdec(substr($duid_string, $i+1, 3))); + $i += 3; + } + } else { + $parsed_duid[] = sprintf("%02x", ord($s)); + } + } + $iaid = array_slice($parsed_duid, 0, 4); + $duid = array_slice($parsed_duid, 4); + return array($iaid, $duid); +} + +$awk = "/usr/bin/awk"; + +/* this pattern sticks comments into a single array item */ +$cleanpattern = "'{ gsub(\"^#.*\", \"\");} { gsub(\"^server-duid.*\", \"\");} { gsub(\";$\", \"\"); print;}'"; +/* We then split the leases file by } */ +$splitpattern = "'BEGIN { RS=\"}\";} {for (i=1; i<=NF; i++) printf \"%s \", \$i; printf \"}\\n\";}'"; + +/* stuff the leases file in a proper format into a array by line */ +exec("/bin/cat {$leasesfile} | {$awk} {$cleanpattern} | {$awk} {$splitpattern} | /usr/bin/grep '^ia-.. '", $leases_content); +$leases_count = count($leases_content); +exec("/usr/sbin/ndp -an", $rawdata); +$ndpdata = array(); +foreach ($rawdata as $line) { + $elements = preg_split('/\s+/ ', $line); + if ($elements[1] != "(incomplete)") { + $ndpent = array(); + $ip = trim(str_replace(array('(', ')'), '', $elements[0])); + $ndpent['mac'] = trim($elements[1]); + $ndpent['interface'] = trim($elements[2]); + $ndpdata[$ip] = $ndpent; + } +} + +$pools = array(); +$leases = array(); +$prefixes = array(); +$mappings = array(); +$i = 0; +$l = 0; +$p = 0; + +// Put everything together again +while ($i < $leases_count) { + $entry = array(); + /* split the line by space */ + $duid_split = array(); + preg_match('/ia-.. "(.*)" { (.*)/ ', $leases_content[$i], $duid_split); + if (!empty($duid_split[1])) { + $iaid_duid = parse_duid($duid_split[1]); + $entry['iaid'] = hexdec(implode("", array_reverse($iaid_duid[0]))); + $entry['duid'] = implode(":", $iaid_duid[1]); + $data = explode(" ", $duid_split[2]); + } else { + $data = explode(" ", $leases_content[$i]); + } + /* walk the fields */ + $f = 0; + $fcount = count($data); + /* with less then 12 fields there is nothing useful */ + if ($fcount < 12) { + $i++; + continue; + } + while ($f < $fcount) { + switch ($data[$f]) { + case "failover": + $pools[$p]['name'] = $data[$f+2]; + $pools[$p]['mystate'] = $data[$f+7]; + $pools[$p]['peerstate'] = $data[$f+14]; + $pools[$p]['mydate'] = $data[$f+10]; + $pools[$p]['mydate'] .= " " . $data[$f+11]; + $pools[$p]['peerdate'] = $data[$f+17]; + $pools[$p]['peerdate'] .= " " . $data[$f+18]; + $p++; + $i++; + continue 3; + case "ia-pd": + $is_prefix = true; + case "ia-na": + $entry['iaid'] = $tmp_iaid; + $entry['duid'] = $tmp_duid; + if ($data[$f+1][0] == '"') { + $duid = ""; + /* FIXME: This needs a safety belt to prevent an infinite loop */ + while ($data[$f][strlen($data[$f])-1] != '"') { + $duid .= " " . $data[$f+1]; + $f++; + } + $entry['duid'] = $duid; + } else { + $entry['duid'] = $data[$f+1]; + } + $entry['type'] = "dynamic"; + $f = $f+2; + break; + case "iaaddr": + $entry['ip'] = $data[$f+1]; + $entry['type'] = "dynamic"; + if (in_array($entry['ip'], array_keys($ndpdata))) { + $entry['online'] = 'online'; + } else { + $entry['online'] = 'offline'; + } + $f = $f+2; + break; + case "iaprefix": + $is_prefix = true; + $entry['prefix'] = $data[$f+1]; + $entry['type'] = "dynamic"; + $f = $f+2; + break; + case "starts": + $entry['start'] = $data[$f+2]; + $entry['start'] .= " " . $data[$f+3]; + $f = $f+3; + break; + case "ends": + $entry['end'] = $data[$f+2]; + $entry['end'] .= " " . $data[$f+3]; + $f = $f+3; + break; + case "tstp": + $f = $f+3; + break; + case "tsfp": + $f = $f+3; + break; + case "atsfp": + $f = $f+3; + break; + case "cltt": + $entry['start'] = $data[$f+2]; + $entry['start'] .= " " . $data[$f+3]; + $f = $f+3; + break; + case "binding": + switch ($data[$f+2]) { + case "active": + $entry['act'] = "active"; + break; + case "free": + $entry['act'] = "expired"; + $entry['online'] = "offline"; + break; + case "backup": + $entry['act'] = "reserved"; + $entry['online'] = "offline"; + break; + case "released": + $entry['act'] = "released"; + $entry['online'] = "offline"; + } + $f = $f+1; + break; + case "next": + /* skip the next binding statement */ + $f = $f+3; + break; + case "hardware": + $f = $f+2; + break; + case "client-hostname": + if ($data[$f+1] <> "") { + $entry['hostname'] = preg_replace('/"/', '', $data[$f+1]); + } else { + $hostname = gethostbyaddr($entry['ip']); + if ($hostname <> "") { + $entry['hostname'] = $hostname; + } + } + $f = $f+1; + break; + case "uid": + $f = $f+1; + break; + } + $f++; + } + if ($is_prefix) { + $prefixes[] = $entry; + } else { + $leases[] = $entry; + $mappings[$entry['iaid'] . $entry['duid']] = $entry['ip']; + } + $l++; + $i++; + $is_prefix = false; +} + +if (count($leases) > 0) { + $leases = remove_duplicate($leases, "ip"); +} + +if (count($prefixes) > 0) { + $prefixes = remove_duplicate($prefixes, "prefix"); +} + +if (count($pools) > 0) { + $pools = remove_duplicate($pools, "name"); + asort($pools); +} + +foreach ($config['interfaces'] as $ifname => $ifarr) { + if (is_array($config['dhcpdv6'][$ifname]) && + is_array($config['dhcpdv6'][$ifname]['staticmap'])) { + foreach ($config['dhcpdv6'][$ifname]['staticmap'] as $static) { + $slease = array(); + $slease['ip'] = $static['ipaddrv6']; + $slease['type'] = "static"; + $slease['duid'] = $static['duid']; + $slease['start'] = ""; + $slease['end'] = ""; + $slease['hostname'] = htmlentities($static['hostname']); + $slease['act'] = "static"; + if (in_array($slease['ip'], array_keys($ndpdata))) { + $slease['online'] = 'online'; + } else { + $slease['online'] = 'offline'; + } + + $leases[] = $slease; + } + } +} + +if ($_GET['order']) { + usort($leases, "leasecmp"); +} + +/* only print pool status when we have one */ +if (count($pools) > 0) { +?> + + + + + + + + +\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } +?> +
                            {$fspans}{$data['name']}{$fspane}{$fspans}{$data['mystate']}{$fspane}{$fspans}" . adjust_gmt($data['mydate']) . "{$fspane}{$fspans}{$data['peerstate']}{$fspane}{$fspans}" . adjust_gmt($data['peerdate']) . "{$fspane}  
                            + + + +
                            + + + + + + + + + + + + +"; + $fspane = " "; + } else { + $fspans = ""; + $fspane = " "; + } + + if ($data['act'] == "static") { + foreach ($config['dhcpdv6'] as $dhcpif => $dhcpifconf) { + if (is_array($dhcpifconf['staticmap'])) { + foreach ($dhcpifconf['staticmap'] as $staticent) { + if ($data['ip'] == $staticent['ipaddr']) { + $data['if'] = $dhcpif; + break; + } + } + } + /* exit as soon as we have an interface */ + if ($data['if'] != "") { + break; + } + } + } else { + $data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip'])); + } + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($data['type'] != "static") { + echo "\n"; + echo "\n"; + } else { + echo "\n"; + echo "\n"; + } + echo "\n"; + echo "\n"; + + if ($data['type'] == "dynamic") { + echo "\n"; + } else { + echo "\n"; + } + + /* Only show the button for offline dynamic leases */ + if (($data['type'] == "dynamic") && ($data['online'] != "online")) { + echo "\n"; + } + echo "\n"; + } +} +?> +
                            {$fspans}{$data['ip']}{$fspane}{$fspans}{$data['iaid']}{$fspane}{$fspans}{$data['duid']}{$fspane}{$fspans}"; + if (!empty($data['hostname'])) { + echo htmlentities($data['hostname']) . "
                            "; + } + + $mac=trim($ndpdata[$data['ip']]['mac']); + if (!empty($mac)) { + $mac_hi = strtoupper($mac[0] . $mac[1] . $mac[3] . $mac[4] . $mac[6] . $mac[7]); + print htmlentities($mac); + if (isset($mac_man[$mac_hi])) { + print "
                            {$mac_man[$mac_hi]}"; + } + } + + echo "{$fspane} 
                            {$fspans}" . adjust_gmt($data['start']) . "{$fspane}{$fspans}" . adjust_gmt($data['end']) . "{$fspane}{$fspans} n/a {$fspane}{$fspans} n/a {$fspane}{$fspans}{$data['online']}{$fspane}{$fspans}{$data['act']}{$fspane}"; + echo "\"add\""; + echo "\"add\""; + echo "\"delete\"
                            +
                            +

                            Delegated Prefixes

                            + + + + + + + + + +"; + $fspane = " "; + } else { + $fspans = ""; + $fspane = " "; + } + + if ($data['act'] == "static") { + foreach ($config['dhcpdv6'] as $dhcpif => $dhcpifconf) { + if (is_array($dhcpifconf['staticmap'])) { + foreach ($dhcpifconf['staticmap'] as $staticent) { + if ($data['ip'] == $staticent['ipaddr']) { + $data['if'] = $dhcpif; + break; + } + } + } + /* exit as soon as we have an interface */ + if ($data['if'] != "") { + break; + } + } + } else { + $data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip'])); + } + echo "\n"; + if ($mappings[$data['iaid'] . $data['duid']]) { + $dip = "
                            Routed To: {$mappings[$data['iaid'] . $data['duid']]}"; + } + echo "\n"; + echo "\n"; + echo "\n"; + if ($data['type'] != "static") { + echo "\n"; + echo "\n"; + } else { + echo "\n"; + echo "\n"; + } + echo "\n"; + echo "\n"; + } +} +?> +
                            {$fspans}{$data['prefix']}{$dip}{$fspane}{$fspans}{$data['iaid']}{$fspane}{$fspans}{$data['duid']}{$fspane}{$fspans}" . adjust_gmt($data['start']) . "{$fspane}{$fspans}" . adjust_gmt($data['end']) . "{$fspane}{$fspans} n/a {$fspane}{$fspans} n/a {$fspane}{$fspans}{$data['act']}{$fspane}
                            +
                            +
                            + + + + " /> + + + " /> + +
                            + +

                            ?

                            + + + + + diff --git a/src/usr/local/www/status_filter_reload.php b/src/usr/local/www/status_filter_reload.php new file mode 100644 index 0000000..8844a48 --- /dev/null +++ b/src/usr/local/www/status_filter_reload.php @@ -0,0 +1,179 @@ + + + + + +
                            +
                            + + +      + + +
                            +


                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            .
                            + + + + + + + + + diff --git a/src/usr/local/www/status_gateway_groups.php b/src/usr/local/www/status_gateway_groups.php new file mode 100755 index 0000000..e9011c8 --- /dev/null +++ b/src/usr/local/www/status_gateway_groups.php @@ -0,0 +1,173 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-status-gatewaygroups +##|*NAME=Status: Gateway Groups page +##|*DESCR=Allow access to the 'Status: Gateway Groups' page. +##|*MATCH=status_gateway_groups.php* +##|-PRIV + +require("guiconfig.inc"); + +if (!is_array($config['gateways']['gateway_group'])) { + $config['gateways']['gateway_group'] = array(); +} + +$a_gateway_groups = &$config['gateways']['gateway_group']; +$changedesc = gettext("Gateway Groups") . ": "; + +$gateways_status = return_gateways_status(); + +$pgtitle = array(gettext("Status"), gettext("Gateway Groups")); +$shortcut_section = "gateway-groups"; +include("head.inc"); + +?> + + + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + +
                            + + + +"; + foreach ($priorities as $number => $tier) { + echo ""; + } + echo "\n"; + + /* inverse gateway group to gateway priority */ + $priority_arr = array(); + foreach ($gateway_group['item'] as $item) { + $itemsplit = explode("|", $item); + $priority_arr[$itemsplit[1]][] = $itemsplit[0]; + } + ksort($priority_arr); + $p = 1; + foreach ($priority_arr as $number => $tier) { + /* for each priority process the gateways */ + foreach ($tier as $member) { + /* we always have $priority_count fields */ + echo ""; + $c = 1; + while ($c <= $priority_count) { + $monitor = lookup_gateway_monitor_ip_by_name($member); + if ($p == $c) { + $status = $gateways_status[$monitor]['status']; + if (stristr($status, "down")) { + $online = gettext("Offline"); + $bgcolor = "#F08080"; // lightcoral + } elseif (stristr($status, "loss")) { + $online = gettext("Warning, Packetloss"); + $bgcolor = "#F0E68C"; // khaki + } elseif (stristr($status, "delay")) { + $online = gettext("Warning, Latency"); + $bgcolor = "#F0E68C"; // khaki + } elseif ($status == "none") { + $online = gettext("Online"); + $bgcolor = "#90EE90"; // lightgreen + } else { + $online = gettext("Gathering data"); + $bgcolor = "#ADD8E6"; // lightblue + } + echo ""; + } else { + echo ""; + } + $c++; + } + echo "\n"; + } + $p++; + } +?> +
                            " . sprintf(gettext("Tier %s"), $number) . "
                             ". htmlspecialchars($member) .", $online  
                            +
                            +   +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/status_gateways.php b/src/usr/local/www/status_gateways.php new file mode 100644 index 0000000..e6fcf9d --- /dev/null +++ b/src/usr/local/www/status_gateways.php @@ -0,0 +1,169 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-status-gateways +##|*NAME=Status: Gateways page +##|*DESCR=Allow access to the 'Status: Gateways' page. +##|*MATCH=status_gateways.php* +##|-PRIV + +require("guiconfig.inc"); + +$a_gateways = return_gateways_array(); +$gateways_status = array(); +$gateways_status = return_gateways_status(true); + +$now = time(); +$year = date("Y"); + +$pgtitle = array(gettext("Status"), gettext("Gateways")); +$shortcut_section = "gateways"; +include("head.inc"); + +?> + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + $gateway) { +?> + + + + + + + + + + +
                            + + + + + + + + + + + + "; + ?> +
                             $online 
                            "; + $lastchange = $gateways_status[$gname]['lastcheck']; + if (!empty($lastchange)) { + echo gettext("Last check:") . '
                            ' . $lastchange; + } + echo "
                            +
                            +
                            +
                            + + + + diff --git a/src/usr/local/www/status_graph.php b/src/usr/local/www/status_graph.php new file mode 100644 index 0000000..056c297 --- /dev/null +++ b/src/usr/local/www/status_graph.php @@ -0,0 +1,352 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-status-trafficgraph +##|*NAME=Status: Traffic Graph page +##|*DESCR=Allow access to the 'Status: Traffic Graph' page. +##|*MATCH=status_graph.php* +##|*MATCH=bandwidth_by_ip.php* +##|*MATCH=graph.php* +##|*MATCH=ifstats.php* +##|-PRIV + +require("guiconfig.inc"); + +if ($_POST['width']) { + $width = $_POST['width']; +} else { + $width = "100%"; +} + +if ($_POST['height']) { + $height = $_POST['height']; +} else { + $height = "200"; +} + +// Get configured interface list +$ifdescrs = get_configured_interface_with_descr(); +if (isset($config['ipsec']['enable'])) { + $ifdescrs['enc0'] = "IPsec"; +} +foreach (array('server', 'client') as $mode) { + if (is_array($config['openvpn']["openvpn-{$mode}"])) { + foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { + if (!isset($setting['disable'])) { + $ifdescrs['ovpn' . substr($mode, 0, 1) . $setting['vpnid']] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']); + } + } + } +} + +if ($_GET['if']) { + $curif = $_GET['if']; + $found = false; + foreach ($ifdescrs as $descr => $ifdescr) { + if ($descr == $curif) { + $found = true; + break; + } + } + if ($found === false) { + header("Location: status_graph.php"); + exit; + } +} else { + if (empty($ifdescrs["wan"])) { + /* Handle the case when WAN has been disabled. Use the first key in ifdescrs. */ + reset($ifdescrs); + $curif = key($ifdescrs); + } else { + $curif = "wan"; + } +} +if ($_GET['sort']) { + $cursort = $_GET['sort']; +} else { + $cursort = ""; +} +if ($_GET['filter']) { + $curfilter = $_GET['filter']; +} else { + $curfilter = ""; +} +if ($_GET['hostipformat']) { + $curhostipformat = $_GET['hostipformat']; +} else { + $curhostipformat = ""; +} + +$pgtitle = array(gettext("Status"), gettext("Traffic Graph")); + +include("head.inc"); + +?> + + + + + + + +
                            +: + +, Sort by: + +, Filter: + +, Display: + +
                            +

                             

                            +
                            +
                            + + + + + + + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            +
                            +
                            +
                            +

                            : , .

                            + + + + + + diff --git a/src/usr/local/www/status_graph_cpu.php b/src/usr/local/www/status_graph_cpu.php new file mode 100644 index 0000000..6712508 --- /dev/null +++ b/src/usr/local/www/status_graph_cpu.php @@ -0,0 +1,55 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-status-cpuload +##|*NAME=Status: CPU load page +##|*DESCR=Allow access to the 'Status: CPU load' page. +##|*MATCH=status_graph_cpu.php* +##|-PRIV + +$pgtitle = array(gettext("Status"), gettext("CPU load")); +require("guiconfig.inc"); +include("head.inc"); +include("fbegin.inc"); + +$pgtitle = gettext("Status: CPU Graph"); + +?> +
                            + +
                            +
                            : . + diff --git a/src/usr/local/www/status_interfaces.php b/src/usr/local/www/status_interfaces.php new file mode 100644 index 0000000..67ab96f --- /dev/null +++ b/src/usr/local/www/status_interfaces.php @@ -0,0 +1,607 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2005 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: interfaces +*/ + +##|+PRIV +##|*IDENT=page-status-interfaces +##|*NAME=Status: Interfaces page +##|*DESCR=Allow access to the 'Status: Interfaces' page. +##|*MATCH=status_interfaces.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("shaper.inc"); +require_once("filter.inc"); + +if ($_POST['if'] && $_POST['submit']) { + $interface = $_POST['if']; + if ($_POST['status'] == "up") { + interface_bring_down($interface); + } else { + interface_configure($interface); + } + header("Location: status_interfaces.php"); + exit; +} + +$pgtitle = array(gettext("Status"), gettext("Interfaces")); +$shortcut_section = "interfaces"; +include("head.inc"); + +?> + + + + + $ifname): + $ifinfo = get_interface_info($ifdescr); + // Load MAC-Manufacturer table + $mac_man = load_mac_manufacturer_table(); +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + (, ) +
                            + +
                            + DHCP + +
                            + + +    + + +
                            +
                            + DHCP6 + +
                            + + +    + + +
                            +
                            +
                            + + +    + + +
                            +
                            +
                            + + +    + + +
                            +
                            +
                            + + +    + + +
                            +
                            +
                            + + + + + " /> + + + " /> + + +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + kbit/s +
                            + kbit/s +
                            + kbit/s +
                            + kbit/s +
                            + " . $mac . " - " . htmlspecialchars($mac_man[$mac_hi]); print ""; + } else { + print htmlspecialchars($mac); + } + ?> +
                            + +   +
                            + +
                            + + +
                            + +   +
                            + +   +
                            + +
                            + + +
                            + "; + } + ?> +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + "; + echo $interrupt_sec . " " . gettext("rate"); + ?> +
                            + +
                            + +', '')?> + + + + diff --git a/src/usr/local/www/status_lb_pool.php b/src/usr/local/www/status_lb_pool.php new file mode 100644 index 0000000..984ab9e --- /dev/null +++ b/src/usr/local/www/status_lb_pool.php @@ -0,0 +1,231 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-status-loadbalancer-pool +##|*NAME=Status: Load Balancer: Pool page +##|*DESCR=Allow access to the 'Status: Load Balancer: Pool' page. +##|*MATCH=status_lb_pool.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("vslb.inc"); + +if (!is_array($config['load_balancer']['lbpool'])) { + $config['load_balancer']['lbpool'] = array(); +} +$a_pool = &$config['load_balancer']['lbpool']; + +$lb_logfile = "{$g['varlog_path']}/relayd.log"; + +$now = time(); +$year = date("Y"); + +$pgtitle = array(gettext("Status"), gettext("Load Balancer"), gettext("Pool")); +$shortcut_section = "relayd"; +include("head.inc"); + +$relay_hosts = get_lb_summary(); + +if ($_POST) { + if ($_POST['apply']) { + $retval = 0; + $retval |= filter_configure(); + $retval |= relayd_configure(); + $savemsg = get_std_save_message($retval); + clear_subsystem_dirty('loadbalancer'); + } else { + /* Keep a list of servers we find in POST variables */ + $newservers = array(); + foreach ($_POST as $name => $value) { + /* Look through the POST vars to find the pool data */ + if (strpos($name, '|') !== false) { + list($poolname, $ip) = explode("|", $name); + $ip = str_replace('_', '.', $ip); + $newservers[$poolname][] = $ip; + } elseif (is_ipaddr($value)) { + $newservers[$name][] = $value; + } + } + foreach ($a_pool as & $pool) { + if (is_array($pool['servers']) && is_array($pool['serversdisabled'])) { + $oldservers = array_merge($pool['servers'], $pool['serversdisabled']); + } elseif (is_array($pool['servers'])) { + $oldservers = $pool['servers']; + } elseif (is_array($pool['serversdisabled'])) { + $oldservers = $pool['serversdisabled']; + } else { + $oldservers = array(); + } + if (is_array($newservers[$pool['name']])) { + $pool['servers'] = $newservers[$pool['name']]; + $pool['serversdisabled'] = array_diff($oldservers, $newservers[$pool['name']]); + } + } + mark_subsystem_dirty('loadbalancer'); + write_config("Updated load balancer pools via status screen."); + } +} + +?> + + +
                            +
                            +"));?>
                            + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +"; + switch ($pool['mode']) { + case 'loadbalance': + echo "\n"; + break; + case 'failover': + echo "\n"; + break; + } + echo ""; + } + } +?> +
                             {$server['ip']['addr']}:{$pool['port']}  "; +# echo " {$server['ip']['addr']}:{$pool['port']} "; + if ($server['ip']['avail']) { + echo " ({$server['ip']['avail']}) "; + } + echo " 
                            +
                            + + + +
                            + " /> + " /> +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/status_lb_vs.php b/src/usr/local/www/status_lb_vs.php new file mode 100644 index 0000000..0d0bd60 --- /dev/null +++ b/src/usr/local/www/status_lb_vs.php @@ -0,0 +1,158 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/local/sbin/relayctl + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-status-loadbalancer-virtualserver +##|*NAME=Status: Load Balancer: Virtual Server page +##|*DESCR=Allow access to the 'Status: Load Balancer: Virtual Server' page. +##|*MATCH=status_lb_vs.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("vslb.inc"); + +if (!is_array($config['load_balancer']['lbpool'])) { + $config['load_balancer']['lbpool'] = array(); +} +if (!is_array($config['load_balancer']['virtual_server'])) { + $config['load_balancer']['virtual_server'] = array(); +} +$a_vs = &$config['load_balancer']['virtual_server']; +$a_pool = &$config['load_balancer']['lbpool']; +$rdr_a = get_lb_redirects(); + +$pgtitle = array(gettext("Status"), gettext("Load Balancer"), gettext("Virtual Server")); +include("head.inc"); + +?> + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + +
                            + + + +
                            +
                            + +"; + } + } + } + ?> +
                            {$server}
                            +
                            + + + + +
                            +Last: {$rdr_a[$vsent['name']]['last']}\n"; + } + if (!empty($rdr_a[$vsent['name']]['average'])) { + echo "
                            Average: {$rdr_a[$vsent['name']]['average']}\n"; + } +?> +
                            + +
                            +
                            +
                            + + + + diff --git a/src/usr/local/www/status_ntpd.php b/src/usr/local/www/status_ntpd.php new file mode 100644 index 0000000..329764b --- /dev/null +++ b/src/usr/local/www/status_ntpd.php @@ -0,0 +1,320 @@ + + + + + + + +
                            +
                            + + + + +
                            Network Time Protocol Status
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + Statistics unavailable because ntpq and ntpdc queries are disabled in the NTP service settings. +
                            + No peers found, is the ntp service running?. +
                            + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +' . gettext("Clock Altitude") . ''; + $gps_goo_lnk++; + } + + if (isset($gps_sat) || isset($gps_satview)) { + echo ''; + $gps_goo_lnk++; + } +?> + + + + + + +' . $gps_alt . ' ' . $gps_alt_unit . ''; + } + + if (isset($gps_sat) || isset($gps_satview)) { + echo ''; + } +?> + + + + + +
                            ' . gettext("Satellites") . '
                            (° ) (° )'; + if (isset($gps_satview)) { + echo 'in view ' . intval($gps_satview); + } + if (isset($gps_sat) && isset($gps_satview)) { + echo ', '; + } + if (isset($gps_sat)) { + echo 'in use ' . $gps_sat; + } + echo '
                            Google Maps Link
                            + +
                            +
                            + + + diff --git a/src/usr/local/www/status_openvpn.php b/src/usr/local/www/status_openvpn.php new file mode 100644 index 0000000..e9d2073 --- /dev/null +++ b/src/usr/local/www/status_openvpn.php @@ -0,0 +1,443 @@ + + +"> + +
                            + + + + + + + + + + +
                            + +
                            + + + + + + + + + + + "> + + + + + + + + + + + + + + + +
                            + + + + + + + + + + + + + " + title="" alt="delete" /> +
                            + + + + +
                            + +
                            +
                             
                            +
                            + +
                            + " /> - +

                            +
                            + + + + + + + + + +
                            + +
                            + + + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + "> + + + + + + + + + + +
                            + + + + + + + + + + + + + + + + + + +
                            + + +
                            +
                            +
                            + + +
                            + + + + + + + + +
                            + +
                            + + + + + + + + + + + + + + "> + + + + + + + + + + +
                            + + + + + + + + + + + + + + + + + + +
                            + + + +
                            +
                            +
                            + +" . gettext("NOTE") . ": " . gettext("If you have custom options that override the management features of OpenVPN on a client or server, they will cause that OpenVPN instance to not work correctly with this status page."); + } + + if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) { + echo gettext("No OpenVPN instances defined"); + } +?> +
                            + + + + + diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php new file mode 100644 index 0000000..42789bf --- /dev/null +++ b/src/usr/local/www/status_queues.php @@ -0,0 +1,310 @@ +#!/usr/local/bin/php +pps) { + $bigger_stat = $q->pps; + } + } + } else { + foreach ($statistics as $q) { + if ($bigger_stat < $q->bandwidth) { + $bigger_stat = $q->bandwidth; + } + } + } + $finscript = ""; + foreach ($statistics as $q) { + if ($stat_type == "0") { + $packet_s = round(150 * (1 - $q->pps / $bigger_stat), 0); + } else { + $packet_s = round(150 * (1 - $q->bandwidth / $bigger_stat), 0); + } + if ($packet_s < 0) { + $packet_s = 0; + } + $finscript .= "jQuery('#queue{$q->queuename}widthb').width('{$packet_s}');"; + $finscript .= "jQuery('#queue{$q->queuename}widtha').width('" . (150 - $packet_s) . "');"; + $finscript .= "jQuery('#queue{$q->queuename}pps').val('" . number_format($q->pps, 1) . "');"; + $finscript .= "jQuery('#queue{$q->queuename}bps').val('" . format_bits($q->bandwidth) . "');"; + $finscript .= "jQuery('#queue{$q->queuename}borrows').val('{$q->borrows}');"; + $finscript .= "jQuery('#queue{$q->queuename}suspends').val('{$q->suspends}');"; + $finscript .= "jQuery('#queue{$q->queuename}drops').val('{$q->drops}');"; + $finscript .= "jQuery('#queue{$q->queuename}length').val('{$q->queuelength}');"; + } + unset($statistics, $altqstats); + header("Content-type: text/javascript"); + echo $finscript; + exit; +} +$pgtitle = array(gettext("Status"), gettext("Traffic shaper"), gettext("Queues")); +$shortcut_section = "trafficshaper"; +include("head.inc"); +?> + + +"; + exit; +} +?> + +
                            + + + + + + + + + + + + + + + + + + +
                            + + +
                            +

                            + :
                            + .
                            + . +

                            + +
                            + + + + 250) { + $gray_value = 255; + } + $row_background = str_repeat(dechex($gray_value), 3); + $parent_name = $parent_name . " queuerow" . $altqstats['name'] . $altqstats['interface']; + $prev_if = $altqstats['interface']; + foreach ($altqstats['queue'] as $q) { + $if_name = ""; + foreach ($if_queue_list as $oif => $real_name) { + if ($oif == $q['interface']) { + $if_name = $real_name; + break; + } + } + if ($prev_if != $q['interface']) { + echo "Interface ". htmlspecialchars(convert_real_interface_to_friendly_descr($q['interface'])) . ""; + $prev_if = $q['interface']; + } +?> + + + + Root queue"; + } else { + echo "" . htmlspecialchars($q['name']) . ""; + } + ?> + + +"; + echo ""; + echo "" . htmlspecialchars($q["; + echo "" . htmlspecialchars($q["; + echo " "; + if (is_array($q['queue'])) { + echo "+/- "; + } + echo " "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; +?> + +queuename = $xml['name'] . $xml['interface']; + $current->queuelength = $xml['qlength']; + $current->pps = $xml['measured']; + $current->bandwidth = $xml['measuredspeedint']; + $current->borrows = intval($xml['borrows']); + $current->suspends = intval($xml['suspends']); + $current->drops = intval($xml['droppedpkts']); + if (is_array($xml['queue'])) { + foreach ($xml['queue'] as $q) { + $child = statsQueues($q); + $current->pps += $child->pps; + $current->bandwidth += $child->bandwidth; + $current->borrows += $child->borrows; + $current->suspends += $child->suspends; + $current->drops += $child->drops; + } + } + unset($child); + $statistics[] = $current; + return $current; +} +function format_bits($bits) { + if ($bits >= 1000000000) { + return sprintf("%.2f Gbps", $bits/1000000000); + } else if ($bits >= 1000000) { + return sprintf("%.2f Mbps", $bits/1000000); + } else if ($bits >= 1000) { + return sprintf("%.2f Kbps", $bits/1000); + } else { + return sprintf("%d bps", $bits); + } +} +?> diff --git a/src/usr/local/www/status_rrd_graph.php b/src/usr/local/www/status_rrd_graph.php new file mode 100644 index 0000000..ae9c709 --- /dev/null +++ b/src/usr/local/www/status_rrd_graph.php @@ -0,0 +1,834 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-status-rrdgraphs +##|*NAME=Status: RRD Graphs page +##|*DESCR=Allow access to the 'Status: RRD Graphs' page. +##|*MATCH=status_rrd_graph.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require_once("rrd.inc"); + +unset($input_errors); + +/* if the rrd graphs are not enabled redirect to settings page */ +if (!isset($config['rrd']['enable'])) { + header("Location: status_rrd_graph_settings.php"); +} + +$rrddbpath = "/var/db/rrd/"; +chdir($rrddbpath); +$databases = glob("*.rrd"); + + +if ($_GET['cat']) { + $curcat = htmlspecialchars($_GET['cat']); +} else { + if (!empty($config['rrd']['category'])) { + $curcat = $config['rrd']['category']; + } else { + $curcat = "system"; + } +} + +if ($_GET['zone']) { + $curzone = $_GET['zone']; +} else { + $curzone = ''; +} + +if ($_GET['period']) { + $curperiod = $_GET['period']; +} else { + if (!empty($config['rrd']['period'])) { + $curperiod = $config['rrd']['period']; + } else { + $curperiod = "absolute"; + } +} + +if ($_GET['option']) { + $curoption = $_GET['option']; +} else { + switch ($curcat) { + case "system": + $curoption = "processor"; + break; + case "queues": + $curoption = "queues"; + break; + case "queuedrops": + $curoption = "queuedrops"; + break; + case "quality": + foreach ($databases as $database) { + if (preg_match("/[-]quality\.rrd/i", $database)) { + /* pick off the 1st database we find that matches the quality graph */ + $name = explode("-", $database); + $curoption = "$name[0]"; + continue 2; + } + } + case "wireless": + foreach ($databases as $database) { + if (preg_match("/[-]wireless\.rrd/i", $database)) { + /* pick off the 1st database we find that matches the wireless graph */ + $name = explode("-", $database); + $curoption = "$name[0]"; + continue 2; + } + } + case "cellular": + foreach ($databases as $database) { + if (preg_match("/[-]cellular\.rrd/i", $database)) { + /* pick off the 1st database we find that matches the celullar graph */ + $name = explode("-", $database); + $curoption = "$name[0]"; + continue 2; + } + } + case "vpnusers": + foreach ($databases as $database) { + if (preg_match("/[-]vpnusers\.rrd/i", $database)) { + /* pick off the 1st database we find that matches the VPN graphs */ + $name = explode("-", $database); + $curoption = "$name[0]"; + continue 2; + } + } + case "captiveportal": + $curoption = "allgraphs"; + break; + case "ntpd": + if (isset($config['ntpd']['statsgraph'])) { + $curoption = "allgraphs"; + } else { + $curoption = "processor"; + $curcat = "system"; + } + break; + default: + $curoption = "wan"; + break; + } +} + +$now = time(); +if ($curcat == "custom") { + if (is_numeric($_GET['start'])) { + if ($start < ($now - (3600 * 24 * 365 * 5))) { + $start = $now - (8 * 3600); + } + $start = $_GET['start']; + } else if ($_GET['start']) { + $start = strtotime($_GET['start']); + if ($start === FALSE || $start === -1) { + $input_errors[] = gettext("Invalid start date/time:") . " '{$_GET['start']}'"; + $start = $now - (8 * 3600); + } + } else { + $start = $now - (8 * 3600); + } +} + +if (is_numeric($_GET['end'])) { + $end = $_GET['end']; +} else if ($_GET['end']) { + $end = strtotime($_GET['end']); + if ($end === FALSE || $end === -1) { + $input_errors[] = gettext("Invalid end date/time:") . " '{$_GET['end']}'"; + $end = $now; + } +} else { + $end = $now; +} + +/* this should never happen */ +if ($end < $start) { + log_error("start $start is smaller than end $end"); + $end = $now; +} + +$seconds = $end - $start; + +$styles = array('inverse' => gettext('Inverse'), + 'absolute' => gettext('Absolute')); + +// Set default and override later +$curstyle = "inverse"; + +if ($_GET['style']) { + foreach ($styles as $style) { + if (strtoupper($style) == strtoupper($_GET['style'])) { + $curstyle = $_GET['style']; + } + } +} else { + if (!empty($config['rrd']['style'])) { + $curstyle = $config['rrd']['style']; + } else { + $curstyle = "inverse"; + } +} + +/* sort names reverse so WAN comes first */ +rsort($databases); + +/* these boilerplate databases are required for the other menu choices */ +$dbheader = array("allgraphs-traffic.rrd", + "allgraphs-quality.rrd", + "allgraphs-wireless.rrd", + "allgraphs-cellular.rrd", + "allgraphs-vpnusers.rrd", + "allgraphs-packets.rrd", + "system-allgraphs.rrd", + "system-throughput.rrd", + "outbound-quality.rrd", + "outbound-packets.rrd", + "outbound-traffic.rrd"); + +/* additional menu choices for the custom tab */ +$dbheader_custom = array("system-throughput.rrd"); + +foreach ($databases as $database) { + if (stristr($database, "-wireless")) { + $wireless = true; + } + if (stristr($database, "-queues")) { + $queues = true; + } + if (stristr($database, "-cellular") && !empty($config['ppps'])) { + $cellular = true; + } + if (stristr($database, "-vpnusers")) { + $vpnusers = true; + } + if (stristr($database, "captiveportal-") && is_array($config['captiveportal'])) { + $captiveportal = true; + } + if (stristr($database, "ntpd") && isset($config['ntpd']['statsgraph'])) { + $ntpd = true; + } +} +/* append the existing array to the header */ +$ui_databases = array_merge($dbheader, $databases); +$custom_databases = array_merge($dbheader_custom, $databases); + +$graphs = array("eighthour", "day", "week", "month", "quarter", "year", "fouryear"); +$periods = array("absolute" => gettext("Absolute Timespans"), "current" => gettext("Current Period"), "previous" => gettext("Previous Period")); +$graph_length = array( + "eighthour" => 28800, + "day" => 86400, + "week" => 604800, + "month" => 2678400, + "quarter" => 7948800, + "year" => 31622400, + "fouryear" => 126230400); + +$pgtitle = array(gettext("Status"), gettext("RRD Graphs")); + +$closehead = false; + +/* Load all CP zones */ +if ($captiveportal && is_array($config['captiveportal'])) { + $cp_zones_tab_array = array(); + foreach ($config['captiveportal'] as $cpkey => $cp) { + if (!isset($cp['enable'])) { + continue; + } + + if ($curzone == '') { + $tabactive = true; + $curzone = $cpkey; + } elseif ($curzone == $cpkey) { + $tabactive = true; + } else { + $tabactive = false; + } + + $cp_zones_tab_array[] = array($cp['zone'], $tabactive, "status_rrd_graph.php?cat=captiveportal&zone=$cpkey"); + } +} + +include("head.inc"); +?> + + + + + + + + + + + + +"; + $dates = array(); + $dates['start'] = $start; + $dates['end'] = $end; + return $dates; +} + +?> + + + + +
                            + + + + + + + + + + + + +
                            + " /> + +
                            + +
                            +
                            + + + + + + + +\n"; + } + } else { + // Insert each of the graphs for the various set time periods + foreach ($graphs as $graph) { + /* check which databases are valid for our category */ + foreach ($ui_databases as $curdatabase) { + if (!preg_match("/($curcat)/i", $curdatabase)) { + continue; + } + + if (($curcat == "captiveportal") && !empty($curzone) && !preg_match("/captiveportal-{$curzone}/i", $curdatabase)) { + continue; + } + + $optionc = explode("-", $curdatabase); + $search = array("-", ".rrd", $optionc); + $replace = array(" :: ", "", $friendly); + switch ($curoption) { + case "outbound": + /* make sure we do not show the placeholder databases in the outbound view */ + if ((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) { + continue 2; + } + /* only show interfaces with a gateway */ + $optionc = "$optionc[0]"; + if (!interface_has_gateway($optionc)) { + if (!isset($gateways_arr)) { + if (preg_match("/quality/i", $curdatabase)) { + $gateways_arr = return_gateways_array(); + } else { + $gateways_arr = array(); + } + } + $found_gateway = false; + foreach ($gateways_arr as $gw) { + if ($gw['name'] == $optionc) { + $found_gateway = true; + break; + } + } + if (!$found_gateway) { + continue 2; + } + } + if (!preg_match("/(^$optionc-|-$optionc\\.)/i", $curdatabase)) { + continue 2; + } + break; + case "allgraphs": + /* make sure we do not show the placeholder databases in the all view */ + if ((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) { + continue 2; + } + break; + default: + /* just use the name here */ + if (!preg_match("/(^$curoption-|-$curoption\\.)/i", $curdatabase)) { + continue 2; + } + } + if (in_array($curdatabase, $ui_databases)) { + $id = "{$graph}-{$curoption}-{$curdatabase}"; + $id = preg_replace('/\./', '_', $id); + + $dates = get_dates($curperiod, $graph); + $start = $dates['start']; + $end = $dates['end']; + echo "\n"; + } + } + } + } +?> + + + +

                            + + + + + + + + + + + + + + + " /> + + + + +
                            \n"; + echo "\"$prettydb\n"; + echo "


                            \n"; + echo "
                            \n"; + echo "\"$prettydb\n"; + echo "


                            \n"; + echo "
                            + +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/status_rrd_graph_img.php b/src/usr/local/www/status_rrd_graph_img.php new file mode 100644 index 0000000..d28472f --- /dev/null +++ b/src/usr/local/www/status_rrd_graph_img.php @@ -0,0 +1,1278 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /bin/rm /usr/local/bin/rrdtool + pfSense_MODULE: system +*/ + +require_once("globals.inc"); +require_once("guiconfig.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("rrd.inc"); + +global $g; + +$pgtitle = array(gettext("System"), gettext("RRD Graphs"), gettext("Image viewer")); + +if ($_GET['database']) { + $curdatabase = basename($_GET['database']); + $curdatabase = str_replace(array("<", ">", ";", "&", "'", '"'), "", htmlspecialchars_decode($curdatabase, ENT_QUOTES | ENT_HTML401)); +} else { + $curdatabase = "wan-traffic.rrd"; +} + +if ($_GET['style']) { + $curstyle = $_GET['style']; +} else { + $curstyle = "inverse"; +} + +/* this is used for temp name */ +if ($_GET['graph']) { + $curgraph = str_replace(array("<", ">", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_GET['graph'], ENT_QUOTES | ENT_HTML401)); +} else { + $curgraph = "custom"; +} + +$now = time(); + +if (is_numeric($_GET['start'])) { + $start = $_GET['start']; +} else { + $start = $now - (8 * 3600); +} + +if (is_numeric($_GET['end'])) { + $end = $_GET['end']; +} else { + $end = $now; +} + +/* this should never happen */ +if ($end < $start) { + log_error("start $start is smaller than end $end"); + $end = $now; +} + +$seconds = $end - $start; + +$scales = array(); +$scales[14400] = "MINUTE:5:MINUTE:10:MINUTE:30:0:%H%:%M"; +$scales[57600] = "MINUTE:30:HOUR:1:HOUR:1:0:%H"; +$scales[172800] = "HOUR:1:HOUR:6:HOUR:2:0:%H"; +$scales[691200] = "HOUR:2:HOUR:12:DAY:1:0:%D %d"; +$scales[2764800] = "DAY:1:WEEK:1:WEEK:1:0:Week %W"; +$scales[16070400] = "WEEK:1:MONTH:1:MONTH:1:0:%b"; +$scales[42854400] = "MONTH:1:MONTH:1:MONTH:1:0:%b"; + +$archives = array(); +$archives[1] = 1200; +$archives[5] = 720; +$archives[60] = 1860; +$archives[1440] = 2284; + +$defOptions = array( + 'to' => 1, + 'parts' => 1, + 'precision' => 'minute', + 'distance' => FALSE, + 'separator' => ', ' +); + +/* always set the average to the highest value as a fallback */ +$average = 1440 * 60; +foreach ($archives as $rra => $value) { + $archivestart = $now - ($rra * 60 * $value); + if ($archivestart <= $start) { + $average = $rra * 60; + break; + } +} + +foreach ($scales as $scalelength => $value) { + if ($scalelength >= $seconds) { + $scale = $value; + break; + } +} + +// log_error("start $start, end $end, archivestart $archivestart, average $average, scale $scale, seconds $seconds"); + +/* Deduce a interface if possible and use the description */ +$curif = explode("-", $curdatabase); +$curif = "$curif[0]"; +$friendly = convert_friendly_interface_to_friendly_descr(strtolower($curif)); +if ($friendly == "") { + $friendly = $curif; +} +$search = array("-", ".rrd", $curif); +$replace = array(" :: ", "", $friendly); +$prettydb = ucwords(str_replace($search, $replace, $curdatabase)); + +$rrddbpath = "/var/db/rrd/"; +$rrdtmppath = "/tmp/"; +$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool"; +$uptime = "/usr/bin/uptime"; +$sed = "/usr/bin/sed"; + +$havg = timeDiff($average, $defOptions); +$hperiod = timeDiff($seconds, $defOptions); +$data = true; + +/* Don't leave it up to RRD Tool to select the RRA and resolution to use. */ +/* Specify the RRA and resolution to use per the graph havg value. */ +switch ($havg) { + case "1 minute": $step = 60; break; + case "5 minutes": $step = 300; break; + case "1 hour": $step = 3600; break; + case "1 day": $step = 86400; break; + default: $step = 0; break; +} + +$rrddbpath = "/var/db/rrd/"; +chdir($rrddbpath); +$databases = glob("*.rrd"); +rsort($databases); + +/* compare bytes/sec counters, divide bps by 8 */ +read_altq_config(); +if ($altq_list_queues[$curif]) { + $altq =& $altq_list_queues[$curif]; + switch ($altq->GetBwscale()) { + case "Gb": + $factor = 1024 * 1024 * 1024; + break; + case "Mb": + $factor = 1024 * 1024; + break; + case "Kb": + $factor = 1024; + break; + case "b": + default: + $factor = 1; + break; + } + $upstream = (($altq->GetBandwidth()*$factor)/8); + if ($upstream != 0) { + $downstream = $upstream; /* XXX: Ugly hack */ + } else { + $downstream = $upstream = 12500000; + } + $upif = $curif; + $downif = "lan"; /* XXX should this be set to something else?! */ +} else { + $altq = null; + $downstream = 12500000; + $upstream = 12500000; + $upif = "wan"; + $downif = "lan"; +} + +$speedlimit = ($upstream + $downstream); + +/* Set default colors explicitly, the theme can then override them below. + This prevents missing colors in themes from crashing the graphs. */ +/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Traffic Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colortrafficdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* Packets Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colorpacketsup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Packets Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colorpacketsdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* 95th Percentile Lines Out, In */ +$colortraffic95 = array('660000', 'FF0000'); + +/* State Table pfrate, pfstates, pfnat, srcip, dstip */ +$colorstates = array('00AA00', '990000', '0000FF', '000000', 'DD9B00'); + +/* Processor Usage user, nice, system, int, processes */ +$colorprocessor = array('00AA00', '990000', '0000FF', 'DD9B00', '000000'); + +/* Memory Usage active, inact, free, cache, wire */ +$colormemory = array('00AA00', '990000', '0000FF', '666666', 'DD9B00'); + +/* MBUF Usage current, cache, total, max */ +$colormbuf = array('0080FF', '00E344', 'FF0000', '000000'); + +/* Traffic Shaper Queues q1, q2, q3, q4, q5, q6, q7, q8, q9 */ +$colorqueuesup = array('000000', '7B0000', '0080FF', '00E344', 'FF0000', '2217AA', 'FFC875', 'FF9900', 'CC0000'); +$colorqueuesdown = array('000000', '7B7B7B', '999999', 'BBBBBB', 'CCCCCC', 'D9D9D9', 'EEEEEE', 'FFFFFF', 'CCCCCC'); + +$colorqueuesdropup = array('000000', '7B0000', '0080FF', '00E344', 'FF0000', '2217AA', 'FFC875', 'FF9900', 'CC0000'); +$colorqueuesdropdown = array('000000', '7B7B7B', '999999', 'BBBBBB', 'CCCCCC', 'D9D9D9', 'EEEEEE', 'FFFFFF', 'CCCCCC'); + +/* Quality Graph Delay >420, 180-420, 60-180, 20-60, <20, Delay Avg */ +$colorqualityrtt = array('990000', 'a83c3c', 'b36666', 'bd9090', 'cccccc', '000000'); +/* Quality Graph Loss */ +$colorqualityloss = 'ee0000'; + +/* Wireless Graph SNR, Rate, Channel*/ +/* Cellular Graph RSSI, */ +$colorwireless = array('333333', 'a83c3c', '999999'); + +/* SPAMD Times min area, avg area, max area, Time line */ +$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); +/* SPAMD Connections max area, min area, min line, max line, avg line */ +$colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600'); + +/* OpenVPN Users Online Users */ +$colorvpnusers = array('990000'); + +/* NTPD stats offset, clk jit, sys jit, wander */ +$colorntpd = array('0080FF', '00E344', 'FF0000', '000000'); + +/* Captive Portal Total Users Total Users */ +/* Captive Portal Concurrent Concurrent Users */ +$colorcaptiveportalusers = array('990000'); + +/* select theme colors if the inclusion file exists */ +$rrdcolors = "{$g['www_path']}/themes/{$g['theme']}/rrdcolors.inc.php"; +if (file_exists($rrdcolors)) { + include($rrdcolors); +} else { + log_error(sprintf(gettext("rrdcolors.inc.php for theme %s does not exist, using defaults!"), $g['theme'])); +} + +switch ($curstyle) { + case "absolute": + $multiplier = 1; + $AREA = "LINE1"; + break; + default: + $multiplier = -1; + $AREA = "AREA"; + break; +} + +function timeDiff($time, $opt = array()) { + // The default values + $defOptions = array( + 'to' => 0, + 'parts' => 1, + 'precision' => 'second', + 'distance' => TRUE, + 'separator' => ', ' + ); + $opt = array_merge($defOptions, $opt); + // Default to current time if no to point is given + (!$opt['to']) && ($opt['to'] = time()); + // Init an empty string + $str = ''; + // To or From computation + $diff = ($opt['to'] > $time) ? $opt['to'] - $time : $time - $opt['to']; + // An array of label => periods of seconds; + $periods = array( + 'decade' => 315569260, + 'year' => 31539600, + 'month' => 2629744, + 'week' => 604800, + 'day' => 86400, + 'hour' => 3600, + 'minute' => 60, + 'second' => 1 + ); + // 31539600, 31556926, 31622400 + // Round to precision + if ($opt['precision'] != 'second') { + $diff = round(($diff / $periods[$opt['precision']])) * $periods[$opt['precision']]; + } + // Report the value is 'less than 1 ' precision period away + (0 == $diff) && ($str = 'less than 1 ' . $opt['precision']); + // Loop over each period + foreach ($periods as $label => $value) { + // Stitch together the time difference string + (($x = round($diff / $value)) && $opt['parts']--) && $str .= ($str ? $opt['separator'] : '') . ($x .' '. $label. ($x > 1 ? 's' : '')); + // Stop processing if no more parts are going to be reported. + if ($opt['parts'] == 0 || $label == $opt['precision']) { + break; + } + // Get ready for the next pass + $diff -= $x * $value; + } + $opt['distance'] && $str .= ($str && $opt['to'] >= $time) ? ' ago' : ' away'; + return $str; +} + + +if ((strstr($curdatabase, "-traffic.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for traffic stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step --vertical-label \"bits/sec\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:$curif-in_bytes_pass=$rrddbpath$curdatabase:inpass:AVERAGE:step=$step "; + $graphcmd .= "DEF:$curif-out_bytes_pass=$rrddbpath$curdatabase:outpass:AVERAGE:step=$step "; + $graphcmd .= "DEF:$curif-in_bytes_block=$rrddbpath$curdatabase:inblock:AVERAGE:step=$step "; + $graphcmd .= "DEF:$curif-out_bytes_block=$rrddbpath$curdatabase:outblock:AVERAGE:step=$step "; + + $graphcmd .= "DEF:$curif-in6_bytes_pass=$rrddbpath$curdatabase:inpass6:AVERAGE:step=$step "; + $graphcmd .= "DEF:$curif-out6_bytes_pass=$rrddbpath$curdatabase:outpass6:AVERAGE:step=$step "; + $graphcmd .= "DEF:$curif-in6_bytes_block=$rrddbpath$curdatabase:inblock6:AVERAGE:step=$step "; + $graphcmd .= "DEF:$curif-out6_bytes_block=$rrddbpath$curdatabase:outblock6:AVERAGE:step=$step "; + + $graphcmd .= "CDEF:\"$curif-in_bits_pass=$curif-in_bytes_pass,8,*\" "; + $graphcmd .= "CDEF:\"$curif-out_bits_pass=$curif-out_bytes_pass,8,*\" "; + $graphcmd .= "CDEF:\"$curif-in_bits_block=$curif-in_bytes_block,8,*\" "; + $graphcmd .= "CDEF:\"$curif-out_bits_block=$curif-out_bytes_block,8,*\" "; + + $graphcmd .= "CDEF:\"$curif-in6_bits_pass=$curif-in6_bytes_pass,8,*\" "; + $graphcmd .= "CDEF:\"$curif-out6_bits_pass=$curif-out6_bytes_pass,8,*\" "; + $graphcmd .= "CDEF:\"$curif-in6_bits_block=$curif-in6_bytes_block,8,*\" "; + $graphcmd .= "CDEF:\"$curif-out6_bits_block=$curif-out6_bytes_block,8,*\" "; + + $graphcmd .= "CDEF:\"$curif-in_bytes=$curif-in_bytes_pass,$curif-in_bytes_block,+\" "; + $graphcmd .= "CDEF:\"$curif-out_bytes=$curif-out_bytes_pass,$curif-out_bytes_block,+\" "; + $graphcmd .= "CDEF:\"$curif-in_bits=$curif-in_bits_pass,$curif-in_bits_block,+\" "; + $graphcmd .= "CDEF:\"$curif-out_bits=$curif-out_bits_pass,$curif-out_bits_block,+\" "; + + $graphcmd .= "CDEF:\"$curif-in6_bytes=$curif-in6_bytes_pass,$curif-in6_bytes_block,+\" "; + $graphcmd .= "CDEF:\"$curif-out6_bytes=$curif-out6_bytes_pass,$curif-out6_bytes_block,+\" "; + $graphcmd .= "CDEF:\"$curif-in6_bits=$curif-in6_bits_pass,$curif-in6_bits_block,+\" "; + $graphcmd .= "CDEF:\"$curif-out6_bits=$curif-out6_bits_pass,$curif-out6_bits_block,+\" "; + + $graphcmd .= "CDEF:\"$curif-bits_io=$curif-in_bits,$curif-out_bits,+\" "; + $graphcmd .= "CDEF:\"$curif-out_bits_block_neg=$curif-out_bits_block,$multiplier,*\" "; + $graphcmd .= "CDEF:\"$curif-out_bits_pass_neg=$curif-out_bits_pass,$multiplier,*\" "; + + $graphcmd .= "CDEF:\"$curif-bits6_io=$curif-in6_bits,$curif-out6_bits,+\" "; + $graphcmd .= "CDEF:\"$curif-out6_bits_block_neg=$curif-out6_bits_block,$multiplier,*\" "; + $graphcmd .= "CDEF:\"$curif-out6_bits_pass_neg=$curif-out6_bits_pass,$multiplier,*\" "; + + $graphcmd .= "CDEF:\"$curif-bytes_in_pass=$curif-in_bytes_pass,0,$speedlimit,LIMIT,UN,0,$curif-in_bytes_pass,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_out_pass=$curif-out_bytes_pass,0,$speedlimit,LIMIT,UN,0,$curif-out_bytes_pass,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_in_block=$curif-in_bytes_block,0,$speedlimit,LIMIT,UN,0,$curif-in_bytes_block,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_out_block=$curif-out_bytes_block,0,$speedlimit,LIMIT,UN,0,$curif-out_bytes_block,IF,$average,*\" "; + + $graphcmd .= "CDEF:\"$curif-bytes_in6_pass=$curif-in6_bytes_pass,0,$speedlimit,LIMIT,UN,0,$curif-in6_bytes_pass,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_out6_pass=$curif-out6_bytes_pass,0,$speedlimit,LIMIT,UN,0,$curif-out6_bytes_pass,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_in6_block=$curif-in6_bytes_block,0,$speedlimit,LIMIT,UN,0,$curif-in6_bytes_block,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_out6_block=$curif-out6_bytes_block,0,$speedlimit,LIMIT,UN,0,$curif-out6_bytes_block,IF,$average,*\" "; + + $graphcmd .= "CDEF:\"$curif-bytes_pass=$curif-bytes_in_pass,$curif-bytes_out_pass,+\" "; + $graphcmd .= "CDEF:\"$curif-bytes_block=$curif-bytes_in_block,$curif-bytes_out_block,+\" "; + + $graphcmd .= "CDEF:\"$curif-bytes_pass6=$curif-bytes_in6_pass,$curif-bytes_out6_pass,+\" "; + $graphcmd .= "CDEF:\"$curif-bytes_block6=$curif-bytes_in6_block,$curif-bytes_out6_block,+\" "; + + $graphcmd .= "CDEF:\"$curif-bytes_in_t_pass=$curif-in_bytes_pass,0,$speedlimit,LIMIT,UN,0,$curif-in_bytes_pass,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_out_t_pass=$curif-out_bytes_pass,0,$speedlimit,LIMIT,UN,0,$curif-out_bytes_pass,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_in_t_block=$curif-in_bytes_block,0,$speedlimit,LIMIT,UN,0,$curif-in_bytes_block,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_out_t_block=$curif-out_bytes_block,0,$speedlimit,LIMIT,UN,0,$curif-out_bytes_block,IF,$seconds,*\" "; + + $graphcmd .= "CDEF:\"$curif-bytes_in6_t_pass=$curif-in6_bytes_pass,0,$speedlimit,LIMIT,UN,0,$curif-in6_bytes_pass,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_out6_t_pass=$curif-out6_bytes_pass,0,$speedlimit,LIMIT,UN,0,$curif-out6_bytes_pass,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_in6_t_block=$curif-in6_bytes_block,0,$speedlimit,LIMIT,UN,0,$curif-in6_bytes_block,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-bytes_out6_t_block=$curif-out6_bytes_block,0,$speedlimit,LIMIT,UN,0,$curif-out6_bytes_block,IF,$seconds,*\" "; + + $graphcmd .= "CDEF:\"$curif-bytes_t_pass=$curif-bytes_in_t_pass,$curif-bytes_out_t_pass,+\" "; + $graphcmd .= "CDEF:\"$curif-bytes_t_block=$curif-bytes_in_t_block,$curif-bytes_out_t_block,+\" "; + $graphcmd .= "CDEF:\"$curif-bytes_t=$curif-bytes_t_pass,$curif-bytes_t_block,+\" "; + + $graphcmd .= "CDEF:\"$curif-bytes_t_pass6=$curif-bytes_in6_t_pass,$curif-bytes_out6_t_pass,+\" "; + $graphcmd .= "CDEF:\"$curif-bytes_t_block6=$curif-bytes_in6_t_block,$curif-bytes_out6_t_block,+\" "; + $graphcmd .= "CDEF:\"$curif-bytes_t6=$curif-bytes_t_pass6,$curif-bytes_t_block6,+\" "; + $graphcmd .= "VDEF:\"$curif-in_bits_95=$curif-in_bits,95,PERCENT\" "; + $graphcmd .= "CDEF:\"$curif-out_bits_mul=$curif-out_bits,$multiplier,*\" "; + $perc = $multiplier > 0 ? "95" : "5"; + $graphcmd .= "VDEF:\"$curif-out_bits_95=$curif-out_bits_mul,{$perc},PERCENT\" "; + + $graphcmd .= "AREA:\"$curif-in_bits_block#{$colortrafficdown[1]}:$curif-in-block\" "; + $graphcmd .= "AREA:\"$curif-in_bits_pass#{$colortrafficdown[0]}:$curif-in-pass:STACK\" "; + $graphcmd .= "AREA:\"$curif-in6_bits_block#{$colortrafficdown[3]}:$curif-in6-block:STACK\" "; + $graphcmd .= "AREA:\"$curif-in6_bits_pass#{$colortrafficdown[2]}:$curif-in6-pass:STACK\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + + $graphcmd .= "{$AREA}:\"$curif-out_bits_block_neg#{$colortrafficup[1]}:$curif-out-block\" "; + $graphcmd .= "{$AREA}:\"$curif-out_bits_pass_neg#{$colortrafficup[0]}:$curif-out-pass:STACK\" "; + $graphcmd .= "{$AREA}:\"$curif-out6_bits_block_neg#{$colortrafficup[3]}:$curif-out6-block:STACK\" "; + $graphcmd .= "{$AREA}:\"$curif-out6_bits_pass_neg#{$colortrafficup[2]}:$curif-out6-pass:STACK\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "HRULE:\"$curif-in_bits_95#{$colortraffic95[1]}:$curif-in (95%)\" "; + $graphcmd .= "HRULE:\"$curif-out_bits_95#{$colortraffic95[0]}:$curif-out (95%)\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t maximum\t average\t\t current\t period\t 95th percentile\\n\" "; + $graphcmd .= "COMMENT:\"IPv4 in-pass\t\" "; + $graphcmd .= "GPRINT:\"$curif-in_bits_pass:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-in_bits_pass:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-in_bits_pass:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-bytes_in_t_pass:AVERAGE:%7.2lf %sB i\" "; + $graphcmd .= "GPRINT:\"$curif-in_bits_95:%7.2lf %sb/s\" "; + + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"IPv4 out-pass\t\" "; + $graphcmd .= "GPRINT:\"$curif-out_bits_pass:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-out_bits_pass:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-out_bits_pass:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-bytes_out_t_pass:AVERAGE:%7.2lf %sB o\" "; + $graphcmd .= "GPRINT:\"$curif-out_bits_95:%7.2lf %sb/s\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"IPv4 in-block\t\" "; + $graphcmd .= "GPRINT:\"$curif-in_bits_block:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-in_bits_block:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-in_bits_block:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-bytes_in_t_block:AVERAGE:%7.2lf %sB i\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"IPv4 out-block\t\" "; + $graphcmd .= "GPRINT:\"$curif-out_bits_block:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-out_bits_block:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-out_bits_block:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-bytes_out_t_block:AVERAGE:%7.2lf %sB o\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"IPv6 in-pass\t\" "; + $graphcmd .= "GPRINT:\"$curif-in6_bits_pass:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-in6_bits_pass:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-in6_bits_pass:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-bytes_in6_t_pass:AVERAGE:%7.2lf %sB i\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"IPv6 out-pass\t\" "; + $graphcmd .= "GPRINT:\"$curif-out6_bits_pass:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-out6_bits_pass:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-out6_bits_pass:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-bytes_out6_t_pass:AVERAGE:%7.2lf %sB o\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"IPv6 in-block\t\" "; + $graphcmd .= "GPRINT:\"$curif-in6_bits_block:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-in6_bits_block:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-in6_bits_block:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-bytes_in6_t_block:AVERAGE:%7.2lf %sB i\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"IPv6 out-block\t\" "; + $graphcmd .= "GPRINT:\"$curif-out6_bits_block:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-out6_bits_block:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-out6_bits_block:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"$curif-bytes_out6_t_block:AVERAGE:%7.2lf %sB o\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif (strstr($curdatabase, "-throughput.rrd")) { + /* define graphcmd for throughput stats */ + /* this gathers all interface statistics, the database does not actually exist */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"bits/sec\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + + $iflist = get_configured_interface_list(); + $g = 0; + $operand = ""; + $comma = ""; + $graphtputbip = ""; + $graphtputbop = ""; + $graphtputbtp = ""; + $graphtputbib = ""; + $graphtputbob = ""; + $graphtputbtb = ""; + $graphtputbyip = ""; + $graphtputbyop = ""; + $graphtputbytp = ""; + $graphtputbyib = ""; + $graphtputbyob = ""; + $graphtputbytb = ""; + foreach ($iflist as $ifname) { + /* collect all interface stats */ + $graphcmd .= "DEF:\"{$ifname}-in_bytes_pass={$rrddbpath}{$ifname}-traffic.rrd:inpass:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"{$ifname}-out_bytes_pass={$rrddbpath}{$ifname}-traffic.rrd:outpass:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"{$ifname}-in_bytes_block={$rrddbpath}{$ifname}-traffic.rrd:inblock:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"{$ifname}-out_bytes_block={$rrddbpath}{$ifname}-traffic.rrd:outblock:AVERAGE:step=$step\" "; + + $graphcmd .= "CDEF:\"{$ifname}-in_bytes={$ifname}-in_bytes_pass,{$ifname}-in_bytes_block,+\" "; + $graphcmd .= "CDEF:\"{$ifname}-out_bytes={$ifname}-out_bytes_pass,{$ifname}-out_bytes_block,+\" "; + + $graphcmd .= "CDEF:\"{$ifname}-in_bits_pass={$ifname}-in_bytes_pass,8,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-out_bits_pass={$ifname}-out_bytes_pass,8,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-bits_io_pass={$ifname}-in_bits_pass,{$ifname}-out_bits_pass,+\" "; + + $graphcmd .= "CDEF:\"{$ifname}-in_bits_block={$ifname}-in_bytes_block,8,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-out_bits_block={$ifname}-out_bytes_block,8,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-bits_io_block={$ifname}-in_bits_block,{$ifname}-out_bits_block,+\" "; + + $graphcmd .= "CDEF:\"{$ifname}-bytes_in_pass={$ifname}-in_bytes_pass,0,$speedlimit,LIMIT,UN,0,{$ifname}-in_bytes_pass,IF,$average,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-bytes_out_pass={$ifname}-out_bytes_pass,0,$speedlimit,LIMIT,UN,0,{$ifname}-out_bytes_pass,IF,$average,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-bytes_in_block={$ifname}-in_bytes_block,0,$speedlimit,LIMIT,UN,0,{$ifname}-in_bytes_block,IF,$average,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-bytes_out_block={$ifname}-out_bytes_block,0,$speedlimit,LIMIT,UN,0,{$ifname}-out_bytes_block,IF,$average,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-bytes_pass={$ifname}-bytes_in_pass,{$ifname}-bytes_out_pass,+\" "; + $graphcmd .= "CDEF:\"{$ifname}-bytes_block={$ifname}-bytes_in_pass,{$ifname}-bytes_out_block,+\" "; + + $graphcmd .= "CDEF:\"{$ifname}-bytes_in_t_pass={$ifname}-in_bytes,0,$speedlimit,LIMIT,UN,0,{$ifname}-in_bytes_pass,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-bytes_in_t_block={$ifname}-in_bytes,0,$speedlimit,LIMIT,UN,0,{$ifname}-in_bytes_block,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-bytes_out_t_pass={$ifname}-out_bytes,0,$speedlimit,LIMIT,UN,0,{$ifname}-out_bytes_pass,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-bytes_out_t_block={$ifname}-out_bytes,0,$speedlimit,LIMIT,UN,0,{$ifname}-out_bytes_block,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"{$ifname}-bytes_t_pass={$ifname}-bytes_in_t_pass,{$ifname}-bytes_out_t_pass,+\" "; + $graphcmd .= "CDEF:\"{$ifname}-bytes_t_block={$ifname}-bytes_in_t_block,{$ifname}-bytes_out_t_block,+\" "; + if ($g > 0) { + $operand .= ",+"; + $comma = ","; + } + $graphtputbip .= "{$comma}{$ifname}-in_bits_pass"; + $graphtputbop .= "{$comma}{$ifname}-out_bits_pass"; + $graphtputbtp .= "{$comma}{$ifname}-bits_io_pass"; + $graphtputbib .= "{$comma}{$ifname}-in_bits_block"; + $graphtputbob .= "{$comma}{$ifname}-out_bits_block"; + $graphtputbtb .= "{$comma}{$ifname}-bits_io_block"; + $graphtputbyip .= "{$comma}{$ifname}-bytes_in_t_pass"; + $graphtputbyop .= "{$comma}{$ifname}-bytes_out_t_pass"; + $graphtputbyib .= "{$comma}{$ifname}-bytes_in_t_block"; + $graphtputbyob .= "{$comma}{$ifname}-bytes_out_t_block"; + $graphtputbytp .= "{$comma}{$ifname}-bytes_t_pass"; + $graphtputbytb .= "{$comma}{$ifname}-bytes_t_block"; + $g++; + } + $graphcmd .= "CDEF:\"tput-in_bits_pass={$graphtputbip}{$operand}\" "; + $graphcmd .= "CDEF:\"tput-out_bits_pass={$graphtputbop}{$operand}\" "; + $graphcmd .= "CDEF:\"tput-bits_io_pass={$graphtputbtp}{$operand}\" "; + + $graphcmd .= "CDEF:\"tput-in_bits_block={$graphtputbib}{$operand}\" "; + $graphcmd .= "CDEF:\"tput-out_bits_block={$graphtputbob}{$operand}\" "; + $graphcmd .= "CDEF:\"tput-bits_io_block={$graphtputbtb}{$operand}\" "; + + $graphcmd .= "CDEF:\"tput-out_bits_pass_neg=tput-out_bits_pass,$multiplier,*\" "; + $graphcmd .= "CDEF:\"tput-out_bits_block_neg=tput-out_bits_block,$multiplier,*\" "; + + $graphcmd .= "CDEF:\"tput-bytes_in_t_pass={$graphtputbyip}{$operand}\" "; + $graphcmd .= "CDEF:\"tput-bytes_out_t_pass={$graphtputbyop}{$operand}\" "; + $graphcmd .= "CDEF:\"tput-bytes_t_pass={$graphtputbytp}{$operand}\" "; + + $graphcmd .= "CDEF:\"tput-bytes_in_t_block={$graphtputbyib}{$operand}\" "; + $graphcmd .= "CDEF:\"tput-bytes_out_t_block={$graphtputbyob}{$operand}\" "; + $graphcmd .= "CDEF:\"tput-bytes_t_block={$graphtputbytb}{$operand}\" "; + + $graphcmd .= "AREA:\"tput-in_bits_block#{$colortrafficdown[0]}:in-block \" "; + $graphcmd .= "AREA:\"tput-in_bits_pass#{$colortrafficdown[1]}:in-pass \" "; + + $graphcmd .= "{$AREA}:\"tput-out_bits_block_neg#{$colortrafficup[1]}:out-block \" "; + $graphcmd .= "{$AREA}:\"tput-out_bits_pass_neg#{$colortrafficup[0]}:out-pass \" "; + + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t maximum average current period\\n\" "; + $graphcmd .= "COMMENT:\"in-pass\t\" "; + $graphcmd .= "GPRINT:\"tput-in_bits_pass:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"tput-in_bits_pass:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"tput-in_bits_pass:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"tput-bytes_in_t_pass:AVERAGE:%7.2lf %sB i\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"out-pass\t\" "; + $graphcmd .= "GPRINT:\"tput-out_bits_pass:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"tput-out_bits_pass:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"tput-out_bits_pass:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"tput-bytes_out_t_pass:AVERAGE:%7.2lf %sB o\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"in-block\t\" "; + $graphcmd .= "GPRINT:\"tput-in_bits_block:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"tput-in_bits_block:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"tput-in_bits_block:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"tput-bytes_in_t_block:AVERAGE:%7.2lf %sB i\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"out-block\t\" "; + $graphcmd .= "GPRINT:\"tput-out_bits_block:MAX:%7.2lf %sb/s\" "; + $graphcmd .= "GPRINT:\"tput-out_bits_block:AVERAGE:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"tput-out_bits_block:LAST:%7.2lf %Sb/s\" "; + $graphcmd .= "GPRINT:\"tput-bytes_out_t_block:AVERAGE:%7.2lf %sB o\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-packets.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for packets stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"packets/sec\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"$curif-in_pps_pass=$rrddbpath$curdatabase:inpass:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-out_pps_pass=$rrddbpath$curdatabase:outpass:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-in_pps_block=$rrddbpath$curdatabase:inblock:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-out_pps_block=$rrddbpath$curdatabase:outblock:AVERAGE:step=$step\" "; + + $graphcmd .= "DEF:\"$curif-in6_pps_pass=$rrddbpath$curdatabase:inpass6:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-out6_pps_pass=$rrddbpath$curdatabase:outpass6:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-in6_pps_block=$rrddbpath$curdatabase:inblock6:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-out6_pps_block=$rrddbpath$curdatabase:outblock6:AVERAGE:step=$step\" "; + + $graphcmd .= "CDEF:\"$curif-in_pps=$curif-in_pps_pass,$curif-in_pps_block,+\" "; + $graphcmd .= "CDEF:\"$curif-out_pps=$curif-out_pps_pass,$curif-out_pps_block,+\" "; + $graphcmd .= "CDEF:\"$curif-out_pps_pass_neg=$curif-out_pps_pass,$multiplier,*\" "; + $graphcmd .= "CDEF:\"$curif-out_pps_block_neg=$curif-out_pps_block,$multiplier,*\" "; + + $graphcmd .= "CDEF:\"$curif-in6_pps=$curif-in6_pps_pass,$curif-in6_pps_block,+\" "; + $graphcmd .= "CDEF:\"$curif-out6_pps=$curif-out6_pps_pass,$curif-out6_pps_block,+\" "; + $graphcmd .= "CDEF:\"$curif-out6_pps_pass_neg=$curif-out6_pps_pass,$multiplier,*\" "; + $graphcmd .= "CDEF:\"$curif-out6_pps_block_neg=$curif-out6_pps_block,$multiplier,*\" "; + + $graphcmd .= "CDEF:\"$curif-pps_in_pass=$curif-in_pps_pass,0,12500000,LIMIT,UN,0,$curif-in_pps_pass,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_out_pass=$curif-out_pps_pass,0,12500000,LIMIT,UN,0,$curif-out_pps_pass,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_in_block=$curif-in_pps_block,0,12500000,LIMIT,UN,0,$curif-in_pps_block,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_out_block=$curif-out_pps_block,0,12500000,LIMIT,UN,0,$curif-out_pps_block,IF,$average,*\" "; + + $graphcmd .= "CDEF:\"$curif-pps_in6_pass=$curif-in6_pps_pass,0,12500000,LIMIT,UN,0,$curif-in6_pps_pass,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_out6_pass=$curif-out6_pps_pass,0,12500000,LIMIT,UN,0,$curif-out6_pps_pass,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_in6_block=$curif-in6_pps_block,0,12500000,LIMIT,UN,0,$curif-in6_pps_block,IF,$average,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_out6_block=$curif-out6_pps_block,0,12500000,LIMIT,UN,0,$curif-out6_pps_block,IF,$average,*\" "; + + $graphcmd .= "CDEF:\"$curif-pps_io=$curif-in_pps,$curif-out_pps,+\" "; + $graphcmd .= "CDEF:\"$curif-pps_pass=$curif-pps_in_pass,$curif-pps_out_pass,+\" "; + $graphcmd .= "CDEF:\"$curif-pps_block=$curif-pps_in_block,$curif-pps_out_block,+\" "; + + $graphcmd .= "CDEF:\"$curif-pps_io6=$curif-in6_pps,$curif-out6_pps,+\" "; + $graphcmd .= "CDEF:\"$curif-pps_pass6=$curif-pps_in6_pass,$curif-pps_out6_pass,+\" "; + $graphcmd .= "CDEF:\"$curif-pps_block6=$curif-pps_in6_block,$curif-pps_out6_block,+\" "; + + $graphcmd .= "CDEF:\"$curif-pps_in_t_pass=$curif-in_pps_pass,0,12500000,LIMIT,UN,0,$curif-in_pps_pass,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_out_t_pass=$curif-out_pps_pass,0,12500000,LIMIT,UN,0,$curif-out_pps_pass,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_in_t_block=$curif-in_pps_block,0,12500000,LIMIT,UN,0,$curif-in_pps_block,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_out_t_block=$curif-out_pps_block,0,12500000,LIMIT,UN,0,$curif-out_pps_block,IF,$seconds,*\" "; + + $graphcmd .= "CDEF:\"$curif-pps_in6_t_pass=$curif-in6_pps_pass,0,12500000,LIMIT,UN,0,$curif-in6_pps_pass,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_out6_t_pass=$curif-out6_pps_pass,0,12500000,LIMIT,UN,0,$curif-out6_pps_pass,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_in6_t_block=$curif-in6_pps_block,0,12500000,LIMIT,UN,0,$curif-in6_pps_block,IF,$seconds,*\" "; + $graphcmd .= "CDEF:\"$curif-pps_out6_t_block=$curif-out6_pps_block,0,12500000,LIMIT,UN,0,$curif-out6_pps_block,IF,$seconds,*\" "; + + $graphcmd .= "CDEF:\"$curif-pps_t_pass=$curif-pps_in_t_pass,$curif-pps_out_t_pass,+\" "; + $graphcmd .= "CDEF:\"$curif-pps_t_block=$curif-pps_in_t_block,$curif-pps_out_t_block,+\" "; + + $graphcmd .= "CDEF:\"$curif-pps_t_pass6=$curif-pps_in6_t_pass,$curif-pps_out6_t_pass,+\" "; + $graphcmd .= "CDEF:\"$curif-pps_t_block6=$curif-pps_in6_t_block,$curif-pps_out6_t_block,+\" "; + + $graphcmd .= "AREA:\"$curif-in_pps_block#{$colorpacketsdown[1]}:$curif-in-block\" "; + $graphcmd .= "AREA:\"$curif-in_pps_pass#{$colorpacketsdown[0]}:$curif-in-pass:STACK\" "; + $graphcmd .= "AREA:\"$curif-in6_pps_block#{$colorpacketsdown[3]}:$curif-in6-block:STACK\" "; + $graphcmd .= "AREA:\"$curif-in6_pps_pass#{$colorpacketsdown[2]}:$curif-in6-pass:STACK\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "$AREA:\"$curif-out_pps_block_neg#{$colorpacketsup[1]}:$curif-out-block\" "; + $graphcmd .= "$AREA:\"$curif-out_pps_pass_neg#{$colorpacketsup[0]}:$curif-out-pass:STACK\" "; + $graphcmd .= "$AREA:\"$curif-out6_pps_block_neg#{$colorpacketsup[3]}:$curif-out6-block:STACK\" "; + $graphcmd .= "$AREA:\"$curif-out6_pps_pass_neg#{$colorpacketsup[2]}:$curif-out6-pass:STACK\" "; + + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t maximum\t\t average\t current\t period\\n\" "; + $graphcmd .= "COMMENT:\"in-pass\t\" "; + $graphcmd .= "GPRINT:\"$curif-in_pps_pass:MAX:%7.2lf %s pps\" "; + $graphcmd .= "GPRINT:\"$curif-in_pps_pass:AVERAGE:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-in_pps_pass:LAST:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-pps_in_t_pass:AVERAGE:%7.2lf %s pkts\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"out-pass\t\" "; + $graphcmd .= "GPRINT:\"$curif-out_pps_pass:MAX:%7.2lf %s pps\" "; + $graphcmd .= "GPRINT:\"$curif-out_pps_pass:AVERAGE:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-out_pps_pass:LAST:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-pps_out_t_pass:AVERAGE:%7.2lf %s pkts\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"in-block\t\" "; + $graphcmd .= "GPRINT:\"$curif-in_pps_block:MAX:%7.2lf %s pps\" "; + $graphcmd .= "GPRINT:\"$curif-in_pps_block:AVERAGE:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-in_pps_block:LAST:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-pps_in_t_block:AVERAGE:%7.2lf %s pkts\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"out-block\t\" "; + $graphcmd .= "GPRINT:\"$curif-out_pps_block:MAX:%7.2lf %s pps\" "; + $graphcmd .= "GPRINT:\"$curif-out_pps_block:AVERAGE:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-out_pps_block:LAST:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-pps_out_t_block:AVERAGE:%7.2lf %s pkts\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"in-pass6\t\" "; + $graphcmd .= "GPRINT:\"$curif-in6_pps_pass:MAX:%7.2lf %s pps\" "; + $graphcmd .= "GPRINT:\"$curif-in6_pps_pass:AVERAGE:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-in6_pps_pass:LAST:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-pps_in6_t_pass:AVERAGE:%7.2lf %s pkts\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"out-pass6\t\" "; + $graphcmd .= "GPRINT:\"$curif-out6_pps_pass:MAX:%7.2lf %s pps\" "; + $graphcmd .= "GPRINT:\"$curif-out6_pps_pass:AVERAGE:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-out6_pps_pass:LAST:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-pps_out6_t_pass:AVERAGE:%7.2lf %s pkts\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"in-block6\t\" "; + $graphcmd .= "GPRINT:\"$curif-in6_pps_block:MAX:%7.2lf %s pps\" "; + $graphcmd .= "GPRINT:\"$curif-in6_pps_block:AVERAGE:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-in6_pps_block:LAST:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-pps_in6_t_block:AVERAGE:%7.2lf %s pkts\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"out-pass6\t\" "; + $graphcmd .= "GPRINT:\"$curif-out6_pps_block:MAX:%7.2lf %s pps\" "; + $graphcmd .= "GPRINT:\"$curif-out6_pps_block:AVERAGE:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-out6_pps_block:LAST:%7.2lf %S pps\" "; + $graphcmd .= "GPRINT:\"$curif-pps_out6_t_block:AVERAGE:%7.2lf %s pkts\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-wireless.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for packets stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"snr/channel/rate\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"$curif-snr=$rrddbpath$curdatabase:snr:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-rate=$rrddbpath$curdatabase:rate:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-channel=$rrddbpath$curdatabase:channel:AVERAGE:step=$step\" "; + $graphcmd .= "LINE2:\"$curif-snr#{$colorwireless[0]}:$curif-snr\" "; + $graphcmd .= "LINE2:\"$curif-rate#{$colorwireless[1]}:$curif-rate\" "; + $graphcmd .= "LINE2:\"$curif-channel#{$colorwireless[2]}:$curif-channel\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t maximum\t\t average\t current\\n\" "; + $graphcmd .= "COMMENT:\"SNR\t\t\" "; + $graphcmd .= "GPRINT:\"$curif-snr:MAX:%7.2lf dBi \" "; + $graphcmd .= "GPRINT:\"$curif-snr:AVERAGE:%7.2lf dBi \" "; + $graphcmd .= "GPRINT:\"$curif-snr:LAST:%7.2lf dBi\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"RATE\t\t\" "; + $graphcmd .= "GPRINT:\"$curif-rate:MAX:%7.2lf Mb \" "; + $graphcmd .= "GPRINT:\"$curif-rate:AVERAGE:%7.2lf Mb \" "; + $graphcmd .= "GPRINT:\"$curif-rate:LAST:%7.2lf Mb\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Channel\t\" "; + $graphcmd .= "GPRINT:\"$curif-channel:MAX:%7.2lf \" "; + $graphcmd .= "GPRINT:\"$curif-channel:AVERAGE:%7.2lf \" "; + $graphcmd .= "GPRINT:\"$curif-channel:LAST:%7.2lf\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-vpnusers.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for vpn users stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"users\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"$curif-users=$rrddbpath$curdatabase:users:AVERAGE:step=$step\" "; + $graphcmd .= "LINE2:\"$curif-users#{$colorvpnusers[0]}:$curif-users\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t maximum\t\t average\t current\\n\" "; + $graphcmd .= "COMMENT:\"Users Online\t\" "; + $graphcmd .= "GPRINT:\"$curif-users:MAX:%7.2lf \" "; + $graphcmd .= "GPRINT:\"$curif-users:AVERAGE:%7.2lf \" "; + $graphcmd .= "GPRINT:\"$curif-users:LAST:%7.2lf \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-states.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for states stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start -$seconds -e -$average --step $step "; + $graphcmd .= "--vertical-label \"states, ip\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"$curif-pfrate=$rrddbpath$curdatabase:pfrate:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-pfstates=$rrddbpath$curdatabase:pfstates:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-pfnat=$rrddbpath$curdatabase:pfnat:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-srcip=$rrddbpath$curdatabase:srcip:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"$curif-dstip=$rrddbpath$curdatabase:dstip:AVERAGE:step=$step\" "; + $graphcmd .= "CDEF:\"$curif-pfrate_t=$curif-pfrate,0,1000000,LIMIT,UN,0,$curif-pfrate,IF,$seconds,*\" "; + $graphcmd .= "LINE1:\"$curif-pfrate#{$colorstates[0]}:$curif-pfrate\" "; + $graphcmd .= "LINE1:\"$curif-pfstates#{$colorstates[1]}:$curif-pfstates\" "; + $graphcmd .= "LINE1:\"$curif-pfnat#{$colorstates[2]}:$curif-pfnat\" "; + $graphcmd .= "LINE1:\"$curif-srcip#{$colorstates[3]}:$curif-srcip\" "; + $graphcmd .= "LINE1:\"$curif-dstip#{$colorstates[4]}:$curif-dstip\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t minimum average maximum current period\\n\" "; + $graphcmd .= "COMMENT:\"state changes\" "; + $graphcmd .= "GPRINT:\"$curif-pfrate:MIN:%7.2lf %s cps\" "; + $graphcmd .= "GPRINT:\"$curif-pfrate:AVERAGE:%7.2lf %s cps\" "; + $graphcmd .= "GPRINT:\"$curif-pfrate:MAX:%7.2lf %s cps\" "; + $graphcmd .= "GPRINT:\"$curif-pfrate:LAST:%7.2lf %S cps\" "; + $graphcmd .= "GPRINT:\"$curif-pfrate_t:AVERAGE:%7.2lf %s chg\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"filter states\" "; + $graphcmd .= "GPRINT:\"$curif-pfstates:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-pfstates:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-pfstates:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-pfstates:LAST:%7.2lf %s \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"nat states \" "; + $graphcmd .= "GPRINT:\"$curif-pfnat:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-pfnat:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-pfnat:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-pfnat:LAST:%7.2lf %s \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Source addr. \" "; + $graphcmd .= "GPRINT:\"$curif-srcip:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-srcip:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-srcip:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-srcip:LAST:%7.2lf %s \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Dest. addr. \" "; + $graphcmd .= "GPRINT:\"$curif-dstip:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-dstip:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-dstip:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"$curif-dstip:LAST:%7.2lf %s \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-processor.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for processor stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"utilization, number\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"user=$rrddbpath$curdatabase:user:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"nice=$rrddbpath$curdatabase:nice:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"system=$rrddbpath$curdatabase:system:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"interrupt=$rrddbpath$curdatabase:interrupt:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"processes=$rrddbpath$curdatabase:processes:AVERAGE:step=$step\" "; + $graphcmd .= "AREA:\"user#{$colorprocessor[0]}:user\" "; + $graphcmd .= "AREA:\"nice#{$colorprocessor[1]}:nice:STACK\" "; + $graphcmd .= "AREA:\"system#{$colorprocessor[2]}:system:STACK\" "; + $graphcmd .= "AREA:\"interrupt#{$colorprocessor[3]}:interrupt:STACK\" "; + $graphcmd .= "LINE2:\"processes#{$colorprocessor[4]}:processes\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t minimum average maximum current\\n\" "; + $graphcmd .= "COMMENT:\"User util. \" "; + $graphcmd .= "GPRINT:\"user:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"user:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"user:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"user:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Nice util. \" "; + $graphcmd .= "GPRINT:\"nice:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"nice:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"nice:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"nice:LAST:%7.2lf %s \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"System util. \" "; + $graphcmd .= "GPRINT:\"system:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"system:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"system:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"system:LAST:%7.2lf %s \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Interrupt \" "; + $graphcmd .= "GPRINT:\"interrupt:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"interrupt:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"interrupt:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"interrupt:LAST:%7.2lf %s \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Processes \" "; + $graphcmd .= "GPRINT:\"processes:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"processes:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"processes:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"processes:LAST:%7.2lf %s \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-memory.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for memory usage stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"utilization, percent\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"active=$rrddbpath$curdatabase:active:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"inactive=$rrddbpath$curdatabase:inactive:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"free=$rrddbpath$curdatabase:free:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"cache=$rrddbpath$curdatabase:cache:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"wire=$rrddbpath$curdatabase:wire:AVERAGE:step=$step\" "; + $graphcmd .= "LINE2:\"active#{$colormemory[0]}:active\" "; + $graphcmd .= "LINE2:\"inactive#{$colormemory[1]}:inactive\" "; + $graphcmd .= "LINE2:\"free#{$colormemory[2]}:free\" "; + $graphcmd .= "LINE2:\"cache#{$colormemory[3]}:cache\" "; + $graphcmd .= "LINE2:\"wire#{$colormemory[4]}:wire\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t minimum average maximum current\\n\" "; + $graphcmd .= "COMMENT:\"Active. \" "; + $graphcmd .= "GPRINT:\"active:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"active:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"active:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"active:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Inactive. \" "; + $graphcmd .= "GPRINT:\"inactive:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"inactive:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"inactive:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"inactive:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Free. \" "; + $graphcmd .= "GPRINT:\"free:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"free:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"free:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"free:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Cached. \" "; + $graphcmd .= "GPRINT:\"cache:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"cache:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"cache:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"cache:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Wired. \" "; + $graphcmd .= "GPRINT:\"wire:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"wire:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"wire:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"wire:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-mbuf.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for mbuf usage stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"utilization, percent\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} clusters - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"current=$rrddbpath$curdatabase:current:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"cache=$rrddbpath$curdatabase:cache:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"total=$rrddbpath$curdatabase:total:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"max=$rrddbpath$curdatabase:max:AVERAGE:step=$step\" "; + $graphcmd .= "LINE2:\"current#{$colormbuf[0]}:current\" "; + $graphcmd .= "LINE2:\"cache#{$colormbuf[1]}:cache\" "; + $graphcmd .= "LINE2:\"total#{$colormbuf[2]}:total\" "; + $graphcmd .= "LINE2:\"max#{$colormbuf[3]}:max\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t minimum average maximum current\\n\" "; + $graphcmd .= "COMMENT:\"Current. \" "; + $graphcmd .= "GPRINT:\"current:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"current:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"current:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"current:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Cache. \" "; + $graphcmd .= "GPRINT:\"cache:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"cache:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"cache:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"cache:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Total. \" "; + $graphcmd .= "GPRINT:\"total:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"total:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"total:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"total:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Max. \" "; + $graphcmd .= "GPRINT:\"max:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"max:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"max:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"max:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-queues.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for queue stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"bits/sec\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + if ($altq) { + $a_queues =& $altq->get_queue_list(); + $t = 0; + } else { + $a_queues = array(); + $i = 0; + $t = 0; + } + foreach ($a_queues as $name => $q) { + $color = "$colorqueuesup[$t]"; + if ($t > 0) { + $stack = ":STACK"; + } + $graphcmd .= "DEF:\"$name=$rrddbpath$curdatabase:$name:AVERAGE:step=$step\" "; + $graphcmd .= "CDEF:\"$name-bytes_out=$name,0,$speedlimit,LIMIT,UN,0,$name,IF\" "; + $graphcmd .= "CDEF:\"$name-bits_out=$name-bytes_out,8,*\" "; + $graphcmd .= "$AREA:\"$name-bits_out#${color}:$name$stack\" "; + $t++; + if ($t > 7) { + $t = 0; + } + } + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-queuedrops.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for queuedrop stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"drops / sec\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + if ($altq) { + $a_queues =& $altq->get_queue_list(); + $t = 0; + } else { + $a_queues = array(); + $i = 0; + $t = 0; + } + foreach ($a_queues as $name => $q) { + $color = "$colorqueuesdropup[$t]"; + if ($t > 0) { + $stack = ":STACK"; + } + $graphcmd .= "DEF:\"$name=$rrddbpath$curdatabase:$name:AVERAGE:step=$step\" "; + $graphcmd .= "CDEF:\"$name-bytes_out=$name,0,$speedlimit,LIMIT,UN,0,$name,IF\" "; + $graphcmd .= "CDEF:\"$name-bits_out=$name-bytes_out,8,*\" "; + $graphcmd .= "CDEF:\"$name-bits_out_neg=$name-bits_out,$multiplier,*\" "; + $graphcmd .= "$AREA:\"$name-bits_out_neg#${color}:$name$stack\" "; + $t++; + if ($t > 7) { + $t = 0; + } + } + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-quality.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* make a link quality graphcmd */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png \\ + --start $start --end $end --step $step \\ + --title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" \\ + --color SHADEA#eeeeee --color SHADEB#eeeeee \\ + --vertical-label \"ms / %\" \\ + --height 200 --width 620 \\ + --lower-limit 0 \\ + DEF:delayraw=$rrddbpath$curdatabase:delay:AVERAGE:step=$step \\ + DEF:loss=$rrddbpath$curdatabase:loss:AVERAGE:step=$step \\ + \"CDEF:delay=delayraw,1000,*\" \\ + \"CDEF:roundavg=delay,PREV(delay),+,2,/\" \\ + \"CDEF:loss10=loss,$multiplier,*\" \\ + \"CDEF:r0=delay,20,MIN\" \\ + \"CDEF:r1=delay,60,MIN\" \\ + \"CDEF:r2=delay,180,MIN\" \\ + \"CDEF:r3=delay,420,MIN\" \\ + COMMENT:\"\t\t\t\t\tDelay\t\t\tPacket loss\\n\" \\ + AREA:delay#$colorqualityrtt[0]:\"> 420 ms\" \\ + GPRINT:delay:MIN:\"\t\tMin\\: %7.2lf ms\" \\ + GPRINT:loss:MIN:\"\tMin\\: %3.1lf %%\\n\" \\ + AREA:r3#$colorqualityrtt[1]:\"180-420 ms\" \\ + GPRINT:delay:AVERAGE:\"\t\tAvg\\: %7.2lf ms\" \\ + GPRINT:loss:AVERAGE:\"\tAvg\\: %3.1lf %%\\n\" \\ + AREA:r2#$colorqualityrtt[2]:\"60-180 ms\" \\ + GPRINT:delay:MAX:\"\t\tMax\\: %7.2lf ms\" \\ + GPRINT:loss:MAX:\"\tMax\\: %3.1lf %%\\n\" \\ + AREA:r1#$colorqualityrtt[3]:\"20-60 ms\\n\" \\ + AREA:r0#$colorqualityrtt[4]:\"< 20 ms\" \\ + GPRINT:delay:LAST:\"\t\tLast\\: %7.2lf ms\" \\ + GPRINT:loss:LAST:\"\tLast\: %3.1lf %%\\n\" \\ + AREA:loss10#$colorqualityloss:\"Packet loss\\n\" \\ + LINE1:delay#$colorqualityrtt[5]:\"Delay average\\n\" \\ + COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\""; +} elseif ((strstr($curdatabase, "spamd.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* graph a spamd statistics graph */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png \\ + --start $start --end $end --step $step \\ + --title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" \\ + --color SHADEA#eeeeee --color SHADEB#eeeeee \\ + --vertical-label=\"Conn / Time, sec.\" \\ + --height 200 --width 620 --no-gridfit \\ + --lower-limit 0 \\ + DEF:consmin=$rrddbpath$curdatabase:conn:MIN:step=$step \\ + DEF:consavg=$rrddbpath$curdatabase:conn:AVERAGE:step=$step \\ + DEF:consmax=$rrddbpath$curdatabase:conn:MAX:step=$step \\ + DEF:timemin=$rrddbpath$curdatabase:time:MIN:step=$step \\ + DEF:timeavg=$rrddbpath$curdatabase:time:AVERAGE:step=$step \\ + DEF:timemax=$rrddbpath$curdatabase:time:MAX:step=$step \\ + \"CDEF:timeminadj=timemin,0,86400,LIMIT,UN,0,timemin,IF\" \\ + \"CDEF:timeavgadj=timeavg,0,86400,LIMIT,UN,0,timeavg,IF\" \\ + \"CDEF:timemaxadj=timemax,0,86400,LIMIT,UN,0,timemax,IF\" \\ + \"CDEF:t1=timeminadj,timeavgadj,+,2,/,timeminadj,-\" \\ + \"CDEF:t2=timeavgadj,timemaxadj,+,2,/,timeminadj,-,t1,-\" \\ + \"CDEF:t3=timemaxadj,timeminadj,-,t1,-,t2,-\" \\ + AREA:timeminadj \\ + AREA:t1#$colorspamdtime[0]::STACK \\ + AREA:t2#$colorspamdtime[1]::STACK \\ + AREA:t3#$colorspamdtime[2]::STACK \\ + LINE2:timeavgadj#$colorspamdtime[3]:\"Time \" \\ + GPRINT:timeminadj:MIN:\"Min\\:%6.2lf\\t\" \\ + GPRINT:timeavgadj:AVERAGE:\"Avg\\:%6.2lf\\t\" \\ + GPRINT:timemaxadj:MAX:\"Max\\:%6.2lf\\n\" \\ + AREA:consmax#$colorspamdconn[0] \\ + AREA:consmin#$colorspamdconn[1] \\ + LINE1:consmin#$colorspamdconn[2] \\ + LINE1:consmax#$colorspamdconn[3] \\ + LINE1:consavg#$colorspamdconn[4]:\"Cons \" \\ + GPRINT:consmin:MIN:\"Min\\:%6.2lf\\t\" \\ + GPRINT:consavg:AVERAGE:\"Avg\\:%6.2lf\\t\" \\ + GPRINT:consmax:MAX:\"Max\\:%6.2lf\\n\" \\ + COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-cellular.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"signal\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"$curif-rssi=$rrddbpath$curdatabase:rssi:AVERAGE:step=$step\" "; + $graphcmd .= "LINE2:\"$curif-rssi#{$colorwireless[0]}:$curif-rssi\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t maximum\t\t average\t current\\n\" "; + $graphcmd .= "COMMENT:\"RSSI\t\t\" "; + $graphcmd .= "GPRINT:\"$curif-rssi:MAX:%7.2lf \" "; + $graphcmd .= "GPRINT:\"$curif-rssi:AVERAGE:%7.2lf \" "; + $graphcmd .= "GPRINT:\"$curif-rssi:LAST:%7.2lf \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-loggedin.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for online Captive Portal users stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"Captive Portal Users\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--base=1000 "; + $graphcmd .= "--lower-limit=0 "; + $graphcmd .= "--slope-mode "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"$curif-loggedinusers=$rrddbpath$curdatabase:loggedinusers:AVERAGE:step=$step\" "; + $graphcmd .= "CDEF:\"$curif-totalusers_t=PREV,UN,0,PREV,IF,$curif-loggedinusers,+\" "; + $graphcmd .= "CDEF:\"$curif-totalusers_d=$curif-totalusers_t,FLOOR\" "; + $graphcmd .= "AREA:\"$curif-totalusers_d#{$colorcaptiveportalusers[0]}:Total logged in users\" "; + $graphcmd .= "GPRINT:\"$curif-totalusers_d:MAX:%8.0lf \\n\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "-concurrent.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for online Captive Portal users stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"Captive Portal Users\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--base=1000 "; + $graphcmd .= "--lower-limit=0 "; + $graphcmd .= "--slope-mode "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"$curif-concurrentusers=$rrddbpath$curdatabase:concurrentusers:AVERAGE:step=$step\" "; + $graphcmd .= "AREA:\"$curif-concurrentusers#{$colorcaptiveportalusers[0]}:Concurrent Users\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t current\t\t average\t maximum\\n\" "; + $graphcmd .= "COMMENT:\"Users Online\t\" "; + $graphcmd .= "GPRINT:\"$curif-concurrentusers:LAST:%8.0lf \" "; + $graphcmd .= "GPRINT:\"$curif-concurrentusers:AVERAGE:%8.0lf \" "; + $graphcmd .= "GPRINT:\"$curif-concurrentusers:MAX:%8.0lf \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} elseif ((strstr($curdatabase, "ntpd.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for ntpd (was: mbuf) usage stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end --step $step "; + $graphcmd .= "--vertical-label \"time\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"offset=$rrddbpath$curdatabase:offset:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"sjit=$rrddbpath$curdatabase:sjit:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"cjit=$rrddbpath$curdatabase:cjit:AVERAGE:step=$step\" "; + $graphcmd .= "DEF:\"wander=$rrddbpath$curdatabase:wander:AVERAGE:step=$step\" "; + $graphcmd .= "LINE2:\"offset#{$colorntpd[0]}:offset\" "; + $graphcmd .= "LINE2:\"sjit#{$colorntpd[1]}:sjit\" "; + $graphcmd .= "LINE2:\"cjit#{$colorntpd[2]}:cjit\" "; + $graphcmd .= "LINE2:\"wander#{$colorntpd[3]}:wander\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t minimum average maximum current\\n\" "; + $graphcmd .= "COMMENT:\"Offset \" "; + $graphcmd .= "GPRINT:\"offset:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"offset:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"offset:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"offset:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"System jitter \" "; + $graphcmd .= "GPRINT:\"sjit:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"sjit:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"sjit:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"sjit:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Clock jitter \" "; + $graphcmd .= "GPRINT:\"cjit:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"cjit:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"cjit:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"cjit:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"Clk freq wander\" "; + $graphcmd .= "GPRINT:\"wander:MIN:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"wander:AVERAGE:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"wander:MAX:%7.2lf %s \" "; + $graphcmd .= "GPRINT:\"wander:LAST:%7.2lf %S \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" "; +} else { + $data = false; + log_error(sprintf(gettext("Sorry we do not have data to graph for %s"),$curdatabase)); +} + +/* check modification time to see if we need to generate image */ +if (file_exists("$rrdtmppath$curdatabase-$curgraph.png")) { + if ((time() - filemtime("$rrdtmppath$curdatabase-$curgraph.png")) >= 15) { + if ($data) { + $_gb = exec("$graphcmd 2>&1", $graphcmdoutput, $graphcmdreturn); + $graphcmdoutput = implode(" ", $graphcmdoutput) . $graphcmd; + flush(); + usleep(500); + } + } +} else { + if ($data) { + $_gb = exec("$graphcmd 2>&1", $graphcmdoutput, $graphcmdreturn); + $graphcmdoutput = implode(" ", $graphcmdoutput) . $graphcmd; + flush(); + usleep(500); + } +} +if (($graphcmdreturn <> 0) || (!$data)) { + log_error(sprintf(gettext('Failed to create graph with error code %1$s, the error is: %2$s'), $graphcmdreturn, $graphcmdoutput)); + if (strstr($curdatabase, "queues")) { + log_error(sprintf(gettext("failed to create graph from %s%s, removing database"), $rrddbpath, $curdatabase)); + unlink_if_exists($rrddbpath . $curif . $queues); + flush(); + usleep(500); + enable_rrd_graphing(); + } + if (strstr($curdatabase, "queuesdrop")) { + log_error(sprintf(gettext("failed to create graph from %s%s, removing database"), $rrddbpath, $curdatabase)); + unlink_if_exists($rrddbpath . $curdatabase); + flush(); + usleep(500); + enable_rrd_graphing(); + } + header("Content-type: image/png"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: no-cache, no-store, must-revalidate"); + header("Pragma: no-cache"); + $file= "/usr/local/www/themes/{$g['theme']}/images/misc/rrd_error.png"; + readfile($file); +} else { + $file = "$rrdtmppath$curdatabase-$curgraph.png"; + if (file_exists("$file")) { + header("Content-type: image/png"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: no-cache, no-store, must-revalidate"); + header("Pragma: no-cache"); + readfile($file); + } +} + +?> diff --git a/src/usr/local/www/status_rrd_graph_settings.php b/src/usr/local/www/status_rrd_graph_settings.php new file mode 100644 index 0000000..ede9f41 --- /dev/null +++ b/src/usr/local/www/status_rrd_graph_settings.php @@ -0,0 +1,316 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/bin/find + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-status-rrdgraph-settings +##|*NAME=Status: RRD Graphs settings page +##|*DESCR=Allow access to the 'Status: RRD Graphs: settings' page. +##|*MATCH=status_rrd_graph_settings.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("filter.inc"); +require("shaper.inc"); +require_once("rrd.inc"); + +$pconfig['enable'] = isset($config['rrd']['enable']); +$pconfig['category'] = $config['rrd']['category']; +$pconfig['style'] = $config['rrd']['style']; +$pconfig['period'] = $config['rrd']['period']; + +$curcat = "settings"; +$categories = array('system' => gettext("System"), + 'traffic' => gettext("Traffic"), + 'packets' => gettext("Packets"), + 'quality' => gettext("Quality"), + 'queues' => gettext("Queues"), + 'captiveportal' => gettext("Captive Portal")); + +if (isset($config['ntpd']['statsgraph'])) { + $categories['ntpd'] = gettext("NTP"); +} + +$styles = array('inverse' => gettext("Inverse"), + 'absolute' => gettext("Absolute")); +$periods = array("absolute" => gettext("Absolute Timespans"), + "current" => gettext("Current Period"), + "previous" => gettext("Previous Period")); + +if ($_POST['ResetRRD']) { + mwexec('/bin/rm /var/db/rrd/*'); + enable_rrd_graphing(); + setup_gateways_monitor(); + $savemsg = "RRD data has been cleared. New RRD files have been generated."; +} elseif ($_POST) { + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + /* none */ + + if (!$input_errors) { + $config['rrd']['enable'] = $_POST['enable'] ? true : false; + $config['rrd']['category'] = $_POST['category']; + $config['rrd']['style'] = $_POST['style']; + $config['rrd']['period'] = $_POST['period']; + write_config(); + + $retval = 0; + $retval = enable_rrd_graphing(); + $savemsg = get_std_save_message($retval); + } +} + +$rrddbpath = "/var/db/rrd/"; +chdir($rrddbpath); +$databases = glob("*.rrd"); + +foreach ($databases as $database) { + if (stristr($database, "wireless")) { + $wireless = true; + } + if (stristr($database, "queues")) { + $queues = true; + } + if (stristr($database, "-cellular") && !empty($config['ppps'])) { + $cellular = true; + } + if (stristr($database, "-vpnusers")) { + $vpnusers = true; + } + if (stristr($database, "captiveportal-") && is_array($config['captiveportal'])) { + $captiveportal = true; + } +} + +$pgtitle = array(gettext("Status"), gettext("RRD Graphs")); +include("head.inc"); + +?> + + + + +
                            + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + onclick="enable_change(false)" /> + +
                            + + +
                            + + +
                            + + +
                              + " onclick="enable_change(true)" /> +
                              + " onclick="return confirm('')" /> +
                             
                            + +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/status_services.php b/src/usr/local/www/status_services.php new file mode 100755 index 0000000..ac13b32 --- /dev/null +++ b/src/usr/local/www/status_services.php @@ -0,0 +1,135 @@ + + + + +
                            + + +
                            + + + + + + + + + + 0) { + uasort($services, "service_name_compare"); + foreach ($services as $service) { + if (empty($service['name'])) { + continue; + } + if (empty($service['description'])) { + $service['description'] = get_pkg_descr($service['name']); + } + echo "\n"; + echo "\n"; + // if service is running then listr else listbg + $bgclass = null; + if (get_service_status($service)) { + $bgclass = "listr"; + } else { + $bgclass = "listbg"; + } + echo "\n"; + echo "\n"; + } +} else { + echo "\n"; +} + +?> + +
                            " . $service['name'] . "" . $service['description'] . "" . get_service_status_icon($service, true, true) . "" . get_service_control_links($service); + $scut = get_shortcut_by_service_name($service['name']); + if (!empty($scut)) { + echo get_shortcut_main_link($scut, true, $service); + echo get_shortcut_status_link($scut, true, $service); + echo get_shortcut_log_link($scut, true); + } + echo "
                            " . gettext("No services found") . " .
                            +
                            +
                            + + + diff --git a/src/usr/local/www/status_upnp.php b/src/usr/local/www/status_upnp.php new file mode 100644 index 0000000..62349df --- /dev/null +++ b/src/usr/local/www/status_upnp.php @@ -0,0 +1,130 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /sbin/pfctl + pfSense_MODULE: upnp +*/ + +##|+PRIV +##|*IDENT=page-status-upnpstatus +##|*NAME=Status: UPnP Status page +##|*DESCR=Allow access to the 'Status: UPnP Status' page. +##|*MATCH=status_upnp.php* +##|-PRIV + +require("guiconfig.inc"); + +if ($_POST) { + if ($_POST['clear'] == "Clear") { + upnp_action('restart'); + $savemsg = gettext("Rules have been cleared and the daemon restarted"); + } +} + +$rdr_entries = array(); +exec("/sbin/pfctl -aminiupnpd -sn", $rdr_entries, $pf_ret); + +$now = time(); +$year = date("Y"); + +$pgtitle = array(gettext("Status"), gettext("UPnP & NAT-PMP Status")); +$shortcut_section = "upnp"; +include("head.inc"); +?> + + + + +
                            + + + + + + + +
                            +
                            + " /> . +
                            +
                            + + + + + + + + + (.*) port (.*)/", $rdr_entry, $matches)) { + $rdr_proto = $matches[2]; + $rdr_port = $matches[3]; + $rdr_label =$matches[4]; + $rdr_ip = $matches[5]; + $rdr_iport = $matches[6]; +?> + + + + + + + + +
                            + + + + + + + + + +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/status_wireless.php b/src/usr/local/www/status_wireless.php new file mode 100644 index 0000000..be51458 --- /dev/null +++ b/src/usr/local/www/status_wireless.php @@ -0,0 +1,201 @@ + "") { + $if = $_GET['if']; +} + +$ciflist = get_configured_interface_with_descr(); +if (empty($if)) { + /* Find the first interface + that is wireless */ + foreach ($ciflist as $interface => $ifdescr) { + if (is_interface_wireless(get_real_interface($interface))) { + $if = $interface; + break; + } + } +} +?> + + + +
                            + + + + + + + +
                            + $ifdescr) { + if (is_interface_wireless(get_real_interface($interface))) { + $enabled = false; + if ($if == $interface) { + $enabled = true; + } + $tab_array[] = array(gettext("Status") . " ({$ifdescr})", $enabled, "status_wireless.php?if={$interface}"); + } + } + $rwlif = get_real_interface($if); + if ($_POST['rescanwifi'] <> "") { + mwexec_bg("/sbin/ifconfig {$rwlif} scan 2>&1"); + $savemsg = gettext("Rescan has been initiated in the background. Refresh this page in 10 seconds to see the results."); + } + if ($savemsg) print_info_box($savemsg); + display_top_tabs($tab_array); +?> +
                            +
                            + +

                            + + + + + + + + + + + + + + +&1", $states, $ret); + /* Skip Header */ + array_shift($states); + + $counter = 0; + foreach ($states as $state) { + /* Split by Mac address for the SSID Field */ + $split = preg_split("/([0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f])/i", $state); + preg_match("/([0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f]\:[0-9a-f][[0-9a-f])/i", $state, $bssid); + $ssid = htmlspecialchars($split[0]); + $bssid = $bssid[0]; + /* Split the rest by using spaces for this line using the 2nd part */ + $split = preg_split("/[ ]+/i", $split[1]); + $channel = $split[1]; + $rate = $split[2]; + $rssi = $split[3]; + $int = $split[4]; + $caps = "$split[5] $split[6] $split[7] $split[8] $split[9] $split[10] $split[11] "; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } +?> + +
                            SSIDBSSIDCHANRATERSSIINTCAPS
                            {$ssid}{$bssid}{$channel}{$rate}{$rssi}{$int}{$caps}
                            +
                            + + + + + + + + + + + + + + + + + +&1", $states, $ret); + array_shift($states); + + $counter = 0; + foreach ($states as $state) { + $split = preg_split("/[ ]+/i", $state); + /* Split the rest by using spaces for this line using the 2nd part */ + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + +/* XXX: what stats to we get for adhoc mode? */ + +?> + +
                            ADDRAIDCHANRATERSSIIDLETXSEQRXSEQCAPSERP
                            {$split[0]}{$split[1]}{$split[2]}{$split[3]}{$split[4]}{$split[5]}{$split[6]}{$split[7]}{$split[8]}{$split[9]}
                            +
                            +
                            + Flags: A = Authorized, E = Extended Rate (802.11g), P = Power save mode, H = High Throughput (HT), Q = QoS (WME)
                            + Capabilities: WME = Wireless Multimedia Extensions (QoS), WPA = Wi-Fi Protected Access, RSN = 802.11i, HTCAP = 802.11n High Throughput, ATH = Atheros protocol extensions
                            +
                            + + + + diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php new file mode 100644 index 0000000..b275129 --- /dev/null +++ b/src/usr/local/www/system.php @@ -0,0 +1,565 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /bin/kill /usr/bin/tar + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-system-generalsetup +##|*NAME=System: General Setup page +##|*DESCR=Allow access to the 'System: General Setup' page. +##|*MATCH=system.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +$pconfig['hostname'] = $config['system']['hostname']; +$pconfig['domain'] = $config['system']['domain']; +list($pconfig['dns1'], $pconfig['dns2'], $pconfig['dns3'], $pconfig['dns4']) = $config['system']['dnsserver']; + +$arr_gateways = return_gateways_array(); + +$pconfig['dns1gw'] = $config['system']['dns1gw']; +$pconfig['dns2gw'] = $config['system']['dns2gw']; +$pconfig['dns3gw'] = $config['system']['dns3gw']; +$pconfig['dns4gw'] = $config['system']['dns4gw']; + +$pconfig['dnsallowoverride'] = isset($config['system']['dnsallowoverride']); +$pconfig['timezone'] = $config['system']['timezone']; +$pconfig['timeupdateinterval'] = $config['system']['time-update-interval']; +$pconfig['timeservers'] = $config['system']['timeservers']; +$pconfig['theme'] = $config['system']['theme']; +$pconfig['language'] = $config['system']['language']; + +$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']); + +if (!isset($pconfig['timeupdateinterval'])) { + $pconfig['timeupdateinterval'] = 300; +} +if (!$pconfig['timezone']) { + $pconfig['timezone'] = "Etc/UTC"; +} +if (!$pconfig['timeservers']) { + $pconfig['timeservers'] = "pool.ntp.org"; +} + +$changedesc = gettext("System") . ": "; +$changecount = 0; + +function is_timezone($elt) { + return !preg_match("/\/$/", $elt); +} + +if ($pconfig['timezone'] <> $_POST['timezone']) { + filter_pflog_start(true); +} + +exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist); +$timezonelist = array_filter($timezonelist, 'is_timezone'); +sort($timezonelist); + +$multiwan = false; +$interfaces = get_configured_interface_list(); +foreach ($interfaces as $interface) { + if (interface_has_gateway($interface)) { + $multiwan = true; + } +} + +if ($_POST) { + + $changecount++; + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "hostname domain"); + $reqdfieldsn = array(gettext("Hostname"), gettext("Domain")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($_POST['hostname']) { + if (!is_hostname($_POST['hostname'])) { + $input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'. It may not start or end with '-'."); + } else { + if (!is_unqualified_hostname($_POST['hostname'])) { + $input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted"); + } + } + } + if ($_POST['domain'] && !is_domain($_POST['domain'])) { + $input_errors[] = gettext("The domain may only contain the characters a-z, 0-9, '-' and '.'."); + } + + $ignore_posted_dnsgw = array(); + + for ($dnscounter=1; $dnscounter<5; $dnscounter++) { + $dnsname="dns{$dnscounter}"; + $dnsgwname="dns{$dnscounter}gw"; + if (($_POST[$dnsname] && !is_ipaddr($_POST[$dnsname]))) { + $input_errors[] = gettext("A valid IP address must be specified for DNS server $dnscounter."); + } else { + if (($_POST[$dnsgwname] <> "") && ($_POST[$dnsgwname] <> "none")) { + // A real gateway has been selected. + if (is_ipaddr($_POST[$dnsname])) { + if ((is_ipaddrv4($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false)) { + $input_errors[] = gettext("You can not specify IPv6 gateway '{$_POST[$dnsgwname]}' for IPv4 DNS server '{$_POST[$dnsname]}'"); + } + if ((is_ipaddrv6($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false)) { + $input_errors[] = gettext("You can not specify IPv4 gateway '{$_POST[$dnsgwname]}' for IPv6 DNS server '{$_POST[$dnsname]}'"); + } + } else { + // The user selected a gateway but did not provide a DNS address. Be nice and set the gateway back to "none". + $ignore_posted_dnsgw[$dnsgwname] = true; + } + } + } + } + + $direct_networks_list = explode(" ", filter_get_direct_networks_list()); + for ($dnscounter=1; $dnscounter<5; $dnscounter++) { + $dnsitem = "dns{$dnscounter}"; + $dnsgwitem = "dns{$dnscounter}gw"; + if ($_POST[$dnsgwitem]) { + if (interface_has_gateway($_POST[$dnsgwitem])) { + foreach ($direct_networks_list as $direct_network) { + if (ip_in_subnet($_POST[$dnsitem], $direct_network)) { + $input_errors[] = sprintf(gettext("You can not assign a gateway to DNS '%s' server which is on a directly connected network."), $_POST[$dnsitem]); + } + } + } + } + } + + $t = (int)$_POST['timeupdateinterval']; + if (($t < 0) || (($t > 0) && ($t < 6)) || ($t > 1440)) { + $input_errors[] = gettext("The time update interval must be either 0 (disabled) or between 6 and 1440."); + } + # it's easy to have a little too much whitespace in the field, clean it up for the user before processing. + $_POST['timeservers'] = preg_replace('/[[:blank:]]+/', ' ', $_POST['timeservers']); + $_POST['timeservers'] = trim($_POST['timeservers']); + foreach (explode(' ', $_POST['timeservers']) as $ts) { + if (!is_domain($ts)) { + $input_errors[] = gettext("A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'."); + } + } + + if (!$input_errors) { + update_if_changed("hostname", $config['system']['hostname'], $_POST['hostname']); + update_if_changed("domain", $config['system']['domain'], $_POST['domain']); + + update_if_changed("timezone", $config['system']['timezone'], $_POST['timezone']); + update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers'])); + update_if_changed("NTP update interval", $config['system']['time-update-interval'], $_POST['timeupdateinterval']); + + if ($_POST['language'] && $_POST['language'] != $config['system']['language']) { + $config['system']['language'] = $_POST['language']; + set_language($config['system']['language']); + } + + /* pfSense themes */ + if (!$g['disablethemeselection']) { + update_if_changed("System Theme", $config['theme'], $_POST['theme']); + } + + /* XXX - billm: these still need updating after figuring out how to check if they actually changed */ + $olddnsservers = $config['system']['dnsserver']; + unset($config['system']['dnsserver']); + if ($_POST['dns1']) { + $config['system']['dnsserver'][] = $_POST['dns1']; + } + if ($_POST['dns2']) { + $config['system']['dnsserver'][] = $_POST['dns2']; + } + if ($_POST['dns3']) { + $config['system']['dnsserver'][] = $_POST['dns3']; + } + if ($_POST['dns4']) { + $config['system']['dnsserver'][] = $_POST['dns4']; + } + + $olddnsallowoverride = $config['system']['dnsallowoverride']; + + unset($config['system']['dnsallowoverride']); + $config['system']['dnsallowoverride'] = $_POST['dnsallowoverride'] ? true : false; + + if ($_POST['dnslocalhost'] == "yes") { + $config['system']['dnslocalhost'] = true; + } else { + unset($config['system']['dnslocalhost']); + } + + /* which interface should the dns servers resolve through? */ + $outdnscounter = 0; + for ($dnscounter=1; $dnscounter<5; $dnscounter++) { + $dnsname="dns{$dnscounter}"; + $dnsgwname="dns{$dnscounter}gw"; + $olddnsgwname = $config['system'][$dnsgwname]; + + if ($ignore_posted_dnsgw[$dnsgwname]) { + $thisdnsgwname = "none"; + } else { + $thisdnsgwname = $pconfig[$dnsgwname]; + } + + // "Blank" out the settings for this index, then we set them below using the "outdnscounter" index. + $config['system'][$dnsgwname] = "none"; + $pconfig[$dnsgwname] = "none"; + $pconfig[$dnsname] = ""; + + if ($_POST[$dnsname]) { + // Only the non-blank DNS servers were put into the config above. + // So we similarly only add the corresponding gateways sequentially to the config (and to pconfig), as we find non-blank DNS servers. + // This keeps the DNS server IP and corresponding gateway "lined up" when the user blanks out a DNS server IP in the middle of the list. + $outdnscounter++; + $outdnsname="dns{$outdnscounter}"; + $outdnsgwname="dns{$outdnscounter}gw"; + $pconfig[$outdnsname] = $_POST[$dnsname]; + if ($_POST[$dnsgwname]) { + $config['system'][$outdnsgwname] = $thisdnsgwname; + $pconfig[$outdnsgwname] = $thisdnsgwname; + } else { + // Note: when no DNS GW name is chosen, the entry is set to "none", so actually this case never happens. + unset($config['system'][$outdnsgwname]); + $pconfig[$outdnsgwname] = ""; + } + } + if (($olddnsgwname != "") && ($olddnsgwname != "none") && (($olddnsgwname != $thisdnsgwname) || ($olddnsservers[$dnscounter-1] != $_POST[$dnsname]))) { + // A previous DNS GW name was specified. It has now gone or changed, or the DNS server address has changed. + // Remove the route. Later calls will add the correct new route if needed. + if (is_ipaddrv4($olddnsservers[$dnscounter-1])) { + mwexec("/sbin/route delete " . escapeshellarg($olddnsservers[$dnscounter-1])); + } else { + if (is_ipaddrv6($olddnsservers[$dnscounter-1])) { + mwexec("/sbin/route delete -inet6 " . escapeshellarg($olddnsservers[$dnscounter-1])); + } + } + } + } + + if ($changecount > 0) { + write_config($changedesc); + } + + $retval = 0; + $retval = system_hostname_configure(); + $retval |= system_hosts_generate(); + $retval |= system_resolvconf_generate(); + if (isset($config['dnsmasq']['enable'])) { + $retval |= services_dnsmasq_configure(); + } elseif (isset($config['unbound']['enable'])) { + $retval |= services_unbound_configure(); + } + $retval |= system_timezone_configure(); + $retval |= system_ntp_configure(); + + if ($olddnsallowoverride != $config['system']['dnsallowoverride']) { + $retval |= send_event("service reload dns"); + } + + // Reload the filter - plugins might need to be run. + $retval |= filter_configure(); + + $savemsg = get_std_save_message($retval); + } + + unset($ignore_posted_dnsgw); +} + +$pgtitle = array(gettext("System"), gettext("General Setup")); +include("head.inc"); + +?> + + + + + + + + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            +
                            + + +
                            + firewall +
                            +
                            +
                            + + +
                            + +
                            +
                            +
                            + + + + + + + + + + + + + +
                            + + + + + +
                            +
                            + + +
                            + +
                            + +
                            + +
                            + /> + + + +
                            + +
                            +
                            + /> + + + +
                            + +
                            +
                            + +
                            + + + +
                            + +
                            + + + +
                            + + + + +
                             
                              + + + + . + +
                             
                              + " /> +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/system_advanced_admin.php b/src/usr/local/www/system_advanced_admin.php new file mode 100644 index 0000000..a449452 --- /dev/null +++ b/src/usr/local/www/system_advanced_admin.php @@ -0,0 +1,657 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/bin/killall + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-system-advanced-admin +##|*NAME=System: Advanced: Admin Access Page +##|*DESCR=Allow access to the 'System: Advanced: Admin Access' page. +##|*MATCH=system_advanced_admin.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +$pconfig['webguiproto'] = $config['system']['webgui']['protocol']; +$pconfig['webguiport'] = $config['system']['webgui']['port']; +$pconfig['max_procs'] = ($config['system']['webgui']['max_procs']) ? $config['system']['webgui']['max_procs'] : 2; +$pconfig['ssl-certref'] = $config['system']['webgui']['ssl-certref']; +$pconfig['disablehttpredirect'] = isset($config['system']['webgui']['disablehttpredirect']); +$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']); +$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']); +$pconfig['nodnsrebindcheck'] = isset($config['system']['webgui']['nodnsrebindcheck']); +$pconfig['nohttpreferercheck'] = isset($config['system']['webgui']['nohttpreferercheck']); +$pconfig['pagenamefirst'] = isset($config['system']['webgui']['pagenamefirst']); +$pconfig['loginautocomplete'] = isset($config['system']['webgui']['loginautocomplete']); +$pconfig['althostnames'] = $config['system']['webgui']['althostnames']; +$pconfig['enableserial'] = $config['system']['enableserial']; +$pconfig['serialspeed'] = $config['system']['serialspeed']; +$pconfig['primaryconsole'] = $config['system']['primaryconsole']; +$pconfig['enablesshd'] = $config['system']['enablesshd']; +$pconfig['sshport'] = $config['system']['ssh']['port']; +$pconfig['sshdkeyonly'] = isset($config['system']['ssh']['sshdkeyonly']); +$pconfig['quietlogin'] = isset($config['system']['webgui']['quietlogin']); + +$a_cert =& $config['cert']; + +$certs_available = false; +if (is_array($a_cert) && count($a_cert)) { + $certs_available = true; +} + +if (!$pconfig['webguiproto'] || !$certs_available) { + $pconfig['webguiproto'] = "http"; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if ($_POST['webguiport']) { + if (!is_port($_POST['webguiport'])) { + $input_errors[] = gettext("You must specify a valid webConfigurator port number"); + } + } + + if ($_POST['max_procs']) { + if (!is_numericint($_POST['max_procs']) || ($_POST['max_procs'] < 1) || ($_POST['max_procs'] > 500)) { + $input_errors[] = gettext("Max Processes must be a number 1 or greater"); + } + } + + if ($_POST['althostnames']) { + $althosts = explode(" ", $_POST['althostnames']); + foreach ($althosts as $ah) { + if (!is_hostname($ah)) { + $input_errors[] = sprintf(gettext("Alternate hostname %s is not a valid hostname."), htmlspecialchars($ah)); + } + } + } + + if ($_POST['sshport']) { + if (!is_port($_POST['sshport'])) { + $input_errors[] = gettext("You must specify a valid port number"); + } + } + + if ($_POST['sshdkeyonly'] == "yes") { + $config['system']['ssh']['sshdkeyonly'] = "enabled"; + } else if (isset($config['system']['ssh']['sshdkeyonly'])) { + unset($config['system']['ssh']['sshdkeyonly']); + } + + ob_flush(); + flush(); + + if (!$input_errors) { + + if (update_if_changed("webgui protocol", $config['system']['webgui']['protocol'], $_POST['webguiproto'])) { + $restart_webgui = true; + } + if (update_if_changed("webgui port", $config['system']['webgui']['port'], $_POST['webguiport'])) { + $restart_webgui = true; + } + if (update_if_changed("webgui certificate", $config['system']['webgui']['ssl-certref'], $_POST['ssl-certref'])) { + $restart_webgui = true; + } + if (update_if_changed("webgui max processes", $config['system']['webgui']['max_procs'], $_POST['max_procs'])) { + $restart_webgui = true; + } + + if ($_POST['disablehttpredirect'] == "yes") { + $config['system']['webgui']['disablehttpredirect'] = true; + $restart_webgui = true; + } else { + unset($config['system']['webgui']['disablehttpredirect']); + $restart_webgui = true; + } + if ($_POST['quietlogin'] == "yes") { + $config['system']['webgui']['quietlogin'] = true; + } else { + unset($config['system']['webgui']['quietlogin']); + } + + if ($_POST['disableconsolemenu'] == "yes") { + $config['system']['disableconsolemenu'] = true; + } else { + unset($config['system']['disableconsolemenu']); + } + + if ($_POST['noantilockout'] == "yes") { + $config['system']['webgui']['noantilockout'] = true; + } else { + unset($config['system']['webgui']['noantilockout']); + } + + if ($_POST['enableserial'] == "yes" || $g['enableserial_force']) { + $config['system']['enableserial'] = true; + } else { + unset($config['system']['enableserial']); + } + + if (is_numericint($_POST['serialspeed'])) { + $config['system']['serialspeed'] = $_POST['serialspeed']; + } else { + unset($config['system']['serialspeed']); + } + + if ($_POST['primaryconsole']) { + $config['system']['primaryconsole'] = $_POST['primaryconsole']; + } else { + unset($config['system']['primaryconsole']); + } + + if ($_POST['nodnsrebindcheck'] == "yes") { + $config['system']['webgui']['nodnsrebindcheck'] = true; + } else { + unset($config['system']['webgui']['nodnsrebindcheck']); + } + + if ($_POST['nohttpreferercheck'] == "yes") { + $config['system']['webgui']['nohttpreferercheck'] = true; + } else { + unset($config['system']['webgui']['nohttpreferercheck']); + } + + if ($_POST['pagenamefirst'] == "yes") { + $config['system']['webgui']['pagenamefirst'] = true; + } else { + unset($config['system']['webgui']['pagenamefirst']); + } + + if ($_POST['loginautocomplete'] == "yes") { + $config['system']['webgui']['loginautocomplete'] = true; + } else { + unset($config['system']['webgui']['loginautocomplete']); + } + + if ($_POST['althostnames']) { + $config['system']['webgui']['althostnames'] = $_POST['althostnames']; + } else { + unset($config['system']['webgui']['althostnames']); + } + + $sshd_enabled = $config['system']['enablesshd']; + if ($_POST['enablesshd']) { + $config['system']['enablesshd'] = "enabled"; + } else { + unset($config['system']['enablesshd']); + } + + $sshd_keyonly = isset($config['system']['sshdkeyonly']); + if ($_POST['sshdkeyonly']) { + $config['system']['sshdkeyonly'] = true; + } else { + unset($config['system']['sshdkeyonly']); + } + + $sshd_port = $config['system']['ssh']['port']; + if ($_POST['sshport']) { + $config['system']['ssh']['port'] = $_POST['sshport']; + } else if (isset($config['system']['ssh']['port'])) { + unset($config['system']['ssh']['port']); + } + + if (($sshd_enabled != $config['system']['enablesshd']) || + ($sshd_keyonly != $config['system']['sshdkeyonly']) || + ($sshd_port != $config['system']['ssh']['port'])) { + $restart_sshd = true; + } + + if ($restart_webgui) { + global $_SERVER; + $http_host_port = explode("]", $_SERVER['HTTP_HOST']); + /* IPv6 address check */ + if (strstr($_SERVER['HTTP_HOST'], "]")) { + if (count($http_host_port) > 1) { + array_pop($http_host_port); + $host = str_replace(array("[", "]"), "", implode(":", $http_host_port)); + $host = "[{$host}]"; + } else { + $host = str_replace(array("[", "]"), "", implode(":", $http_host_port)); + $host = "[{$host}]"; + } + } else { + list($host) = explode(":", $_SERVER['HTTP_HOST']); + } + $prot = $config['system']['webgui']['protocol']; + $port = $config['system']['webgui']['port']; + if ($port) { + $url = "{$prot}://{$host}:{$port}/system_advanced_admin.php"; + } else { + $url = "{$prot}://{$host}/system_advanced_admin.php"; + } + } + + write_config(); + + $retval = filter_configure(); + $savemsg = get_std_save_message($retval); + + if ($restart_webgui) { + $savemsg .= sprintf("
                            " . gettext("One moment...redirecting to %s in 20 seconds."), $url); + } + + conf_mount_rw(); + setup_serial_port(); + // Restart DNS in case dns rebinding toggled + if (isset($config['dnsmasq']['enable'])) { + services_dnsmasq_configure(); + } elseif (isset($config['unbound']['enable'])) { + services_unbound_configure(); + } + conf_mount_ro(); + } +} + +$pgtitle = array(gettext("System"), gettext("Advanced: Admin Access")); +include("head.inc"); + +?> + + + + + +
                            + + + + + + + +
                            + +
                            +
                            + + +   + + +
                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + onclick="prot_change()" /> + +     + onclick="prot_change()" /> + + +
                            + + + + +
                            + +
                            + +
                            + + + +
                            + +
                            + + + +
                            + /> + +
                            + +
                            + /> + +
                            + +
                            + /> + +
                            + +
                            + + /> + +
                            + + +
                            + /> + +
                            + DNS Rebinding attacks. " . + "This blocks private IP responses from your configured DNS servers. Check this box to disable this protection if it interferes with " . + "webConfigurator access or name resolution in your environment. "); ?> +
                            + +
                            + +
                            + +
                            + /> + +
                            + Wikipedia."); ?> +
                            + /> + +
                            + +
                            + +
                             
                            + /> + +
                            + /> + +
                            + + + +
                            + +
                            + +
                             
                            + /> + + null modem serial cable or adapter is required to use the serial console."); ?> +
                            + bps +
                            +
                            + +
                            +
                             
                            + /> + +
                             
                             " />
                             
                            +
                            +
                            +
                            + + + +"; + } +?> + + + + diff --git a/src/usr/local/www/system_advanced_firewall.php b/src/usr/local/www/system_advanced_firewall.php new file mode 100644 index 0000000..fc6b0ed --- /dev/null +++ b/src/usr/local/www/system_advanced_firewall.php @@ -0,0 +1,807 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-system-advanced-firewall +##|*NAME=System: Advanced: Firewall and NAT page +##|*DESCR=Allow access to the 'System: Advanced: Firewall and NAT' page. +##|*MATCH=system_advanced_firewall.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +$pconfig['disablefilter'] = $config['system']['disablefilter']; +$pconfig['rfc959workaround'] = $config['system']['rfc959workaround']; +$pconfig['scrubnodf'] = $config['system']['scrubnodf']; +$pconfig['scrubrnid'] = $config['system']['scrubrnid']; +$pconfig['tcpidletimeout'] = $config['filter']['tcpidletimeout']; +$pconfig['optimization'] = $config['filter']['optimization']; +$pconfig['adaptivestart'] = $config['system']['adaptivestart']; +$pconfig['adaptiveend'] = $config['system']['adaptiveend']; +$pconfig['maximumstates'] = $config['system']['maximumstates']; +$pconfig['aliasesresolveinterval'] = $config['system']['aliasesresolveinterval']; +$old_aliasesresolveinterval = $config['system']['aliasesresolveinterval']; +$pconfig['checkaliasesurlcert'] = isset($config['system']['checkaliasesurlcert']); +$pconfig['maximumtableentries'] = $config['system']['maximumtableentries']; +$pconfig['maximumfrags'] = $config['system']['maximumfrags']; +$pconfig['disablereplyto'] = isset($config['system']['disablereplyto']); +$pconfig['disablenegate'] = isset($config['system']['disablenegate']); +$pconfig['bogonsinterval'] = $config['system']['bogons']['interval']; +$pconfig['disablenatreflection'] = $config['system']['disablenatreflection']; +$pconfig['enablebinatreflection'] = $config['system']['enablebinatreflection']; +$pconfig['reflectiontimeout'] = $config['system']['reflectiontimeout']; +$pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']); +$pconfig['disablescrub'] = isset($config['system']['disablescrub']); +$pconfig['tftpinterface'] = explode(",", $config['system']['tftpinterface']); +$pconfig['disablevpnrules'] = isset($config['system']['disablevpnrules']); +$pconfig['tcpfirsttimeout'] = $config['system']['tcpfirsttimeout']; +$pconfig['tcpopeningtimeout'] = $config['system']['tcpopeningtimeout']; +$pconfig['tcpestablishedtimeout'] = $config['system']['tcpestablishedtimeout']; +$pconfig['tcpclosingtimeout'] = $config['system']['tcpclosingtimeout']; +$pconfig['tcpfinwaittimeout'] = $config['system']['tcpfinwaittimeout']; +$pconfig['tcpclosedtimeout'] = $config['system']['tcpclosedtimeout']; +$pconfig['udpfirsttimeout'] = $config['system']['udpfirsttimeout']; +$pconfig['udpsingletimeout'] = $config['system']['udpsingletimeout']; +$pconfig['udpmultipletimeout'] = $config['system']['udpmultipletimeout']; +$pconfig['icmpfirsttimeout'] = $config['system']['icmpfirsttimeout']; +$pconfig['icmperrortimeout'] = $config['system']['icmperrortimeout']; +$pconfig['otherfirsttimeout'] = $config['system']['otherfirsttimeout']; +$pconfig['othersingletimeout'] = $config['system']['othersingletimeout']; +$pconfig['othermultipletimeout'] = $config['system']['othermultipletimeout']; + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if ((empty($_POST['adaptivestart']) && !empty($_POST['adaptiveend'])) || (!empty($_POST['adaptivestart']) && empty($_POST['adaptiveend']))) { + $input_errors[] = gettext("The Firewall Adaptive values must be set together."); + } + if (!empty($_POST['adaptivestart']) && !is_numericint($_POST['adaptivestart'])) { + $input_errors[] = gettext("The Firewall Adaptive Start value must be an integer."); + } + if (!empty($_POST['adaptiveend']) && !is_numericint($_POST['adaptiveend'])) { + $input_errors[] = gettext("The Firewall Adaptive End value must be an integer."); + } + if ($_POST['maximumstates'] && !is_numericint($_POST['maximumstates'])) { + $input_errors[] = gettext("The Firewall Maximum States value must be an integer."); + } + if ($_POST['aliasesresolveinterval'] && !is_numericint($_POST['aliasesresolveinterval'])) { + $input_errors[] = gettext("The Aliases Hostname Resolve Interval value must be an integer."); + } + if ($_POST['maximumtableentries'] && !is_numericint($_POST['maximumtableentries'])) { + $input_errors[] = gettext("The Firewall Maximum Table Entries value must be an integer."); + } + if ($_POST['maximumfrags'] && !is_numericint($_POST['maximumfrags'])) { + $input_errors[] = gettext("The Firewall Maximum Fragment Entries value must be an integer."); + } + if ($_POST['tcpidletimeout'] && !is_numericint($_POST['tcpidletimeout'])) { + $input_errors[] = gettext("The TCP idle timeout must be an integer."); + } + if ($_POST['reflectiontimeout'] && !is_numericint($_POST['reflectiontimeout'])) { + $input_errors[] = gettext("The Reflection timeout must be an integer."); + } + if ($_POST['tcpfirsttimeout'] && !is_numericint($_POST['tcpfirsttimeout'])) { + $input_errors[] = gettext("The TCP first timeout value must be an integer."); + } + if ($_POST['tcpopeningtimeout'] && !is_numericint($_POST['tcpopeningtimeout'])) { + $input_errors[] = gettext("The TCP opening timeout value must be an integer."); + } + if ($_POST['tcpestablishedtimeout'] && !is_numericint($_POST['tcpestablishedtimeout'])) { + $input_errors[] = gettext("The TCP established timeout value must be an integer."); + } + if ($_POST['tcpclosingtimeout'] && !is_numericint($_POST['tcpclosingtimeout'])) { + $input_errors[] = gettext("The TCP closing timeout value must be an integer."); + } + if ($_POST['tcpfinwaittimeout'] && !is_numericint($_POST['tcpfinwaittimeout'])) { + $input_errors[] = gettext("The TCP FIN wait timeout value must be an integer."); + } + if ($_POST['tcpclosedtimeout'] && !is_numericint($_POST['tcpclosedtimeout'])) { + $input_errors[] = gettext("The TCP closed timeout value must be an integer."); + } + if ($_POST['udpfirsttimeout'] && !is_numericint($_POST['udpfirsttimeout'])) { + $input_errors[] = gettext("The UDP first timeout value must be an integer."); + } + if ($_POST['udpsingletimeout'] && !is_numericint($_POST['udpsingletimeout'])) { + $input_errors[] = gettext("The UDP single timeout value must be an integer."); + } + if ($_POST['udpmultipletimeout'] && !is_numericint($_POST['udpmultipletimeout'])) { + $input_errors[] = gettext("The UDP multiple timeout value must be an integer."); + } + if ($_POST['icmpfirsttimeout'] && !is_numericint($_POST['icmpfirsttimeout'])) { + $input_errors[] = gettext("The ICMP first timeout value must be an integer."); + } + if ($_POST['icmperrortimeout'] && !is_numericint($_POST['icmperrortimeout'])) { + $input_errors[] = gettext("The ICMP error timeout value must be an integer."); + } + if ($_POST['otherfirsttimeout'] && !is_numericint($_POST['otherfirsttimeout'])) { + $input_errors[] = gettext("The Other first timeout value must be an integer."); + } + if ($_POST['othersingletimeout'] && !is_numericint($_POST['othersingletimeout'])) { + $input_errors[] = gettext("The Other single timeout value must be an integer."); + } + if ($_POST['othermultipletimeout'] && !is_numericint($_POST['othermultipletimeout'])) { + $input_errors[] = gettext("The Other multiple timeout value must be an integer."); + } + + ob_flush(); + flush(); + + if (!$input_errors) { + + if ($_POST['disablefilter'] == "yes") { + $config['system']['disablefilter'] = "enabled"; + } else { + unset($config['system']['disablefilter']); + } + + if ($_POST['disablevpnrules'] == "yes") { + $config['system']['disablevpnrules'] = true; + } else { + unset($config['system']['disablevpnrules']); + } + if ($_POST['rfc959workaround'] == "yes") { + $config['system']['rfc959workaround'] = "enabled"; + } else { + unset($config['system']['rfc959workaround']); + } + + if ($_POST['scrubnodf'] == "yes") { + $config['system']['scrubnodf'] = "enabled"; + } else { + unset($config['system']['scrubnodf']); + } + + if ($_POST['scrubrnid'] == "yes") { + $config['system']['scrubrnid'] = "enabled"; + } else { + unset($config['system']['scrubrnid']); + } + + if (!empty($_POST['adaptiveend'])) { + $config['system']['adaptiveend'] = $_POST['adaptiveend']; + } else { + unset($config['system']['adaptiveend']); + } + if (!empty($_POST['adaptivestart'])) { + $config['system']['adaptivestart'] = $_POST['adaptivestart']; + } else { + unset($config['system']['adaptivestart']); + } + + if ($_POST['checkaliasesurlcert'] == "yes") { + $config['system']['checkaliasesurlcert'] = true; + } else { + unset($config['system']['checkaliasesurlcert']); + } + + $config['system']['optimization'] = $_POST['optimization']; + $config['system']['maximumstates'] = $_POST['maximumstates']; + $config['system']['aliasesresolveinterval'] = $_POST['aliasesresolveinterval']; + $config['system']['maximumtableentries'] = $_POST['maximumtableentries']; + $config['system']['maximumfrags'] = $_POST['maximumfrags']; + + if (!empty($_POST['tcpfirsttimeout'])) { + $config['system']['tcpfirsttimeout'] = $_POST['tcpfirsttimeout']; + } else { + unset($config['system']['tcpfirsttimeout']); + } + if (!empty($_POST['tcpopeningtimeout'])) { + $config['system']['tcpopeningtimeout'] = $_POST['tcpopeningtimeout']; + } else { + unset($config['system']['tcpopeningtimeout']); + } + if (!empty($_POST['tcpestablishedtimeout'])) { + $config['system']['tcpestablishedtimeout'] = $_POST['tcpestablishedtimeout']; + } else { + unset($config['system']['tcpestablishedtimeout']); + } + if (!empty($_POST['tcpclosingtimeout'])) { + $config['system']['tcpclosingtimeout'] = $_POST['tcpclosingtimeout']; + } else { + unset($config['system']['tcpclosingtimeout']); + } + if (!empty($_POST['tcpfinwaittimeout'])) { + $config['system']['tcpfinwaittimeout'] = $_POST['tcpfinwaittimeout']; + } else { + unset($config['system']['tcpfinwaittimeout']); + } + if (!empty($_POST['tcpclosedtimeout'])) { + $config['system']['tcpclosedtimeout'] = $_POST['tcpclosedtimeout']; + } else { + unset($config['system']['tcpclosedtimeout']); + } + if (!empty($_POST['udpfirsttimeout'])) { + $config['system']['udpfirsttimeout'] = $_POST['udpfirsttimeout']; + } else { + unset($config['system']['udpfirsttimeout']); + } + if (!empty($_POST['udpsingletimeout'])) { + $config['system']['udpsingletimeout'] = $_POST['udpsingletimeout']; + } else { + unset($config['system']['udpsingletimeout']); + } + if (!empty($_POST['udpmultipletimeout'])) { + $config['system']['udpmultipletimeout'] = $_POST['udpmultipletimeout']; + } else { + unset($config['system']['udpmultipletimeout']); + } + if (!empty($_POST['icmpfirsttimeout'])) { + $config['system']['icmpfirsttimeout'] = $_POST['icmpfirsttimeout']; + } else { + unset($config['system']['icmpfirsttimeout']); + } + if (!empty($_POST['icmperrortimeout'])) { + $config['system']['icmperrortimeout'] = $_POST['icmperrortimeout']; + } else { + unset($config['system']['icmperrortimeout']); + } + if (!empty($_POST['otherfirsttimeout'])) { + $config['system']['otherfirsttimeout'] = $_POST['otherfirsttimeout']; + } else { + unset($config['system']['otherfirsttimeout']); + } + if (!empty($_POST['othersingletimeout'])) { + $config['system']['othersingletimeout'] = $_POST['othersingletimeout']; + } else { + unset($config['system']['othersingletimeout']); + } + if (!empty($_POST['othermultipletimeout'])) { + $config['system']['othermultipletimeout'] = $_POST['othermultipletimeout']; + } else { + unset($config['system']['othermultipletimeout']); + } + + if ($_POST['natreflection'] == "proxy") { + unset($config['system']['disablenatreflection']); + unset($config['system']['enablenatreflectionpurenat']); + } else if ($_POST['natreflection'] == "purenat") { + unset($config['system']['disablenatreflection']); + $config['system']['enablenatreflectionpurenat'] = "yes"; + } else { + $config['system']['disablenatreflection'] = "yes"; + unset($config['system']['enablenatreflectionpurenat']); + } + + if ($_POST['enablebinatreflection'] == "yes") { + $config['system']['enablebinatreflection'] = "yes"; + } else { + unset($config['system']['enablebinatreflection']); + } + + if ($_POST['disablereplyto'] == "yes") { + $config['system']['disablereplyto'] = $_POST['disablereplyto']; + } else { + unset($config['system']['disablereplyto']); + } + + if ($_POST['disablenegate'] == "yes") { + $config['system']['disablenegate'] = $_POST['disablenegate']; + } else { + unset($config['system']['disablenegate']); + } + + if ($_POST['enablenatreflectionhelper'] == "yes") { + $config['system']['enablenatreflectionhelper'] = "yes"; + } else { + unset($config['system']['enablenatreflectionhelper']); + } + + $config['system']['reflectiontimeout'] = $_POST['reflectiontimeout']; + + if ($_POST['bypassstaticroutes'] == "yes") { + $config['filter']['bypassstaticroutes'] = $_POST['bypassstaticroutes']; + } elseif (isset($config['filter']['bypassstaticroutes'])) { + unset($config['filter']['bypassstaticroutes']); + } + + if ($_POST['disablescrub'] == "yes") { + $config['system']['disablescrub'] = $_POST['disablescrub']; + } else { + unset($config['system']['disablescrub']); + } + + if ($_POST['tftpinterface']) { + $config['system']['tftpinterface'] = implode(",", $_POST['tftpinterface']); + } else { + unset($config['system']['tftpinterface']); + } + + if ($_POST['bogonsinterval'] != $config['system']['bogons']['interval']) { + switch ($_POST['bogonsinterval']) { + case 'daily': + install_cron_job("/usr/bin/nice -n20 /etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "*"); + break; + case 'weekly': + install_cron_job("/usr/bin/nice -n20 /etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "0"); + break; + case 'monthly': + // fall through + default: + install_cron_job("/usr/bin/nice -n20 /etc/rc.update_bogons.sh", true, "1", "3", "1", "*", "*"); + } + $config['system']['bogons']['interval'] = $_POST['bogonsinterval']; + } + + write_config(); + + // Kill filterdns when value changes, filter_configure() will restart it + if (($old_aliasesresolveinterval != $config['system']['aliasesresolveinterval']) && + isvalidpid("{$g['varrun_path']}/filterdns.pid")) { + killbypid("{$g['varrun_path']}/filterdns.pid"); + } + + $retval = 0; + $retval = filter_configure(); + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } + } +} + +$pgtitle = array(gettext("System"), gettext("Advanced: Firewall and NAT")); +include("head.inc"); + +?> + + + + + + + +
                            + + + + + + + +
                            + +
                            +
                            + + +   + + +
                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1): +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + +
                            + /> +
                            + +
                            + /> +
                            + +
                            + +
                            + + +
                            + +
                            + /> + +
                            +
                            + +
                            . +
                            +
                            + /> + +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + + + + + + +
                            + +
                            + +
                            + + + +
                            + /> + +
                            + +
                            +
                            Disable Auto-added VPN rules + /> + +
                            + + + +
                            Disable reply-to + /> + +
                            + +
                            +
                            Disable Negate rules + /> + +
                            + +
                            +
                            + +
                            + +
                            + +
                            + /> + +
                            + +
                            +
                             
                            + +
                            + +
                             
                            + +
                            + +

                            + +

                            + +

                            + +
                            +
                            + +

                            + +
                            + /> + +

                            + +

                            + +
                            + /> + +
                            + +

                            + +
                            + +
                            +
                            +   +
                            +
                            + +

                            +
                            + +

                            +
                            + +

                            +
                            + +

                            +
                            + +

                            +
                            + +
                            +
                            + +

                            +
                            + +

                            +
                            + +
                            +
                            + +

                            +
                            + +
                            +
                            + +

                            +
                            + +

                            +
                            + +
                             
                             " />
                            +
                            +
                            +
                            + + + + diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php new file mode 100644 index 0000000..72f4833 --- /dev/null +++ b/src/usr/local/www/system_advanced_misc.php @@ -0,0 +1,738 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-system-advanced-misc +##|*NAME=System: Advanced: Miscellaneous page +##|*DESCR=Allow access to the 'System: Advanced: Miscellaneous' page. +##|*MATCH=system_advanced_misc.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("vpn.inc"); +require_once("vslb.inc"); + +$pconfig['proxyurl'] = $config['system']['proxyurl']; +$pconfig['proxyport'] = $config['system']['proxyport']; +$pconfig['proxyuser'] = $config['system']['proxyuser']; +$pconfig['proxypass'] = $config['system']['proxypass']; +$pconfig['harddiskstandby'] = $config['system']['harddiskstandby']; +$pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']); +$pconfig['srctrack'] = $config['system']['srctrack']; +$pconfig['gw_switch_default'] = isset($config['system']['gw_switch_default']); +$pconfig['powerd_enable'] = isset($config['system']['powerd_enable']); +$pconfig['crypto_hardware'] = $config['system']['crypto_hardware']; +$pconfig['thermal_hardware'] = $config['system']['thermal_hardware']; +$pconfig['schedule_states'] = isset($config['system']['schedule_states']); +$pconfig['kill_states'] = isset($config['system']['kill_states']); +$pconfig['skip_rules_gw_down'] = isset($config['system']['skip_rules_gw_down']); +$pconfig['apinger_debug'] = isset($config['system']['apinger_debug']); +$pconfig['use_mfs_tmpvar'] = isset($config['system']['use_mfs_tmpvar']); +$pconfig['use_mfs_tmp_size'] = $config['system']['use_mfs_tmp_size']; +$pconfig['use_mfs_var_size'] = $config['system']['use_mfs_var_size']; +$pconfig['pkg_nochecksig'] = isset($config['system']['pkg_nochecksig']); +$pconfig['host_uuid'] = !isset($config['system']['host_uuid']); + +$pconfig['powerd_ac_mode'] = "hadp"; +if (!empty($config['system']['powerd_ac_mode'])) { + $pconfig['powerd_ac_mode'] = $config['system']['powerd_ac_mode']; +} + +$pconfig['powerd_battery_mode'] = "hadp"; +if (!empty($config['system']['powerd_battery_mode'])) { + $pconfig['powerd_battery_mode'] = $config['system']['powerd_battery_mode']; +} + +$pconfig['powerd_normal_mode'] = "hadp"; +if (!empty($config['system']['powerd_normal_mode'])) { + $pconfig['powerd_normal_mode'] = $config['system']['powerd_normal_mode']; +} + +$crypto_modules = array( + 'glxsb' => gettext("AMD Geode LX Security Block"), + 'aesni' => gettext("AES-NI CPU-based Acceleration")); + +$thermal_hardware_modules = array( + 'coretemp' => gettext("Intel Core* CPU on-die thermal sensor"), + 'amdtemp' => gettext("AMD K8, K10 and K11 CPU on-die thermal sensor")); + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + ob_flush(); + flush(); + + if (!empty($_POST['crypto_hardware']) && !array_key_exists($_POST['crypto_hardware'], $crypto_modules)) { + $input_errors[] = gettext("Please select a valid Cryptographic Accelerator."); + } + + if (!empty($_POST['thermal_hardware']) && !array_key_exists($_POST['thermal_hardware'], $thermal_hardware_modules)) { + $input_errors[] = gettext("Please select a valid Thermal Hardware Sensor."); + } + + if (!empty($_POST['use_mfs_tmp_size']) && (!is_numeric($_POST['use_mfs_tmp_size']) || ($_POST['use_mfs_tmp_size'] < 40))) { + $input_errors[] = gettext("/tmp Size must be numeric and should not be less than 40MB."); + } + + if (!empty($_POST['use_mfs_var_size']) && (!is_numeric($_POST['use_mfs_var_size']) || ($_POST['use_mfs_var_size'] < 60))) { + $input_errors[] = gettext("/var Size must be numeric and should not be less than 60MB."); + } + + if (!empty($_POST['proxyport']) && !is_port($_POST['proxyport'])) { + $input_errors[] = gettext("Proxy port must be a valid port number, 1-65535."); + } + + if (!empty($_POST['proxyurl']) && !is_fqdn($_POST['proxyurl']) && !is_ipaddr($_POST['proxyurl'])) { + $input_errors[] = gettext("Proxy URL must be a valid IP address or FQDN."); + } + + if (!empty($_POST['proxyuser']) && preg_match("/[^a-zA-Z0-9\.\-_@]/", $_POST['proxyuser'])) { + $input_errors[] = gettext("The proxy username contains invalid characters."); + } + + if (!$input_errors) { + + if ($_POST['harddiskstandby'] <> "") { + $config['system']['harddiskstandby'] = $_POST['harddiskstandby']; + system_set_harddisk_standby(); + } else { + unset($config['system']['harddiskstandby']); + } + + if ($_POST['proxyurl'] <> "") { + $config['system']['proxyurl'] = $_POST['proxyurl']; + } else { + unset($config['system']['proxyurl']); + } + + if ($_POST['proxyport'] <> "") { + $config['system']['proxyport'] = $_POST['proxyport']; + } else { + unset($config['system']['proxyport']); + } + + if ($_POST['proxyuser'] <> "") { + $config['system']['proxyuser'] = $_POST['proxyuser']; + } else { + unset($config['system']['proxyuser']); + } + + if ($_POST['proxypass'] <> "") { + $config['system']['proxypass'] = $_POST['proxypass']; + } else { + unset($config['system']['proxypass']); + } + + $need_relayd_restart = false; + if ($_POST['lb_use_sticky'] == "yes") { + if (!isset($config['system']['lb_use_sticky'])) { + $config['system']['lb_use_sticky'] = true; + $need_relayd_restart = true; + } + if ($config['system']['srctrack'] != $_POST['srctrack']) { + $config['system']['srctrack'] = $_POST['srctrack']; + $need_relayd_restart = true; + } + } else { + if (isset($config['system']['lb_use_sticky'])) { + unset($config['system']['lb_use_sticky']); + $need_relayd_restart = true; + } + } + + if ($_POST['gw_switch_default'] == "yes") { + $config['system']['gw_switch_default'] = true; + } else { + unset($config['system']['gw_switch_default']); + } + + if ($_POST['pkg_nochecksig'] == "yes") { + $config['system']['pkg_nochecksig'] = true; + } elseif (isset($config['system']['pkg_nochecksig'])) { + unset($config['system']['pkg_nochecksig']); + } + + if ($_POST['host_uuid'] == "yes") { + unset($config['system']['host_uuid']); + } else { + $config['system']['host_uuid'] = true; + } + + if ($_POST['powerd_enable'] == "yes") { + $config['system']['powerd_enable'] = true; + } else { + unset($config['system']['powerd_enable']); + } + + $config['system']['powerd_ac_mode'] = $_POST['powerd_ac_mode']; + $config['system']['powerd_battery_mode'] = $_POST['powerd_battery_mode']; + $config['system']['powerd_normal_mode'] = $_POST['powerd_normal_mode']; + + if ($_POST['crypto_hardware']) { + $config['system']['crypto_hardware'] = $_POST['crypto_hardware']; + } else { + unset($config['system']['crypto_hardware']); + } + + if ($_POST['thermal_hardware']) { + $config['system']['thermal_hardware'] = $_POST['thermal_hardware']; + } else { + unset($config['system']['thermal_hardware']); + } + + if ($_POST['schedule_states'] == "yes") { + $config['system']['schedule_states'] = true; + } else { + unset($config['system']['schedule_states']); + } + + if ($_POST['kill_states'] == "yes") { + $config['system']['kill_states'] = true; + } else { + unset($config['system']['kill_states']); + } + + if ($_POST['skip_rules_gw_down'] == "yes") { + $config['system']['skip_rules_gw_down'] = true; + } else { + unset($config['system']['skip_rules_gw_down']); + } + + $need_apinger_restart = false; + if ($_POST['apinger_debug'] == "yes") { + if (!isset($config['system']['apinger_debug'])) { + $need_apinger_restart = true; + } + $config['system']['apinger_debug'] = true; + } else { + if (isset($config['system']['apinger_debug'])) { + $need_apinger_restart = true; + } + unset($config['system']['apinger_debug']); + } + + if ($_POST['use_mfs_tmpvar'] == "yes") { + $config['system']['use_mfs_tmpvar'] = true; + } else { + unset($config['system']['use_mfs_tmpvar']); + } + + $config['system']['use_mfs_tmp_size'] = $_POST['use_mfs_tmp_size']; + $config['system']['use_mfs_var_size'] = $_POST['use_mfs_var_size']; + + if (isset($_POST['rrdbackup'])) { + $config['system']['rrdbackup'] = $_POST['rrdbackup']; + install_cron_job("/etc/rc.backup_rrd.sh", ($config['system']['rrdbackup'] > 0), $minute="0", "*/{$config['system']['rrdbackup']}"); + } + if (isset($_POST['dhcpbackup'])) { + $config['system']['dhcpbackup'] = $_POST['dhcpbackup']; + install_cron_job("/etc/rc.backup_dhcpleases.sh", ($config['system']['dhcpbackup'] > 0), $minute="0", "*/{$config['system']['dhcpbackup']}"); + } + + write_config(); + + $retval = 0; + system_resolvconf_generate(true); + $retval = filter_configure(); + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message(gettext($retval)); + } else { + $savemsg = gettext($retval); + } + + activate_powerd(); + load_crypto(); + load_thermal_hardware(); + if ($need_relayd_restart) { + relayd_configure(); + } + if ($need_apinger_restart) { + setup_gateways_monitor(); + } + } +} + +$pgtitle = array(gettext("System"), gettext("Advanced: Miscellaneous")); +include("head.inc"); + +?> + + + + +
                            + + + + + + + +
                            + +
                            +
                            + + +   + + +
                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + " class="formfld unknown" /> +
                            + +
                            + " class="formfld unknown" /> +
                            + +
                            + " class="formfld unknown" /> +
                            + +
                            + " class="formfld unknown" /> +
                            + +
                            + onclick="sticky_checked(this)" /> +
                            + +
                            + " class="formfld unknown" /> +
                            + +
                            + /> +
                            + +
                             
                            + /> +
                            +
                            + + + + + + + + + + + + + +
                              + +
                              + +
                              + +
                            +
                            + +
                             
                            + +
                            + +

                            + +
                             
                            + +
                            + +

                            + +
                             
                              + VPN > IPsec on the Advanced Settings tab."); ?> +
                             
                            + /> +
                            + +
                             
                            + /> +
                            + +
                            + /> +
                            + +
                            + /> +
                            + +
                            + onclick="tmpvar_checked(this)" /> +
                            + +
                            + " class="formfld unknown" /> MB +
                            + +
                            + " class="formfld unknown" /> MB +
                            + +
                            + + +
                            + +
                            +
                            +
                            + + +
                            + +
                            +
                            +
                             
                            + +
                            + +
                             
                            + /> +
                            + +
                            + /> +
                            + +
                              + " /> +
                            +
                            +
                            +
                            + + + + diff --git a/src/usr/local/www/system_advanced_network.php b/src/usr/local/www/system_advanced_network.php new file mode 100644 index 0000000..4b3b7ce --- /dev/null +++ b/src/usr/local/www/system_advanced_network.php @@ -0,0 +1,320 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-system-advanced-network +##|*NAME=System: Advanced: Network page +##|*DESCR=Allow access to the 'System: Advanced: Networking' page. +##|*MATCH=system_advanced_network.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + + +$pconfig['ipv6nat_enable'] = isset($config['diag']['ipv6nat']['enable']); +$pconfig['ipv6nat_ipaddr'] = $config['diag']['ipv6nat']['ipaddr']; +$pconfig['ipv6allow'] = isset($config['system']['ipv6allow']); +$pconfig['prefer_ipv4'] = isset($config['system']['prefer_ipv4']); +$pconfig['polling_enable'] = isset($config['system']['polling']); +$pconfig['sharednet'] = $config['system']['sharednet']; +$pconfig['disablechecksumoffloading'] = isset($config['system']['disablechecksumoffloading']); +$pconfig['disablesegmentationoffloading'] = isset($config['system']['disablesegmentationoffloading']); +$pconfig['disablelargereceiveoffloading'] = isset($config['system']['disablelargereceiveoffloading']); + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + if ($_POST['ipv6nat_enable'] && !is_ipaddr($_POST['ipv6nat_ipaddr'])) { + $input_errors[] = gettext("You must specify an IP address to NAT IPv6 packets."); + } + + ob_flush(); + flush(); + if (!$input_errors) { + + if ($_POST['ipv6nat_enable'] == "yes") { + $config['diag']['ipv6nat']['enable'] = true; + $config['diag']['ipv6nat']['ipaddr'] = $_POST['ipv6nat_ipaddr']; + } else { + if ($config['diag']) { + if ($config['diag']['ipv6nat']) { + unset($config['diag']['ipv6nat']['enable']); + unset($config['diag']['ipv6nat']['ipaddr']); + } + } + } + + if ($_POST['ipv6allow'] == "yes") { + $config['system']['ipv6allow'] = true; + } else { + unset($config['system']['ipv6allow']); + } + + if ($_POST['prefer_ipv4'] == "yes") { + $config['system']['prefer_ipv4'] = true; + } else { + unset($config['system']['prefer_ipv4']); + } + + if ($_POST['sharednet'] == "yes") { + $config['system']['sharednet'] = true; + system_disable_arp_wrong_if(); + } else { + unset($config['system']['sharednet']); + system_enable_arp_wrong_if(); + } + + if ($_POST['polling_enable'] == "yes") { + $config['system']['polling'] = true; + setup_polling(); + } else { + unset($config['system']['polling']); + setup_polling(); + } + + if ($_POST['disablechecksumoffloading'] == "yes") { + $config['system']['disablechecksumoffloading'] = true; + } else { + unset($config['system']['disablechecksumoffloading']); + } + + if ($_POST['disablesegmentationoffloading'] == "yes") { + $config['system']['disablesegmentationoffloading'] = true; + } else { + unset($config['system']['disablesegmentationoffloading']); + } + + if ($_POST['disablelargereceiveoffloading'] == "yes") { + $config['system']['disablelargereceiveoffloading'] = true; + } else { + unset($config['system']['disablelargereceiveoffloading']); + } + + setup_microcode(); + + // Write out configuration (config.xml) + write_config(); + + // Set preferred protocol + prefer_ipv4_or_ipv6(); + + $retval = filter_configure(); + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message(gettext($retval)); + } else { + $savemsg = gettext($retval); + } + } +} + +$pgtitle = array(gettext("System"), gettext("Advanced: Networking")); +include("head.inc"); + +?> + + + + + + + + +
                            + + + + + + + +
                            + +
                            +
                            + + +   + + +
                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + onclick="enable_change(false)" /> +
                            +
                            +
                            +
                            +
                            + onclick="enable_change(false)" /> +
                            +
                            +
                            +  :  + +
                            + /> +
                            +
                            +
                             
                            + /> +
                            + +
                            + /> +
                            + +
                            +   + +
                            + /> +
                            + +
                            +   + +
                            + /> +
                            + +
                            +   + +
                            + /> +
                            + +
                             
                             " />
                            +
                            +
                            +
                            + + + + + diff --git a/src/usr/local/www/system_advanced_notifications.php b/src/usr/local/www/system_advanced_notifications.php new file mode 100644 index 0000000..45ac501 --- /dev/null +++ b/src/usr/local/www/system_advanced_notifications.php @@ -0,0 +1,413 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-system-advanced-notifications +##|*NAME=System: Advanced: Notifications page +##|*DESCR=Allow access to the 'System: Advanced: Notifications' page. +##|*MATCH=system_advanced_notifications.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("notices.inc"); + +// Growl +$pconfig['disable_growl'] = isset($config['notifications']['growl']['disable']); +if ($config['notifications']['growl']['password']) { + $pconfig['password'] = $config['notifications']['growl']['password']; +} +if ($config['notifications']['growl']['ipaddress']) { + $pconfig['ipaddress'] = $config['notifications']['growl']['ipaddress']; +} + +if ($config['notifications']['growl']['notification_name']) { + $pconfig['notification_name'] = $config['notifications']['growl']['notification_name']; +} else { + $pconfig['notification_name'] = "{$g['product_name']} growl alert"; +} + +if ($config['notifications']['growl']['name']) { + $pconfig['name'] = $config['notifications']['growl']['name']; +} else { + $pconfig['name'] = 'PHP-Growl'; +} + + +// SMTP +$pconfig['disable_smtp'] = isset($config['notifications']['smtp']['disable']); +if ($config['notifications']['smtp']['ipaddress']) { + $pconfig['smtpipaddress'] = $config['notifications']['smtp']['ipaddress']; +} +if ($config['notifications']['smtp']['port']) { + $pconfig['smtpport'] = $config['notifications']['smtp']['port']; +} +if (isset($config['notifications']['smtp']['ssl'])) { + $pconfig['smtpssl'] = true; +} +if (isset($config['notifications']['smtp']['tls'])) { + $pconfig['smtptls'] = true; +} +if ($config['notifications']['smtp']['notifyemailaddress']) { + $pconfig['smtpnotifyemailaddress'] = $config['notifications']['smtp']['notifyemailaddress']; +} +if ($config['notifications']['smtp']['username']) { + $pconfig['smtpusername'] = $config['notifications']['smtp']['username']; +} +if ($config['notifications']['smtp']['password']) { + $pconfig['smtppassword'] = $config['notifications']['smtp']['password']; +} +if ($config['notifications']['smtp']['authentication_mechanism']) { + $pconfig['smtpauthmech'] = $config['notifications']['smtp']['authentication_mechanism']; +} +if ($config['notifications']['smtp']['fromaddress']) { + $pconfig['smtpfromaddress'] = $config['notifications']['smtp']['fromaddress']; +} + +// System Sounds +$pconfig['disablebeep'] = isset($config['system']['disablebeep']); + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* if this is an AJAX caller then handle via JSON */ + if (isAjax() && is_array($input_errors)) { + input_errors2Ajax($input_errors); + exit; + } + + if ($_POST['apply']) { + $retval = 0; + system_setup_sysctl(); + $savemsg = get_std_save_message($retval); + } + + if ($_POST['Submit'] == gettext("Save")) { + $tunableent = array(); + + // Growl + $config['notifications']['growl']['ipaddress'] = $_POST['ipaddress']; + $config['notifications']['growl']['password'] = $_POST['password']; + $config['notifications']['growl']['name'] = $_POST['name']; + $config['notifications']['growl']['notification_name'] = $_POST['notification_name']; + + if ($_POST['disable_growl'] == "yes") { + $config['notifications']['growl']['disable'] = true; + } else { + unset($config['notifications']['growl']['disable']); + } + + // SMTP + $config['notifications']['smtp']['ipaddress'] = $_POST['smtpipaddress']; + $config['notifications']['smtp']['port'] = $_POST['smtpport']; + if (isset($_POST['smtpssl'])) { + $config['notifications']['smtp']['ssl'] = true; + } else { + unset($config['notifications']['smtp']['ssl']); + } + if (isset($_POST['smtptls'])) { + $config['notifications']['smtp']['tls'] = true; + } else { + unset($config['notifications']['smtp']['tls']); + } + $config['notifications']['smtp']['notifyemailaddress'] = $_POST['smtpnotifyemailaddress']; + $config['notifications']['smtp']['username'] = $_POST['smtpusername']; + $config['notifications']['smtp']['password'] = $_POST['smtppassword']; + $config['notifications']['smtp']['authentication_mechanism'] = $_POST['smtpauthmech']; + $config['notifications']['smtp']['fromaddress'] = $_POST['smtpfromaddress']; + + if ($_POST['disable_smtp'] == "yes") { + $config['notifications']['smtp']['disable'] = true; + } else { + unset($config['notifications']['smtp']['disable']); + } + + // System Sounds + if ($_POST['disablebeep'] == "yes") { + $config['system']['disablebeep'] = true; + } else { + unset($config['system']['disablebeep']); + } + + write_config(); + pfSenseHeader("system_advanced_notifications.php"); + return; + + } + if ($_POST['test_growl'] == gettext("Test Growl")) { + // Send test message via growl + if ($config['notifications']['growl']['ipaddress'] && + $config['notifications']['growl']['password'] = $_POST['password']) { + unlink_if_exists($g['vardb_path'] . "/growlnotices_lastmsg.txt"); + register_via_growl(); + notify_via_growl(sprintf(gettext("This is a test message from %s. It is safe to ignore this message."), $g['product_name']), true); + } + } + if ($_POST['test_smtp'] == gettext("Test SMTP")) { + // Send test message via smtp + if (file_exists("/var/db/notices_lastmsg.txt")) { + unlink("/var/db/notices_lastmsg.txt"); + } + $savemsg = notify_via_smtp(sprintf(gettext("This is a test message from %s. It is safe to ignore this message."), $g['product_name']), true); + } +} + +$pgtitle = array(gettext("System"), gettext("Advanced: Notifications")); +include("head.inc"); + +?> + + + +
                            + +
                            + + + + + + + +
                            + +
                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + checked="checked" />
                            + +
                            + ' />
                            + +
                            + ' />
                            + +
                            + ' />
                            + +
                            + ' />
                            + +
                            +   + + +
                            +
                             
                            + checked="checked" />
                            + +
                            + ' />
                            + +
                            + ' />
                            + +
                            + />Enable SMTP over SSL/TLS
                            + />Enable STARTTLS
                            +
                            + ' />
                            + +
                            + ' />
                            + +
                            + ' />
                            + +
                            + ' />
                            + +
                            + +
                            + +
                            +   + + +
                            +
                             
                            + /> + +
                            + +
                             
                            +   + + +
                            +
                            +
                            +
                            + + + + diff --git a/src/usr/local/www/system_advanced_sysctl.php b/src/usr/local/www/system_advanced_sysctl.php new file mode 100644 index 0000000..1992cc1 --- /dev/null +++ b/src/usr/local/www/system_advanced_sysctl.php @@ -0,0 +1,305 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-system-advanced-sysctl +##|*NAME=System: Advanced: Tunables page +##|*DESCR=Allow access to the 'System: Advanced: Tunables' page. +##|*MATCH=system_advanced_sysctl.php* +##|-PRIV + +require("guiconfig.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_advanced_sysctl.php'); +} + +if (!is_array($config['sysctl'])) { + $config['sysctl'] = array(); +} +if (!is_array($config['sysctl']['item'])) { + $config['sysctl']['item'] = array(); +} + +$a_tunable = &$config['sysctl']['item']; +$tunables = system_get_sysctls(); + +if (isset($_GET['id'])) { + $id = htmlspecialchars_decode($_GET['id']); +} +if (isset($_POST['id'])) { + $id = htmlspecialchars_decode($_POST['id']); +} + +$act = $_GET['act']; +if (isset($_POST['act'])) { + $act = $_POST['act']; +} + +if ($act == "edit") { + if (isset($a_tunable[$id])) { + $pconfig['tunable'] = $a_tunable[$id]['tunable']; + $pconfig['value'] = $a_tunable[$id]['value']; + $pconfig['descr'] = $a_tunable[$id]['descr']; + } else if (isset($tunables[$id])) { + $pconfig['tunable'] = $tunables[$id]['tunable']; + $pconfig['value'] = $tunables[$id]['value']; + $pconfig['descr'] = $tunables[$id]['descr']; + } +} + +if ($act == "del") { + if ($a_tunable[$id]) { + /* if this is an AJAX caller then handle via JSON */ + if (isAjax() && is_array($input_errors)) { + input_errors2Ajax($input_errors); + exit; + } + if (!$input_errors) { + unset($a_tunable[$id]); + write_config(); + mark_subsystem_dirty('sysctl'); + pfSenseHeader("system_advanced_sysctl.php"); + exit; + } + } +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* if this is an AJAX caller then handle via JSON */ + if (isAjax() && is_array($input_errors)) { + input_errors2Ajax($input_errors); + exit; + } + + if ($_POST['apply']) { + $retval = 0; + system_setup_sysctl(); + $savemsg = get_std_save_message($retval); + clear_subsystem_dirty('sysctl'); + } + + if ($_POST['Submit'] == gettext("Save")) { + $tunableent = array(); + + $tunableent['tunable'] = $_POST['tunable']; + $tunableent['value'] = $_POST['value']; + $tunableent['descr'] = $_POST['descr']; + + if (isset($id) && isset($a_tunable[$id])) { + $a_tunable[$id] = $tunableent; + } else { + $a_tunable[] = $tunableent; + } + + mark_subsystem_dirty('sysctl'); + + write_config(); + + pfSenseHeader("system_advanced_sysctl.php"); + exit; + } +} + +$pgtitle = array(gettext("System"), gettext("Advanced: System Tunables")); +include("head.inc"); + +?> + + + +
                            + +
                            + + + + + + + + + + + + + +
                            + +
                            +
                            + + +   + + +
                            +
                            +
                            + + + + + + + $tunable): + + if (!isset($tunable['modified'])) { + $i = urlencode($tunable['tunable']); + } + ?> + + + + + + + + + + + +
                            + + + + + + + + + + + + + + +
                            + + + + + ')"> + + +
                            +
                            + + + + + +
                            + + + +
                            +
                            +
                            +
                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + +
                              + " /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php new file mode 100644 index 0000000..0b7c81d --- /dev/null +++ b/src/usr/local/www/system_authservers.php @@ -0,0 +1,912 @@ + $as) { + if ($config['system']['authserver'][$k]['name'] == $serverdeleted) { + unset($config['system']['authserver'][$k]); + } + } + + /* Remove server from temp list used later on this page. */ + unset($a_server[$_GET['id']]); + + $savemsg = gettext("Authentication Server") . " " . htmlspecialchars($serverdeleted) . " " . gettext("deleted") . "
                            "; + write_config($savemsg); +} + +if ($act == "edit") { + if (isset($id) && $a_server[$id]) { + + $pconfig['type'] = $a_server[$id]['type']; + $pconfig['name'] = $a_server[$id]['name']; + + if ($pconfig['type'] == "ldap") { + $pconfig['ldap_caref'] = $a_server[$id]['ldap_caref']; + $pconfig['ldap_host'] = $a_server[$id]['host']; + $pconfig['ldap_port'] = $a_server[$id]['ldap_port']; + $pconfig['ldap_urltype'] = $a_server[$id]['ldap_urltype']; + $pconfig['ldap_protver'] = $a_server[$id]['ldap_protver']; + $pconfig['ldap_scope'] = $a_server[$id]['ldap_scope']; + $pconfig['ldap_basedn'] = $a_server[$id]['ldap_basedn']; + $pconfig['ldap_authcn'] = $a_server[$id]['ldap_authcn']; + $pconfig['ldap_extended_enabled'] = $a_server[$id]['ldap_extended_enabled']; + $pconfig['ldap_extended_query'] = $a_server[$id]['ldap_extended_query']; + $pconfig['ldap_binddn'] = $a_server[$id]['ldap_binddn']; + $pconfig['ldap_bindpw'] = $a_server[$id]['ldap_bindpw']; + $pconfig['ldap_attr_user'] = $a_server[$id]['ldap_attr_user']; + $pconfig['ldap_attr_group'] = $a_server[$id]['ldap_attr_group']; + $pconfig['ldap_attr_member'] = $a_server[$id]['ldap_attr_member']; + $pconfig['ldap_utf8'] = isset($a_server[$id]['ldap_utf8']); + $pconfig['ldap_nostrip_at'] = isset($a_server[$id]['ldap_nostrip_at']); + + if (!$pconfig['ldap_binddn'] || !$pconfig['ldap_bindpw']) { + $pconfig['ldap_anon'] = true; + } + } + + if ($pconfig['type'] == "radius") { + $pconfig['radius_host'] = $a_server[$id]['host']; + $pconfig['radius_auth_port'] = $a_server[$id]['radius_auth_port']; + $pconfig['radius_acct_port'] = $a_server[$id]['radius_acct_port']; + $pconfig['radius_secret'] = $a_server[$id]['radius_secret']; + $pconfig['radius_timeout'] = $a_server[$id]['radius_timeout']; + + if ($pconfig['radius_auth_port'] && + $pconfig['radius_acct_port']) { + $pconfig['radius_srvcs'] = "both"; + } + + if ($pconfig['radius_auth_port'] && + !$pconfig['radius_acct_port']) { + $pconfig['radius_srvcs'] = "auth"; + $pconfig['radius_acct_port'] = 1813; + } + + if (!$pconfig['radius_auth_port'] && + $pconfig['radius_acct_port']) { + $pconfig['radius_srvcs'] = "acct"; + $pconfig['radius_auth_port'] = 1812; + } + + } + } +} + +if ($act == "new") { + $pconfig['ldap_protver'] = 3; + $pconfig['ldap_anon'] = true; + $pconfig['radius_srvcs'] = "both"; + $pconfig['radius_auth_port'] = "1812"; + $pconfig['radius_acct_port'] = "1813"; +} + +if ($_POST) { + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + + if ($pconfig['type'] == "ldap") { + $reqdfields = explode(" ", + "name type ldap_host ldap_port " . + "ldap_urltype ldap_protver ldap_scope " . + "ldap_attr_user ldap_attr_group ldap_attr_member ldapauthcontainers"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Type"), + gettext("Hostname or IP"), + gettext("Port value"), + gettext("Transport"), + gettext("Protocol version"), + gettext("Search level"), + gettext("User naming Attribute"), + gettext("Group naming Attribute"), + gettext("Group member attribute"), + gettext("Authentication container")); + + if (!$pconfig['ldap_anon']) { + $reqdfields[] = "ldap_binddn"; + $reqdfields[] = "ldap_bindpw"; + $reqdfieldsn[] = gettext("Bind user DN"); + $reqdfieldsn[] = gettext("Bind Password"); + } + } + + if ($pconfig['type'] == "radius") { + $reqdfields = explode(" ", "name type radius_host radius_srvcs"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Type"), + gettext("Hostname or IP"), + gettext("Services")); + + if ($pconfig['radisu_srvcs'] == "both" || + $pconfig['radisu_srvcs'] == "auth") { + $reqdfields[] = "radius_auth_port"; + $reqdfieldsn[] = gettext("Authentication port value"); + } + + if ($pconfig['radisu_srvcs'] == "both" || + $pconfig['radisu_srvcs'] == "acct") { + $reqdfields[] = "radius_acct_port"; + $reqdfieldsn[] = gettext("Accounting port value"); + } + + if (!isset($id)) { + $reqdfields[] = "radius_secret"; + $reqdfieldsn[] = gettext("Shared Secret"); + } + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['host'])) { + $input_errors[] = gettext("The host name contains invalid characters."); + } + + if (auth_get_authserver($pconfig['name']) && !isset($id)) { + $input_errors[] = gettext("An authentication server with the same name already exists."); + } + + if (($pconfig['type'] == "radius") && isset($_POST['radius_timeout']) && !empty($_POST['radius_timeout']) && (!is_numeric($_POST['radius_timeout']) || (is_numeric($_POST['radius_timeout']) && ($_POST['radius_timeout'] <= 0)))) { + $input_errors[] = gettext("RADIUS Timeout value must be numeric and positive."); + } + + /* if this is an AJAX caller then handle via JSON */ + if (isAjax() && is_array($input_errors)) { + input_errors2Ajax($input_errors); + exit; + } + + if (!$input_errors) { + $server = array(); + $server['refid'] = uniqid(); + if (isset($id) && $a_server[$id]) { + $server = $a_server[$id]; + } + + $server['type'] = $pconfig['type']; + $server['name'] = $pconfig['name']; + + if ($server['type'] == "ldap") { + + if (!empty($pconfig['ldap_caref'])) { + $server['ldap_caref'] = $pconfig['ldap_caref']; + } + $server['host'] = $pconfig['ldap_host']; + $server['ldap_port'] = $pconfig['ldap_port']; + $server['ldap_urltype'] = $pconfig['ldap_urltype']; + $server['ldap_protver'] = $pconfig['ldap_protver']; + $server['ldap_scope'] = $pconfig['ldap_scope']; + $server['ldap_basedn'] = $pconfig['ldap_basedn']; + $server['ldap_authcn'] = $pconfig['ldapauthcontainers']; + $server['ldap_extended_enabled'] = $pconfig['ldap_extended_enabled']; + $server['ldap_extended_query'] = $pconfig['ldap_extended_query']; + $server['ldap_attr_user'] = $pconfig['ldap_attr_user']; + $server['ldap_attr_group'] = $pconfig['ldap_attr_group']; + $server['ldap_attr_member'] = $pconfig['ldap_attr_member']; + if ($pconfig['ldap_utf8'] == "yes") { + $server['ldap_utf8'] = true; + } else { + unset($server['ldap_utf8']); + } + if ($pconfig['ldap_nostrip_at'] == "yes") { + $server['ldap_nostrip_at'] = true; + } else { + unset($server['ldap_nostrip_at']); + } + + + if (!$pconfig['ldap_anon']) { + $server['ldap_binddn'] = $pconfig['ldap_binddn']; + $server['ldap_bindpw'] = $pconfig['ldap_bindpw']; + } else { + unset($server['ldap_binddn']); + unset($server['ldap_bindpw']); + } + } + + if ($server['type'] == "radius") { + + $server['host'] = $pconfig['radius_host']; + + if ($pconfig['radius_secret']) { + $server['radius_secret'] = $pconfig['radius_secret']; + } + + if ($pconfig['radius_timeout']) { + $server['radius_timeout'] = $pconfig['radius_timeout']; + } else { + $server['radius_timeout'] = 5; + } + + if ($pconfig['radius_srvcs'] == "both") { + $server['radius_auth_port'] = $pconfig['radius_auth_port']; + $server['radius_acct_port'] = $pconfig['radius_acct_port']; + } + + if ($pconfig['radius_srvcs'] == "auth") { + $server['radius_auth_port'] = $pconfig['radius_auth_port']; + unset($server['radius_acct_port']); + } + + if ($pconfig['radius_srvcs'] == "acct") { + $server['radius_acct_port'] = $pconfig['radius_acct_port']; + unset($server['radius_auth_port']); + } + } + + if (isset($id) && $config['system']['authserver'][$id]) { + $config['system']['authserver'][$id] = $server; + } else { + $config['system']['authserver'][] = $server; + } + + write_config(); + + pfSenseHeader("system_authservers.php"); + } +} + +include("head.inc"); +?> + +"> + + + + + + + + + + +
                            + +
                            +
                            + + + +
                            + + + + + + + + + +
                            + + + + + + +
                            + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + " /> + + + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + ondblclick="document.location='system_authservers.php?act=edit&id='" > + + + + + + + +
                            + + " alt="" width="17" height="17" border="0" /> + +
                            +

                            + +

                            +
                                + + + " alt="" width="17" height="17" border="0" /> + +   + ')"> + " alt="" width="17" height="17" border="0" /> + + +
                            + + + +
                            +
                            + + + + diff --git a/src/usr/local/www/system_camanager.php b/src/usr/local/www/system_camanager.php new file mode 100644 index 0000000..368b30c --- /dev/null +++ b/src/usr/local/www/system_camanager.php @@ -0,0 +1,770 @@ + gettext("Import an existing Certificate Authority"), + "internal" => gettext("Create an internal Certificate Authority"), + "intermediate" => gettext("Create an intermediate Certificate Authority")); + +$ca_keylens = array("512", "1024", "2048", "4096"); +$openssl_digest_algs = array("sha1", "sha224", "sha256", "sha384", "sha512"); + +$pgtitle = array(gettext("System"), gettext("Certificate Authority Manager")); + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (!is_array($config['ca'])) { + $config['ca'] = array(); +} + +$a_ca =& $config['ca']; + +if (!is_array($config['cert'])) { + $config['cert'] = array(); +} + +$a_cert =& $config['cert']; + +if (!is_array($config['crl'])) { + $config['crl'] = array(); +} + +$a_crl =& $config['crl']; + +$act = $_GET['act']; +if ($_POST['act']) { + $act = $_POST['act']; +} + +if ($act == "del") { + + if (!isset($a_ca[$id])) { + pfSenseHeader("system_camanager.php"); + exit; + } + + $index = count($a_cert) - 1; + for (;$index >= 0; $index--) { + if ($a_cert[$index]['caref'] == $a_ca[$id]['refid']) { + unset($a_cert[$index]); + } + } + + $index = count($a_crl) - 1; + for (;$index >= 0; $index--) { + if ($a_crl[$index]['caref'] == $a_ca[$id]['refid']) { + unset($a_crl[$index]); + } + } + + $name = $a_ca[$id]['descr']; + unset($a_ca[$id]); + write_config(); + $savemsg = sprintf(gettext("Certificate Authority %s and its CRLs (if any) successfully deleted"), htmlspecialchars($name)) . "
                            "; + pfSenseHeader("system_camanager.php"); + exit; +} + +if ($act == "edit") { + if (!$a_ca[$id]) { + pfSenseHeader("system_camanager.php"); + exit; + } + $pconfig['descr'] = $a_ca[$id]['descr']; + $pconfig['refid'] = $a_ca[$id]['refid']; + $pconfig['cert'] = base64_decode($a_ca[$id]['crt']); + $pconfig['serial'] = $a_ca[$id]['serial']; + if (!empty($a_ca[$id]['prv'])) { + $pconfig['key'] = base64_decode($a_ca[$id]['prv']); + } +} + +if ($act == "new") { + $pconfig['method'] = $_GET['method']; + $pconfig['keylen'] = "2048"; + $pconfig['digest_alg'] = "sha256"; + $pconfig['lifetime'] = "3650"; + $pconfig['dn_commonname'] = "internal-ca"; +} + +if ($act == "exp") { + + if (!$a_ca[$id]) { + pfSenseHeader("system_camanager.php"); + exit; + } + + $exp_name = urlencode("{$a_ca[$id]['descr']}.crt"); + $exp_data = base64_decode($a_ca[$id]['crt']); + $exp_size = strlen($exp_data); + + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$exp_name}"); + header("Content-Length: $exp_size"); + echo $exp_data; + exit; +} + +if ($act == "expkey") { + + if (!$a_ca[$id]) { + pfSenseHeader("system_camanager.php"); + exit; + } + + $exp_name = urlencode("{$a_ca[$id]['descr']}.key"); + $exp_data = base64_decode($a_ca[$id]['prv']); + $exp_size = strlen($exp_data); + + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$exp_name}"); + header("Content-Length: $exp_size"); + echo $exp_data; + exit; +} + +if ($_POST) { + + unset($input_errors); + $input_errors = array(); + $pconfig = $_POST; + + /* input validation */ + if ($pconfig['method'] == "existing") { + $reqdfields = explode(" ", "descr cert"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Certificate data")); + if ($_POST['cert'] && (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE"))) { + $input_errors[] = gettext("This certificate does not appear to be valid."); + } + if ($_POST['key'] && strstr($_POST['key'], "ENCRYPTED")) { + $input_errors[] = gettext("Encrypted private keys are not yet supported."); + } + } + if ($pconfig['method'] == "internal") { + $reqdfields = explode(" ", + "descr keylen lifetime dn_country dn_state dn_city ". + "dn_organization dn_email dn_commonname"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Key length"), + gettext("Lifetime"), + gettext("Distinguished name Country Code"), + gettext("Distinguished name State or Province"), + gettext("Distinguished name City"), + gettext("Distinguished name Organization"), + gettext("Distinguished name Email Address"), + gettext("Distinguished name Common Name")); + } + if ($pconfig['method'] == "intermediate") { + $reqdfields = explode(" ", + "descr caref keylen lifetime dn_country dn_state dn_city ". + "dn_organization dn_email dn_commonname"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Signing Certificate Authority"), + gettext("Key length"), + gettext("Lifetime"), + gettext("Distinguished name Country Code"), + gettext("Distinguished name State or Province"), + gettext("Distinguished name City"), + gettext("Distinguished name Organization"), + gettext("Distinguished name Email Address"), + gettext("Distinguished name Common Name")); + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + if ($pconfig['method'] != "existing") { + /* Make sure we do not have invalid characters in the fields for the certificate */ + if (preg_match("/[\?\>\<\&\/\\\"\']/", $_POST['descr'])) { + array_push($input_errors, "The field 'Descriptive Name' contains invalid characters."); + } + + for ($i = 0; $i < count($reqdfields); $i++) { + if ($reqdfields[$i] == 'dn_email') { + if (preg_match("/[\!\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST["dn_email"])) { + array_push($input_errors, "The field 'Distinguished name Email Address' contains invalid characters."); + } + } else if ($reqdfields[$i] == 'dn_commonname') { + if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST["dn_commonname"])) { + array_push($input_errors, "The field 'Distinguished name Common Name' contains invalid characters."); + } + } else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"])) { + array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters."); + } + } + if (!in_array($_POST["keylen"], $ca_keylens)) { + array_push($input_errors, gettext("Please select a valid Key Length.")); + } + if (!in_array($_POST["digest_alg"], $openssl_digest_algs)) { + array_push($input_errors, gettext("Please select a valid Digest Algorithm.")); + } + } + + /* if this is an AJAX caller then handle via JSON */ + if (isAjax() && is_array($input_errors)) { + input_errors2Ajax($input_errors); + exit; + } + + /* save modifications */ + if (!$input_errors) { + + $ca = array(); + if (!isset($pconfig['refid']) || empty($pconfig['refid'])) { + $ca['refid'] = uniqid(); + } else { + $ca['refid'] = $pconfig['refid']; + } + + if (isset($id) && $a_ca[$id]) { + $ca = $a_ca[$id]; + } + + $ca['descr'] = $pconfig['descr']; + + if ($_POST['edit'] == "edit") { + $ca['descr'] = $pconfig['descr']; + $ca['refid'] = $pconfig['refid']; + $ca['serial'] = $pconfig['serial']; + $ca['crt'] = base64_encode($pconfig['cert']); + if (!empty($pconfig['key'])) { + $ca['prv'] = base64_encode($pconfig['key']); + } + } else { + $old_err_level = error_reporting(0); /* otherwise openssl_ functions throw warnings directly to a page screwing menu tab */ + if ($pconfig['method'] == "existing") { + ca_import($ca, $pconfig['cert'], $pconfig['key'], $pconfig['serial']); + } else if ($pconfig['method'] == "internal") { + $dn = array( + 'countryName' => $pconfig['dn_country'], + 'stateOrProvinceName' => $pconfig['dn_state'], + 'localityName' => $pconfig['dn_city'], + 'organizationName' => $pconfig['dn_organization'], + 'emailAddress' => $pconfig['dn_email'], + 'commonName' => $pconfig['dn_commonname']); + if (!ca_create($ca, $pconfig['keylen'], $pconfig['lifetime'], $dn, $pconfig['digest_alg'])) { + while ($ssl_err = openssl_error_string()) { + $input_errors = array(); + array_push($input_errors, "openssl library returns: " . $ssl_err); + } + } + } + else if ($pconfig['method'] == "intermediate") { + $dn = array( + 'countryName' => $pconfig['dn_country'], + 'stateOrProvinceName' => $pconfig['dn_state'], + 'localityName' => $pconfig['dn_city'], + 'organizationName' => $pconfig['dn_organization'], + 'emailAddress' => $pconfig['dn_email'], + 'commonName' => $pconfig['dn_commonname']); + if (!ca_inter_create($ca, $pconfig['keylen'], $pconfig['lifetime'], $dn, $pconfig['caref'], $pconfig['digest_alg'])) { + while ($ssl_err = openssl_error_string()) { + $input_errors = array(); + array_push($input_errors, "openssl library returns: " . $ssl_err); + } + } + } + error_reporting($old_err_level); + } + + if (isset($id) && $a_ca[$id]) { + $a_ca[$id] = $ca; + } else { + $a_ca[] = $ca; + } + + if (!$input_errors) { + write_config(); + } + +// pfSenseHeader("system_camanager.php"); + } +} + +include("head.inc"); +?> + +"> + + + + + + + + + + +
                            + +
                            +
                            + + + +
                            + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + +

                            + +
                            + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + + +
                            + +
                            +
                            + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                            :   + +
                            :   + +   + +   + +
                            :   + +   + +   + +
                            :   + +   + +   + +
                            :   + +   + +   + +
                            :   + +   + +   + +
                            +
                            + + + + + + +
                              + " /> + + + +
                            +
                            + + + + + + + + + + + + + " . gettext("self-signed") . ""; + } else { + $issuer_name = "" . gettext("external") . ""; + } + $subj = htmlspecialchars($subj); + $issuer = htmlspecialchars($issuer); + $certcount = 0; + + $issuer_ca = lookup_ca($ca['caref']); + if ($issuer_ca) { + $issuer_name = htmlspecialchars($issuer_ca['descr']); + } + + // TODO : Need gray certificate icon + + if ($ca['prv']) { + $caimg = "/themes/{$g['theme']}/images/icons/icon_frmfld_cert.png"; + $internal = "YES"; + + } else { + $caimg = "/themes/{$g['theme']}/images/icons/icon_frmfld_cert.png"; + $internal = "NO"; + } + foreach ($a_cert as $cert) { + if ($cert['caref'] == $ca['refid']) { + $certcount++; + } + } + foreach ($a_ca as $cert) { + if ($cert['caref'] == $ca['refid']) { + $certcount++; + } + } + ?> + + + + + + + + + + + + + + + + +
                            + + + + + +
                            + CA + + +
                            +
                               
                            + + + + + + + + + + + +
                             :
                             :
                            +
                            + + " alt="" width="17" height="17" border="0" /> + + + " alt="" width="17" height="17" border="0" /> + + + + " alt="" width="17" height="17" border="0" /> + + + ')"> + " alt="" width="17" height="17" border="0" /> + +
                            + + " alt="" width="17" height="17" border="0" /> + +
                            +

                            + +

                            +
                            + + + +
                            +
                            + + + + + diff --git a/src/usr/local/www/system_certmanager.php b/src/usr/local/www/system_certmanager.php new file mode 100644 index 0000000..cd553e6 --- /dev/null +++ b/src/usr/local/www/system_certmanager.php @@ -0,0 +1,1349 @@ + gettext("Import an existing Certificate"), + "internal" => gettext("Create an internal Certificate"), + "external" => gettext("Create a Certificate Signing Request"), +); + +$cert_keylens = array("512", "1024", "2048", "4096"); +$cert_types = array( + "ca" => "Certificate Authority", + "server" => "Server Certificate", + "user" => "User Certificate"); + +$altname_types = array("DNS", "IP", "email", "URI"); +$openssl_digest_algs = array("sha1", "sha224", "sha256", "sha384", "sha512"); + +$pgtitle = array(gettext("System"), gettext("Certificate Manager")); + +if (is_numericint($_GET['userid'])) { + $userid = $_GET['userid']; +} +if (isset($_POST['userid']) && is_numericint($_POST['userid'])) { + $userid = $_POST['userid']; +} + +if (isset($userid)) { + $cert_methods["existing"] = gettext("Choose an existing certificate"); + if (!is_array($config['system']['user'])) { + $config['system']['user'] = array(); + } + $a_user =& $config['system']['user']; +} + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (!is_array($config['ca'])) { + $config['ca'] = array(); +} + +$a_ca =& $config['ca']; + +if (!is_array($config['cert'])) { + $config['cert'] = array(); +} + +$a_cert =& $config['cert']; + +$internal_ca_count = 0; +foreach ($a_ca as $ca) { + if ($ca['prv']) { + $internal_ca_count++; + } +} + +$act = $_GET['act']; +if ($_POST['act']) { + $act = $_POST['act']; +} + +if ($act == "del") { + + if (!isset($a_cert[$id])) { + pfSenseHeader("system_certmanager.php"); + exit; + } + + unset($a_cert[$id]); + write_config(); + $savemsg = sprintf(gettext("Certificate %s successfully deleted"), htmlspecialchars($a_cert[$id]['descr'])) . "
                            "; + pfSenseHeader("system_certmanager.php"); + exit; +} + +if ($act == "new") { + $pconfig['method'] = $_GET['method']; + $pconfig['keylen'] = "2048"; + $pconfig['digest_alg'] = "sha256"; + $pconfig['csr_keylen'] = "2048"; + $pconfig['csr_digest_alg'] = "sha256"; + $pconfig['type'] = "user"; + $pconfig['lifetime'] = "3650"; +} + +if ($act == "exp") { + + if (!$a_cert[$id]) { + pfSenseHeader("system_certmanager.php"); + exit; + } + + $exp_name = urlencode("{$a_cert[$id]['descr']}.crt"); + $exp_data = base64_decode($a_cert[$id]['crt']); + $exp_size = strlen($exp_data); + + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$exp_name}"); + header("Content-Length: $exp_size"); + echo $exp_data; + exit; +} + +if ($act == "key") { + + if (!$a_cert[$id]) { + pfSenseHeader("system_certmanager.php"); + exit; + } + + $exp_name = urlencode("{$a_cert[$id]['descr']}.key"); + $exp_data = base64_decode($a_cert[$id]['prv']); + $exp_size = strlen($exp_data); + + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$exp_name}"); + header("Content-Length: $exp_size"); + echo $exp_data; + exit; +} + +if ($act == "p12") { + if (!$a_cert[$id]) { + pfSenseHeader("system_certmanager.php"); + exit; + } + + $exp_name = urlencode("{$a_cert[$id]['descr']}.p12"); + $args = array(); + $args['friendly_name'] = $a_cert[$id]['descr']; + + $ca = lookup_ca($a_cert[$id]['caref']); + if ($ca) { + $args['extracerts'] = openssl_x509_read(base64_decode($ca['crt'])); + } + + $res_crt = openssl_x509_read(base64_decode($a_cert[$id]['crt'])); + $res_key = openssl_pkey_get_private(array(0 => base64_decode($a_cert[$id]['prv']) , 1 => "")); + + $exp_data = ""; + openssl_pkcs12_export($res_crt, $exp_data, $res_key, null, $args); + $exp_size = strlen($exp_data); + + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$exp_name}"); + header("Content-Length: $exp_size"); + echo $exp_data; + exit; +} + +if ($act == "csr") { + + if (!$a_cert[$id]) { + pfSenseHeader("system_certmanager.php"); + exit; + } + + $pconfig['descr'] = $a_cert[$id]['descr']; + $pconfig['csr'] = base64_decode($a_cert[$id]['csr']); +} + +if ($_POST) { + if ($_POST['save'] == gettext("Save")) { + $input_errors = array(); + $pconfig = $_POST; + + /* input validation */ + if ($pconfig['method'] == "import") { + $reqdfields = explode(" ", + "descr cert key"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Certificate data"), + gettext("Key data")); + if ($_POST['cert'] && (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE"))) { + $input_errors[] = gettext("This certificate does not appear to be valid."); + } + } + + if ($pconfig['method'] == "internal") { + $reqdfields = explode(" ", + "descr caref keylen type lifetime dn_country dn_state dn_city ". + "dn_organization dn_email dn_commonname"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Certificate authority"), + gettext("Key length"), + gettext("Certificate Type"), + gettext("Lifetime"), + gettext("Distinguished name Country Code"), + gettext("Distinguished name State or Province"), + gettext("Distinguished name City"), + gettext("Distinguished name Organization"), + gettext("Distinguished name Email Address"), + gettext("Distinguished name Common Name")); + } + + if ($pconfig['method'] == "external") { + $reqdfields = explode(" ", + "descr csr_keylen csr_dn_country csr_dn_state csr_dn_city ". + "csr_dn_organization csr_dn_email csr_dn_commonname"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Key length"), + gettext("Distinguished name Country Code"), + gettext("Distinguished name State or Province"), + gettext("Distinguished name City"), + gettext("Distinguished name Organization"), + gettext("Distinguished name Email Address"), + gettext("Distinguished name Common Name")); + } + + if ($pconfig['method'] == "existing") { + $reqdfields = array("certref"); + $reqdfieldsn = array(gettext("Existing Certificate Choice")); + } + + $altnames = array(); + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + if ($pconfig['method'] != "import" && $pconfig['method'] != "existing") { + /* subjectAltNames */ + foreach ($_POST as $key => $value) { + $entry = ''; + if (!substr_compare('altname_type', $key, 0, 12)) { + $entry = substr($key, 12); + $field = 'type'; + } + elseif (!substr_compare('altname_value', $key, 0, 13)) { + $entry = substr($key, 13); + $field = 'value'; + } + if (ctype_digit($entry)) { + $altnames[$entry][$field] = $value; + } + } + $pconfig['altnames']['item'] = $altnames; + + /* Input validation for subjectAltNames */ + foreach ($altnames as $idx => $altname) { + switch ($altname['type']) { + case "DNS": + if (!is_hostname($altname['value'])) { + array_push($input_errors, "DNS subjectAltName values must be valid hostnames or FQDNs"); + } + break; + case "IP": + if (!is_ipaddr($altname['value'])) { + array_push($input_errors, "IP subjectAltName values must be valid IP Addresses"); + } + break; + case "email": + if (empty($altname['value'])) { + array_push($input_errors, "You must provide an e-mail address for this type of subjectAltName"); + } + if (preg_match("/[\!\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $altname['value'])) { + array_push($input_errors, "The e-mail provided in a subjectAltName contains invalid characters."); + } + break; + case "URI": + /* Close enough? */ + if (!is_URL($altname['value'])) { + $input_errors[] = "URI subjectAltName types must be a valid URI"; + } + break; + default: + $input_errors[] = "Unrecognized subjectAltName type."; + } + } + + /* Make sure we do not have invalid characters in the fields for the certificate */ + + if (preg_match("/[\?\>\<\&\/\\\"\']/", $_POST['descr'])) { + array_push($input_errors, "The field 'Descriptive Name' contains invalid characters."); + } + + for ($i = 0; $i < count($reqdfields); $i++) { + if (preg_match('/email/', $reqdfields[$i])) { /* dn_email or csr_dn_name */ + if (preg_match("/[\!\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST[$reqdfields[$i]])) { + array_push($input_errors, "The field 'Distinguished name Email Address' contains invalid characters."); + } + } else if (preg_match('/commonname/', $reqdfields[$i])) { /* dn_commonname or csr_dn_commonname */ + if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST[$reqdfields[$i]])) { + array_push($input_errors, "The field 'Distinguished name Common Name' contains invalid characters."); + } + } else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST[$reqdfields[$i]])) { + array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters."); + } + } + + if (($pconfig['method'] != "external") && isset($_POST["keylen"]) && !in_array($_POST["keylen"], $cert_keylens)) { + array_push($input_errors, gettext("Please select a valid Key Length.")); + } + if (($pconfig['method'] != "external") && !in_array($_POST["digest_alg"], $openssl_digest_algs)) { + array_push($input_errors, gettext("Please select a valid Digest Algorithm.")); + } + + if (($pconfig['method'] == "external") && isset($_POST["csr_keylen"]) && !in_array($_POST["csr_keylen"], $cert_keylens)) { + array_push($input_errors, gettext("Please select a valid Key Length.")); + } + if (($pconfig['method'] == "external") && !in_array($_POST["csr_digest_alg"], $openssl_digest_algs)) { + array_push($input_errors, gettext("Please select a valid Digest Algorithm.")); + } + } + + /* if this is an AJAX caller then handle via JSON */ + if (isAjax() && is_array($input_errors)) { + input_errors2Ajax($input_errors); + exit; + } + + /* save modifications */ + if (!$input_errors) { + + if ($pconfig['method'] == "existing") { + $cert = lookup_cert($pconfig['certref']); + if ($cert && $a_user) { + $a_user[$userid]['cert'][] = $cert['refid']; + } + } else { + $cert = array(); + $cert['refid'] = uniqid(); + if (isset($id) && $a_cert[$id]) { + $cert = $a_cert[$id]; + } + + $cert['descr'] = $pconfig['descr']; + + $old_err_level = error_reporting(0); /* otherwise openssl_ functions throw warnings directly to a page screwing menu tab */ + + if ($pconfig['method'] == "import") { + cert_import($cert, $pconfig['cert'], $pconfig['key']); + } + + if ($pconfig['method'] == "internal") { + $dn = array( + 'countryName' => $pconfig['dn_country'], + 'stateOrProvinceName' => $pconfig['dn_state'], + 'localityName' => $pconfig['dn_city'], + 'organizationName' => $pconfig['dn_organization'], + 'emailAddress' => $pconfig['dn_email'], + 'commonName' => $pconfig['dn_commonname']); + if (count($altnames)) { + $altnames_tmp = ""; + foreach ($altnames as $altname) { + $altnames_tmp[] = "{$altname['type']}:{$altname['value']}"; + } + $dn['subjectAltName'] = implode(",", $altnames_tmp); + } + if (!cert_create($cert, $pconfig['caref'], $pconfig['keylen'], + $pconfig['lifetime'], $dn, $pconfig['type'], $pconfig['digest_alg'])) { + while ($ssl_err = openssl_error_string()) { + $input_errors = array(); + array_push($input_errors, "openssl library returns: " . $ssl_err); + } + } + } + + if ($pconfig['method'] == "external") { + $dn = array( + 'countryName' => $pconfig['csr_dn_country'], + 'stateOrProvinceName' => $pconfig['csr_dn_state'], + 'localityName' => $pconfig['csr_dn_city'], + 'organizationName' => $pconfig['csr_dn_organization'], + 'emailAddress' => $pconfig['csr_dn_email'], + 'commonName' => $pconfig['csr_dn_commonname']); + if (count($altnames)) { + $altnames_tmp = ""; + foreach ($altnames as $altname) { + $altnames_tmp[] = "{$altname['type']}:{$altname['value']}"; + } + $dn['subjectAltName'] = implode(",", $altnames_tmp); + } + if (!csr_generate($cert, $pconfig['csr_keylen'], $dn, $pconfig['csr_digest_alg'])) { + while ($ssl_err = openssl_error_string()) { + $input_errors = array(); + array_push($input_errors, "openssl library returns: " . $ssl_err); + } + } + } + error_reporting($old_err_level); + + if (isset($id) && $a_cert[$id]) { + $a_cert[$id] = $cert; + } else { + $a_cert[] = $cert; + } + if (isset($a_user) && isset($userid)) { + $a_user[$userid]['cert'][] = $cert['refid']; + } + } + + if (!$input_errors) { + write_config(); + } + + if ($userid) { + post_redirect("system_usermanager.php", array('act' => 'edit', 'userid' => $userid)); + exit; + } + } + } + + if ($_POST['save'] == gettext("Update")) { + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "descr cert"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Final Certificate data")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (preg_match("/[\?\>\<\&\/\\\"\']/", $_POST['descr'])) { + array_push($input_errors, "The field 'Descriptive Name' contains invalid characters."); + } + +// old way + /* make sure this csr and certificate subjects match */ +// $subj_csr = csr_get_subject($pconfig['csr'], false); +// $subj_cert = cert_get_subject($pconfig['cert'], false); +// +// if (!isset($_POST['ignoresubjectmismatch']) && !($_POST['ignoresubjectmismatch'] == "yes")) { +// if (strcmp($subj_csr, $subj_cert)) { +// $input_errors[] = sprintf(gettext("The certificate subject '%s' does not match the signing request subject."), $subj_cert); +// $subject_mismatch = true; +// } +// } + $mod_csr = csr_get_modulus($pconfig['csr'], false); + $mod_cert = cert_get_modulus($pconfig['cert'], false); + + if (strcmp($mod_csr, $mod_cert)) { + // simply: if the moduli don't match, then the private key and public key won't match + $input_errors[] = sprintf(gettext("The certificate modulus does not match the signing request modulus."), $subj_cert); + $subject_mismatch = true; + } + + /* if this is an AJAX caller then handle via JSON */ + if (isAjax() && is_array($input_errors)) { + input_errors2Ajax($input_errors); + exit; + } + + /* save modifications */ + if (!$input_errors) { + + $cert = $a_cert[$id]; + + $cert['descr'] = $pconfig['descr']; + + csr_complete($cert, $pconfig['cert']); + + $a_cert[$id] = $cert; + + write_config(); + + pfSenseHeader("system_certmanager.php"); + } + } +} + +include("head.inc"); +?> + +"> + + + + + + + + + + + + + + +
                            + +
                            +
                            + + + +
                            + + + + + + + + + + + + +
                            + +
                            + +
                            + + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + +
                            + +
                            + + +
                            + +
                            +
                            + +
                            + +
                            + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            :   + +
                            :   + +
                            :   + +
                            :   + +
                            :   + +   + ex: +   + +
                            :   + + +   + ex: +   + +
                            :   + + + + + + + + + + + + + + + + + +
                            + + + + + " /> +
                             
                            + + " /> + + +
                            NOTE: Type must be one of DNS (FQDN or Hostname), IP (IP address), URI, or email. +
                            +
                            + + + + + + + + + + + + + + + + + + + + +
                            + + bits +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                            :   + +
                            :   + +   + ex: +   + +
                            :   + +   + ex: +   + +
                            :   + +   + ex: +   + +
                            :   + +   + ex: +   + +
                            :   + +   + ex: +   + +
                            +
                            + + + + + + + + + + + + +
                            + + + + +
                            + + + + + + +
                              + " /> + + + +
                            +
                            + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            +
                            + +
                            +
                              + + +
                            + " . + "response subject verification. "); + ?>
                            + + " /> + + + + +
                            +
                            + + + + + + + + + + + + " . gettext("self-signed") . ""; + } else { + $caname = "" . gettext("external"). ""; + } + $subj = htmlspecialchars($subj); + } + + if ($cert['csr']) { + $subj = htmlspecialchars(csr_get_subject($cert['csr'])); + $caname = "" . gettext("external - signature pending") . ""; + } + + $ca = lookup_ca($cert['caref']); + if ($ca) { + $caname = htmlspecialchars($ca['descr']); + } + + if ($cert['prv']) { + $certimg = "/themes/{$g['theme']}/images/icons/icon_frmfld_cert.png"; + } else { + $certimg = "/themes/{$g['theme']}/images/icons/icon_frmfld_cert.png"; + } + ?> + + + + + + + + + + + + + + + + +
                            + + + + + + + + + + + + + + + + +
                            + CA + + +
                             
                            + CA: , + Server: +
                            +
                              
                            + + + + + + + + + + + +
                             :
                             :
                            +
                            + + Revoked
                            + + + webConfigurator
                            + + + User Cert
                            + + + OpenVPN Server
                            + + + OpenVPN Client
                            + + + IPsec Tunnel
                            + + + Captive Portal
                            + + $package) { + if (isset($package['certificatelist'][$refid])) { + $hint = "" ; + if (is_array($package['certificatelist'][$refid])) { + foreach ($package['certificatelist'][$refid] as $cert_used) { + $hint = $hint . $cert_used['usedby']."\n"; + } + } + $count = count($package['certificatelist'][$refid]); + echo "
                            "; + echo htmlspecialchars($package['pkgname'])." ($count)
                            "; + echo "
                            "; + } + } + } + ?> +
                            + + " alt="" width="17" height="17" border="0" /> + + + " alt="" width="17" height="17" border="0" /> + + + " alt="" width="17" height="17" border="0" /> + + + ')"> + " alt="" width="17" height="17" border="0" /> + + + +   + + " alt="" width="17" height="17" border="0" /> + + +
                            + + " alt="" width="17" height="17" border="0" /> + +
                             
                            + + + +
                            +
                            + + + + + diff --git a/src/usr/local/www/system_crlmanager.php b/src/usr/local/www/system_crlmanager.php new file mode 100644 index 0000000..ff70e9b --- /dev/null +++ b/src/usr/local/www/system_crlmanager.php @@ -0,0 +1,722 @@ + gettext("Create an internal Certificate Revocation List"), + "existing" => gettext("Import an existing Certificate Revocation List")); + +if (ctype_alnum($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && ctype_alnum($_POST['id'])) { + $id = $_POST['id']; +} + +if (!is_array($config['ca'])) { + $config['ca'] = array(); +} + +$a_ca =& $config['ca']; + +if (!is_array($config['cert'])) { + $config['cert'] = array(); +} + +$a_cert =& $config['cert']; + +if (!is_array($config['crl'])) { + $config['crl'] = array(); +} + +$a_crl =& $config['crl']; + +foreach ($a_crl as $cid => $acrl) { + if (!isset($acrl['refid'])) { + unset ($a_crl[$cid]); + } +} + +$act = $_GET['act']; +if ($_POST['act']) { + $act = $_POST['act']; +} + +if (!empty($id)) { + $thiscrl =& lookup_crl($id); +} + +// If we were given an invalid crlref in the id, no sense in continuing as it would only cause errors. +if (!$thiscrl && (($act != "") && ($act != "new"))) { + pfSenseHeader("system_crlmanager.php"); + $act=""; + $savemsg = gettext("Invalid CRL reference."); +} + +if ($act == "del") { + $name = htmlspecialchars($thiscrl['descr']); + if (crl_in_use($id)) { + $savemsg = sprintf(gettext("Certificate Revocation List %s is in use and cannot be deleted"), $name) . "
                            "; + } else { + foreach ($a_crl as $cid => $acrl) { + if ($acrl['refid'] == $thiscrl['refid']) { + unset($a_crl[$cid]); + } + } + write_config("Deleted CRL {$name}."); + $savemsg = sprintf(gettext("Certificate Revocation List %s successfully deleted"), $name) . "
                            "; + } +} + +if ($act == "new") { + $pconfig['method'] = $_GET['method']; + $pconfig['caref'] = $_GET['caref']; + $pconfig['lifetime'] = "9999"; + $pconfig['serial'] = "0"; +} + +if ($act == "exp") { + crl_update($thiscrl); + $exp_name = urlencode("{$thiscrl['descr']}.crl"); + $exp_data = base64_decode($thiscrl['text']); + $exp_size = strlen($exp_data); + + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$exp_name}"); + header("Content-Length: $exp_size"); + echo $exp_data; + exit; +} + +if ($act == "addcert") { + if ($_POST) { + unset($input_errors); + $pconfig = $_POST; + + if (!$pconfig['crlref'] || !$pconfig['certref']) { + pfSenseHeader("system_crlmanager.php"); + exit; + } + + // certref, crlref + $crl =& lookup_crl($pconfig['crlref']); + $cert = lookup_cert($pconfig['certref']); + + if (!$crl['caref'] || !$cert['caref']) { + $input_errors[] = gettext("Both the Certificate and CRL must be specified."); + } + + if ($crl['caref'] != $cert['caref']) { + $input_errors[] = gettext("CA mismatch between the Certificate and CRL. Unable to Revoke."); + } + if (!is_crl_internal($crl)) { + $input_errors[] = gettext("Cannot revoke certificates for an imported/external CRL."); + } + + if (!$input_errors) { + $reason = (empty($pconfig['crlreason'])) ? OCSP_REVOKED_STATUS_UNSPECIFIED : $pconfig['crlreason']; + cert_revoke($cert, $crl, $reason); + // refresh IPsec and OpenVPN CRLs + openvpn_refresh_crls(); + vpn_ipsec_configure(); + write_config("Revoked cert {$cert['descr']} in CRL {$crl['descr']}."); + pfSenseHeader("system_crlmanager.php"); + exit; + } + } +} + +if ($act == "delcert") { + if (!is_array($thiscrl['cert'])) { + pfSenseHeader("system_crlmanager.php"); + exit; + } + $found = false; + foreach ($thiscrl['cert'] as $acert) { + if ($acert['refid'] == $_GET['certref']) { + $found = true; + $thiscert = $acert; + } + } + if (!$found) { + pfSenseHeader("system_crlmanager.php"); + exit; + } + $certname = htmlspecialchars($thiscert['descr']); + $crlname = htmlspecialchars($thiscrl['descr']); + if (cert_unrevoke($thiscert, $thiscrl)) { + $savemsg = sprintf(gettext("Deleted Certificate %s from CRL %s"), $certname, $crlname) . "
                            "; + // refresh IPsec and OpenVPN CRLs + openvpn_refresh_crls(); + vpn_ipsec_configure(); + write_config(sprintf(gettext("Deleted Certificate %s from CRL %s"), $certname, $crlname)); + } else { + $savemsg = sprintf(gettext("Failed to delete Certificate %s from CRL %s"), $certname, $crlname) . "
                            "; + } + $act="edit"; +} + +if ($_POST) { + $input_errors = array(); + $pconfig = $_POST; + + /* input validation */ + if (($pconfig['method'] == "existing") || ($act == "editimported")) { + $reqdfields = explode(" ", "descr crltext"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Certificate Revocation List data")); + } + if ($pconfig['method'] == "internal") { + $reqdfields = explode(" ", "descr caref"); + $reqdfieldsn = array( + gettext("Descriptive name"), + gettext("Certificate Authority")); + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (preg_match("/[\?\>\<\&\/\\\"\']/", $pconfig['descr'])) { + array_push($input_errors, "The field 'Descriptive Name' contains invalid characters."); + } + + /* if this is an AJAX caller then handle via JSON */ + if (isAjax() && is_array($input_errors)) { + input_errors2Ajax($input_errors); + exit; + } + + /* save modifications */ + if (!$input_errors) { + $result = false; + + if ($thiscrl) { + $crl =& $thiscrl; + } else { + $crl = array(); + $crl['refid'] = uniqid(); + } + + $crl['descr'] = $pconfig['descr']; + if ($act != "editimported") { + $crl['caref'] = $pconfig['caref']; + $crl['method'] = $pconfig['method']; + } + + if (($pconfig['method'] == "existing") || ($act == "editimported")) { + $crl['text'] = base64_encode($pconfig['crltext']); + } + + if ($pconfig['method'] == "internal") { + $crl['serial'] = empty($pconfig['serial']) ? 9999 : $pconfig['serial']; + $crl['lifetime'] = empty($pconfig['lifetime']) ? 9999 : $pconfig['lifetime']; + $crl['cert'] = array(); + } + + if (!$thiscrl) { + $a_crl[] = $crl; + } + + write_config("Saved CRL {$crl['descr']}"); + // refresh IPsec and OpenVPN CRLs + openvpn_refresh_crls(); + vpn_ipsec_configure(); + pfSenseHeader("system_crlmanager.php"); + } +} + +include("head.inc"); +?> + +"> + + + + + + + + + + +
                            + +
                            +
                            + + + +
                            + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + +
                            + + + + + + + + + + + + + +
                            + +
                            + +
                            + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            + +
                            + +
                            + + + + + + +
                              + " /> + + + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + +
                            + +
                            + +
                            +
                              + " /> + + +
                            +
                            + + +
                            + + + + + + + + + + + + + + + + + + + + $cert): + $name = htmlspecialchars($cert['descr']); + ?> + + + + + + + + + + + + + + + + + + + +
                            +      +  
                            + + + + + + + ')"> + " alt="" width="17" height="17" border="0" /> + +
                            +      +  
                            + : + + : + + + + + " /> +  
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            +

                            + +

                            +
                            + + + + + +
                            + CA + + +
                            +
                            + + + " alt="" width="17" height="17" border="0" /> + + + + " alt="" width="17" height="17" border="0" /> + + +
                            + + " alt="" width="17" height="17" border="0" /> + + + + " alt="" width="17" height="17" border="0" /> + + + + " alt="" width="17" height="17" border="0" /> + + + + ')"> + " alt="" width="17" height="17" border="0" /> + + +
                             
                            + + + +
                            +
                            + + + + + diff --git a/src/usr/local/www/system_firmware.php b/src/usr/local/www/system_firmware.php new file mode 100644 index 0000000..d6d48ee --- /dev/null +++ b/src/usr/local/www/system_firmware.php @@ -0,0 +1,343 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/bin/tar + pfSense_MODULE: firmware +*/ + +##|+PRIV +##|*IDENT=page-system-firmware-manualupdate +##|*NAME=System: Firmware: Manual Update page +##|*DESCR=Allow access to the 'System: Firmware: Manual Update' page. +##|*MATCH=system_firmware.php* +##|-PRIV + +$d_isfwfile = 1; +$nocsrf = true; + +require_once("globals.inc"); +require_once("functions.inc"); +require_once("guiconfig.inc"); +require_once("xmlrpc_client.inc"); + +$curcfg = $config['system']['firmware']; + +/* Allow additional execution time 0 = no limit. */ +ini_set('max_execution_time', '9999'); +ini_set('max_input_time', '9999'); + +function file_is_for_platform($filename, $ul_name) { + global $g; + if ($g['platform'] == "nanobsd") { + if (stristr($ul_name, "nanobsd")) { + return true; + } else { + return false; + } + } + $_gb = exec("/usr/bin/tar xzf $filename -C /tmp/ etc/platform"); + unset($_gb); + if (!file_exists("/tmp/etc/platform")) { + return false; + } + $upgrade_is_for_platform = trim(file_get_contents("/tmp/etc/platform", " \n\t\r")); + if ($g['platform'] == $upgrade_is_for_platform) { + @unlink("/tmp/etc/platform"); + return true; + } + return false; +} + +function file_upload_error_message($error_code) { + switch ($error_code) { + case UPLOAD_ERR_INI_SIZE: + return gettext('The uploaded file exceeds the upload_max_filesize directive in php.ini'); + case UPLOAD_ERR_FORM_SIZE: + return gettext('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'); + case UPLOAD_ERR_PARTIAL: + return gettext('The uploaded file was only partially uploaded'); + case UPLOAD_ERR_NO_FILE: + return gettext('No file was uploaded'); + case UPLOAD_ERR_NO_TMP_DIR: + return gettext('Missing a temporary folder'); + case UPLOAD_ERR_CANT_WRITE: + return gettext('Failed to write file to disk'); + case UPLOAD_ERR_EXTENSION: + return gettext('File upload stopped by extension'); + default: + return gettext('Unknown upload error'); + } +} + +/* if upgrade in progress, alert user */ +if (is_subsystem_dirty('firmwarelock')) { + $pgtitle = array(gettext("System"), gettext("Firmware"), gettext("Manual Update")); + include("head.inc"); + echo "\n"; + include("fbegin.inc"); + echo "
                            \n"; + print_info_box(gettext("An upgrade is currently in progress.

                            The firewall will reboot when the operation is complete.") . "

                            update

                            "); + echo "
                            \n"; + include("fend.inc"); + echo ""; + echo ""; + exit; +} + +if ($_POST['backupbeforeupgrade']) { + touch("/tmp/perform_full_backup.txt"); +} + +/* Handle manual upgrade */ +if ($_POST && !is_subsystem_dirty('firmwarelock')) { + + unset($input_errors); + unset($sig_warning); + + if (stristr($_POST['Submit'], gettext("Enable"))) { + $mode = "enable"; + } else if (stristr($_POST['Submit'], gettext("Disable"))) { + $mode = "disable"; + } else if (stristr($_POST['Submit'], gettext("Upgrade")) || $_POST['sig_override']) { + $mode = "upgrade"; + } else if ($_POST['sig_no']) { + if (file_exists("{$g['upload_path']}/firmware.tgz")) { + unlink("{$g['upload_path']}/firmware.tgz"); + } + } + if ($mode) { + if ($mode == "enable") { + conf_mount_rw(); + mark_subsystem_dirty('firmware'); + } else if ($mode == "disable") { + conf_mount_ro(); + clear_subsystem_dirty('firmware'); + } else if ($mode == "upgrade") { + if ($_FILES['ulfile']['error']) { + $errortext = "(" . file_upload_error_message($_FILES['ulfile']['error']) . ")"; + } + if (is_uploaded_file($_FILES['ulfile']['tmp_name'])) { + /* verify firmware image(s) */ + if (file_is_for_platform($_FILES['ulfile']['tmp_name'], $_FILES['ulfile']['name']) == false && !$_POST['sig_override']) { + $input_errors[] = gettext("The uploaded image file is not for this platform."); + } else if (!file_exists($_FILES['ulfile']['tmp_name'])) { + /* probably out of memory for the MFS */ + $input_errors[] = gettext("Image upload failed (out of memory?)"); + mwexec("/etc/rc.firmware disable"); + clear_subsystem_dirty('firmware'); + } else { + /* move the image so PHP won't delete it */ + rename($_FILES['ulfile']['tmp_name'], "{$g['upload_path']}/firmware.tgz"); + + /* check digital signature */ + $sigchk = verify_digital_signature("{$g['upload_path']}/firmware.tgz"); + + if ($sigchk == 1) { + $sig_warning = gettext("The digital signature on this image is invalid."); + } else if ($sigchk == 2 && !isset($config['system']['firmware']['allowinvalidsig'])) { + $sig_warning = gettext("This image is not digitally signed."); + } else if (($sigchk >= 3)) { + $sig_warning = gettext("There has been an error verifying the signature on this image."); + } + + if (!verify_gzip_file("{$g['upload_path']}/firmware.tgz")) { + $input_errors[] = gettext("The image file is corrupt."); + unlink("{$g['upload_path']}/firmware.tgz"); + } + } + } + + run_plugins("/usr/local/pkg/firmware_upgrade"); + + /* Check for input errors, firmware locks, warnings, then check for firmware if sig_override is set */ + if (!$input_errors && !is_subsystem_dirty('firmwarelock') && (!$sig_warning || $_POST['sig_override'])) { + if (file_exists("{$g['upload_path']}/firmware.tgz")) { + /* fire up the update script in the background */ + mark_subsystem_dirty('firmwarelock'); + $savemsg = gettext("The firmware is now being updated. The firewall will reboot automatically."); + if (stristr($_FILES['ulfile']['name'], "nanobsd") or $_POST['isnano'] == "yes") { + mwexec_bg("/etc/rc.firmware pfSenseNanoBSDupgrade {$g['upload_path']}/firmware.tgz"); + } else { + if ($g['platform'] == "nanobsd") { + $whichone = "pfSenseNanoBSDupgrade"; + } else { + $whichone = "pfSenseupgrade"; + } + mwexec_bg("/etc/rc.firmware {$whichone} {$g['upload_path']}/firmware.tgz"); + unset($whichone); + } + } else { + $savemsg = sprintf(gettext("Firmware image missing or other error, please try again %s."), $errortext); + } + } + } + } +} + +$pgtitle = array(gettext("System"), gettext("Firmware")); +include("head.inc"); + +?> + +
                            + + + + + + "") print_info_box($fwinfo); ?> +" . $sig_warning . "
                            " . gettext("This means that the image you uploaded " . + "is not an official/supported image and may lead to unexpected behavior or security " . + "compromises. Only install images that come from sources that you trust, and make sure " . + "that the image has not been tampered with.") . "

                            " . + gettext("Do you want to install this image anyway (on your own risk)?"); + print_info_box($sig_warning); + if (stristr($_FILES['ulfile']['name'], "nanobsd")) { + echo "\n"; + } +?> + " /> + " /> + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + +
                              + + " /> +
                            + +
                            + + " /> +
                              + + + +
                            + + +
                            + + " /> + + + + +
                              + + + + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + + + +
                            + + diff --git a/src/usr/local/www/system_firmware_auto.php b/src/usr/local/www/system_firmware_auto.php new file mode 100755 index 0000000..e2970fa --- /dev/null +++ b/src/usr/local/www/system_firmware_auto.php @@ -0,0 +1,296 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + Based originally on system_firmware.php + (C)2003-2004 Manuel Kasper + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/bin/tar /usr/bin/nohup /bin/cat /sbin/sha256 + pfSense_MODULE: firmware +*/ + +##|+PRIV +##|*IDENT=page-system-firmware-checkforupdate +##|*NAME=System: Firmware: Check For Update page +##|*DESCR=Allow access to the 'System: Firmware: Check For Update' page. +##|*MATCH=system_firmware_auto.php* +##|-PRIV + +$nocsrf = true; + +require("guiconfig.inc"); +require_once("pfsense-utils.inc"); + +$curcfg = $config['system']['firmware']; + +if (isset($curcfg['alturl']['enable'])) { + $updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}"; +} else { + $updater_url = $g['update_url']; +} + +if ($_POST['backupbeforeupgrade']) { + touch("/tmp/perform_full_backup.txt"); +} + +$closehead = false; +$pgtitle = array(gettext("Diagnostics"), gettext("Firmware"), gettext("Auto Update")); +include("head.inc"); + +?> + + + + + + + + + +
                            + + + + + + + +
                            + +
                            + + + + +
                            + + + + +
                            + + + + + + +
                            + + + + +
                            + +
                            +
                            +
                            + + + +
                            + + +
                            +
                            +
                            +
                            + + + += 3)) { + $sig_warning = gettext("There has been an error verifying the signature on this image."); + $exitstatus = 1; +} + +if ($exitstatus) { + update_status($sig_warning); + update_output_window(gettext("Update cannot continue. You can disable this check on the Updater Settings tab.")); + require("fend.inc"); + exit; +} else if ($sigchk == 2) { + update_status("Upgrade in progress..."); + update_output_window("\n" . gettext("Upgrade Image does not contain a signature but the system has been configured to allow unsigned images. One moment please...") . "\n"); +} + +if (!verify_gzip_file("{$g['upload_path']}/latest.tgz")) { + update_status(gettext("The image file is corrupt.")); + update_output_window(gettext("Update cannot continue")); + if (file_exists("{$g['upload_path']}/latest.tgz")) { + conf_mount_rw(); + unlink("{$g['upload_path']}/latest.tgz"); + conf_mount_ro(); + } + require("fend.inc"); + exit; +} + +if ($downloaded_latest_tgz_sha256 <> $upgrade_latest_tgz_sha256) { + update_status(gettext("Downloading complete but sha256 does not match.")); + update_output_window(gettext("Auto upgrade aborted.") . " \n\n" . gettext("Downloaded SHA256") . ": " . $downloaded_latest_tgz_sha256 . "\n\n" . gettext("Needed SHA256") . ": " . $upgrade_latest_tgz_sha256); +} else { + update_output_window($g['product_name'] . " " . gettext("is now upgrading.") . "\\n\\n" . gettext("The firewall will reboot once the operation is completed.")); + echo "\n"; + mwexec_bg($external_upgrade_helper_text); +} + +/* + Helper functions +*/ + +function read_body_firmware($ch, $string) { + global $g, $fout, $file_size, $downloaded, $counter, $version, $latest_version; + $length = strlen($string); + $downloaded += intval($length); + $downloadProgress = round(100 * (1 - $downloaded / $file_size), 0); + $downloadProgress = 100 - $downloadProgress; + $a = $file_size; + $b = $downloaded; + $c = $downloadProgress; + $text = " " . gettext("Auto Update Download Status") . "\\n"; + $text .= "----------------------------------------------------\\n"; + $text .= " " . gettext("Current Version") . " : {$g['product_version']}\\n"; + $text .= " " . gettext("Latest Version") . " : {$latest_version}\\n"; + $text .= " " . gettext("File size") . " : {$a}\\n"; + $text .= " " . gettext("Downloaded") . " : {$b}\\n"; + $text .= " " . gettext("Percent") . " : {$c}%\\n"; + $text .= "----------------------------------------------------\\n"; + $counter++; + if ($counter > 150) { + update_output_window($text); + update_progress_bar($downloadProgress); + $counter = 0; + } + fwrite($fout, $string); + return $length; +} + +?> + + + diff --git a/src/usr/local/www/system_firmware_check.php b/src/usr/local/www/system_firmware_check.php new file mode 100644 index 0000000..2e56943 --- /dev/null +++ b/src/usr/local/www/system_firmware_check.php @@ -0,0 +1,206 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: firmware +*/ + +##|+PRIV +##|*IDENT=page-system-firmware-autoupdate +##|*NAME=System: Firmware: Auto Update page +##|*DESCR=Allow access to the 'System: Firmware: Auto Update' page. +##|*MATCH=system_firmware_check.php* +##|-PRIV + +$d_isfwfile = 1; +require("guiconfig.inc"); +require_once("pfsense-utils.inc"); + +$curcfg = $config['system']['firmware']; +$pgtitle = array(gettext("System"), gettext("Firmware"), gettext("Auto Update")); +include("head.inc"); + +?> + + + + + +
                            + + + + + + + +
                            + +
                            + + + + +
                            + + + + + + + + +
                            + + + + +
                            + +
                            +
                            +
                            + + + + + " /> +
                            +
                            + +

                            + +"; + echo "

                            "; + require("fend.inc"); + echo ""; + echo ""; + exit; +} + +echo "\n\n"; +echo "\n\n"; + +$txt = gettext("A new version is now available") . "\\n\\n"; +$txt .= gettext("Current version") . ": " . $g['product_version'] . "\\n"; +if ($g['platform'] == "nanobsd") { + $txt .= " " . gettext("NanoBSD Size") . " : " . trim(file_get_contents("/etc/nanosize.txt")) . "\\n"; +} +$txt .= " " . gettext("Built On") . ": " . $current_installed_buildtime . "\\n"; +$txt .= " " . gettext("New version") . ": " . htmlspecialchars($remote_version, ENT_QUOTES | ENT_HTML401). "\\n\\n"; +$txt .= " " . gettext("Update source") . ": " . $updater_url . "\\n"; +update_output_window($txt); +?> +

                            + + + + diff --git a/src/usr/local/www/system_firmware_restorefullbackup.php b/src/usr/local/www/system_firmware_restorefullbackup.php new file mode 100644 index 0000000..3cf3f83 --- /dev/null +++ b/src/usr/local/www/system_firmware_restorefullbackup.php @@ -0,0 +1,220 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + pfSense_BUILDER_BINARIES: /etc/rc.restore_full_backup + pfSense_MODULE: backup +*/ + +##|+PRIV +##|*IDENT=page-diagnostics-restore-full-backup +##|*NAME=Diagnostics: Restore full backup +##|*DESCR=Allow access to the 'Diagnostics: Restore Full Backup' page. +##|*MATCH=system_firmware_restorefullbackup.php +##|-PRIV + +/* Allow additional execution time 0 = no limit. */ +ini_set('max_execution_time', '0'); +ini_set('max_input_time', '0'); + +require_once("functions.inc"); +require("guiconfig.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +if ($_POST['overwriteconfigxml']) { + touch("/tmp/do_not_restore_config.xml"); +} + +if ($_GET['backupnow']) { + mwexec_bg("/etc/rc.create_full_backup"); +} + +if ($_GET['downloadbackup']) { + $filename = basename($_GET['downloadbackup']); + $path = "/root/{$filename}"; + if (file_exists($path)) { + session_write_close(); + ob_end_clean(); + session_cache_limiter('public'); + //$fd = fopen("/root/{$filename}", "rb"); + $filesize = filesize("/root/{$filename}"); + header("Cache-Control: "); + header("Pragma: "); + header("Content-Type: application/octet-stream"); + header("Content-Length: " .(string)(filesize($path))); + header('Content-Disposition: attachment; filename="'.$filename.'"'); + header("Content-Transfer-Encoding: binary\n"); + if ($file = fopen("/root/{$filename}", 'rb')) { + while ((!feof($file)) && (connection_status() == 0)) { + print(fread($file, 1024*8)); + flush(); + } + fclose($file); + } + + exit; + } +} + +if ($_GET['deletefile']) { + $filename = basename($_GET['deletefile']); + if (file_exists("/root/{$filename}") && (preg_match("/pfSense-full-backup-\d+-\d+\.tgz/", $filename) == 1)) { + unlink("/root/" . $filename); + $savemsg = htmlspecialchars($filename) . " " . gettext("has been deleted."); + } else { + $savemsg = htmlspecialchars($filename) . " " . gettext("has not been been deleted (invalid backup file or file does not exist)."); + } +} + +if ($_POST['restorefile']) { + $filename = basename($_POST['restorefile']); + if (file_exists("/root/{$filename}") && (preg_match("/pfSense-full-backup-\d+-\d+\.tgz/", $filename) == 1)) { + mwexec_bg("/etc/rc.restore_full_backup /root/" . escapeshellcmd($filename)); + $savemsg = gettext("The firewall is currently restoring") . " " . htmlspecialchars($filename); + } else { + $savemsg = htmlspecialchars($filename) . " " . gettext("has not been been restored (invalid backup file or file does not exist)."); + } +} + +$pgtitle = array(gettext("Diagnostics"), gettext("Restore full backup")); +include("head.inc"); + +?> + + + + + + +

                            +

                            + + " . gettext("The firewall is now rebooting."));?>
                            +
                            +

                            + +
                            + + + + + + + +
                            + +
                            +
                            + + + + + + + +"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + if ($counter == 0) { + echo ""; + echo ""; + echo ""; + } +?> + + + +
                            "; + echo " $arf"; + echo ""; + echo date ("F d Y H:i:s", filemtime($arf)); + echo ""; + echo format_bytes($size); + echo ""; + echo ""; + echo gettext("Delete"); + echo " | "; + echo ""; + echo gettext("Download"); + echo ""; + echo "
                            "; + echo gettext("Could not locate any previous backups."); + echo "
                            +  
                            + +
                            + " /> +
                            +
                            +
                            +
                            + + + + + + + diff --git a/src/usr/local/www/system_firmware_settings.php b/src/usr/local/www/system_firmware_settings.php new file mode 100644 index 0000000..9f6c5e0 --- /dev/null +++ b/src/usr/local/www/system_firmware_settings.php @@ -0,0 +1,318 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: /usr/bin/fetch + pfSense_MODULE: firmware +*/ + +##|+PRIV +##|*IDENT=page-system-firmware-settings +##|*NAME=System: Firmware: Settings page +##|*DESCR=Allow access to the 'System: Firmware: Settings' page. +##|*MATCH=system_firmware_settings.php* +##|-PRIV + +require("guiconfig.inc"); + +if ($_POST) { + unset($input_errors); + + /* input validation */ + if (($_POST['alturlenable'] == "yes") && (empty($_POST['firmwareurl']))) { + $input_errors[] = gettext("A Firmware Auto Update Base URL must be specified when \"Use an unofficial server for firmware upgrades\" is enabled."); + } + + if (!$input_errors) { + if ($_POST['alturlenable'] == "yes") { + $config['system']['firmware']['alturl']['enable'] = true; + $config['system']['firmware']['alturl']['firmwareurl'] = $_POST['firmwareurl']; + } else { + unset($config['system']['firmware']['alturl']['enable']); + unset($config['system']['firmware']['alturl']['firmwareurl']); + unset($config['system']['firmware']['alturl']); + unset($config['system']['firmware']); + } + if ($_POST['allowinvalidsig'] == "yes") { + $config['system']['firmware']['allowinvalidsig'] = true; + } else { + unset($config['system']['firmware']['allowinvalidsig']); + } + + if ($_POST['disablecheck'] == "yes") { + $config['system']['firmware']['disablecheck'] = true; + } else { + unset($config['system']['firmware']['disablecheck']); + } + + if ($_POST['synconupgrade'] == "yes") { + $config['system']['gitsync']['synconupgrade'] = true; + } else { + unset($config['system']['gitsync']['synconupgrade']); + } + $config['system']['gitsync']['repositoryurl'] = $_POST['repositoryurl']; + $config['system']['gitsync']['branch'] = $_POST['branch']; + + write_config(); + } +} + +$curcfg = $config['system']['firmware']; +$gitcfg = $config['system']['gitsync']; + +$pgtitle = array(gettext("System"), gettext("Firmware"), gettext("Settings")); +$closehead = false; +include("head.inc"); + +exec("/usr/bin/fetch -q -o {$g['tmp_path']}/manifest \"{$g['update_manifest']}\""); +if (file_exists("{$g['tmp_path']}/manifest")) { + $preset_urls_split = explode("\n", file_get_contents("{$g['tmp_path']}/manifest")); +} + +?> + + + + + + + +
                            + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +

                            +
                            + />
                            + + + + + +
                            + + + +
                            + + +
                            + +
                            +
                             
                            + /> +
                            + +
                            + /> +
                            + +
                             
                            + /> +
                            + +
                            + + +
                            + +
                            + + +
                            + + +
                            + + +
                            + + +
                            + +
                            + +
                              + " /> +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/system_gateway_groups.php b/src/usr/local/www/system_gateway_groups.php new file mode 100644 index 0000000..aeb0bad --- /dev/null +++ b/src/usr/local/www/system_gateway_groups.php @@ -0,0 +1,235 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-system-gatewaygroups +##|*NAME=System: Gateway Groups page +##|*DESCR=Allow access to the 'System: Gateway Groups' page. +##|*MATCH=system_gateway_groups.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("openvpn.inc"); + +if (!is_array($config['gateways']['gateway_group'])) { + $config['gateways']['gateway_group'] = array(); +} + +$a_gateway_groups = &$config['gateways']['gateway_group']; +$a_gateways = &$config['gateways']['gateway_item']; +$changedesc = gettext("Gateway Groups") . ": "; + +if ($_POST) { + + $pconfig = $_POST; + + if ($_POST['apply']) { + + $retval = 0; + + $retval = system_routing_configure(); + send_multiple_events(array("service reload dyndnsall", "service reload ipsecdns", "filter reload")); + + /* reconfigure our gateway monitor */ + setup_gateways_monitor(); + + $savemsg = get_std_save_message($retval); + if ($retval == 0) { + clear_subsystem_dirty('staticroutes'); + } + + foreach ($a_gateway_groups as $gateway_group) { + $gw_subsystem = 'gwgroup.' . $gateway_group['name']; + if (is_subsystem_dirty($gw_subsystem)) { + openvpn_resync_gwgroup($gateway_group['name']); + clear_subsystem_dirty($gw_subsystem); + } + } + } +} + +if ($_GET['act'] == "del") { + if ($a_gateway_groups[$_GET['id']]) { + $changedesc .= gettext("removed gateway group") . " {$_GET['id']}"; + foreach ($config['filter']['rule'] as $idx => $rule) { + if ($rule['gateway'] == $a_gateway_groups[$_GET['id']]['name']) { + unset($config['filter']['rule'][$idx]['gateway']); + } + } + unset($a_gateway_groups[$_GET['id']]); + write_config($changedesc); + mark_subsystem_dirty('staticroutes'); + header("Location: system_gateway_groups.php"); + exit; + } +} + +$pgtitle = array(gettext("System"), gettext("Gateway Groups")); +$shortcut_section = "gateway-groups"; + +include("head.inc"); + +?> + + + +
                            + + +
                            +"));?>

                            + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + +
                            + edit +
                            +
                            + + + + + +
                            + edit +
                            +
                            + + + \n"; + } + ?> + + \n"; + } + ?> + +   + + + + + + + + + + +
                            + edit + + ')">delete +
                            + duplicate +
                            +
                            +
                            +
                            +
                            +

                            + + +

                            + + + diff --git a/src/usr/local/www/system_gateway_groups_edit.php b/src/usr/local/www/system_gateway_groups_edit.php new file mode 100644 index 0000000..c5fcc3b --- /dev/null +++ b/src/usr/local/www/system_gateway_groups_edit.php @@ -0,0 +1,378 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-system-gateways-editgatewaygroups +##|*NAME=System: Gateways: Edit Gateway Groups page +##|*DESCR=Allow access to the 'System: Gateways: Edit Gateway Groups' page. +##|*MATCH=system_gateway_groups_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("ipsec.inc"); +require_once("vpn.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_gateway_groups.php'); +} + +if (!is_array($config['gateways']['gateway_group'])) { + $config['gateways']['gateway_group'] = array(); +} + +$a_gateway_groups = &$config['gateways']['gateway_group']; +$a_gateways = return_gateways_array(); + +$categories = array( + 'down' => gettext("Member Down"), + 'downloss' => gettext("Packet Loss"), + 'downlatency' => gettext("High Latency"), + 'downlosslatency' => gettext("Packet Loss or High Latency")); + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + $id = $_GET['dup']; +} + +if (isset($id) && $a_gateway_groups[$id]) { + $pconfig['name'] = $a_gateway_groups[$id]['name']; + $pconfig['item'] = &$a_gateway_groups[$id]['item']; + $pconfig['descr'] = $a_gateway_groups[$id]['descr']; + $pconfig['trigger'] = $a_gateway_groups[$id]['trigger']; +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + unset($id); +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "name"); + $reqdfieldsn = explode(",", "Name"); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (!isset($_POST['name'])) { + $input_errors[] = gettext("A valid gateway group name must be specified."); + } + if (!is_validaliasname($_POST['name'])) { + $input_errors[] = gettext("The gateway name must not contain invalid characters."); + } + + if (isset($_POST['name'])) { + /* check for overlaps */ + if (is_array($a_gateway_groups)) { + foreach ($a_gateway_groups as $gateway_group) { + if (isset($id) && ($a_gateway_groups[$id]) && ($a_gateway_groups[$id] === $gateway_group)) { + if ($gateway_group['name'] != $_POST['name']) { + $input_errors[] = gettext("Changing name on a gateway group is not allowed."); + } + continue; + } + + if ($gateway_group['name'] == $_POST['name']) { + $input_errors[] = sprintf(gettext('A gateway group with this name "%s" already exists.'), $_POST['name']); + break; + } + } + } + } + + /* Build list of items in group with priority */ + $pconfig['item'] = array(); + foreach ($a_gateways as $gwname => $gateway) { + if ($_POST[$gwname] > 0) { + $vipname = "{$gwname}_vip"; + /* we have a priority above 0 (disabled), add item to list */ + $pconfig['item'][] = "{$gwname}|{$_POST[$gwname]}|{$_POST[$vipname]}"; + } + /* check for overlaps */ + if ($_POST['name'] == $gwname) { + $input_errors[] = sprintf(gettext('A gateway group cannot have the same name with a gateway "%s" please choose another name.'), $_POST['name']); + } + + } + if (count($pconfig['item']) == 0) { + $input_errors[] = gettext("No gateway(s) have been selected to be used in this group"); + } + + if (!$input_errors) { + $gateway_group = array(); + $gateway_group['name'] = $_POST['name']; + $gateway_group['item'] = $pconfig['item']; + $gateway_group['trigger'] = $_POST['trigger']; + $gateway_group['descr'] = $_POST['descr']; + + if (isset($id) && $a_gateway_groups[$id]) { + $a_gateway_groups[$id] = $gateway_group; + } else { + $a_gateway_groups[] = $gateway_group; + } + + mark_subsystem_dirty('staticroutes'); + mark_subsystem_dirty('gwgroup.' . $gateway_group['name']); + + write_config(); + + header("Location: system_gateway_groups.php"); + exit; + } +} + +$pgtitle = array(gettext("System"), gettext("Gateways"), gettext("Edit gateway group")); +$shortcut_section = "gateway-groups"; + +function build_gateway_protocol_map (&$a_gateways) { + $result = array(); + foreach ($a_gateways as $gwname => $gateway) { + $result[$gwname] = $gateway['ipprotocol']; + } + return $result; +} + +include("head.inc"); + +?> + + + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +
                            +
                            + + + + + + + + $gateway) { + if (!empty($pconfig['item'])) { + $af = explode("|", $pconfig['item'][0]); + $family = $a_gateways[$af[0]]['ipprotocol']; + if ($gateway['ipprotocol'] != $family) { + continue; + } + } + $interface = $gateway['friendlyiface']; + $selected = array(); + foreach ((array)$pconfig['item'] as $item) { + $itemsplit = explode("|", $item); + if ($itemsplit[0] == $gwname) { + $selected[$itemsplit[1]] = "selected=\"selected\""; + break; + } else { + $selected[0] = "selected=\"selected\""; + } + } + $tr_id = $gwname . "_row"; + echo "\n"; + echo ""; + + $selected = array(); + foreach ((array)$pconfig['item'] as $item) { + $itemsplit = explode("|", $item); + if ($itemsplit[0] == $gwname) { + $selected[$itemsplit[2]] = "selected=\"selected\""; + break; + } else { + $selected['address'] = "selected=\"selected\""; + } + } + echo ""; + echo ""; + } + ?> +
                            GatewayTierVirtual IPDescription
                            "; + echo "{$gateway['name']} "; + echo ""; + echo "\n"; + echo ""; + echo "{$gateway['descr']} "; + echo "
                            +
                            +
                            + +
                            +
                            + +

                            +
                            + +
                            +
                            + +
                            +
                              + " /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            + + + diff --git a/src/usr/local/www/system_gateways.php b/src/usr/local/www/system_gateways.php new file mode 100644 index 0000000..850c5ba --- /dev/null +++ b/src/usr/local/www/system_gateways.php @@ -0,0 +1,436 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-system-gateways +##|*NAME=System: Gateways page +##|*DESCR=Allow access to the 'System: Gateways' page. +##|*MATCH=system_gateways.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +$a_gateways = return_gateways_array(true, false, true); +$a_gateways_arr = array(); +foreach ($a_gateways as $gw) { + $a_gateways_arr[] = $gw; +} +$a_gateways = $a_gateways_arr; + +if (!is_array($config['gateways']['gateway_item'])) { + $config['gateways']['gateway_item'] = array(); +} + +$a_gateway_item = &$config['gateways']['gateway_item']; + +if ($_POST) { + + $pconfig = $_POST; + + if ($_POST['apply']) { + + $retval = 0; + + $retval = system_routing_configure(); + $retval |= filter_configure(); + /* reconfigure our gateway monitor */ + setup_gateways_monitor(); + + $savemsg = get_std_save_message($retval); + if ($retval == 0) { + clear_subsystem_dirty('staticroutes'); + } + } +} + +function can_delete_disable_gateway_item($id, $disable = false) { + global $config, $input_errors, $a_gateways; + + if (!isset($a_gateways[$id])) { + return false; + } + + if (is_array($config['gateways']['gateway_group'])) { + foreach ($config['gateways']['gateway_group'] as $group) { + foreach ($group['item'] as $item) { + $items = explode("|", $item); + if ($items[0] == $a_gateways[$id]['name']) { + if (!$disable) { + $input_errors[] = sprintf(gettext("Gateway '%s' cannot be deleted because it is in use on Gateway Group '%s'"), $a_gateways[$id]['name'], $group['name']); + } else { + $input_errors[] = sprintf(gettext("Gateway '%s' cannot be disabled because it is in use on Gateway Group '%s'"), $a_gateways[$id]['name'], $group['name']); + } + } + } + } + } + + if (is_array($config['staticroutes']['route'])) { + foreach ($config['staticroutes']['route'] as $route) { + if ($route['gateway'] == $a_gateways[$id]['name']) { + if (!$disable) { + // The user wants to delete this gateway, but there is a static route (enabled or disabled) that refers to the gateway. + $input_errors[] = sprintf(gettext("Gateway '%s' cannot be deleted because it is in use on Static Route '%s'"), $a_gateways[$id]['name'], $route['network']); + } else if (!isset($route['disabled'])) { + // The user wants to disable this gateway. + // But there is a static route that uses this gateway and is enabled (not disabled). + $input_errors[] = sprintf(gettext("Gateway '%s' cannot be disabled because it is in use on Static Route '%s'"), $a_gateways[$id]['name'], $route['network']); + } + } + } + } + + if (isset($input_errors)) { + return false; + } + + return true; +} + +function delete_gateway_item($id) { + global $config, $a_gateways; + + if (!isset($a_gateways[$id])) { + return; + } + + /* NOTE: Cleanup static routes for the monitor ip if any */ + if (!empty($a_gateways[$id]['monitor']) && + $a_gateways[$id]['monitor'] != "dynamic" && + is_ipaddr($a_gateways[$id]['monitor']) && + $a_gateways[$id]['gateway'] != $a_gateways[$id]['monitor']) { + if (is_ipaddrv4($a_gateways[$id]['monitor'])) { + mwexec("/sbin/route delete " . escapeshellarg($a_gateways[$id]['monitor'])); + } else { + mwexec("/sbin/route delete -inet6 " . escapeshellarg($a_gateways[$id]['monitor'])); + } + } + + if ($config['interfaces'][$a_gateways[$id]['friendlyiface']]['gateway'] == $a_gateways[$id]['name']) { + unset($config['interfaces'][$a_gateways[$id]['friendlyiface']]['gateway']); + } + unset($config['gateways']['gateway_item'][$a_gateways[$id]['attribute']]); +} + +unset($input_errors); +if ($_GET['act'] == "del") { + if (can_delete_disable_gateway_item($_GET['id'])) { + $realid = $a_gateways[$_GET['id']]['attribute']; + delete_gateway_item($_GET['id']); + write_config("Gateways: removed gateway {$realid}"); + mark_subsystem_dirty('staticroutes'); + header("Location: system_gateways.php"); + exit; + } +} + +if (isset($_POST['del_x'])) { + /* delete selected items */ + if (is_array($_POST['rule']) && count($_POST['rule'])) { + foreach ($_POST['rule'] as $rulei) { + if (!can_delete_disable_gateway_item($rulei)) { + break; + } + } + + if (!isset($input_errors)) { + $items_deleted = ""; + foreach ($_POST['rule'] as $rulei) { + delete_gateway_item($rulei); + $items_deleted .= "{$rulei} "; + } + if (!empty($items_deleted)) { + write_config("Gateways: removed gateways {$items_deleted}"); + mark_subsystem_dirty('staticroutes'); + } + header("Location: system_gateways.php"); + exit; + } + } + +} else if ($_GET['act'] == "toggle" && $a_gateways[$_GET['id']]) { + $realid = $a_gateways[$_GET['id']]['attribute']; + $disable_gw = !isset($a_gateway_item[$realid]['disabled']); + if ($disable_gw) { + // The user wants to disable the gateway, so check if that is OK. + $ok_to_toggle = can_delete_disable_gateway_item($_GET['id'], $disable_gw); + } else { + // The user wants to enable the gateway. That is always OK. + $ok_to_toggle = true; + } + if ($ok_to_toggle) { + if ($disable_gw) { + $a_gateway_item[$realid]['disabled'] = true; + } else { + unset($a_gateway_item[$realid]['disabled']); + } + + if (write_config("Gateways: enable/disable")) { + mark_subsystem_dirty('staticroutes'); + } + + header("Location: system_gateways.php"); + exit; + } +} + +$pgtitle = array(gettext("System"), gettext("Gateways")); +$shortcut_section = "gateways"; + +include("head.inc"); + +?> + + + + +
                            + + +

                            +" . gettext("You must apply the changes in order for them to take effect."));?>

                            + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + +"; + $i = 0; + foreach ($a_gateways as $gateway): + if (isset($gateway['disabled']) || isset($gateway['inactive'])) { + $textss = ""; + $iconfn = "pass_d"; + } else { + $textss = ""; + $iconfn = "pass"; + } +?> + + + + + + + + + + + + + + + + +
                               + + + + + +
                            + + add + +
                            +
                            + + + +   + + + + " alt="icon" /> + + + " alt="icon" /> + + + " alt="icon" /> + + +(default)"; + } + echo $textse; +?> + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + edit + + + ')"> + delete + +
                            + + add + +
                            +
                            + + + + + +
                            + + " border="0" alt="delete" /> + + " + onclick="return confirm('')" /> + + + + edit + +
                            +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/system_gateways_edit.php b/src/usr/local/www/system_gateways_edit.php new file mode 100644 index 0000000..af5e7cb --- /dev/null +++ b/src/usr/local/www/system_gateways_edit.php @@ -0,0 +1,950 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-system-gateways-editgateway +##|*NAME=System: Gateways: Edit Gateway page +##|*DESCR=Allow access to the 'System: Gateways: Edit Gateway' page. +##|*MATCH=system_gateways_edit.php* +##|-PRIV + +require("guiconfig.inc"); +require("pkg-utils.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_gateways.php'); +} + +$a_gateways = return_gateways_array(true, false, true); +$a_gateways_arr = array(); +foreach ($a_gateways as $gw) { + $a_gateways_arr[] = $gw; +} +$a_gateways = $a_gateways_arr; + +if (!is_array($config['gateways']['gateway_item'])) { + $config['gateways']['gateway_item'] = array(); +} + +$a_gateway_item = &$config['gateways']['gateway_item']; +$apinger_default = return_apinger_defaults(); + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + $id = $_GET['dup']; +} + +if (isset($id) && $a_gateways[$id]) { + $pconfig = array(); + $pconfig['name'] = $a_gateways[$id]['name']; + $pconfig['weight'] = $a_gateways[$id]['weight']; + $pconfig['interval'] = $a_gateways[$id]['interval']; + $pconfig['avg_delay_samples'] = $a_gateways[$id]['avg_delay_samples']; + $pconfig['avg_delay_samples_calculated'] = isset($a_gateways[$id]['avg_delay_samples_calculated']); + $pconfig['avg_loss_samples'] = $a_gateways[$id]['avg_loss_samples']; + $pconfig['avg_loss_samples_calculated'] = isset($a_gateways[$id]['avg_loss_samples_calculated']); + $pconfig['avg_loss_delay_samples'] = $a_gateways[$id]['avg_loss_delay_samples']; + $pconfig['avg_loss_delay_samples_calculated'] = isset($a_gateways[$id]['avg_loss_delay_samples_calculated']); + $pconfig['interface'] = $a_gateways[$id]['interface']; + $pconfig['friendlyiface'] = $a_gateways[$id]['friendlyiface']; + $pconfig['ipprotocol'] = $a_gateways[$id]['ipprotocol']; + if (isset($a_gateways[$id]['dynamic'])) { + $pconfig['dynamic'] = true; + } + $pconfig['gateway'] = $a_gateways[$id]['gateway']; + $pconfig['defaultgw'] = isset($a_gateways[$id]['defaultgw']); + $pconfig['force_down'] = isset($a_gateways[$id]['force_down']); + $pconfig['latencylow'] = $a_gateways[$id]['latencylow']; + $pconfig['latencyhigh'] = $a_gateways[$id]['latencyhigh']; + $pconfig['losslow'] = $a_gateways[$id]['losslow']; + $pconfig['losshigh'] = $a_gateways[$id]['losshigh']; + $pconfig['down'] = $a_gateways[$id]['down']; + $pconfig['monitor'] = $a_gateways[$id]['monitor']; + $pconfig['monitor_disable'] = isset($a_gateways[$id]['monitor_disable']); + $pconfig['descr'] = $a_gateways[$id]['descr']; + $pconfig['attribute'] = $a_gateways[$id]['attribute']; + $pconfig['disabled'] = isset($a_gateways[$id]['disabled']); +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + unset($id); + unset($pconfig['attribute']); +} + +if (isset($id) && $a_gateways[$id]) { + $realid = $a_gateways[$id]['attribute']; +} + +if ($_POST) { + + unset($input_errors); + + /* input validation */ + $reqdfields = explode(" ", "name interface"); + $reqdfieldsn = array(gettext("Name"), gettext("Interface")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (!isset($_POST['name'])) { + $input_errors[] = "A valid gateway name must be specified."; + } + if (!is_validaliasname($_POST['name'])) { + $input_errors[] = gettext("The gateway name must not contain invalid characters."); + } else if (isset($_POST['disabled'])) { + // We have a valid gateway name that the user wants to mark as disabled. + // Check if the gateway name is used in any gateway group. + if (is_array($config['gateways']['gateway_group'])) { + foreach ($config['gateways']['gateway_group'] as $group) { + foreach ($group['item'] as $item) { + $items = explode("|", $item); + if ($items[0] == $_POST['name']) { + $input_errors[] = sprintf(gettext("Gateway '%s' cannot be disabled because it is in use on Gateway Group '%s'"), $_POST['name'], $group['name']); + } + } + } + } + + // Check if the gateway name is used in any enabled Static Route. + if (is_array($config['staticroutes']['route'])) { + foreach ($config['staticroutes']['route'] as $route) { + if ($route['gateway'] == $_POST['name']) { + if (!isset($route['disabled'])) { + // There is a static route that uses this gateway and is enabled (not disabled). + $input_errors[] = sprintf(gettext("Gateway '%s' cannot be disabled because it is in use on Static Route '%s'"), $_POST['name'], $route['network']); + } + } + } + } + } + /* skip system gateways which have been automatically added */ + if (($_POST['gateway'] && (!is_ipaddr($_POST['gateway'])) && ($_POST['attribute'] !== "system")) && ($_POST['gateway'] != "dynamic")) { + $input_errors[] = gettext("A valid gateway IP address must be specified."); + } + + if ($_POST['gateway'] && (is_ipaddr($_POST['gateway'])) && !$_REQUEST['isAjax']) { + if (is_ipaddrv4($_POST['gateway'])) { + $parent_ip = get_interface_ip($_POST['interface']); + $parent_sn = get_interface_subnet($_POST['interface']); + if (empty($parent_ip) || empty($parent_sn)) { + $input_errors[] = gettext("Cannot add IPv4 Gateway Address because no IPv4 address could be found on the interface."); + } else { + $subnets = array(gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn); + $vips = link_interface_to_vips($_POST['interface']); + if (is_array($vips)) { + foreach ($vips as $vip) { + if (!is_ipaddrv4($vip['subnet'])) { + continue; + } + $subnets[] = gen_subnet($vip['subnet'], $vip['subnet_bits']) . "/" . $vip['subnet_bits']; + } + } + + $found = false; + foreach ($subnets as $subnet) { + if (ip_in_subnet($_POST['gateway'], $subnet)) { + $found = true; + break; + } + } + + if ($found === false) { + $input_errors[] = sprintf(gettext("The gateway address %1\$s does not lie within one of the chosen interface's subnets."), $_POST['gateway']); + } + } + } else if (is_ipaddrv6($_POST['gateway'])) { + /* do not do a subnet match on a link local address, it's valid */ + if (!is_linklocal($_POST['gateway'])) { + $parent_ip = get_interface_ipv6($_POST['interface']); + $parent_sn = get_interface_subnetv6($_POST['interface']); + if (empty($parent_ip) || empty($parent_sn)) { + $input_errors[] = gettext("Cannot add IPv6 Gateway Address because no IPv6 address could be found on the interface."); + } else { + $subnets = array(gen_subnetv6($parent_ip, $parent_sn) . "/" . $parent_sn); + $vips = link_interface_to_vips($_POST['interface']); + if (is_array($vips)) { + foreach ($vips as $vip) { + if (!is_ipaddrv6($vip['subnet'])) { + continue; + } + $subnets[] = gen_subnetv6($vip['subnet'], $vip['subnet_bits']) . "/" . $vip['subnet_bits']; + } + } + + $found = false; + foreach ($subnets as $subnet) { + if (ip_in_subnet($_POST['gateway'], $subnet)) { + $found = true; + break; + } + } + + if ($found === false) { + $input_errors[] = sprintf(gettext("The gateway address %1\$s does not lie within one of the chosen interface's subnets."), $_POST['gateway']); + } + } + } + } + + if (!empty($config['interfaces'][$_POST['interface']]['ipaddr'])) { + if (is_ipaddr($config['interfaces'][$_POST['interface']]['ipaddr']) && (empty($_POST['gateway']) || $_POST['gateway'] == "dynamic")) { + $input_errors[] = gettext("Dynamic gateway values cannot be specified for interfaces with a static IPv4 configuration."); + } + } + if (!empty($config['interfaces'][$_POST['interface']]['ipaddrv6'])) { + if (is_ipaddr($config['interfaces'][$_POST['interface']]['ipaddrv6']) && (empty($_POST['gateway']) || $_POST['gateway'] == "dynamic")) { + $input_errors[] = gettext("Dynamic gateway values cannot be specified for interfaces with a static IPv6 configuration."); + } + } + } + if (($_POST['monitor'] <> "") && !is_ipaddr($_POST['monitor']) && $_POST['monitor'] != "dynamic") { + $input_errors[] = gettext("A valid monitor IP address must be specified."); + } + /* only allow correct IPv4 and IPv6 gateway addresses */ + if (($_POST['gateway'] <> "") && is_ipaddr($_POST['gateway']) && $_POST['gateway'] != "dynamic") { + if (is_ipaddrv6($_POST['gateway']) && ($_POST['ipprotocol'] == "inet")) { + $input_errors[] = gettext("The IPv6 gateway address '{$_POST['gateway']}' can not be used as a IPv4 gateway'."); + } + if (is_ipaddrv4($_POST['gateway']) && ($_POST['ipprotocol'] == "inet6")) { + $input_errors[] = gettext("The IPv4 gateway address '{$_POST['gateway']}' can not be used as a IPv6 gateway'."); + } + } + /* only allow correct IPv4 and IPv6 monitor addresses */ + if (($_POST['monitor'] <> "") && is_ipaddr($_POST['monitor']) && $_POST['monitor'] != "dynamic") { + if (is_ipaddrv6($_POST['monitor']) && ($_POST['ipprotocol'] == "inet")) { + $input_errors[] = gettext("The IPv6 monitor address '{$_POST['monitor']}' can not be used on a IPv4 gateway'."); + } + if (is_ipaddrv4($_POST['monitor']) && ($_POST['ipprotocol'] == "inet6")) { + $input_errors[] = gettext("The IPv4 monitor address '{$_POST['monitor']}' can not be used on a IPv6 gateway'."); + } + } + + if (isset($_POST['name'])) { + /* check for overlaps */ + foreach ($a_gateways as $gateway) { + if (isset($id) && ($a_gateways[$id]) && ($a_gateways[$id] === $gateway)) { + if ($gateway['name'] != $_POST['name']) { + $input_errors[] = gettext("Changing name on a gateway is not allowed."); + } + continue; + } + if ($_POST['name'] <> "") { + if (($gateway['name'] <> "") && ($_POST['name'] == $gateway['name']) && ($gateway['attribute'] !== "system")) { + $input_errors[] = sprintf(gettext('The gateway name "%s" already exists.'), $_POST['name']); + break; + } + } + if (is_ipaddr($_POST['gateway'])) { + if (($gateway['gateway'] <> "") && ($_POST['gateway'] == $gateway['gateway']) && ($gateway['attribute'] !== "system")) { + $input_errors[] = sprintf(gettext('The gateway IP address "%s" already exists.'), $_POST['gateway']); + break; + } + } + if (is_ipaddr($_POST['monitor'])) { + if (($gateway['monitor'] <> "") && ($_POST['monitor'] == $gateway['monitor']) && ($gateway['attribute'] !== "system")) { + $input_errors[] = sprintf(gettext('The monitor IP address "%s" is already in use. You must choose a different monitor IP.'), $_POST['monitor']); + break; + } + } + } + } + + /* input validation of apinger advanced parameters */ + if ($_POST['latencylow']) { + if (!is_numeric($_POST['latencylow'])) { + $input_errors[] = gettext("The low latency threshold needs to be a numeric value."); + } else { + if ($_POST['latencylow'] < 1) { + $input_errors[] = gettext("The low latency threshold needs to be positive."); + } + } + } + + if ($_POST['latencyhigh']) { + if (!is_numeric($_POST['latencyhigh'])) { + $input_errors[] = gettext("The high latency threshold needs to be a numeric value."); + } else { + if ($_POST['latencyhigh'] < 1) { + $input_errors[] = gettext("The high latency threshold needs to be positive."); + } + } + } + + if ($_POST['losslow']) { + if (!is_numeric($_POST['losslow'])) { + $input_errors[] = gettext("The low Packet Loss threshold needs to be a numeric value."); + } else { + if ($_POST['losslow'] < 1) { + $input_errors[] = gettext("The low Packet Loss threshold needs to be positive."); + } + if ($_POST['losslow'] >= 100) { + $input_errors[] = gettext("The low Packet Loss threshold needs to be less than 100."); + } + } + } + + if ($_POST['losshigh']) { + if (!is_numeric($_POST['losshigh'])) { + $input_errors[] = gettext("The high Packet Loss threshold needs to be a numeric value."); + } else { + if ($_POST['losshigh'] < 1) { + $input_errors[] = gettext("The high Packet Loss threshold needs to be positive."); + } + if ($_POST['losshigh'] > 100) { + $input_errors[] = gettext("The high Packet Loss threshold needs to be 100 or less."); + } + } + } + + if (($_POST['latencylow']) && ($_POST['latencyhigh'])) { + if ((is_numeric($_POST['latencylow'])) && (is_numeric($_POST['latencyhigh']))) { + if (($_POST['latencylow'] > $_POST['latencyhigh'])) { + $input_errors[] = gettext("The high latency threshold needs to be higher than the low latency threshold"); + } + } + } else { + if ($_POST['latencylow']) { + if (is_numeric($_POST['latencylow'])) { + if ($_POST['latencylow'] > $apinger_default['latencyhigh']) { + $input_errors[] = gettext(sprintf("The low latency threshold needs to be less than the default high latency threshold (%d)", $apinger_default['latencyhigh'])); + } + } + } + if ($_POST['latencyhigh']) { + if (is_numeric($_POST['latencyhigh'])) { + if ($_POST['latencyhigh'] < $apinger_default['latencylow']) { + $input_errors[] = gettext(sprintf("The high latency threshold needs to be higher than the default low latency threshold (%d)", $apinger_default['latencylow'])); + } + } + } + } + + if (($_POST['losslow']) && ($_POST['losshigh'])) { + if ((is_numeric($_POST['losslow'])) && (is_numeric($_POST['losshigh']))) { + if ($_POST['losslow'] > $_POST['losshigh']) { + $input_errors[] = gettext("The high Packet Loss threshold needs to be higher than the low Packet Loss threshold"); + } + } + } else { + if ($_POST['losslow']) { + if (is_numeric($_POST['losslow'])) { + if ($_POST['losslow'] > $apinger_default['losshigh']) { + $input_errors[] = gettext(sprintf("The low Packet Loss threshold needs to be less than the default high Packet Loss threshold (%d)", $apinger_default['losshigh'])); + } + } + } + if ($_POST['losshigh']) { + if (is_numeric($_POST['losshigh'])) { + if ($_POST['losshigh'] < $apinger_default['losslow']) { + $input_errors[] = gettext(sprintf("The high Packet Loss threshold needs to be higher than the default low Packet Loss threshold (%d)", $apinger_default['losslow'])); + } + } + } + } + + if ($_POST['interval']) { + if (!is_numeric($_POST['interval'])) { + $input_errors[] = gettext("The probe interval needs to be a numeric value."); + } else { + if ($_POST['interval'] < 1) { + $input_errors[] = gettext("The probe interval needs to be positive."); + } + } + } + + if ($_POST['down']) { + if (!is_numeric($_POST['down'])) { + $input_errors[] = gettext("The down time setting needs to be a numeric value."); + } else { + if ($_POST['down'] < 1) { + $input_errors[] = gettext("The down time setting needs to be positive."); + } + } + } + + if (($_POST['interval']) && ($_POST['down'])) { + if ((is_numeric($_POST['interval'])) && (is_numeric($_POST['down']))) { + if ($_POST['interval'] > $_POST['down']) { + $input_errors[] = gettext("The probe interval needs to be less than the down time setting."); + } + } + } else { + if ($_POST['interval']) { + if (is_numeric($_POST['interval'])) { + if ($_POST['interval'] > $apinger_default['down']) { + $input_errors[] = gettext(sprintf("The probe interval needs to be less than the default down time setting (%d)", $apinger_default['down'])); + } + } + } + if ($_POST['down']) { + if (is_numeric($_POST['down'])) { + if ($_POST['down'] < $apinger_default['interval']) { + $input_errors[] = gettext(sprintf("The down time setting needs to be higher than the default probe interval (%d)", $apinger_default['interval'])); + } + } + } + } + + if ($_POST['avg_delay_samples']) { + if (!is_numeric($_POST['avg_delay_samples'])) { + $input_errors[] = gettext("The average delay replies qty needs to be a numeric value."); + } else { + if ($_POST['avg_delay_samples'] < 1) { + $input_errors[] = gettext("The average delay replies qty needs to be positive."); + } + } + } + + if ($_POST['avg_loss_samples']) { + if (!is_numeric($_POST['avg_loss_samples'])) { + $input_errors[] = gettext("The average packet loss probes qty needs to be a numeric value."); + } else { + if ($_POST['avg_loss_samples'] < 1) { + $input_errors[] = gettext("The average packet loss probes qty needs to be positive."); + } + } + } + + if ($_POST['avg_loss_delay_samples']) { + if (!is_numeric($_POST['avg_loss_delay_samples'])) { + $input_errors[] = gettext("The lost probe delay needs to be a numeric value."); + } else { + if ($_POST['avg_loss_delay_samples'] < 1) { + $input_errors[] = gettext("The lost probe delay needs to be positive."); + } + } + } + + if (!$input_errors) { + $reloadif = ""; + $gateway = array(); + + if (empty($_POST['interface'])) { + $gateway['interface'] = $pconfig['friendlyiface']; + } else { + $gateway['interface'] = $_POST['interface']; + } + if (is_ipaddr($_POST['gateway'])) { + $gateway['gateway'] = $_POST['gateway']; + } else { + $gateway['gateway'] = "dynamic"; + } + $gateway['name'] = $_POST['name']; + $gateway['weight'] = $_POST['weight']; + $gateway['ipprotocol'] = $_POST['ipprotocol']; + $gateway['interval'] = $_POST['interval']; + + $gateway['avg_delay_samples'] = $_POST['avg_delay_samples']; + if ($_POST['avg_delay_samples_calculated'] == "yes" || $_POST['avg_delay_samples_calculated'] == "on") { + $gateway['avg_delay_samples_calculated'] = true; + } + + $gateway['avg_loss_samples'] = $_POST['avg_loss_samples']; + if ($_POST['avg_loss_samples_calculated'] == "yes" || $_POST['avg_loss_samples_calculated'] == "on") { + $gateway['avg_loss_samples_calculated'] = true; + } + + $gateway['avg_loss_delay_samples'] = $_POST['avg_loss_delay_samples']; + if ($_POST['avg_loss_delay_samples_calculated'] == "yes" || $_POST['avg_loss_delay_samples_calculated'] == "on") { + $gateway['avg_loss_delay_samples_calculated'] = true; + } + + $gateway['descr'] = $_POST['descr']; + if ($_POST['monitor_disable'] == "yes") { + $gateway['monitor_disable'] = true; + } + if ($_POST['force_down'] == "yes") { + $gateway['force_down'] = true; + } + if (is_ipaddr($_POST['monitor'])) { + $gateway['monitor'] = $_POST['monitor']; + } + + /* NOTE: If monitor ip is changed need to cleanup the old static route */ + if ($_POST['monitor'] != "dynamic" && !empty($a_gateway_item[$realid]) && is_ipaddr($a_gateway_item[$realid]['monitor']) && + $_POST['monitor'] != $a_gateway_item[$realid]['monitor'] && $gateway['gateway'] != $a_gateway_item[$realid]['monitor']) { + if (is_ipaddrv4($a_gateway_item[$realid]['monitor'])) { + mwexec("/sbin/route delete " . escapeshellarg($a_gateway_item[$realid]['monitor'])); + } else { + mwexec("/sbin/route delete -inet6 " . escapeshellarg($a_gateway_item[$realid]['monitor'])); + } + } + + if ($_POST['defaultgw'] == "yes" || $_POST['defaultgw'] == "on") { + $i = 0; + /* remove the default gateway bits for all gateways with the same address family */ + foreach ($a_gateway_item as $gw) { + if ($gateway['ipprotocol'] == $gw['ipprotocol']) { + unset($config['gateways']['gateway_item'][$i]['defaultgw']); + if ($gw['interface'] != $_POST['interface'] && $gw['defaultgw']) { + $reloadif = $gw['interface']; + } + } + $i++; + } + $gateway['defaultgw'] = true; + } + + if ($_POST['latencylow']) { + $gateway['latencylow'] = $_POST['latencylow']; + } + if ($_POST['latencyhigh']) { + $gateway['latencyhigh'] = $_POST['latencyhigh']; + } + if ($_POST['losslow']) { + $gateway['losslow'] = $_POST['losslow']; + } + if ($_POST['losshigh']) { + $gateway['losshigh'] = $_POST['losshigh']; + } + if ($_POST['down']) { + $gateway['down'] = $_POST['down']; + } + + if (isset($_POST['disabled'])) { + $gateway['disabled'] = true; + } else { + unset($gateway['disabled']); + } + + /* when saving the manual gateway we use the attribute which has the corresponding id */ + if (isset($realid) && $a_gateway_item[$realid]) { + $a_gateway_item[$realid] = $gateway; + } else { + $a_gateway_item[] = $gateway; + } + + mark_subsystem_dirty('staticroutes'); + + write_config(); + + if ($_REQUEST['isAjax']) { + echo $_POST['name']; + exit; + } else if (!empty($reloadif)) { + send_event("interface reconfigure {$reloadif}"); + } + + header("Location: system_gateways.php"); + exit; + } else { + if ($_REQUEST['isAjax']) { + header("HTTP/1.0 500 Internal Server Error"); + header("Content-type: text/plain"); + foreach ($input_errors as $error) { + echo("$error\n"); + } + exit; + } + + $pconfig = $_POST; + if (empty($_POST['friendlyiface'])) { + $pconfig['friendlyiface'] = $_POST['interface']; + } + } +} + + +$pgtitle = array(gettext("System"), gettext("Gateways"), gettext("Edit gateway")); +$shortcut_section = "gateways"; + +include("head.inc"); + +?> + + + + + +
                            + \n"; + } + echo "\n"; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + /> +
                            + +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            + " /> +
                            +
                            + /> +
                            + +
                            + onclick="monitor_change()" /> +
                            + +
                            + + +
                            + . +
                            +
                            + /> +
                            + +
                            + 1) || (isset($pconfig['interval']) && ($pconfig['interval'] > $apinger_default['interval'])) || (isset($pconfig['down']) && !($pconfig['down'] == $apinger_default['down']))); ?> +
                            > + +
                            +
                            > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + +

                            +
                            + + + + +
                            +
                            + + + + +
                            +
                            + +
                            + +

                            + +
                            +
                            + +
                            +
                            + + onclick="calculated_change(this, document.iform.avg_delay_samples)" /> + +


                            +
                            + + onclick="calculated_change(this, document.iform.avg_loss_samples)" /> + +


                            +
                            + + onclick="calculated_change(this, document.iform.avg_loss_delay_samples)" /> + +


                            +
                            +

                            +
                            +
                            +
                            +
                            + +
                            . +
                              + " onclick="enable_change()" /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            + + + + diff --git a/src/usr/local/www/system_groupmanager.php b/src/usr/local/www/system_groupmanager.php new file mode 100644 index 0000000..17b0f73 --- /dev/null +++ b/src/usr/local/www/system_groupmanager.php @@ -0,0 +1,607 @@ +. + All rights reserved. + + Copyright (C) 2003-2005 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: auth +*/ + +##|+PRIV +##|*IDENT=page-system-groupmanager +##|*NAME=System: Group manager page +##|*DESCR=Allow access to the 'System: Group manager' page. +##|*MATCH=system_groupmanager.php* +##|-PRIV + +require("guiconfig.inc"); + +$pgtitle = array(gettext("System"), gettext("Group manager")); + +if (!is_array($config['system']['group'])) { + $config['system']['group'] = array(); +} + +$a_group = &$config['system']['group']; + +unset($id); +if (isset($_POST['groupid']) && is_numericint($_POST['groupid'])) { + $id = $_POST['groupid']; +} + +$act = (isset($_POST['act']) ? $_POST['act'] : ''); + +if ($act == "delgroup") { + + if (!isset($id) || !isset($_POST['groupname']) || !isset($a_group[$id]) || ($_POST['groupname'] != $a_group[$id]['name'])) { + pfSenseHeader("system_groupmanager.php"); + exit; + } + + conf_mount_rw(); + local_group_del($a_group[$id]); + conf_mount_ro(); + $groupdeleted = $a_group[$id]['name']; + unset($a_group[$id]); + write_config(); + $savemsg = gettext("Group") . " {$groupdeleted} " . + gettext("successfully deleted") . "
                            "; +} + +if ($act == "delpriv") { + + if (!isset($id) || !isset($a_group[$id])) { + pfSenseHeader("system_groupmanager.php"); + exit; + } + + $privdeleted = $priv_list[$a_group[$id]['priv'][$_POST['privid']]]['name']; + unset($a_group[$id]['priv'][$_POST['privid']]); + + if (is_array($a_group[$id]['member'])) { + foreach ($a_group[$id]['member'] as $uid) { + $user = getUserEntryByUID($uid); + if ($user) { + local_user_set($user); + } + } + } + + write_config(); + $act = "edit"; + $savemsg = gettext("Privilege") . " {$privdeleted} " . + gettext("successfully deleted") . "
                            "; +} + +if ($act == "edit") { + if (isset($id) && isset($a_group[$id])) { + $pconfig['name'] = $a_group[$id]['name']; + $pconfig['gid'] = $a_group[$id]['gid']; + $pconfig['gtype'] = $a_group[$id]['scope']; + $pconfig['description'] = $a_group[$id]['description']; + $pconfig['members'] = $a_group[$id]['member']; + $pconfig['priv'] = $a_group[$id]['priv']; + } +} + +if (isset($_POST['dellall_x'])) { + + $del_groups = $_POST['delete_check']; + + if (!empty($del_groups)) { + foreach ($del_groups as $groupid) { + if (isset($a_group[$groupid]) && $a_group[$groupid]['scope'] != "system") { + conf_mount_rw(); + local_group_del($a_group[$groupid]); + conf_mount_ro(); + unset($a_group[$groupid]); + } + } + $savemsg = gettext("Selected groups removed successfully!"); + write_config($savemsg); + } +} + +if (isset($_POST['save'])) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "groupname"); + $reqdfieldsn = array(gettext("Group Name")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (preg_match("/[^a-zA-Z0-9\.\-_ ]/", $_POST['groupname'])) { + $input_errors[] = gettext("The group name contains invalid characters."); + } + + if (strlen($_POST['groupname']) > 16) { + $input_errors[] = gettext("The group name is longer than 16 characters."); + } + + if (!$input_errors && !(isset($id) && $a_group[$id])) { + /* make sure there are no dupes */ + foreach ($a_group as $group) { + if ($group['name'] == $_POST['groupname']) { + $input_errors[] = gettext("Another entry with the same group name already exists."); + break; + } + } + } + + if (!$input_errors) { + $group = array(); + if (isset($id) && $a_group[$id]) { + $group = $a_group[$id]; + } + + $group['name'] = $_POST['groupname']; + $group['description'] = $_POST['description']; + + if (empty($_POST['members'])) { + unset($group['member']); + } else if ($group['gid'] != 1998) { // all group + $group['member'] = $_POST['members']; + } + + if (isset($id) && $a_group[$id]) { + $a_group[$id] = $group; + } else { + $group['gid'] = $config['system']['nextgid']++; + $a_group[] = $group; + } + + conf_mount_rw(); + local_group_set($group); + conf_mount_ro(); + + /* Refresh users in this group since their privileges may have changed. */ + if (is_array($group['member'])) { + $a_user = &$config['system']['user']; + foreach ($a_user as & $user) { + if (in_array($user['uid'], $group['member'])) { + local_user_set($user); + } + } + } + + write_config(); + + header("Location: system_groupmanager.php"); + exit; + } +} + +include("head.inc"); + +?> + +"> + + + + + + + + + + + +
                            + +
                            +
                            + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + +
                            + /> +
                            + +
                            + +
                            + + + + + + +
                            +
                            +
                            + +
                            +
                            +
                            + + " alt="" width="17" height="17" border="0" /> + +

                            + + " alt="" width="17" height="17" border="0" /> + +
                            +
                            +
                            + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + +
                            + + + + + '; + return confirm('');" + title="" /> +
                            + + add + + +
                            +
                              + " /> + " onclick="window.location.href='/system_groupmanager.php'" /> + + + + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + '; + document.getElementById('groupid').value=''; + document.iform2.submit();" id="fr"> + + + + + + + + +
                             
                            + ';" + title="" /> + ')" /> +
                            +

                            + +

                            +
                            + + + + + + + + + +
                            + <?=gettext(" title="" border="0" height="16" width="16" /> + +   +
                            +
                            +   + + + + ';" + title="" /> +   + + '; + return confirm('');" + title="" /> + +
                            +
                            + +
                            +
                            + + + diff --git a/src/usr/local/www/system_groupmanager_addprivs.php b/src/usr/local/www/system_groupmanager_addprivs.php new file mode 100644 index 0000000..830d025 --- /dev/null +++ b/src/usr/local/www/system_groupmanager_addprivs.php @@ -0,0 +1,255 @@ + + +"> + + + + + + + + + + +
                            + +
                            +
                            +
                            + + + + + + + + + + + + + +
                            + + + + + +
                            + +
                            + +
                            + Select all + +
                            +
                            +
                            + +
                              + " /> + " onclick="history.back()" /> + + + +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/system_hasync.php b/src/usr/local/www/system_hasync.php new file mode 100755 index 0000000..8ebde1f --- /dev/null +++ b/src/usr/local/www/system_hasync.php @@ -0,0 +1,365 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: system +*/ + +##|+PRIV +##|*IDENT=page-system-hasync +##|*NAME=System: High Availability Sync +##|*DESCR=Allow access to the 'System: High Availability Sync' page. +##|*MATCH=system_hasync.php* +##|-PRIV + +require("guiconfig.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_hasync.php'); +} + +if (!is_array($config['hasync'])) { + $config['hasync'] = array(); +} + +$a_hasync = &$config['hasync']; + +$checkbox_names = array( + 'pfsyncenabled', + 'synchronizeusers', + 'synchronizeauthservers', + 'synchronizecerts', + 'synchronizerules', + 'synchronizeschedules', + 'synchronizealiases', + 'synchronizenat', + 'synchronizeipsec', + 'synchronizeopenvpn', + 'synchronizedhcpd', + 'synchronizewol', + 'synchronizestaticroutes', + 'synchronizelb', + 'synchronizevirtualip', + 'synchronizetrafficshaper', + 'synchronizetrafficshaperlimiter', + 'synchronizetrafficshaperlayer7', + 'synchronizednsforwarder', + 'synchronizecaptiveportal'); + +if ($_POST) { + $pconfig = $_POST; + foreach ($checkbox_names as $name) { + $a_hasync[$name] = $pconfig[$name] ? $pconfig[$name] : false; + } + $a_hasync['pfsyncpeerip'] = $pconfig['pfsyncpeerip']; + $a_hasync['pfsyncinterface'] = $pconfig['pfsyncinterface']; + $a_hasync['synchronizetoip'] = $pconfig['synchronizetoip']; + $a_hasync['username'] = $pconfig['username']; + $a_hasync['password'] = $pconfig['passwordfld']; + write_config("Updated High Availability Sync configuration"); + interfaces_sync_setup(); + header("Location: system_hasync.php"); + exit(); +} + +foreach ($checkbox_names as $name) { + $pconfig[$name] = $a_hasync[$name]; +} +$pconfig['pfsyncpeerip'] = $a_hasync['pfsyncpeerip']; +$pconfig['pfsyncinterface'] = $a_hasync['pfsyncinterface']; +$pconfig['synchronizetoip'] = $a_hasync['synchronizetoip']; +$pconfig['username'] = $a_hasync['username']; +$pconfig['passwordfld'] = $a_hasync['password']; + +$ifaces = get_configured_interface_with_descr(); +$ifaces["lo0"] = "loopback"; + +$pgtitle = array(gettext("System"), gettext("High Availability Sync")); +$shortcut_section = "carp"; +include("head.inc"); +?> + + + +
                            + + + + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            State Synchronization Settings (pfsync)
                            Synchronize States + /> +
                            + pfsync transfers state insertion, update, and deletion messages between firewalls. Each firewall sends these messages out via multicast on a specified interface, using the PFSYNC protocol (IP Protocol 240). It also listens on that interface for similar messages from other firewalls, and imports them into the local state table.

                            This setting should be enabled on all members of a failover group.

                            NOTE: Clicking save will force a configuration sync if it is enabled! (see Configuration Synchronization Settings below)

                            +
                            Synchronize Interface + +
                            + If Synchronize States is enabled, it will utilize this interface for communication.
                            + NOTE: We recommend setting this to a interface other than LAN! A dedicated interface works the best.
                            + NOTE: You must define a IP on each machine participating in this failover group.
                            + NOTE: You must have an IP assigned to the interface on any participating sync nodes. +
                            pfsync Synchronize Peer IP + ' /> +
                            + Setting this option will force pfsync to synchronize its state table to this IP address. The default is directed multicast. +
                             
                            Configuration Synchronization Settings (XMLRPC Sync)
                            Synchronize Config to IP + ' /> +
                            + Enter the IP address of the firewall to which the selected configuration sections should be synchronized.
                            +
                            + NOTE: XMLRPC sync is currently only supported over connections using the same protocol and port as this system - make sure the remote system's port and protocol are set accordingly!
                            +
                            + NOTE: Do not use the Synchronize Config to IP and password option on backup cluster members! +
                            Remote System Username + ' /> +
                            + Enter the webConfigurator username of the system entered above for synchronizing your configuration.
                            +
                            + NOTE: Do not use the Synchronize Config to IP and username option on backup cluster members! +
                            Remote System Password + ' /> +
                            + Enter the webConfigurator password of the system entered above for synchronizing your configuration.
                            +
                            + NOTE: Do not use the Synchronize Config to IP and password option on backup cluster members! +
                            Synchronize Users and Groups + /> +
                            + When this option is enabled, this system will automatically sync the users and groups over to the other HA host when changes are made. +
                            Synchronize Auth Servers + /> +
                            + When this option is enabled, this system will automatically sync the authentication servers (e.g. LDAP, RADIUS) over to the other HA host when changes are made. +
                            Synchronize Certificates + /> +
                            + When this option is enabled, this system will automatically sync the Certificate Authorities, Certificates, and Certificate Revocation Lists over to the other HA host when changes are made. +
                            Synchronize rules + /> +
                            + When this option is enabled, this system will automatically sync the firewall rules to the other HA host when changes are made. +
                            Synchronize Firewall Schedules + /> +
                            + When this option is enabled, this system will automatically sync the firewall schedules to the other HA host when changes are made. +
                            Synchronize aliases + /> +
                            + When this option is enabled, this system will automatically sync the aliases over to the other HA host when changes are made. +
                            Synchronize NAT + /> +
                            + When this option is enabled, this system will automatically sync the NAT rules over to the other HA host when changes are made. +
                            Synchronize IPsec + /> +
                            + When this option is enabled, this system will automatically sync the IPsec configuration to the other HA host when changes are made. +
                            Synchronize OpenVPN + /> +
                            + When this option is enabled, this system will automatically sync the OpenVPN configuration to the other HA host when changes are made. Using this option implies "Synchronize Certificates" as they are required for OpenVPN. +
                            Synchronize DHCPD + /> +
                            + When this option is enabled, this system will automatically sync the DHCP Server settings over to the other HA host when changes are made. This only applies to DHCP for IPv4. +
                            Synchronize Wake on LAN + /> +
                            + When this option is enabled, this system will automatically sync the WoL configuration to the other HA host when changes are made. +
                            Synchronize Static Routes + /> +
                            + When this option is enabled, this system will automatically sync the Static Route configuration to the other HA host when changes are made. +
                            Synchronize Load Balancer + /> +
                            + When this option is enabled, this system will automatically sync the Load Balancer configuration to the other HA host when changes are made. +
                            Synchronize Virtual IPs + /> +
                            + When this option is enabled, this system will automatically sync the CARP Virtual IPs to the other HA host when changes are made. +
                            Synchronize traffic shaper(queues) + /> +
                            + When this option is enabled, this system will automatically sync the traffic shaper configuration for queues to the other HA host when changes are made. +
                            Synchronize traffic shaper(limiter) + /> +
                            + When this option is enabled, this system will automatically sync the traffic shaper configuration for limiters to the other HA host when changes are made. +
                            Synchronize traffic shaper(layer7) + /> +
                            + When this option is enabled, this system will automatically sync the traffic shaper configuration for layer7 to the other HA host when changes are made. +
                            Synchronize DNS Forwarder / Resolver + /> +
                            + When this option is enabled, this system will automatically sync the DNS Forwarder and DNS Resolver configuration to the other HA host when changes are made. +
                            Synchronize Captive Portal + /> +
                            + When this option is enabled, this system will automatically sync the Captive Portal configuration to the other HA host when changes are made. +
                             
                              + + + " onclick="window.location.href=''" /> + +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/system_routes.php b/src/usr/local/www/system_routes.php new file mode 100644 index 0000000..9443d40 --- /dev/null +++ b/src/usr/local/www/system_routes.php @@ -0,0 +1,407 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-system-staticroutes +##|*NAME=System: Static Routes page +##|*DESCR=Allow access to the 'System: Static Routes' page. +##|*MATCH=system_routes.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); + +if (!is_array($config['staticroutes']['route'])) { + $config['staticroutes']['route'] = array(); +} + +$a_routes = &$config['staticroutes']['route']; +$a_gateways = return_gateways_array(true, true, true); +$changedesc_prefix = gettext("Static Routes") . ": "; +unset($input_errors); + +if ($_POST) { + + $pconfig = $_POST; + + if ($_POST['apply']) { + + $retval = 0; + + if (file_exists("{$g['tmp_path']}/.system_routes.apply")) { + $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.system_routes.apply")); + foreach ($toapplylist as $toapply) { + mwexec("{$toapply}"); + } + + @unlink("{$g['tmp_path']}/.system_routes.apply"); + } + + $retval = system_routing_configure(); + $retval |= filter_configure(); + /* reconfigure our gateway monitor */ + setup_gateways_monitor(); + + $savemsg = get_std_save_message($retval); + if ($retval == 0) { + clear_subsystem_dirty('staticroutes'); + } + } +} + +function delete_static_route($id) { + global $config, $a_routes, $changedesc_prefix; + + if (!isset($a_routes[$id])) { + return; + } + + $targets = array(); + if (is_alias($a_routes[$id]['network'])) { + foreach (filter_expand_alias_array($a_routes[$id]['network']) as $tgt) { + if (is_ipaddrv4($tgt)) { + $tgt .= "/32"; + } else if (is_ipaddrv6($tgt)) { + $tgt .= "/128"; + } + if (!is_subnet($tgt)) { + continue; + } + $targets[] = $tgt; + } + } else { + $targets[] = $a_routes[$id]['network']; + } + + foreach ($targets as $tgt) { + $family = (is_subnetv6($tgt) ? "-inet6" : "-inet"); + mwexec("/sbin/route delete {$family} " . escapeshellarg($tgt)); + } + + unset($targets); +} + +if ($_GET['act'] == "del") { + if ($a_routes[$_GET['id']]) { + $changedesc = $changedesc_prefix . gettext("removed route to") . " " . $a_routes[$_GET['id']]['network']; + delete_static_route($_GET['id']); + unset($a_routes[$_GET['id']]); + write_config($changedesc); + header("Location: system_routes.php"); + exit; + } +} + +if (isset($_POST['del_x'])) { + /* delete selected routes */ + if (is_array($_POST['route']) && count($_POST['route'])) { + $changedesc = $changedesc_prefix . gettext("removed route to"); + foreach ($_POST['route'] as $routei) { + $changedesc .= " " . $a_routes[$routei]['network']; + delete_static_route($routei); + unset($a_routes[$routei]); + } + write_config($changedesc); + header("Location: system_routes.php"); + exit; + } + +} else if ($_GET['act'] == "toggle") { + if ($a_routes[$_GET['id']]) { + $do_update_config = true; + if (isset($a_routes[$_GET['id']]['disabled'])) { + // Do not enable a route whose gateway is disabled + if (isset($a_gateways[$a_routes[$_GET['id']]['gateway']]['disabled'])) { + $do_update_config = false; + $input_errors[] = $changedesc_prefix . gettext("gateway is disabled, cannot enable route to") . " " . $a_routes[$_GET['id']]['network']; + } else { + unset($a_routes[$_GET['id']]['disabled']); + $changedesc = $changedesc_prefix . gettext("enabled route to") . " " . $a_routes[$_GET['id']]['network']; + } + } else { + delete_static_route($_GET['id']); + $a_routes[$_GET['id']]['disabled'] = true; + $changedesc = $changedesc_prefix . gettext("disabled route to") . " " . $a_routes[$_GET['id']]['network']; + } + + if ($do_update_config) { + if (write_config($changedesc)) { + mark_subsystem_dirty('staticroutes'); + } + header("Location: system_routes.php"); + exit; + } + } +} else { + /* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */ + unset($movebtn); + foreach ($_POST as $pn => $pd) { + if (preg_match("/move_(\d+)_x/", $pn, $matches)) { + $movebtn = $matches[1]; + break; + } + } + /* move selected routes before this route */ + if (isset($movebtn) && is_array($_POST['route']) && count($_POST['route'])) { + $a_routes_new = array(); + + /* copy all routes < $movebtn and not selected */ + for ($i = 0; $i < $movebtn; $i++) { + if (!in_array($i, $_POST['route'])) { + $a_routes_new[] = $a_routes[$i]; + } + } + + /* copy all selected routes */ + for ($i = 0; $i < count($a_routes); $i++) { + if ($i == $movebtn) { + continue; + } + if (in_array($i, $_POST['route'])) { + $a_routes_new[] = $a_routes[$i]; + } + } + + /* copy $movebtn route */ + if ($movebtn < count($a_routes)) { + $a_routes_new[] = $a_routes[$movebtn]; + } + + /* copy all routes > $movebtn and not selected */ + for ($i = $movebtn+1; $i < count($a_routes); $i++) { + if (!in_array($i, $_POST['route'])) { + $a_routes_new[] = $a_routes[$i]; + } + } + if (count($a_routes_new) > 0) { + $a_routes = $a_routes_new; + } + + if (write_config()) { + mark_subsystem_dirty('staticroutes'); + } + header("Location: system_routes.php"); + exit; + } +} + +$pgtitle = array(gettext("System"), gettext("Static Routes")); +$shortcut_section = "routing"; + +include("head.inc"); + +?> + + + +
                            + + +

                            +"));?>

                            + + + + + + + + + + +
                            + +
                            +
                            + + + + + + + + + + + + + "; + $textse = ""; + $iconfn .= "_d"; + } else { + $textss = $textse = ""; + } + ?> + + + + + + + + + + + + + +
                               + + + + + +
                            add
                            +
                            + + + + " alt="icon" /> + + + + + + + + + + + + +   + + + + + + + + + + +
                            + " + type="image" style="height:17;width:17;border:0" /> + + + " alt="edit" /> + +
                            + ')"> + " alt="delete" /> + + + + " width="17" height="17" border="0" alt="duplicate" /> + +
                            +
                            + + + + + + + + +
                            + + " border="0" alt="move" /> + + " /> + + + + " alt="add" /> + +
                            + + " border="0" alt="delete" /> + + " + onclick="return confirm('')" /> + +
                            +
                            +
                            +
                            +
                            +

                            + + + diff --git a/src/usr/local/www/system_routes_edit.php b/src/usr/local/www/system_routes_edit.php new file mode 100644 index 0000000..a64580b --- /dev/null +++ b/src/usr/local/www/system_routes_edit.php @@ -0,0 +1,445 @@ +. + Copyright (C) 2010 Scott Ullrich + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: routing +*/ + +##|+PRIV +##|*IDENT=page-system-staticroutes-editroute +##|*NAME=System: Static Routes: Edit route page +##|*DESCR=Allow access to the 'System: Static Routes: Edit route' page. +##|*MATCH=system_routes_edit.php* +##|-PRIV + +require_once("guiconfig.inc"); +require_once("filter.inc"); +require_once("util.inc"); +require_once("gwlb.inc"); + +if (isset($_POST['referer'])) { + $referer = $_POST['referer']; +} else { + $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/system_routes.php'); +} + +if (!is_array($config['staticroutes']['route'])) { + $config['staticroutes']['route'] = array(); +} + +$a_routes = &$config['staticroutes']['route']; +$a_gateways = return_gateways_array(true, true); + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + $id = $_GET['dup']; +} + +if (isset($id) && $a_routes[$id]) { + list($pconfig['network'], $pconfig['network_subnet']) = + explode('/', $a_routes[$id]['network']); + $pconfig['gateway'] = $a_routes[$id]['gateway']; + $pconfig['descr'] = $a_routes[$id]['descr']; + $pconfig['disabled'] = isset($a_routes[$id]['disabled']); +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + unset($id); +} + +if ($_POST) { + + global $aliastable; + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "network network_subnet gateway"); + $reqdfieldsn = explode(",", + gettext("Destination network") . "," . + gettext("Destination network bit count") . "," . + gettext("Gateway")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (($_POST['network'] && !is_ipaddr($_POST['network']) && !is_alias($_POST['network']))) { + $input_errors[] = gettext("A valid IPv4 or IPv6 destination network must be specified."); + } + if (($_POST['network_subnet'] && !is_numeric($_POST['network_subnet']))) { + $input_errors[] = gettext("A valid destination network bit count must be specified."); + } + if (($_POST['gateway']) && is_ipaddr($_POST['network'])) { + if (!isset($a_gateways[$_POST['gateway']])) { + $input_errors[] = gettext("A valid gateway must be specified."); + } else if (isset($a_gateways[$_POST['gateway']]['disabled']) && !$_POST['disabled']) { + $input_errors[] = gettext("The gateway is disabled but the route is not. You must disable the route in order to choose a disabled gateway."); + } else { + // Note that the 3rd parameter "disabled" must be passed as explicitly true or false. + if (!validate_address_family($_POST['network'], $_POST['gateway'], $_POST['disabled'] ? true : false)) { + $input_errors[] = gettext("The gateway '{$a_gateways[$_POST['gateway']]['gateway']}' is a different Address Family than network '{$_POST['network']}'."); + } + } + } + + /* check for overlaps */ + $current_targets = get_staticroutes(true); + $new_targets = array(); + if (is_ipaddrv6($_POST['network'])) { + $osn = gen_subnetv6($_POST['network'], $_POST['network_subnet']) . "/" . $_POST['network_subnet']; + $new_targets[] = $osn; + } + if (is_ipaddrv4($_POST['network'])) { + if ($_POST['network_subnet'] > 32) { + $input_errors[] = gettext("A IPv4 subnet can not be over 32 bits."); + } else { + $osn = gen_subnet($_POST['network'], $_POST['network_subnet']) . "/" . $_POST['network_subnet']; + $new_targets[] = $osn; + } + } elseif (is_alias($_POST['network'])) { + $osn = $_POST['network']; + foreach (preg_split('/\s+/', $aliastable[$osn]) as $tgt) { + if (is_ipaddrv4($tgt)) { + $tgt .= "/32"; + } + if (is_ipaddrv6($tgt)) { + $tgt .= "/128"; + } + if (!is_subnet($tgt)) { + continue; + } + if (!is_subnetv6($tgt)) { + continue; + } + $new_targets[] = $tgt; + } + } + if (!isset($id)) { + $id = count($a_routes); + } + $oroute = $a_routes[$id]; + $old_targets = array(); + if (!empty($oroute)) { + if (is_alias($oroute['network'])) { + foreach (filter_expand_alias_array($oroute['network']) as $tgt) { + if (is_ipaddrv4($tgt)) { + $tgt .= "/32"; + } else if (is_ipaddrv6($tgt)) { + $tgt .= "/128"; + } + if (!is_subnet($tgt)) { + continue; + } + $old_targets[] = $tgt; + } + } else { + $old_targets[] = $oroute['network']; + } + } + + $overlaps = array_intersect($current_targets, $new_targets); + $overlaps = array_diff($overlaps, $old_targets); + if (count($overlaps)) { + $input_errors[] = gettext("A route to these destination networks already exists") . ": " . implode(", ", $overlaps); + } + + if (is_array($config['interfaces'])) { + foreach ($config['interfaces'] as $if) { + if (is_ipaddrv4($_POST['network']) && + isset($if['ipaddr']) && isset($if['subnet']) && + is_ipaddrv4($if['ipaddr']) && is_numeric($if['subnet']) && + ($_POST['network_subnet'] == $if['subnet']) && + (gen_subnet($_POST['network'], $_POST['network_subnet']) == gen_subnet($if['ipaddr'], $if['subnet']))) { + $input_errors[] = sprintf(gettext("This network conflicts with address configured on interface %s."), $if['descr']); + } else if (is_ipaddrv6($_POST['network']) && + isset($if['ipaddrv6']) && isset($if['subnetv6']) && + is_ipaddrv6($if['ipaddrv6']) && is_numeric($if['subnetv6']) && + ($_POST['network_subnet'] == $if['subnetv6']) && + (gen_subnetv6($_POST['network'], $_POST['network_subnet']) == gen_subnetv6($if['ipaddrv6'], $if['subnetv6']))) { + $input_errors[] = sprintf(gettext("This network conflicts with address configured on interface %s."), $if['descr']); + } + } + } + + if (!$input_errors) { + $route = array(); + $route['network'] = $osn; + $route['gateway'] = $_POST['gateway']; + $route['descr'] = $_POST['descr']; + if ($_POST['disabled']) { + $route['disabled'] = true; + } else { + unset($route['disabled']); + } + + if (file_exists("{$g['tmp_path']}/.system_routes.apply")) { + $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.system_routes.apply")); + } else { + $toapplylist = array(); + } + $a_routes[$id] = $route; + + if (!empty($oroute)) { + $delete_targets = array_diff($old_targets, $new_targets); + if (count($delete_targets)) { + foreach ($delete_targets as $dts) { + if (is_ipaddrv6($dts)) { + $family = "-inet6"; + } + $toapplylist[] = "/sbin/route delete {$family} {$dts}"; + } + } + } + file_put_contents("{$g['tmp_path']}/.system_routes.apply", serialize($toapplylist)); + + mark_subsystem_dirty('staticroutes'); + + write_config(); + + header("Location: system_routes.php"); + exit; + } +} + +$pgtitle = array(gettext("System"), gettext("Static Routes"), gettext("Edit route")); +$shortcut_section = "routing"; +include("head.inc"); +?> + + + + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + / + +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            + /> +
                            + +
                            + +
                            +
                              + " /> + " onclick="window.location.href=''" /> + + + + +
                            +
                            + + + + diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php new file mode 100644 index 0000000..f08ce7c --- /dev/null +++ b/src/usr/local/www/system_usermanager.php @@ -0,0 +1,1040 @@ +. + All rights reserved. + + Copyright (C) 2003-2005 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_BUILDER_BINARIES: + pfSense_MODULE: auth +*/ + +##|+PRIV +##|*IDENT=page-system-usermanager +##|*NAME=System: User Manager page +##|*DESCR=Allow access to the 'System: User Manager' page. +##|*MATCH=system_usermanager.php* +##|-PRIV + +require("certs.inc"); +require("guiconfig.inc"); + +// start admin user code +$pgtitle = array(gettext("System"), gettext("User Manager")); + +if (isset($_POST['userid']) && is_numericint($_POST['userid'])) { + $id = $_POST['userid']; +} + +if (!isset($config['system']['user']) || !is_array($config['system']['user'])) { + $config['system']['user'] = array(); +} + +$a_user = &$config['system']['user']; + +if (isset($_SERVER['HTTP_REFERER'])) { + $referer = $_SERVER['HTTP_REFERER']; +} else { + $referer = '/system_usermanager.php'; +} + +if (isset($id) && $a_user[$id]) { + $pconfig['usernamefld'] = $a_user[$id]['name']; + $pconfig['descr'] = $a_user[$id]['descr']; + $pconfig['expires'] = $a_user[$id]['expires']; + $pconfig['groups'] = local_user_get_groups($a_user[$id]); + $pconfig['utype'] = $a_user[$id]['scope']; + $pconfig['uid'] = $a_user[$id]['uid']; + $pconfig['authorizedkeys'] = base64_decode($a_user[$id]['authorizedkeys']); + $pconfig['priv'] = $a_user[$id]['priv']; + $pconfig['ipsecpsk'] = $a_user[$id]['ipsecpsk']; + $pconfig['disabled'] = isset($a_user[$id]['disabled']); +} + +if ($_POST['act'] == "deluser") { + + if (!isset($_POST['username']) || !isset($a_user[$id]) || ($_POST['username'] != $a_user[$id]['name'])) { + pfSenseHeader("system_usermanager.php"); + exit; + } + + conf_mount_rw(); + local_user_del($a_user[$id]); + conf_mount_ro(); + $userdeleted = $a_user[$id]['name']; + unset($a_user[$id]); + write_config(); + $savemsg = gettext("User") . " {$userdeleted} " . gettext("successfully deleted") . "
                            "; +} else if ($_POST['act'] == "delpriv") { + + if (!$a_user[$id]) { + pfSenseHeader("system_usermanager.php"); + exit; + } + + $privdeleted = $priv_list[$a_user[$id]['priv'][$_POST['privid']]]['name']; + unset($a_user[$id]['priv'][$_POST['privid']]); + local_user_set($a_user[$id]); + write_config(); + $_POST['act'] = "edit"; + $savemsg = gettext("Privilege") . " {$privdeleted} " . gettext("successfully deleted"). "
                            "; +} else if ($_POST['act'] == "expcert") { + + if (!$a_user[$id]) { + pfSenseHeader("system_usermanager.php"); + exit; + } + + $cert =& lookup_cert($a_user[$id]['cert'][$_POST['certid']]); + + $exp_name = urlencode("{$a_user[$id]['name']}-{$cert['descr']}.crt"); + $exp_data = base64_decode($cert['crt']); + $exp_size = strlen($exp_data); + + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$exp_name}"); + header("Content-Length: $exp_size"); + echo $exp_data; + exit; +} else if ($_POST['act'] == "expckey") { + + if (!$a_user[$id]) { + pfSenseHeader("system_usermanager.php"); + exit; + } + + $cert =& lookup_cert($a_user[$id]['cert'][$_POST['certid']]); + + $exp_name = urlencode("{$a_user[$id]['name']}-{$cert['descr']}.key"); + $exp_data = base64_decode($cert['prv']); + $exp_size = strlen($exp_data); + + header("Content-Type: application/octet-stream"); + header("Content-Disposition: attachment; filename={$exp_name}"); + header("Content-Length: $exp_size"); + echo $exp_data; + exit; +} else if ($_POST['act'] == "delcert") { + + if (!$a_user[$id]) { + pfSenseHeader("system_usermanager.php"); + exit; + } + + $certdeleted = lookup_cert($a_user[$id]['cert'][$_POST['certid']]); + $certdeleted = $certdeleted['descr']; + unset($a_user[$id]['cert'][$_POST['certid']]); + write_config(); + $_POST['act'] = "edit"; + $savemsg = gettext("Certificate") . " {$certdeleted} " . gettext("association removed.") . "
                            "; +} else if ($_POST['act'] == "new") { + /* + * set this value cause the text field is read only + * and the user should not be able to mess with this + * setting. + */ + $pconfig['utype'] = "user"; + $pconfig['lifetime'] = 3650; +} + +if (isset($_POST['dellall_x'])) { + + $del_users = $_POST['delete_check']; + + if (!empty($del_users)) { + foreach ($del_users as $userid) { + if (isset($a_user[$userid]) && $a_user[$userid]['scope'] != "system") { + conf_mount_rw(); + local_user_del($a_user[$userid]); + conf_mount_ro(); + unset($a_user[$userid]); + } + } + $savemsg = gettext("Selected users removed successfully!"); + write_config($savemsg); + } +} + +if ($_POST['save']) { + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if (isset($id) && ($a_user[$id])) { + $reqdfields = explode(" ", "usernamefld"); + $reqdfieldsn = array(gettext("Username")); + } else { + if (empty($_POST['name'])) { + $reqdfields = explode(" ", "usernamefld passwordfld1"); + $reqdfieldsn = array( + gettext("Username"), + gettext("Password")); + } else { + $reqdfields = explode(" ", "usernamefld passwordfld1 name caref keylen lifetime"); + $reqdfieldsn = array( + gettext("Username"), + gettext("Password"), + gettext("Descriptive name"), + gettext("Certificate authority"), + gettext("Key length"), + gettext("Lifetime")); + } + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['usernamefld'])) { + $input_errors[] = gettext("The username contains invalid characters."); + } + + if (strlen($_POST['usernamefld']) > 16) { + $input_errors[] = gettext("The username is longer than 16 characters."); + } + + if (($_POST['passwordfld1']) && ($_POST['passwordfld1'] != $_POST['passwordfld2'])) { + $input_errors[] = gettext("The passwords do not match."); + } + + if (isset($_POST['ipsecpsk']) && !preg_match('/^[[:ascii:]]*$/', $_POST['ipsecpsk'])) { + $input_errors[] = gettext("IPsec Pre-Shared Key contains invalid characters."); + } + + if (isset($id) && $a_user[$id]) { + $oldusername = $a_user[$id]['name']; + } else { + $oldusername = ""; + } + /* make sure this user name is unique */ + if (!$input_errors) { + foreach ($a_user as $userent) { + if ($userent['name'] == $_POST['usernamefld'] && $oldusername != $_POST['usernamefld']) { + $input_errors[] = gettext("Another entry with the same username already exists."); + break; + } + } + } + /* also make sure it is not reserved */ + if (!$input_errors) { + $system_users = explode("\n", file_get_contents("/etc/passwd")); + foreach ($system_users as $s_user) { + $ent = explode(":", $s_user); + if ($ent[0] == $_POST['usernamefld'] && $oldusername != $_POST['usernamefld']) { + $input_errors[] = gettext("That username is reserved by the system."); + break; + } + } + } + + /* + * Check for a valid expiration date if one is set at all (valid means, + * DateTime puts out a time stamp so any DateTime compatible time + * format may be used. to keep it simple for the enduser, we only + * claim to accept MM/DD/YYYY as inputs. Advanced users may use inputs + * like "+1 day", which will be converted to MM/DD/YYYY based on "now". + * Otherwise such an entry would lead to an invalid expiration data. + */ + if ($_POST['expires']) { + try { + $expdate = new DateTime($_POST['expires']); + //convert from any DateTime compatible date to MM/DD/YYYY + $_POST['expires'] = $expdate->format("m/d/Y"); + } catch (Exception $ex) { + $input_errors[] = gettext("Invalid expiration date format; use MM/DD/YYYY instead."); + } + } + + if (!empty($_POST['name'])) { + $ca = lookup_ca($_POST['caref']); + if (!$ca) { + $input_errors[] = gettext("Invalid internal Certificate Authority") . "\n"; + } + } + + /* if this is an AJAX caller then handle via JSON */ + if (isAjax() && is_array($input_errors)) { + input_errors2Ajax($input_errors); + exit; + } + + if (!$input_errors) { + conf_mount_rw(); + $userent = array(); + if (isset($id) && $a_user[$id]) { + $userent = $a_user[$id]; + } + + isset($_POST['utype']) ? $userent['scope'] = $_POST['utype'] : $userent['scope'] = "system"; + + /* the user name was modified */ + if (!empty($_POST['oldusername']) && ($_POST['usernamefld'] <> $_POST['oldusername'])) { + $_SERVER['REMOTE_USER'] = $_POST['usernamefld']; + local_user_del($userent); + } + + /* the user password was modified */ + if ($_POST['passwordfld1']) { + local_user_set_password($userent, $_POST['passwordfld1']); + } + + $userent['name'] = $_POST['usernamefld']; + $userent['descr'] = $_POST['descr']; + $userent['expires'] = $_POST['expires']; + $userent['authorizedkeys'] = base64_encode($_POST['authorizedkeys']); + $userent['ipsecpsk'] = $_POST['ipsecpsk']; + + if ($_POST['disabled']) { + $userent['disabled'] = true; + } else { + unset($userent['disabled']); + } + + if (isset($id) && $a_user[$id]) { + $a_user[$id] = $userent; + } else { + if (!empty($_POST['name'])) { + $cert = array(); + $cert['refid'] = uniqid(); + $userent['cert'] = array(); + + $cert['descr'] = $_POST['name']; + + $subject = cert_get_subject_array($ca['crt']); + + $dn = array( + 'countryName' => $subject[0]['v'], + 'stateOrProvinceName' => $subject[1]['v'], + 'localityName' => $subject[2]['v'], + 'organizationName' => $subject[3]['v'], + 'emailAddress' => $subject[4]['v'], + 'commonName' => $userent['name']); + + cert_create($cert, $_POST['caref'], $_POST['keylen'], + (int)$_POST['lifetime'], $dn); + + if (!is_array($config['cert'])) { + $config['cert'] = array(); + } + $config['cert'][] = $cert; + $userent['cert'][] = $cert['refid']; + } + $userent['uid'] = $config['system']['nextuid']++; + /* Add the user to All Users group. */ + foreach ($config['system']['group'] as $gidx => $group) { + if ($group['name'] == "all") { + if (!is_array($config['system']['group'][$gidx]['member'])) { + $config['system']['group'][$gidx]['member'] = array(); + } + $config['system']['group'][$gidx]['member'][] = $userent['uid']; + break; + } + } + + $a_user[] = $userent; + } + + local_user_set($userent); + local_user_set_groups($userent, $_POST['groups']); + write_config(); + + if (is_dir("/etc/inc/privhooks")) { + run_plugins("/etc/inc/privhooks"); + } + + conf_mount_ro(); + + pfSenseHeader("system_usermanager.php"); + } +} + +$closehead = false; +include("head.inc"); +?> + + + + + + + + +"> + + + + + + + + + + + +
                            + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0): + $i = 0; + foreach ($config['ca'] as $ca) { + if (!$ca['prv']) { + continue; + } + $i++; + } +?> + + + + + + + 0): +?> + + + + + + > + + + + > + + + + + + + + + + + +
                            + + +
                            + /> +
                            + /> + +
                            + +
                            +   +
                            + /> +
                            + +
                            + +
                            + +
                            + + + + + + +
                            +
                            +
                            + +
                            +
                            +
                            + + " alt="" width="17" height="17" border="0" /> + +

                            + + " alt="" width="17" height="17" border="0" /> + +
                            +
                            +
                            + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + +
                            + + + + + + '; + return confirm('');" + title="" /> + +
                            + + add + +
                            +
                            + + + + + + + + + + + + + + + + + +
                            + + + (Revoked) + + + + + ';" + title="" /> + ';" + title="" /> + '; + return confirm('')" + title="" /> +
                            + + add + +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                              + " /> + " onclick="window.location.href=''" /> + + + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + document.getElementById('userid').value=''; + document.iform2.submit();" id="fr"> + + + + + + + + + +
                             
                            + ';" + title="" /> + ')" /> +
                            +

                            + +

                            + +

                            +
                            + + + + + + + + + +
                            + + <?=gettext(" title="" border="0" height="16" width="16" /> + + +
                            +
                              + +   + + ';" + title="" /> + +   + '; + return confirm('');" + title="" /> + +
                            +
                            + +
                            +
                            + + + diff --git a/src/usr/local/www/system_usermanager_addprivs.php b/src/usr/local/www/system_usermanager_addprivs.php new file mode 100644 index 0000000..40b11a6 --- /dev/null +++ b/src/usr/local/www/system_usermanager_addprivs.php @@ -0,0 +1,220 @@ + 'edit', 'userid' => $userid)); + + exit; + } + conf_mount_ro(); +} + +/* if ajax is calling, give them an update message */ +if (isAjax()) { + print_info_box_np($savemsg); +} + +include("head.inc"); +?> + +"> + + + + + + + + + + +
                            + +
                            +
                            +
                            + + + + + + + + + + + + + +
                            + +
                            + +
                            + +
                              + " /> + " onclick="history.back()" /> + + + +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/system_usermanager_passwordmg.php b/src/usr/local/www/system_usermanager_passwordmg.php new file mode 100644 index 0000000..6d785ee --- /dev/null +++ b/src/usr/local/www/system_usermanager_passwordmg.php @@ -0,0 +1,155 @@ + saving changes + + $userent =& $config['system']['user'][$userindex[$_SESSION['Username']]]; + local_user_set_password($userent, $_POST['passwordfld1']); + local_user_set($userent); + unset($userent); + session_commit(); + + write_config(); + + $savemsg = gettext("Password successfully changed") . "
                            "; + } +} + +if (!session_id()) { + session_start(); +} + +/* determine if user is not local to system */ +$islocal = false; +foreach ($config['system']['user'] as $user) { + if ($user['name'] == $_SESSION['Username']) { + $islocal = true; + } +} + +session_commit(); + +include("head.inc"); + +?> + +"> + + +
                            +
                            +
                            + + + + + + + + + + + + + + + + + +
                            's
                            + +
                            + +   +
                            + + + +
                              + " /> +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/system_usermanager_settings.php b/src/usr/local/www/system_usermanager_settings.php new file mode 100644 index 0000000..cadfb08 --- /dev/null +++ b/src/usr/local/www/system_usermanager_settings.php @@ -0,0 +1,185 @@ + + Copyright (C) 2007 Bill Marquette + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: auth +*/ + +##|+PRIV +##|*IDENT=page-system-usermanager-settings +##|*NAME=System: User Manager: settings page +##|*DESCR=Allow access to the 'System: User Manager: settings' page. +##|*MATCH=system_usermanager_settings.php* +##|-PRIV + +require("guiconfig.inc"); + +$pconfig['session_timeout'] = &$config['system']['webgui']['session_timeout']; +$pconfig['authmode'] = &$config['system']['webgui']['authmode']; +$pconfig['backend'] = &$config['system']['webgui']['backend']; + +// Page title for main admin +$pgtitle = array(gettext("System"), gettext("User manager settings")); + +$save_and_test = false; +if ($_POST) { + unset($input_errors); + $pconfig = $_POST; + + if (isset($_POST['session_timeout'])) { + $timeout = intval($_POST['session_timeout']); + if ($timeout != "" && (!is_numeric($timeout) || $timeout <= 0)) { + $input_errors[] = gettext("Session timeout must be an integer value."); + } + } + + if (!$input_errors) { + if ($_POST['authmode'] != "local") { + $authsrv = auth_get_authserver($_POST['authmode']); + if ($_POST['savetest']) { + if ($authsrv['type'] == "ldap") { + $save_and_test = true; + } else { + $savemsg = gettext("The test was not performed because it is supported only for ldap based backends."); + } + } + } + + + if (isset($_POST['session_timeout']) && $_POST['session_timeout'] != "") { + $config['system']['webgui']['session_timeout'] = intval($_POST['session_timeout']); + } else { + unset($config['system']['webgui']['session_timeout']); + } + + if ($_POST['authmode']) { + $config['system']['webgui']['authmode'] = $_POST['authmode']; + } else { + unset($config['system']['webgui']['authmode']); + } + + write_config(); + + } +} + +include("head.inc"); +?> + +"> + + + + +\n"; + echo "//\n"; + echo "\n"; + } +?> + + + + + + + + +
                            + +
                            +
                            +
                            + + + + + + + + + + + + + +
                            + +
                            +
                            +
                            +
                            + +
                              + " /> + " /> +
                            +
                            +
                            +
                            + + + diff --git a/src/usr/local/www/system_usermanager_settings_ldapacpicker.php b/src/usr/local/www/system_usermanager_settings_ldapacpicker.php new file mode 100644 index 0000000..068142e --- /dev/null +++ b/src/usr/local/www/system_usermanager_settings_ldapacpicker.php @@ -0,0 +1,131 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: auth +*/ + +require("guiconfig.inc"); +require_once("auth.inc"); + +$ous = array(); + +if ($_GET) { + $authcfg = array(); + $authcfg['ldap_port'] = $_GET['port']; + $authcfg['ldap_basedn'] = $_GET['basedn']; + $authcfg['host'] = $_GET['host']; + $authcfg['ldap_scope'] = $_GET['scope']; + $authcfg['ldap_binddn'] = $_GET['binddn']; + $authcfg['ldap_bindpw'] = $_GET['bindpw']; + $authcfg['ldap_urltype'] = $_GET['urltype']; + $authcfg['ldap_protver'] = $_GET['proto']; + $authcfg['ldap_authcn'] = explode(";", $_GET['authcn']); + $authcfg['ldap_caref'] = $_GET['cert']; + $ous = ldap_get_user_ous(true, $authcfg); +} + +?> + + + + + + + +
                            + +

                            + + + +

                            + + + + +
                            + +\n"; + } + } +?> +
                            {$ou}
                            +
                            + +

                            + + + +

                            + + diff --git a/src/usr/local/www/system_usermanager_settings_test.php b/src/usr/local/www/system_usermanager_settings_test.php new file mode 100755 index 0000000..9076262 --- /dev/null +++ b/src/usr/local/www/system_usermanager_settings_test.php @@ -0,0 +1,134 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + Copyright (C) 2014 Silvio Giunge + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ +/* + pfSense_MODULE: auth +*/ + +##|+PRIV +##|*IDENT=page-system-usermanager-settings-testldap +##|*NAME=System: User Manager: Settings: Test LDAP page +##|*DESCR=Allow access to the 'System: User Manager: Settings: Test LDAP' page. +##|*MATCH=system_usermanager_settings_test.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("auth.inc"); + +if (isset($config['system']['authserver'][0]['host'])) { + $auth_server = $config['system']['authserver'][0]['host']; + $authserver = $_GET['authserver']; + $authcfg = auth_get_authserver($authserver); +} + +?> + + + + + + +
                            + +"); +} else { + if ($theme != "" && file_exists("/usr/local/www/themes/{$theme}/images/logo.gif")) { + echo "




                            "; + } + echo "" . sprintf(gettext("Testing %s LDAP settings... One moment please..."), $g['product_name']) . ""; + + echo ""; + + echo ""; + if (ldap_test_connection($authcfg)) { + echo ""; + + echo ""; + if (ldap_test_bind($authcfg)) { + echo ""; + + echo ""; + $ous = ldap_get_user_ous(true, $authcfg); + if (count($ous)>1) { + echo ""; + echo "
                            " . gettext("Attempting connection to") . " " . "
                            $auth_server
                            OK
                            " . gettext("Attempting bind to") . " " . "
                            $auth_server
                            OK
                            " . gettext("Attempting to fetch Organizational Units from") . " " . "
                            $auth_server
                            OK
                            "; + if (is_array($ous)) { + echo "
                            "; + echo "" . gettext("Organization units found") . ""; + echo ""; + foreach ($ous as $ou) { + echo ""; + } + } + } else { + echo ""; + } + + echo "
                            " . $ou . "
                            " . gettext("failed") . "

                            "; + + } else { + echo "" . gettext("failed") . ""; + echo "

                            "; + } + } else { + echo "" . gettext("failed") . ""; + echo "

                            "; + } +} + +?> +

                            + " onClick='Javascript:window.close();'> + + + + diff --git a/src/usr/local/www/themes/_corporate/all.css b/src/usr/local/www/themes/_corporate/all.css new file mode 100644 index 0000000..ea578fa --- /dev/null +++ b/src/usr/local/www/themes/_corporate/all.css @@ -0,0 +1,1209 @@ +/* + * "corporate" theme by Guillaume Belanger + * based on the original "metallic" theme */ + + +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; +} + +.nowrap { white-space: nowrap; } + +.addgatewaybox { + background-color: #990000; + border-style: none none none none; + width: 225px; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 11px; + font-family: "Trebuchet MS", sans-serif; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + background-color: #333333; + margin: 5px auto; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} + +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 815px; + margin: 5px auto; +} + +#header { + background: url('images/header.gif') no-repeat; + background-position: 4px; + height: 102px; + width: 808px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.gif') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 28px; + left: 230px; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: bold; + font-family: Verdana; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 4px; + margin-top: 0px; + margin-left: 5px; + padding-top: 0px; + width: 800px; + background: url('images/horizontal.gif') repeat-y; +} + +#left { + width: 800px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.gif') no-repeat; + top: -18px; + left: 7px; + width: 800px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 7px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -24px; + left: -2px; + width: 800px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + width: 7.75em; + height: 28px; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + background-color: #202020; + /* background: url("images/menu_footer.gif") no-repeat; */ + background-position: bottom; + + padding: 0em 0em 0em 0; + margin-top: 4px; + padding-top: 0em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #303030; + border-top: 0px; + width: 8.9em; + height: 1.6em; + line-height: 1.6em; + background: url('images/metal_bgr.gif') repeat-x; + color: #FFF; +} +#navigation ul li ul li:hover { + background: url('images/metal_bgr_red.gif') repeat-x; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +#graph { + position: relative; + z-index: 1; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/metallic/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/metallic/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/metallic/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/metallic/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/metallic/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/metallic/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/metallic/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/metallic/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/metallic/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/metallic/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/metallic/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/metallic/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/metallic/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/metallic/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/metallic/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/metallic/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/metallic/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/metallic/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #FFFFFF; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #DDDDDD; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 6px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(/themes/metallic/images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password, #password2 { + font-size: small; + width: 60%; + padding-left: 19px; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #B1B1B1; + padding-right: 6px; + padding-left: 6px; + color: #000000; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} +.widgetconfigdiv{ + background:#BBBBBB; + font-size: 11px; + color: #000000; + padding-right: 5px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +div#log div.log-entry-mini { + clear: both; +} + +div#log div.log-entry-mini span { + padding: 2px 2px 2px 2px; + padding-left: 6px; +} + +div#log span.log-action-mini-header, +div#log span.log-time-mini-header, +div#log span.log-interface-mini-header, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header, +div#log span.log-protocol-mini-header { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 12px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-time-mini, +div#log span.log-interface-mini, +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-protocol-mini { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 11px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-action-mini-header { + width: 6%; +} + +div#log span.log-time-mini, +div#log span.log-time-mini-header { + width: 19%; +} + +div#log span.log-interface-mini, +div#log span.log-interface-mini-header { + width: 8%; +} + +div#log span.log-source-mini, +div#log span.log-source-mini-header { + width: 23%; +} + +div#log span.log-destination-mini, +div#log span.log-destination-mini-header { + width: 31%; +} + +div#log span.log-protocol-mini, +div#log span.log-protocol-mini-header { + width: 8%; + border-right: 1px solid #999; +} + +/*thermal_sensors widget styles*/ + +.thermalSensorRow { width: 100%; border: 0px solid #ddd; padding: 1px; border-radius: 3px; } +.thermalSensorBarShell { position: relative; width: 100%; height: 5px; border: 1px solid lightgray; border-radius: 3px; } +.thermalSensorBar { position: absolute; width: 0%; height: 1px; z-index: 1; border-style: solid; border-radius: 3px; + background-color: LimeGreen; + border-top-width: 2px; border-top-color: Lime; + border-left-width: 0px; + border-right-width: 0px; + border-bottom-width: 2px; border-bottom-color: Green; +} +.thermalSensorTextShell { height: 20px; width: 100%; top: 3px; } +.thermalSensorText { float: left; height: 20px; top: 3px; } +.thermalSensorValue { float: left; height: 20px; top: 3px; font-weight: bold; margin-left: 10px;} + +.thermalSensorWarnThresh { position: absolute; background-color: orange; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } +.thermalSensorCritThresh { position: absolute; background-color: red; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } + +.thermal_sensors_widget_scale000 { position: absolute; height: 5px; width: 1px; left: -1px; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale020 { position: absolute; height: 3px; width: 1px; left: 10%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale010 { position: absolute; height: 3px; width: 1px; left: 20%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale030 { position: absolute; height: 3px; width: 1px; left: 30%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale040 { position: absolute; height: 3px; width: 1px; left: 40%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale050 { position: absolute; height: 3px; width: 1px; left: 50%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale060 { position: absolute; height: 3px; width: 1px; left: 60%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale070 { position: absolute; height: 3px; width: 1px; left: 70%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale080 { position: absolute; height: 3px; width: 1px; left: 80%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale090 { position: absolute; height: 3px; width: 1px; left: 90%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; } + +.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; } + +/* widget textarea styles - full width */ +.textarea_widget { + width: 100%; + resize:vertical; + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* IE 8+ */ +} diff --git a/src/usr/local/www/themes/_corporate/bottom-loader.js b/src/usr/local/www/themes/_corporate/bottom-loader.js new file mode 100644 index 0000000..a21f775 --- /dev/null +++ b/src/usr/local/www/themes/_corporate/bottom-loader.js @@ -0,0 +1,10 @@ +// diff --git a/src/usr/local/www/themes/_corporate/graphlink.css b/src/usr/local/www/themes/_corporate/graphlink.css new file mode 100644 index 0000000..5bb1b4c --- /dev/null +++ b/src/usr/local/www/themes/_corporate/graphlink.css @@ -0,0 +1,43 @@ +/******************************************************************************* + $Id$ + + This file is part of the GraphLink software. + GraphLink is distributed under the MIT License. + Copyright (C) 2005-2006 Max Khitrov +*******************************************************************************/ + +/** + * Defines the background image used for the graph, as well as the actual data + * locations. + * Use padding-left and padding-top to align the data area correctly with your + * background image. + * Width and height should same as the dimensions of the image, minus the + * padding values in both directions. + */ +div.GraphLink { + width: 212px; + height: 60px; + padding-left: 38px; + padding-top: 10px; + background-image: url(/themes/corporate/images/misc/graph.png); + overflow: hidden; +} + +/** + * Defines the data display area. Modify to fit your background image. + */ +div.GraphLinkData { + width: 200px; + height: 50px; + overflow: hidden; +} + +/** + * Defines the look of one bar. Nothing to change here other than the color. + */ +span.GraphLinkBar { + background-color: #990000; + height: 100%; + float: left; + overflow: hidden; +} diff --git a/src/usr/local/www/themes/_corporate/images/alert_bgr.gif b/src/usr/local/www/themes/_corporate/images/alert_bgr.gif new file mode 100755 index 0000000..65498f1 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/alert_bgr.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/footer.gif b/src/usr/local/www/themes/_corporate/images/footer.gif new file mode 100755 index 0000000..e516113 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/footer.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/header.gif b/src/usr/local/www/themes/_corporate/images/header.gif new file mode 100755 index 0000000..aebc511 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/header.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/help.png b/src/usr/local/www/themes/_corporate/images/help.png new file mode 100755 index 0000000..1de05e3 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/help.png differ diff --git a/src/usr/local/www/themes/_corporate/images/horizontal.gif b/src/usr/local/www/themes/_corporate/images/horizontal.gif new file mode 100755 index 0000000..4ed7694 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/horizontal.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/favicon.ico b/src/usr/local/www/themes/_corporate/images/icons/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/favicon.ico differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_3g.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_3g.gif new file mode 100755 index 0000000..46ccb92 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_3g.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_3g_inactive.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_3g_inactive.gif new file mode 100755 index 0000000..cf983e4 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_3g_inactive.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_advanced.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_advanced.gif new file mode 100644 index 0000000..3ede1ff Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_advanced.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_advanced_s.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_advanced_s.gif new file mode 100644 index 0000000..b233549 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_advanced_s.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_alert.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_alert.gif new file mode 100755 index 0000000..7646941 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_alert.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_alias_host.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_alias_host.gif new file mode 100644 index 0000000..ad43e17 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_alias_host.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_alias_net.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_alias_net.gif new file mode 100644 index 0000000..abd1b8b Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_alias_net.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_alias_port.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_alias_port.gif new file mode 100644 index 0000000..4acf2aa Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_alias_port.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_alias_url.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_alias_url.gif new file mode 100644 index 0000000..660571e Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_alias_url.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_alias_url_reload.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_alias_url_reload.gif new file mode 100644 index 0000000..55c1c4a Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_alias_url_reload.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_block.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_block.gif new file mode 100755 index 0000000..670c968 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_block.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_block_add.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_block_add.gif new file mode 100755 index 0000000..eb726d6 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_block_add.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_block_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_block_d.gif new file mode 100755 index 0000000..e6345fe Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_block_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_cablenic.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_cablenic.gif new file mode 100755 index 0000000..a071c66 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_cablenic.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_cal.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_cal.gif new file mode 100755 index 0000000..a9c7c87 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_cal.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_cal_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_cal_mo.gif new file mode 100755 index 0000000..1647e2f Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_cal_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_carp.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_carp.gif new file mode 100755 index 0000000..9454a82 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_carp.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_carp_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_carp_d.gif new file mode 100755 index 0000000..2ba8db2 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_carp_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_chain.png b/src/usr/local/www/themes/_corporate/images/icons/icon_chain.png new file mode 100644 index 0000000..12db07a Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_chain.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_check.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_check.gif new file mode 100755 index 0000000..393674d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_check.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_clock_green.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_clock_green.gif new file mode 100755 index 0000000..e171ba8 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_clock_green.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_clock_grey.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_clock_grey.gif new file mode 100755 index 0000000..00c865a Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_clock_grey.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_clock_red.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_clock_red.gif new file mode 100755 index 0000000..7b412ee Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_clock_red.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_close.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_close.gif new file mode 100755 index 0000000..e0f86a7 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_close.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_configure.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_configure.gif new file mode 100755 index 0000000..7182e0d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_configure.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_down.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_down.gif new file mode 100755 index 0000000..b71a9c5 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_down.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_down_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_down_d.gif new file mode 100755 index 0000000..70a7473 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_down_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_down_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_down_mo.gif new file mode 100755 index 0000000..584587a Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_down_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_e.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_e.gif new file mode 100755 index 0000000..2950800 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_e.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_e_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_e_mo.gif new file mode 100755 index 0000000..9ba5738 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_e_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_error.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_error.gif new file mode 100755 index 0000000..e0fa659 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_error.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_exclam.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_exclam.gif new file mode 100755 index 0000000..36c2ec7 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_exclam.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_flag_de.png b/src/usr/local/www/themes/_corporate/images/icons/icon_flag_de.png new file mode 100755 index 0000000..069cbbe Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_flag_de.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_flag_en.png b/src/usr/local/www/themes/_corporate/images/icons/icon_flag_en.png new file mode 100755 index 0000000..bd7f9a5 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_flag_en.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_flag_es.png b/src/usr/local/www/themes/_corporate/images/icons/icon_flag_es.png new file mode 100755 index 0000000..434776c Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_flag_es.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_flag_pt_BR.png b/src/usr/local/www/themes/_corporate/images/icons/icon_flag_pt_BR.png new file mode 100755 index 0000000..f786349 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_flag_pt_BR.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_cert.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_cert.png new file mode 100755 index 0000000..48a34b6 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_cert.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_file.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_file.png new file mode 100755 index 0000000..48a9ed2 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_file.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_group.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_group.png new file mode 100755 index 0000000..7d929c0 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_group.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_host.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_host.png new file mode 100755 index 0000000..867ef2c Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_host.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_imp.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_imp.png new file mode 100755 index 0000000..f667cfc Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_imp.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_mail.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_mail.png new file mode 100755 index 0000000..d2d4548 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_mail.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_pwd.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_pwd.png new file mode 100755 index 0000000..06b53a1 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_pwd.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_search.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_search.png new file mode 100755 index 0000000..33de926 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_search.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_time.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_time.png new file mode 100755 index 0000000..aa8300a Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_time.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_unknown.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_unknown.png new file mode 100755 index 0000000..1857d0e Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_unknown.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_url.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_url.png new file mode 100755 index 0000000..cf56792 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_url.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_user.png b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_user.png new file mode 100755 index 0000000..e00eebe Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_frmfld_user.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_fw-update.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_fw-update.gif new file mode 100755 index 0000000..52c18ac Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_fw-update.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_help.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_help.gif new file mode 100644 index 0000000..84c84db Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_help.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_ifalias.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_ifalias.gif new file mode 100644 index 0000000..0c569a7 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_ifalias.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_ifalias_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_ifalias_d.gif new file mode 100644 index 0000000..faa84d4 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_ifalias_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_import_alias.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_import_alias.gif new file mode 100755 index 0000000..d11a5f0 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_import_alias.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_in.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_in.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_in_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_in_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_info_pkg.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_info_pkg.gif new file mode 100644 index 0000000..cd3a532 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_info_pkg.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_interface_down.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_interface_down.gif new file mode 100755 index 0000000..0626655 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_interface_down.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_interface_up.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_interface_up.gif new file mode 100755 index 0000000..1449513 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_interface_up.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_left.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_left.gif new file mode 100755 index 0000000..8effefe Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_left.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_left_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_left_d.gif new file mode 100755 index 0000000..c778014 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_left_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_left_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_left_mo.gif new file mode 100755 index 0000000..84c6fa2 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_left_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_log.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_log.gif new file mode 100755 index 0000000..4a1983a Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_log.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_log_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_log_d.gif new file mode 100755 index 0000000..d31bd9b Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_log_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_log_s.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_log_s.gif new file mode 100755 index 0000000..f9fda33 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_log_s.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_log_s_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_log_s_d.gif new file mode 100755 index 0000000..fb2c05f Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_log_s_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_logs.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_logs.gif new file mode 100644 index 0000000..afe0104 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_logs.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_match.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_match.gif new file mode 100644 index 0000000..215571f Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_match.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_match_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_match_d.gif new file mode 100644 index 0000000..6e4c364 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_match_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_minus.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_minus.gif new file mode 100755 index 0000000..417544f Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_minus.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_open.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_open.gif new file mode 100755 index 0000000..ac3da14 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_open.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_other.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_other.gif new file mode 100755 index 0000000..e6f780f Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_other.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_other_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_other_d.gif new file mode 100755 index 0000000..b08d970 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_other_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_out.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_out.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_out_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_out_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_parp.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_parp.gif new file mode 100755 index 0000000..96acaf3 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_parp.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_parp_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_parp_d.gif new file mode 100755 index 0000000..7d7d00e Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_parp_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_pass.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_pass.gif new file mode 100755 index 0000000..fe1bb0d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_pass.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_pass_add.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_pass_add.gif new file mode 100755 index 0000000..f7f4c20 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_pass_add.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_pass_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_pass_d.gif new file mode 100755 index 0000000..6adc431 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_pass_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_plus.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_plus.gif new file mode 100755 index 0000000..2a94eeb Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_plus.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_plus_bl.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_plus_bl.gif new file mode 100755 index 0000000..8dcd7c0 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_plus_bl.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_plus_bl_p.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_plus_bl_p.gif new file mode 100755 index 0000000..0c79849 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_plus_bl_p.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_plus_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_plus_d.gif new file mode 100755 index 0000000..ebc7457 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_plus_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_plus_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_plus_mo.gif new file mode 100755 index 0000000..1c7ca08 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_plus_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_plus_p.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_plus_p.gif new file mode 100755 index 0000000..eb41284 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_plus_p.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall.gif new file mode 100755 index 0000000..d78b867 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_d.gif new file mode 100755 index 0000000..13658f7 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_mo.gif new file mode 100755 index 0000000..90b576e Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg.gif new file mode 100755 index 0000000..9aebb03 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg_d.gif new file mode 100755 index 0000000..4ab4992 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg_mo.gif new file mode 100755 index 0000000..7025d20 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_pkg_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml.gif new file mode 100755 index 0000000..4542432 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml_d.gif new file mode 100755 index 0000000..8d3a68d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml_mo.gif new file mode 100755 index 0000000..15e0aed Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reinstall_xml_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reject.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reject.gif new file mode 100755 index 0000000..5565cd6 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reject.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_reject_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_reject_d.gif new file mode 100755 index 0000000..6c09fae Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_reject_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_right.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_right.gif new file mode 100644 index 0000000..fdf2d8b Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_right.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_service_restart.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_service_restart.gif new file mode 100755 index 0000000..e49fbd7 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_service_restart.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_service_restart_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_service_restart_d.gif new file mode 100755 index 0000000..a5d6d7c Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_service_restart_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_service_running.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_service_running.gif new file mode 100644 index 0000000..543fd56 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_service_running.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_service_start.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_service_start.gif new file mode 100755 index 0000000..09bb58f Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_service_start.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_service_start_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_service_start_d.gif new file mode 100755 index 0000000..f58f111 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_service_start_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_service_status.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_service_status.gif new file mode 100644 index 0000000..a93bcfb Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_service_status.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_service_stop.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_service_stop.gif new file mode 100755 index 0000000..922addc Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_service_stop.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_service_stop_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_service_stop_d.gif new file mode 100755 index 0000000..b4cfdea Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_service_stop_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_service_stopped.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_service_stopped.gif new file mode 100644 index 0000000..f93a25d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_service_stopped.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_services_restart_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_services_restart_mo.gif new file mode 100755 index 0000000..a092b40 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_services_restart_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_services_start_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_services_start_mo.gif new file mode 100755 index 0000000..ecdb58f Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_services_start_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_services_stop_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_services_stop_mo.gif new file mode 100755 index 0000000..c00e208 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_services_stop_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_system-group-grey.png b/src/usr/local/www/themes/_corporate/images/icons/icon_system-group-grey.png new file mode 100644 index 0000000..d7b964d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_system-group-grey.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_system-group.png b/src/usr/local/www/themes/_corporate/images/icons/icon_system-group.png new file mode 100644 index 0000000..1c974f2 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_system-group.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_system-user-grey.png b/src/usr/local/www/themes/_corporate/images/icons/icon_system-user-grey.png new file mode 100644 index 0000000..2f6047d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_system-user-grey.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_system-user.png b/src/usr/local/www/themes/_corporate/images/icons/icon_system-user.png new file mode 100644 index 0000000..ef82156 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_system-user.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_system_lock_screen.png b/src/usr/local/www/themes/_corporate/images/icons/icon_system_lock_screen.png new file mode 100644 index 0000000..30f306d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_system_lock_screen.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_system_logout.png b/src/usr/local/www/themes/_corporate/images/icons/icon_system_logout.png new file mode 100755 index 0000000..9bbb6c7 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_system_logout.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_trapped.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_trapped.gif new file mode 100755 index 0000000..ffeb2cd Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_trapped.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_trapped_p.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_trapped_p.gif new file mode 100755 index 0000000..6d46aaf Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_trapped_p.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_ts_rule.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_ts_rule.gif new file mode 100755 index 0000000..e15ab6c Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_ts_rule.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_ts_rule_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_ts_rule_d.gif new file mode 100755 index 0000000..f776281 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_ts_rule_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_up.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_up.gif new file mode 100755 index 0000000..883c5a2 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_up.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_up_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_up_d.gif new file mode 100755 index 0000000..0ddcce2 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_up_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_up_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_up_mo.gif new file mode 100755 index 0000000..9f869a4 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_up_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_wlan.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_wlan.gif new file mode 100755 index 0000000..1f0addc Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_wlan.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_wlan_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_wlan_d.gif new file mode 100755 index 0000000..35bf580 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_wlan_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_wol_all.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_wol_all.gif new file mode 100755 index 0000000..2d22182 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_wol_all.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_wzd_nsaved.png b/src/usr/local/www/themes/_corporate/images/icons/icon_wzd_nsaved.png new file mode 100644 index 0000000..21cb27d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_wzd_nsaved.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_wzd_saved.png b/src/usr/local/www/themes/_corporate/images/icons/icon_wzd_saved.png new file mode 100644 index 0000000..ab82946 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_wzd_saved.png differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_x.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_x.gif new file mode 100755 index 0000000..24e4d49 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_x.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_x_d.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_x_d.gif new file mode 100755 index 0000000..d2bfbc8 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_x_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_x_mo.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_x_mo.gif new file mode 100755 index 0000000..da7b57c Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_x_mo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/icon_x_p.gif b/src/usr/local/www/themes/_corporate/images/icons/icon_x_p.gif new file mode 100755 index 0000000..8828fa6 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/icon_x_p.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/in.gif b/src/usr/local/www/themes/_corporate/images/icons/in.gif new file mode 100644 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/in.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/in_d.gif b/src/usr/local/www/themes/_corporate/images/icons/in_d.gif new file mode 100644 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/in_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/out.gif b/src/usr/local/www/themes/_corporate/images/icons/out.gif new file mode 100644 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/out.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/icons/out_d.gif b/src/usr/local/www/themes/_corporate/images/icons/out_d.gif new file mode 100644 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/icons/out_d.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/log.png b/src/usr/local/www/themes/_corporate/images/log.png new file mode 100755 index 0000000..762ba80 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/log.png differ diff --git a/src/usr/local/www/themes/_corporate/images/logo.gif b/src/usr/local/www/themes/_corporate/images/logo.gif new file mode 100755 index 0000000..08638ff Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/logo.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/menu_down.gif b/src/usr/local/www/themes/_corporate/images/menu_down.gif new file mode 100755 index 0000000..137de8d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/menu_down.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/menu_footer.gif b/src/usr/local/www/themes/_corporate/images/menu_footer.gif new file mode 100755 index 0000000..d06faa4 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/menu_footer.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/menu_right.gif b/src/usr/local/www/themes/_corporate/images/menu_right.gif new file mode 100755 index 0000000..881327c Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/menu_right.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/metal_bgr.gif b/src/usr/local/www/themes/_corporate/images/metal_bgr.gif new file mode 100755 index 0000000..a0ca6c8 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/metal_bgr.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/metal_bgr_red.gif b/src/usr/local/www/themes/_corporate/images/metal_bgr_red.gif new file mode 100755 index 0000000..c4a1465 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/metal_bgr_red.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/bar_blue.gif b/src/usr/local/www/themes/_corporate/images/misc/bar_blue.gif new file mode 100755 index 0000000..953cde1 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/bar_blue.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/bar_gray.gif b/src/usr/local/www/themes/_corporate/images/misc/bar_gray.gif new file mode 100755 index 0000000..a82da78 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/bar_gray.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/bar_left.gif b/src/usr/local/www/themes/_corporate/images/misc/bar_left.gif new file mode 100755 index 0000000..ea98cec Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/bar_left.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/bar_right.gif b/src/usr/local/www/themes/_corporate/images/misc/bar_right.gif new file mode 100755 index 0000000..b5114b0 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/bar_right.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/bullet_toggle_minus.png b/src/usr/local/www/themes/_corporate/images/misc/bullet_toggle_minus.png new file mode 100755 index 0000000..37db2fd Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/bullet_toggle_minus.png differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/bullet_toggle_plus.png b/src/usr/local/www/themes/_corporate/images/misc/bullet_toggle_plus.png new file mode 100755 index 0000000..fba7af9 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/bullet_toggle_plus.png differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/button.gif b/src/usr/local/www/themes/_corporate/images/misc/button.gif new file mode 100755 index 0000000..e85dbb3 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/button.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/key_128.gif b/src/usr/local/www/themes/_corporate/images/misc/key_128.gif new file mode 100755 index 0000000..ea5ae34 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/key_128.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/key_152.gif b/src/usr/local/www/themes/_corporate/images/misc/key_152.gif new file mode 100755 index 0000000..6c7fc03 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/key_152.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/key_256.gif b/src/usr/local/www/themes/_corporate/images/misc/key_256.gif new file mode 100755 index 0000000..3e1c377 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/key_256.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/key_64.gif b/src/usr/local/www/themes/_corporate/images/misc/key_64.gif new file mode 100755 index 0000000..87892bd Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/key_64.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/left_background.gif b/src/usr/local/www/themes/_corporate/images/misc/left_background.gif new file mode 100755 index 0000000..529d827 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/left_background.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/loader.gif b/src/usr/local/www/themes/_corporate/images/misc/loader.gif new file mode 100755 index 0000000..5d10ac3 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/loader.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/loader_tab.gif b/src/usr/local/www/themes/_corporate/images/misc/loader_tab.gif new file mode 100755 index 0000000..05bb04c Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/loader_tab.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/logon.png b/src/usr/local/www/themes/_corporate/images/misc/logon.png new file mode 100755 index 0000000..baf8a9d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/logon.png differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_0.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_0.gif new file mode 100755 index 0000000..160b56d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_0.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_1.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_1.gif new file mode 100755 index 0000000..50342d6 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_1.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_10.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_10.gif new file mode 100755 index 0000000..06cba14 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_10.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_2.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_2.gif new file mode 100755 index 0000000..9d10230 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_2.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_3.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_3.gif new file mode 100755 index 0000000..1983f87 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_3.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_4.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_4.gif new file mode 100755 index 0000000..f7158bd Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_4.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_5.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_5.gif new file mode 100755 index 0000000..c7af593 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_5.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_6.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_6.gif new file mode 100755 index 0000000..310eb22 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_6.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_7.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_7.gif new file mode 100755 index 0000000..06bd2e8 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_7.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_8.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_8.gif new file mode 100755 index 0000000..c6ef564 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_8.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/plogo_9.gif b/src/usr/local/www/themes/_corporate/images/misc/plogo_9.gif new file mode 100755 index 0000000..4f0cd4d Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/plogo_9.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/progress_bar.gif b/src/usr/local/www/themes/_corporate/images/misc/progress_bar.gif new file mode 100755 index 0000000..3b4aa52 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/progress_bar.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/tri_c.gif b/src/usr/local/www/themes/_corporate/images/misc/tri_c.gif new file mode 100755 index 0000000..317b758 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/tri_c.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/tri_c_black.gif b/src/usr/local/www/themes/_corporate/images/misc/tri_c_black.gif new file mode 100755 index 0000000..309846e Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/tri_c_black.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/tri_o.gif b/src/usr/local/www/themes/_corporate/images/misc/tri_o.gif new file mode 100755 index 0000000..eb95c32 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/tri_o.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/tri_o_black.gif b/src/usr/local/www/themes/_corporate/images/misc/tri_o_black.gif new file mode 100755 index 0000000..f818f3b Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/tri_o_black.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/misc/widget_loader.gif b/src/usr/local/www/themes/_corporate/images/misc/widget_loader.gif new file mode 100755 index 0000000..fad101f Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/misc/widget_loader.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/new_tab_menu.png b/src/usr/local/www/themes/_corporate/images/new_tab_menu.png new file mode 100755 index 0000000..4bdfcef Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/new_tab_menu.png differ diff --git a/src/usr/local/www/themes/_corporate/images/status.png b/src/usr/local/www/themes/_corporate/images/status.png new file mode 100755 index 0000000..a3e368e Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/status.png differ diff --git a/src/usr/local/www/themes/_corporate/images/transparent.gif b/src/usr/local/www/themes/_corporate/images/transparent.gif new file mode 100755 index 0000000..89c5530 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/transparent.gif differ diff --git a/src/usr/local/www/themes/_corporate/images/transparent_pixel.gif b/src/usr/local/www/themes/_corporate/images/transparent_pixel.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/images/transparent_pixel.gif differ diff --git a/src/usr/local/www/themes/_corporate/javascript/ie7/blank.gif b/src/usr/local/www/themes/_corporate/javascript/ie7/blank.gif new file mode 100755 index 0000000..a4fe2e6 Binary files /dev/null and b/src/usr/local/www/themes/_corporate/javascript/ie7/blank.gif differ diff --git a/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-box-model.js b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-box-model.js new file mode 100644 index 0000000..45543f6 --- /dev/null +++ b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-box-model.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-box-model",function(){var NUMERIC="\x5cs*:\x5cs*\x5cd[\x5cw%]*",UNIT=/^\d\w*$/,PERCENT=/^\d+%$/,PIXEL=/^\d+(px)?$/;var MATCH=(appVersion<6)?/\b(min|max)-(width|height)\s*:\s*\d/gi:/\b(min|max)-width\s*:\s*\d/gi;var AUTO=(appVersion<5.5)?/^auto|0cm$/:/^auto$/;var ie7_tmp=tmpElement();push(IE7.recalcs,function removeTempElement(){if(ie7_tmp.parentElement)ie7_tmp.parentElement.removeChild(ie7_tmp)});CSSFixes.addFix(MATCH,function(match){return match.slice(0,3)+match.charAt(4).toUpperCase()+match.slice(5)});var viewport=(quirksMode)?document.body:documentElement;function isFixed(element){return element.style.position=="fixed"||element.currentStyle.position=="fixed"};function layoutParent(element){var layoutParent=element.offsetParent;while(layoutParent&&!hasLayout(layoutParent))layoutParent=layoutParent.offsetParent;if(!layoutParent||isFixed(element))layoutParent=viewport;return layoutParent};function fixWidth(HEIGHT){fixWidth=function(element,value){if(!element.runtimeStyle.fixedWidth&&(!isHTML||element.tagName!="HR")){if(!value)value=element.currentStyle.width;element.runtimeStyle.fixedWidth=(UNIT.test(value))?Math.max(0,getFixedWidth(element,value)):value;element.runtimeStyle.width=element.runtimeStyle.fixedWidth;boxSizing(element)}};if(quirksMode)CSSFixes.addRecalc("width\x5cs*:\x5cs*\x5cd\x5cw*[^%]",fixWidth);var getFixedWidth=(quirksMode)?function(element,value){return getPixelWidth(element,value)+getBorderWidth(element)+getPaddingWidth(element)}:function(element,value){return getPixelWidth(element,value)};function getBorderWidth(element){return element.offsetWidth-element.clientWidth};function getPaddingWidth(element){return getPixelWidth(element,element.currentStyle.paddingLeft)+getPixelWidth(element,element.currentStyle.paddingRight)};function getMarginWidth(element){return((element.currentStyle.marginLeft=="auto")?0:getPixelLeft(element,element.currentStyle.marginLeft))+((element.currentStyle.marginRight=="auto")?0:getPixelLeft(element,element.currentStyle.marginRight))};function minWidth(element){minWidth[minWidth.count++]=element;if(element.currentStyle.minHeight=="auto")element.runtimeStyle.minHeight=0;fixWidth(element);boxSizing(element);resizeWidth(element)};minWidth.count=0;CSSFixes.addRecalc("min-width"+NUMERIC,minWidth);eval(String(minWidth).replace(/min/g,"max"));maxWidth.count=0;CSSFixes.addRecalc("max-width"+NUMERIC,maxWidth);function resizeWidth(element){var rect=element.getBoundingClientRect();var width=rect.right-rect.left;if(element.currentStyle.maxWidth&&width>=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)}); diff --git a/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-core.js b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-core.js new file mode 100644 index 0000000..b11e2b1 --- /dev/null +++ b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-core.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-css-strict.js b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-css-strict.js new file mode 100644 index 0000000..4406d7a --- /dev/null +++ b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-css-strict.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-strict",function(){if(!modules["ie7-css2"])return;var NONE=[],ID=/#/g,CLASS=/[:@\.]/g,TAG=/^\w|[\s>+~]\w/g;IE7.parser.parse=function(cssText){var DYNAMIC=new RegExp("(.*):("+dynamicPseudoClasses+")(.*)");function addRule(selector,cssText){var match=selector.match(DYNAMIC);if(match)new DynamicRule(selector,match[1],match[2],match[3],cssText);else new Rule(selector,cssText)};cssText=cssText.replace(IE7.PseudoElement.ALL,IE7.PseudoElement.ID);var RULE=/([^\{]+)\{(\d+)\}/g,match;while(match=RULE.exec(cssText)){addRule(match[1],match[2]);if(appVersion<5.5)cssText=cssText.slice(match.lastIndex)}IE7.classes.sort(Rule.compare);return IE7.classes.join("\n")};function Rule(selector,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.Class;this.inherit(selector)};Rule.prototype=new IE7.Class.ancestor;Rule.prototype.toString=function(){return "."+this.name+"{"+this.cssText+"}"};Rule.score=function(selector){return(selector.match(ID)||NONE).length*10000+(selector.match(CLASS)||NONE).length*100+(selector.match(TAG)||NONE).length};Rule.compare=function(rule1,rule2){return rule1.specificity-rule2.specificity};function DynamicRule(selector,attach,dynamicPseudoClass,target,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.DynamicStyle;this.inherit(selector,attach,dynamicPseudoClass,target)};DynamicRule.prototype=new IE7.DynamicStyle.ancestor;DynamicRule.prototype.toString=Rule.prototype.toString}); diff --git a/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-css2.js b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-css2.js new file mode 100644 index 0000000..7121c8e --- /dev/null +++ b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-css2.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i"){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!ù.´)Ó £(){ÿ{ù.´=ª;¢ ¢Æ=ª.¢´=Ó ¤×;£ ¢©(){if(«.¢Ù)«.¢Ù.Í.¤Ö=¤þ};ª.Õ=£(){¤ ¤ÿ};¢ â=(¤Ù.±(¢î.£Ë))?£(£Ì){ù.â(´+¥¡+£Ì)}:¢Æ;¢ Å=¤Ñ.Å.¬(¤Ú)[1];if(¤Û.±(¢î.£Ë)||Å<5||!¤Ü.±(«.Ù.ü))¤ ¢©();¢ è=¢£(«.¤Í!=¥¢);¢ ë=(¤Ë «.£Ê==¥£)?!¤Ýi.±(¢î.¢Ç):¢£(«.£Ê!=¥¤);¢ ¢í=¥¥;¢ ¢ë=¢í;if(!ë)¢ë+=¥¦;¢ ¢¹;¢ Ù=«.Ù;¢ ó={};ª.¢´=£(£È,ô,£É){if(!ó)¤;if(¢«)¢¬(¥§+¢Î(ô));if(£É){ô();ô=¢Æ}ó[£È]=ô};¢ £Ç=¤Þ;£ ¢È(²,¹){if(£Ç.±(²))²=(¹||¥¨)+²;¤ ²};£ ¢Ä(²,¹){²=¢È(²,¹);¤ ².»(0,².£Ã(¥©)+1)};¢ ¹=¢Ä(«.£Æ[«.£Æ.­-1].¤Å);¢ ¢Ê=Ó ¤Ä(¥ª);£ ã(²,¹){ÿ{²=¢È(²,¹);¢Ê.¤Á(¥«,²,Þ);¢Ê.¤¿();¤ ¢Ê.¤¾}õ(¢à){â(¥¬+²);¤ ¥¨}};¢ ·=£(¢É,¢À){¤ ¢É.·(¢À)};¢ ¢½=£(¢É){¤ ¢É.¢½()};if(Å<5.5)¢¬(ã(¥­,¹));if(«.¢Í==¥®||!ë)«.¤¹();Ö «.¤¸(¥¯);ª.¶=«.É[«.É.­-1];ª.¶.§=¢í;ª.¶.Æ=×;¢ §={};£ £¿(¶,¹){¢ ¢§=¢È(¶.²,¹);if(§[¢§])¤ ¥¨;§[¢§]=(¶.ý)?¥¨:£Å(¢Ã(¶,¹),¢Ä(¶.²,¹));¤ §[¢§]};¢ ¢Ã=£(¶){¤ ¶.§};¢ £Ä=¤ßgi;£ £Å(§,¢Ç){¤ §.³(£Ä,¥°+¢Ç.»(0,¢Ç.£Ã(¥©)+1)+¥±)};ª.Ë=[];ª.£¾=¢Æ;¢ ä=Þ;£ _ã(){ÿ{ä=×;¢ £Á=¤ài;¢ É=«.É;¢ ¢ì=[];¢ ¢Å=«.£µ(¥²);¯(¢ i=¢Å.­-1;i>=0;i--){·(¢ì,¤á.±(¢Å[i].£Â)?¥¨:¢Å[i].£Â)}£ ¢Ã(¶,¹){¢ §=¥¨;if(£Á.±(¶.¤µ)){¯(¢ i=0;i<¶.£À.­;i++){§+=¢¡.¤´(¶.£À[i],¢Ä(¶.²,¹))}§+=((¶.²)?£¿(¶,¹):¢½(¢ì))}¤ §};´.§=¥¨;¯(i=0;i<É.­;i++)´.§+=¢Ã(É[i],¥¨);´.§=£´(´.§);¯(i in ó)ó[i]();£¦ ó;if(¢¹)¢¹.¢·();Ñ.¢·();´.£¾();´.¶.§=¢ë+£³(´.§);¯(i=0;i<É.­;i++){if(!É[i].ý&&!É[i].Æ)É[i].§=¥¨}´.¢Â();â(¥³)}õ(¢¨){â(¥´+¢¨.¢ï)}¢Ë{¢©()}};ª.¢Â=£(){Ñ.¢Â();¯(¢ i=0;i<ª.Ë.­;i++)ª.Ë[i]()};¢ Ñ=Ó £(){¢ Ç=[];ª.û=£(){·(Ç,¢¡)};¢ Ë=[];ª.Ú=£(á,¢Þ){¢ £½=Ó ¢æ(¥µ+á,¥¶);¢ §=´.§;á=[];Ê(¬=£½.¤²(§)){·(á,¬[1]);if(Å<5.5)§=§.»(¬.¤±)}if(á.­){á=á.Õ();·(Ë,¢¡)}};ª.¢·=£(){¯(¢ i=0;i<Ç.­;i++){´.§=´.§.³(Ç[i][0],Ç[i][1])}ª.Ú(¥·,é);ª.Ú(¥¸,£(¡){if(¡.¢².©.Ü==¥¹)é(¡.¢²)})};ª.¢Â=£(){¯(¢ i=0;i<Ë.­;i++){¢ î=¢¶(Ë[i][0]);¯(¢ j=0;j<î.­;j++)Ë[i][1](î[j])}};ª.û(¤âgi,¥º);if(Å<6)ª.û(¤ãgi,¥»);if(è){¢ à=¥¼.¢ç(¥½);¯(¢ i=0;i<à.­;i++)à[à[i]]=à[i-1]||¥¾;£ ³($,$1,$2,$3){¤ $1+à[$3]};ª.û(Ó ¢æ(¥¿+à.¢å(¥À)+¥Á,¥¶),³)}};¢ £¹=¤ä;¢ £¸=¤åg;¢ £·=¤æ;¢ £¼=¤çg;¢ £»=¥Â;¢ þ={};£ ¢¶(µ,¦){¢ ¢è=!¦;¢ ¢é=(¦)?(¦.¤§==¤¦)?¦:[¦]:[«];¢ ñ=µ.³(£¼,£»).¢ç(¥½);¢ ¬=[];¯(¢ i=0;i<ñ.­;i++){µ=£º(ñ[i]);if(µ.»(0,3).¢å(¥¨)==¥Ã){µ=µ.»(2);¦=£¶(¢é,µ[1])}Ö ¦=¢é;¢ j=0,ß,®,Á,ò=¥¨;Ê(j<µ.­){ß=µ[j++];®=µ[j++];ò+=ß+®;Á=¥¨;if(µ[j]==¥Ä){Ê(µ[j++]!=¥Á)Á+=µ[j];Á=Á.»(0,-1);ò+=¥Ä+Á+¥Á}¦=(¢è&&þ[ò])?þ[ò]:¢ß(¦,ß,®,Á);if(¢è)þ[ò]=¦}¬=¬.¤¥(¦)}¤ ¬};£ £º(µ){if(£¹.±(µ))µ=¥Å+µ;¤ µ.¬(£¸)};£ ¢ß(¦,ß,®,Á){¢ À=¥¨;if(£·.±(®)){®=®.¢ç(¥À);À=®[0];®=®[1]}¢ ¸=[];if(ñ[ß])ñ[ß](¸,¦,®,À||Á);¤ ¸};£ £¶(¦,id){¢ ¸=[],i,j;¯(i=0;i<¦.­;i++){¢ ¬=¦[i].ì.¢À(id);if(¬){if(¬.­==¤¤)·(¸,¬);Ö ¯(j=0;j<¬.­;j++)·(¸,¬[j])}}¤ ¸};¢ ñ={¥Å:£(¸,¦,®,À){¯(¢ i=0;i<¦.­;i++){¢ ¢¦=(®==¥Æ&&¦[i].ì)?¦[i].ì:¦[i].£µ(®);¯(¢ j=0;j<¢¦.­;j++){if(ï(¢¦[j])&&(!À||¢¦[j].À==À))·(¸,¢¦[j])}}},¥Ç:£(¸,¦,®){¯(¢ i=0;i<¦.­;i++)if(¦[i].id==®)·(¸,¦[i])},¥È:£(¸,¦,®){®=Ó ¢æ(¥É+®+¥Ê);¯(¢ i=0;i<¦.­;i++)if(®.±(¦[i].¤£))·(¸,¦[i])},¥Ë:£(¸,¦,®,Á){®=¢ä[®];if(®)¯(¢ i=0;i<¦.­;i++)if(®(¦[i],Á))·(¸,¦[i])}};¢ ¤¢=¥¨;¢ ¢ä={Õ:£(){¢ Õ=[];¯(¢ ð in ª){if(ð!=¥Ì&&ð!=¥Í){if(ª[ð].­>1)ð+=¥Î;·(Õ,ð)}}¤ Õ.¢å(¥À)},¥Ì:£(¡){¤ ¢£(¡.©[¥Ï]==¥Ì)},¥Í:£(¡){¤ ¢£(¡.©[¥Ï]==¥Í)}};¢ ¤¡={Õ:¢ä.Õ};£ £ÿ(¡,º,À){if(À&&¡.À!=À)¤ Þ;¤(º==¥Æ)?ï(¡):(ë)?(¡.º==º.¢ý()):(¡.º==º)};¢ ¢¾=[];£ £þ(¢¿){¤ ¢».±(¢¿)?¢¾[¢¿.»(1,-1)]:¢¿};¢ £´=£(§){¤ §.³(¤èg,£(¬){¤(¬.¢þ(0)==¥©)?¥¨:¥Ð+(·(¢¾,¬.»(1,-1))-1)+¥Ð}).³(¤ég,¥¨).³(¤êg,¥À).³(¤ëg,¥°)};£ £³(§){¤ §.³(¤æg,¥Ñ).³(¤ìg,£(¬,£²){¤ ¢¾[£²]})};¢ ¢¼=[];£ ö(¡,Ý,Ô){¡.£±(Ý,Ô);·(¢¼,¢¡)};£ £°(¡,Ý,Ô){ÿ{¡.£û(Ý,Ô)}õ(¢à){}};ù.£±(¥Ò,£(){Ê(¢¼.­){¢ Ô=¢½(¢¼);£°(Ô[0],Ô[1],Ô[2])}});¢ ¢³=(Å<6)?£(¡){¤ ¡.Ä}:£(¡){¤ ¡.©.¢³};£ é(¡){if(!¢³(¡)){¡.£ù=Þ;£¯(£«(¡))}};£ £¯(¡){Ê(¡){¡.°.£®=¡.©.£®;¡=¢â(¡)}};¢ ¢»=¤í;£ £ø(¥){¤(¢».±(¥))?¥:¥Ð+¥+¥Ð};£ £÷(¥){¤(¢».±(¥))?¥.»(1,-1):¥};£ £¡(º){¢ ¡=«.£ª(º||¥Ó);¡.Í.§=¥Ô;¤ ¡};£ ï(¢¢){¤ ¢£(¢¢&&¢¢.£ñ==1&&¢¢.º!=¥Õ&&!¢¢.£ð)};£ £ï(¡){Ê(¡&&(¡=¡.£î)&&!ï(¡))£¬;¤ ¡};£ ¢â(¡){Ê(¡&&(¡=¡.Ì)&&!ï(¡))£¬;¤ ¡};£ £«(¡){¡=¡.£í;¤(ï(¡))?¡:¢â(¡)};¢ ¢«=Þ;´.¢´(¥Ö,£(){if(ë)¢¹=Ó £(){¢ Ç=[];£ ¢Þ(¡){¢ ¢¸=«.£ª(¥×+¡.¢µ.»(1));if(¡.¢µ.»(-2)!=¥Ø){¢ £©=¥Ù+¡.º+¥Ú,Ì;Ê((Ì=¡.Ì)&&Ì.¢µ!=£©){¡.¢á.¢Ú(Ì);¢¸.¢Ï(Ì)}if(Ì)¡.¢á.¢Ú(Ì)}¡.¢á.£ë(¢¸,¡);¤ ¢¸};ª.í=£(){·(Ç,¢¡)};ª.¢·=£(){ÿ{if(Å>5)«.£ê.í(¥Û,¥Ü)}õ(¢à){}¢Ë{¯(¢ i=0;i<Ç.­;i++){¢ î=¢¶(Ç[i][0]);¯(¢ j=0;j<î.­;j++)Ç[i][1](î[j])}}};ª.í(¥Ý,£(¡){if(!¡.£§){¢ Ò=¢¶(¥Þ,¡)[0];if(Ò){if(!Ò.id)Ò.id=Ò.ü;¡.£§=Ò.id}}});ª.í(¥ß,£(¡){¢Þ(¡);£¦ þ[¥à]});ª.í(¥á,£(¡){if(¡.º==¥â){¢ ¬=¡.¢µ.¬(¤îi);¡.°.¥=(¬)?¬[1]:¥¨}if(¡.Ý==¥ã){ö(¡,¥ä,£(){¡.°.¢Ý=×;¢ª(¥å+¡.ü+¥æ,1)})}});ª.í(¥ç,£(¡){¢ ££=¤ï;ö(¡,¥è,£(){¯(¢ i=0;i<¡.­;i++){if(££.±(¡[i].Ý)&&!¡[i].ý&&!¡[i].°.¢Ý){¡[i].ý=×;¢ª(¥å+¡[i].ü+¥é,1)}Ö if(¡[i].º==¥â&&¡[i].Ý==¥ã){¢ª(¥å+¡[i].ü+¥ê+¡[i].¥+¥Ð,1);¡[i].¥=¡[i].°.¥}}})})}},×);´.¢´(¥ë,£(){¢ ¢¯=¥ì,¢û=¤ð,¢ñ=¤ñ,¢Ð=¤ò;¢ ¢ÿ=(Å<6)?¤ógi:¤ôgi;¢ ¢ö=(Å<5.5)?¤õ:¤ö;¢ Ã=£¡();·(´.Ë,£ ¢ò(){if(Ã.Î)Ã.Î.¢Ú(Ã)});Ñ.û(¢ÿ,£(¬){¤ ¬.»(0,3)+¬.¢þ(4).¢ý()+¬.»(5)});¢ ¢ü=(è)?«.¢Ù:Ù;£ ¢Ó(¡){¤ ¡.Í.Ü==¥í||¡.©.Ü==¥í};£ ¾(¡){¢ ¾=¡.¢²;Ê(¾&&!¢³(¾))¾=¾.¢²;if(!¾||¢Ó(¡))¾=¢ü;¤ ¾};£ å(¢ó){å=£(¡,¥){if(!¡.°.¿&&(!ë||¡.º!=¥î)){if(!¥)¥=¡.©.¨;¡.°.¿=(¢û.±(¥))?£Þ.ú(0,ê(¡,¥)):¥;¡.°.¨=¡.°.¿;é(¡)}};if(è)Ñ.Ú(¥ï,å);¢ ê=(è)?£(¡,¥){¤ ç(¡,¥)+¢Õ(¡)+¢Ô(¡)}:£(¡,¥){¤ ç(¡,¥)};£ ¢Õ(¡){¤ ¡.¢Ñ-¡.Ä};£ ¢Ô(¡){¤ ç(¡,¡.©.£Ý)+ç(¡,¡.©.£Ü)};£ ¢ô(¡){¤((¡.©.¢ù==¥ð)?0:÷(¡,¡.©.¢ù))+((¡.©.¢ø==¥ð)?0:÷(¡,¡.©.¢ø))};£ ¼(¡){¼[¼.Ï++]=¡;if(¡.©.¢÷==¥ð)¡.°.¢÷=0;å(¡);é(¡);¢®(¡)};¼.Ï=0;Ñ.Ú(¥ñ+¢¯,¼);¢¬(¢Î(¼).³(¤÷g,¥ò));Ð.Ï=0;Ñ.Ú(¥ó+¢¯,Ð);£ ¢®(¡){¢ ¢°=¡.¢õ();¢ ¨=¢°.æ-¢°.Â;if(¡.©.Ð&&¨>=ê(¡,¡.©.Ð))¡.°.¨=ê(¡,¡.©.Ð);Ö if(¡.©.¼&&¨<=ê(¡,¡.©.¼))¡.°.¨=ê(¡,¡.©.¼);Ö ¡.°.¨=¡.°.¿};£ Ø(¡){if((¡.©.Ü==¥ô||¡.©.Ü==¥í)&&¡.©.Â!=¥ð&&¡.©.æ!=¥ð&&¢ö.±(¡.©.¨)){Ø[Ø.Ï++]=¡;é(¡);¢Ò(¡)}};Ø.Ï=0;Ñ.Ú(¥õ+¢¯,Ø);£ ¢Ò(¡){¡.°.¨=¥¨;¢ Î=¾(¡);¢ Â=(¡.°.£Û)?¡.¢õ().Â-2:÷(¡,¡.©.Â);¢ ¨=Î.Ä-÷(¡,¡.©.æ)-Â-¢ô(¡);if(!è)¨-=¢Õ(¡)+¢Ô(¡);if(¨<0)¨=0;if(¢Ó(¡)||¢ó||¡.¢Ñ<¨){¡.°.¿=¨;¡.°.¨=¨}};¢ Ä=Ù.Ä;ö(ù,¥ö,£(){¢ i,ø=(Ä<Ù.Ä);Ä=Ù.Ä;¯(i=0;i<¼.Ï;i++){¢ ¡=¼[i];¢ ¿=(¡.°.¨==¡.©.¼);if(ø&&¿)¡.°.¨=¥¨;if(ø==¿)¢®(¡)}¯(i=0;i<Ð.Ï;i++){¢ ¡=Ð[i];¢ ¿=(¡.°.¨==¡.©.Ð);if(!ø&&¿)¡.°.¨=¥¨;if(ø!=¿)¢®(¡)}¯(i=0;i<Ø.Ï;i++)¢Ò(Ø[i]);¢ò()});£ ç(¡,¥){if(¢Ð.±(¥))¤ ¢­(¥);if(¢ñ.±(¥))¤ ¢­(£Ù(¥)/100*¾(¡).Ä);¢ Î=(¡.£Ø)?¡:¡.Î;Î.¢Ï(Ã);Ã.Í.¨=¥;¤ Ã.¢Ñ};£ ÷(¡,¥){if(¢­(¥)>0)¤ ç(¡,¥);if(¢Ð.±(¥))¤ ¢­(¥);¡.Î.¢Ï(Ã);Ã.Í.Â=¥;¤ Ã.£×}};¢¬(¢Î(å).³(¤øg,¥÷).³(¤ùg,¥ø).³(¤úg,¥ù).³(¤ûg,¥ú).³(¤üg,¥û).³(¤ýg,¥ü));å();£Î(×)});¢«=×;if(«.¢Í==¥®)_ã();Ö ö(«,¥ý,£(){if(!ä&&«.¢Í==¥®)¢ª(_ã,0)})}õ(¢¨){¢©();â(¥þ+¢¨.¢ï)}¢Ë{}}();',340,0,/./,String,95,'element`var`function`return`value`from`cssText`width`currentStyle`this`document`match`length`filter`for`runtimeStyle`test`href`replace`IE7`selector`styleSheet`push`filtered`path`tagName`slice`minWidth`x5cs`layoutParent`fixedWidth`scopeName`filterArgs`left`ie7_tmp`clientWidth`appVersion`ie7`fixes`link`styleSheets`while`recalcs`nextSibling`style`parentElement`count`maxWidth`CSSFixes`input`new`handler`toString`else`true`fixRight`documentElement`addRecalc`auto`position`type`false`token`SIZES`pattern`alert`load`complete`fixWidth`right`getPixelWidth`quirksMode`boxSizing`getFixedWidth`isHTML`all`add`elements`isElement`pseudoClass`selectors`cacheSelector`modules`script`catch`addEventHandler`getPixelLeft`wider`window`max`addFix`uniqueID`disabled`cssCache`try`arguments`node`Boolean`x5c`visited`subset`url`error`unHide`setTimeout`loaded`eval`parseInt`resizeWidth`NUMERIC`rect`min`offsetParent`hasLayout`addModule`outerHTML`cssQuery`apply`fixedElement`HTMLFixes`display`QUOTED`handlers`pop`strings`string`item`small`recalc`getCSSText`getPath`styles`DUMMY`pathname`makePath`array`httpRequest`finally`Error`readyState`String`appendChild`PIXEL`offsetWidth`resizeRight`isFixed`getPaddingWidth`getBorderWidth`fixed`absolute`x5cw`body`removeChild`box`submit`clicked`fix`select`ignore`parentNode`nextElement`x2f`pseudoClasses`join`RegExp`split`useCache`base`large`HEADER`inlineStyles`LINKS`location`description`height`PERCENT`removeTempElement`HEIGHT`getMarginWidth`getBoundingClientRect`AUTO`minHeight`marginRight`marginLeft`x5cd`UNIT`viewport`toUpperCase`charAt`MATCH`tmpElement`BUTTON`UNSUCCESSFUL`button`abbr`delete`htmlFor`HTML`endTag`createElement`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`decode`encode`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`parse`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`name`autoload`mimeType`search`message`onreadystatechange`fixHeight`bottom`Bottom`Right`top`Top`Left`Height`Width`offsetLeft`canHaveChildren`parseFloat`onresize`screenLeft`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`firstChild`previousSibling`previousElement`ie7_anon`nodeType`clip`none`border`padding`object`unquote`quote`contentEditable`onbeforeunload`detachEvent`import`namespace`getString`compareTagName`dynamicPseudoClasses`attributeTests`className`null`concat`Array`constructor`size`font`medium`list`inline`float`relative`content`sizing`lastIndex`exec`successfully`callee`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`Microsoft`ActiveXObject`src`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ms_`ie7_off`MSIE`navigator`ie7_debug`alpha`version`visible`visibility`Function`fromCharCode`¤Ò`¤Ð (\\d\\.\\d)`¤Ï`^¤Î`\\.¤É$`^[\\w\\.]+[^:]*$`(¢§\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¤·\\b|\\¤¶\\b|^$`Æ-È`(¤­\\s*:\\s*(Â|æ))`¢º\\s*:\\s*¤«-¢À`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢ã\\*[^\\*]*\\*+([^\\¢ã][^\\*]*\\*+)*\\¢ã)|(\x27[^\x27]*\x27)|("[^"]*")`@(£ý|£ü)[^;\\n]+[;\\n]|`\\¢¤:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ¥="([^"]*)"`^(¢Ü|£á|£¤)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(¢±|ú)-(¨|¢ð)\\s*:\\s*\\d`\\b(¢±|ú)-¨\\s*:\\s*\\d`^Û|0cm$`^Û$`¢±`£Ö`¨`£Ô`Â`£Ñ`æ`¤Õ`´ ¤Ô 0.7.3 (¤Ó)`\\n\\n`¤Ì`¤Ê`¤È ¤Ç`:È{Æ-È:È}:¢¥{Æ-È:¢¥}`*{¤Æ:0}`ô=``/`¤Ã.¤Â`¤À`¢Ì [1]: ¤½ ¤¼ ã ¤» `Æ-¤º.js`ä`<Í>`$1`$2`Í`¢« ¤³`¢Ì [2]: `([^{}]*)\\¢¤{([^}]*[^\\¢Ø-])?`gi`¢Û-¤°\\½*:\\½*¤¯-¢Û`Ü\\½*:\\½*¢×`¤®`¢º:¤¬;$1`¢º:£­`xx-¢Á,x-¢Á,¢Á,¤ª,¢ê,x-¢ê,xx-¢ê`,`xx-¢Á`(¤©(-¤¨)?\\½*:\\½*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\½)`(\\½|$)`:`È`¢¥`\\¢¤([^)]*\\¢¤)`Æ-È`\x27`\\¢¤:`£ú`£ö`Ü:¢×;£õ:0;¢º:£­;£ô:£ó;£ò:¢°(0 0 0 0);Â:-9999`!`Æ-£ì`<£¨:`/>``£¨`£é://£è.w3.£ç/1999/£æ`£å`Ò,¢ß,£ä`£¥` £¥`£¤,Ò`£¢`¢Ü`£ã`«.ì.`.°.¢Ý=Þ`£â`£à`.ý=Þ`.¥=\x27`Æ-¢Û-£ß`\\½*:\\½*\\¢ú[\\¢Ø%]*`¢Ö`HR`¨\\½*:\\½*\\¢ú\\¢Ø*[^%]`Û`¢±-¨`ú`ú-¨`¢×`æ`£Ú`£Õ`¢ð`£Ó`£Ò`£Ð`£Ï`£Í`¢Ì [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-lite.js b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-lite.js new file mode 100644 index 0000000..88c764f --- /dev/null +++ b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-lite.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-png.js b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-png.js new file mode 100644 index 0000000..7b8f2cf --- /dev/null +++ b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-png.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-png",function(){if(appVersion<5.5)return;var FILTER="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=%1,sizingMethod='scale')";var NULL=(/\bSV1\b/.test(navigator.userAgent))?makePath("blank.gif",path):"javascript:'#define x_width 1\x5cn#define x_height 1\x5cnstatic char x_bits[]={0x00}'";var pngTest=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");function addFilter(element,src){element.runtimeStyle.filter=FILTER.replace(/%1/,src)};var MATCH=/background(-image)?\s*:([^(};]*)url\(([^\)]+)\)([^;}]*)/gi;CSSFixes.addFix(MATCH,function replace(match,image,prefix,url,suffix){url=getString(url);return pngTest.test(url)?"filter:"+FILTER.replace(/scale/,"crop").replace(/%1/,url)+";zoom:1;background"+(image||"")+":"+(prefix||"")+"none"+(suffix||""):match});if(HTMLFixes){function fixImg(element){if(pngTest.test(element.src)){var width=element.width,height=element.height;addFilter(element,element.src);element.src=NULL;element.width=width;element.height=height}else element.runtimeStyle.filter=""};HTMLFixes.add("img,input",function(element){if(element.tagName=="INPUT"&&element.type!="image")return;fixImg(element);addEventHandler(element,"onpropertychange",function(){if(event.propertyName=="src")fixImg(element)})})}}); diff --git a/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-server.css b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-server.css new file mode 100644 index 0000000..47c7edd --- /dev/null +++ b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-server.css @@ -0,0 +1,43 @@ +body, td, dd {font: 10pt Verdana, Arial, Helvetica, sans-serif; color: black;} +body {margin: 8px; background: #333;} +h1 {margin: 0;} +h1 a:hover {background-color: transparent;} +h2 {font-size: 1.75em;} +h3 {font-size: 1.1em;} +a:active {color: #ff0000;} +a:link {color: #0a6cce;} +a:visited {color: #0a6cce;} +code, *.code {font-family: monospace; font-size: 100%; font-style: normal; white-space: nowrap; + padding: 0 1px; background: #f2f3f8; border: #d6d9e9 1px solid;} +code.box {display: block; padding: 10px; margin: 0.5em 0;} +ul {list-style-type: square;} +dd {margin: .2em 0 .5em 1em;} +dl.library dt {display: list-item; margin-left: 3em; list-style-type: square;} +dl.library dd {font-style: italic; margin-left: 3em;} +dt {font-weight: bold;} +dt.pack {color: brown;} +a img {border-style: none;} +hr {height: 1px; color: #000; border-style: solid;} +hr.short {height: 2px; width: 100px;} +div.document {background: #eef; padding: 20px 20px 5px 20px; width: 600px; border: 1px solid black;} +hr {border-bottom-width: 0px;} +div.header hr {color: #0a6cce; background-color: #0a6cce;} +div.content {min-height: 100px;} +div.footer hr {color: #898e79; background-color: #898e79; } +div.header, div.header a:link, div.header a:visited, h3 a:link, h3 a:visited {text-decoration: none;} +a:hover {color: #fff; background-color: #0a6cce; text-decoration: none;} +div.footer a:hover {background-color: transparent; text-decoration: none;} +div.header .menu {text-align: right;} +div.footer {font-size: x-small; margin-top: 8px;} +div.footnote {font-family: "times new roman", times; font-style: italic; margin-top: 10px;} +#license {margin-top: 5px; font-size: xx-small;} +table {border-top: 1px solid #000; border-left: 1px solid #000;} +th {background-color: #fff; text-align: left;} +th, td {border-right: 1px solid #000; border-bottom: 1px solid #000;} +th.small {width: 100px;} +th.medium {width: 200px;} +th.large {width: 270px;} +th.x-large {width: 408px;} +table.fixed {table-layout: fixed;} +span.comment {color: #666;} + diff --git a/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-standard-p.js b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-standard-p.js new file mode 100644 index 0000000..73e99ac --- /dev/null +++ b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-standard-p.js @@ -0,0 +1,3 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +eval(function(A,r,s,e,n,a,l){s=function(e){return((e=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!¢¡.ª)¶ ¢(){¢Æ{¢¡.ª=¤;£ ¢Ø=¤.¢©=¶ ¤¬;¢ ¢ì(){if(².ß)².ß.Ì.¦²=¦ë};¤.È=¢(){¥ ¦ì};£ ¢¶=(¦´.µ(¢ô.¤ì))?¢(¤í){¢¡.¢¶(ª+¦í+¤í)}:¢Ø;£ á=¤¥.á.§(¦µ)[1];if(¦¶.µ(¢ô.¤ì)||á<5||!¦·.µ(².ù.¢«))¥ ¢ì();£ ¢§=¢ê(².¦«!=¦î);£ ¢±=(¦© ².¤ë==¦ï)?!¦¸i.µ(¢ô.£»):¢ê(².¤ë!=¦ð);£ £ê=¦ñ;£ £¦=£ê;if(!¢±)£¦+=¦ò;£ ¢½;£ ù=².ù;£ ¢Ñ={};¤.¢©=¢(¢Ç,¢Ò,¤ê){if(!¢Ñ)¥;if(¢í)Ü(¦ó+¢ó(¢Ò));if(¤ê){¢Ò();¢Ò=¢Ø}¢Ñ[¢Ç]=¢Ò};£ ¤é=¦¹;¢ ¢À(¾,Á){if(¤é.µ(¾))¾=(Á||¦ô)+¾;¥ ¾};¢ £¹(¾,Á){¾=¢À(¾,Á);¥ ¾.Æ(0,¾.¤å(¦õ)+1)};£ Á=£¹(².¤è[².¤è.¯-1].î);£ £½=¶ ¦£(¦ö);¢ ê(¾,Á){¢Æ{¾=¢À(¾,Á);£½.¦¡(¦÷,¾,ë);£½.¥þ();¥ £½.¥ý}¢·(£¥){¢¶(¦ø+¾);¥ ¦ô}};£ ¸=¢(£¼,£·){¥ £¼.¸(£·)};£ £´=¢(£¼){¥ £¼.£´()};if(á<5.5)Ü(ê(¦ù,Á));if(².£À==¦ú||!¢±)².¥ø();Û ².¥÷(¦û);¤.¿=².é[².é.¯-1];¤.¿.¨=£ê;¤.¿.Î=Ö;£ ¨={};¢ ¤á(¿,Á){£ Ô=¢À(¿.¾,Á);if(¨[Ô])¥ ¦ô;¨[Ô]=(¿.¢ç)?¦ô:¤ç(¢ã(¿,Á),£¹(¿.¾,Á));¥ ¨[Ô]};£ ¢ã=¢(¿){¥ ¿.¨};£ ¤æ=¦ºgi;¢ ¤ç(¨,£»){¥ ¨.¬(¤æ,¦ü+£».Æ(0,£».¤å(¦õ)+1)+¦ý)};¤.ô=[];¤.¢â=¢Ø;£ ¢¸=ë;¢ _ê(){¢Æ{¢¸=Ö;£ ¤ã=¦»i;£ é=².é;£ £é=[];£ £º=².¤Ø(¦þ);®(£ i=£º.¯-1;i>=0;i--){¸(£é,¦¼.µ(£º[i].¤ä)?¦ô:£º[i].¤ä)}¢ ¢ã(¿,Á){£ ¨=¦ô;if(¤ã.µ(¿.¥ô)){®(£ i=0;i<¿.¤â.¯;i++){¨+=í.£ó(¿.¤â[i],£¹(¿.¾,Á))}¨+=((¿.¾)?¤á(¿,Á):£´(£é))}¥ ¨};ª.¨=¦ô;®(i=0;i<é.¯;i++)ª.¨+=¢ã(é[i],¦ô);ª.¨=£©(ª.¨);®(i in ¢Ñ)¢Ñ[i]();£Ö ¢Ñ;if(¢½)¢½.£°();à.£°();ª.¢â();ª.¿.¨=£¦+£§(ª.¨);®(i=0;i<é.¯;i++){if(!é[i].¢ç&&!é[i].Î)é[i].¨=¦ô}ª.Ø();¢¶(¦ÿ)}¢·(¢ë){¢¶(§¡+¢ë.£ë)}£¾{¢ì()}};¤.Ø=¢(){à.Ø();®(£ i=0;i<¤.ô.¯;i++)¤.ô[i]()};£ à=¶ ¢(){£ è=[];¤.¢¿=¢(){¸(è,í)};£ ô=[];¤.ï=¢(¢µ,£ä){£ ¤à=¶ ç(§¢+¢µ,§£);£ ¨=ª.¨;¢µ=[];Ý(§=¤à.¢ß(¨)){¸(¢µ,§[1]);if(á<5.5)¨=¨.Æ(§.¥ò)}if(¢µ.¯){¢µ=¢µ.È();¸(ô,í)}};¤.£°=¢(){®(£ i=0;i<è.¯;i++){ª.¨=ª.¨.¬(è[i][0],è[i][1])}¤.ï(§¤,¢Ê);¤.ï(§¥,¢(¡){if(¡.¢¥.«.³==§¦)¢Ê(¡.¢¥)})};¤.Ø=¢(){®(£ i=0;i<ô.¯;i++){£ ¢Í=ü(ô[i][0]);®(£ j=0;j<¢Í.¯;j++)ô[i][1](¢Í[j])}};¤.¢¿(¦½gi,§§);if(á<6)¤.¢¿(¦¾gi,§¨);if(¢§){£ ¢´=§©.£¨(§ª);®(£ i=0;i<¢´.¯;i++)¢´[¢´[i]]=¢´[i-1]||§«;¢ ¬($,$1,$2,$3){¥ $1+¢´[$3]};¤.¢¿(¶ ç(§¬+¢´.¢Ü(§­)+§®,§£),¬)}};£ ¤Ü=¦¿;£ ¤Û=¦Àg;£ ¤Ú=¦Á;£ ¤ß=¦Âg;£ ¤Þ=§¯;£ ¢è={};¢ ü(´,­){£ £æ=!­;£ £ç=(­)?(­.¥ê==¥é)?­:[­]:[²];£ ò=´.¬(¤ß,¤Þ).£¨(§ª);£ §=[];®(£ i=0;i<ò.¯;i++){´=¤Ý(ò[i]);if(´.Æ(0,3).¢Ü(¦ô)==§°){´=´.Æ(2);­=¤Ù(£ç,´[1])}Û ­=£ç;£ j=0,¢³,±,É,¢Ð=¦ô;Ý(j<´.¯){¢³=´[j++];±=´[j++];¢Ð+=¢³+±;É=¦ô;if(´[j]==§±){Ý(´[j++]!=§®)É+=´[j];É=É.Æ(0,-1);¢Ð+=§±+É+§®}­=(£æ&&¢è[¢Ð])?¢è[¢Ð]:£å(­,¢³,±,É);if(£æ)¢è[¢Ð]=­}§=§.¥è(­)}¥ §};¢ ¤Ý(´){if(¤Ü.µ(´))´=§²+´;¥ ´.§(¤Û)};¢ £å(­,¢³,±,É){£ Ê=¦ô;if(¤Ú.µ(±)){±=±.£¨(§­);Ê=±[0];±=±[1]}£ ¼=[];if(ò[¢³])ò[¢³](¼,­,±,Ê||É);¥ ¼};¢ ¤Ù(­,id){£ ¼=[],i,j;®(i=0;i<­.¯;i++){£ §=­[i].¢Ì.£·(id);if(§){if(§.¯==¢Þ)¸(¼,§);Û ®(j=0;j<§.¯;j++)¸(¼,§[j])}}¥ ¼};£ ò={§²:¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=(±==§³&&­[i].¢Ì)?­[i].¢Ì:­[i].¤Ø(±);®(£ j=0;j<ó.¯;j++){if(¢Î(ó[j])&&(!Ê||ó[j].Ê==Ê))¸(¼,ó[j])}}},§´:¢(¼,­,±){®(£ i=0;i<­.¯;i++)if(­[i].id==±)¸(¼,­[i])},§µ:¢(¼,­,±){±=¶ ç(§¶+±+§·);®(£ i=0;i<­.¯;i++)if(±.µ(­[i].¢Ý))¸(¼,­[i])},§¸:¢(¼,­,±,É){±=¢®[±];if(±)®(£ i=0;i<­.¯;i++)if(±(­[i],É))¸(¼,­[i])}};£ ¢¬=¦ô;£ ¢®={È:¢(){£ È=[];®(£ ¢Ï in ¤){if(¢Ï!=§¹&&¢Ï!=§º){if(¤[¢Ï].¯>1)¢Ï+=§»;¸(È,¢Ï)}}¥ È.¢Ü(§­)},§¹:¢(¡){¥ ¢ê(¡.«[§¼]==§¹)},§º:¢(¡){¥ ¢ê(¡.«[§¼]==§º)}};£ ¢­={È:¢®.È};¢ £Ù(¡,Ï,Ê){if(Ê&&¡.Ê!=Ê)¥ ë;¥(Ï==§³)?¢Î(¡):(¢±)?(¡.Ï==Ï.¤Ç()):(¡.Ï==Ï)};£ £µ=[];¢ ¢ö(£¶){¥ £².µ(£¶)?£µ[£¶.Æ(1,-1)]:£¶};£ £©=¢(¨){¥ ¨.¬(¦Ãg,¢(§){¥(§.¤È(0)==¦õ)?¦ô:§½+(¸(£µ,§.Æ(1,-1))-1)+§½}).¬(¦Äg,¦ô).¬(¦Åg,§­).¬(¦Æg,¦ü)};¢ £§(¨){¥ ¨.¬(¦Ág,§¾).¬(¦Çg,¢(§,¤×){¥ £µ[¤×]})};£ £³=[];¢ Ó(¡,Õ,þ){¡.¤Ö(Õ,þ);¸(£³,í)};¢ ¤Õ(¡,Õ,þ){¢Æ{¡.¥å(Õ,þ)}¢·(£¥){}};¢¡.¤Ö(§¿,¢(){Ý(£³.¯){£ þ=£´(£³);¤Õ(þ[0],þ[1],þ[2])}});£ £®=(á<6)?¢(¡){¥ ¡.Í}:¢(¡){¥ ¡.«.£®};¢ ¢Ê(¡){if(!£®(¡)){¡.¥ã=ë;¤Ô(¤Ð(¡))}};¢ ¤Ô(¡){Ý(¡){¡.¦.¤Ó=¡.«.¤Ó;¡=¢þ(¡)}};£ £²=¦È;¢ ¤ª(©){¥(£².µ(©))?©:§½+©+§½};¢ ¥â(©){¥(£².µ(©))?©.Æ(1,-1):©};¢ £Ï(Ï){£ ¡=².£Û(Ï||§À);¡.Ì.¨=§Á;¥ ¡};¢ ¢Î(¢é){¥ ¢ê(¢é&&¢é.¥Þ==1&&¢é.Ï!=§Â&&!¢é.¢ÿ)};¢ ¤²(¡){Ý(¡&&(¡=¡.¥Ý)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¢þ(¡){Ý(¡&&(¡=¡.õ)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¤Ð(¡){¡=¡.¤¹;¥(¢Î(¡))?¡:¢þ(¡)};£ ¢í=ë;ª.¢©(§Ã,¢(){if(¢±)¢½=¶ ¢(){£ è=[];¢ £ä(¡){£ £±=².£Û(§Ä+¡.£¯.Æ(1));if(¡.£¯.Æ(-2)!=§Å){£ ¤Ï=§Æ+¡.Ï+§Ç,õ;Ý((õ=¡.õ)&&õ.£¯!=¤Ï){¡.¢ü.¢Õ(õ);£±.¢»(õ)}if(õ)¡.¢ü.¢Õ(õ)}¡.¢ü.¥Û(£±,¡);¥ £±};¤.æ=¢(){¸(è,í)};¤.£°=¢(){¢Æ{if(á>5)².¥Ú.æ(§È,§É)}¢·(£¥){}£¾{®(£ i=0;i<è.¯;i++){£ ¢Í=ü(è[i][0]);®(£ j=0;j<¢Í.¯;j++)è[i][1](¢Í[j])}}};¤.æ(§Ê,¢(¡){if(!¡.¤Í){£ ð=ü(§Ë,¡)[0];if(ð){if(!ð.id)ð.id=ð.¢«;¡.¤Í=ð.id}}});¤.æ(§Ì,¢(¡){£ä(¡);£Ö ¢è[§Í]});¤.æ(§Î,¢(¡){if(¡.Ï==§Ï){£ §=¡.£¯.§(¦Éi);¡.¦.©=(§)?§[1]:¦ô}if(¡.Õ==§Ð){Ó(¡,§Ñ,¢(){¡.¦.£ã=Ö;¢Ó(§Ò+¡.¢«+§Ó,1)})}});¤.æ(§Ô,¢(¡){£ ¤Ê=¦Ê;Ó(¡,§Õ,¢(){®(£ i=0;i<¡.¯;i++){if(¤Ê.µ(¡[i].Õ)&&!¡[i].¢ç&&!¡[i].¦.£ã){¡[i].¢ç=Ö;¢Ó(§Ò+¡[i].¢«+§Ö,1)}Û if(¡[i].Ï==§Ï&&¡[i].Õ==§Ð){¢Ó(§Ò+¡[i].¢«+§×+¡[i].©+§½,1);¡[i].©=¡[i].¦.©}}})})}},Ö);ª.¢©(§Ø,¢(){£ £«=§Ù,¤Æ=¦Ë,¢Ö=¦Ì,£Ý=¦Í;£ ¢¾=(á<6)?¦Îgi:¦Ïgi;£ ¤Ã=(á<5.5)?¦Ð:¦Ñ;£ ¹=£Ï();¸(ª.ô,¢ ¤À(){if(¹.½)¹.½.¢Õ(¹)});à.¢¿(¢¾,¢(§){¥ §.Æ(0,3)+§.¤È(4).¤Ç()+§.Æ(5)});£ Þ=(¢§)?².ß:ù;¢ ö(¡){¥ ¡.Ì.³==§Ú||¡.«.³==§Ú};¢ ã(¡){£ ã=¡.¢¥;Ý(ã&&!£®(ã))ã=ã.¢¥;if(!ã||ö(¡))ã=Þ;¥ ã};¢ ì(¤Á){ì=¢(¡,©){if(!¡.¦.ä&&(!¢±||¡.Ï!=§Û)){if(!©)©=¡.«.°;¡.¦.ä=(¤Æ.µ(©))?¥Î.¢æ(0,¢Ë(¡,©)):©;¡.¦.°=¡.¦.ä;¢Ê(¡)}};if(¢§)à.ï(§Ü,ì);£ ¢Ë=(¢§)?¢(¡,©){¥ ¢É(¡,©)+£à(¡)+£ß(¡)}:¢(¡,©){¥ ¢É(¡,©)};¢ £à(¡){¥ ¡.¢¼-¡.Í};¢ £ß(¡){¥ ¢É(¡,¡.«.¥Í)+¢É(¡,¡.«.¥Ì)};¢ ¤Â(¡){¥((¡.«.¢ï==§Ý)?0:¢ä(¡,¡.«.¢ï))+((¡.«.¤Å==§Ý)?0:¢ä(¡,¡.«.¤Å))};¢ Ú(¡){Ú[Ú.Ë++]=¡;if(¡.«.¤Ä==§Ý)¡.¦.¤Ä=0;ì(¡);¢Ê(¡);£ª(¡)};Ú.Ë=0;à.ï(§Þ+£«,Ú);Ü(¢ó(Ú).¬(¦Òg,§ß));ý.Ë=0;à.ï(§à+£«,ý);¢ £ª(¡){£ £¬=¡.£É();£ °=£¬.×-£¬.À;if(¡.«.ý&&°>=¢Ë(¡,¡.«.ý))¡.¦.°=¢Ë(¡,¡.«.ý);Û if(¡.«.Ú&&°<=¢Ë(¡,¡.«.Ú))¡.¦.°=¢Ë(¡,¡.«.Ú);Û ¡.¦.°=¡.¦.ä};¢ ¢²(¡){if((¡.«.³==§á||¡.«.³==§Ú)&&¡.«.À!=§Ý&&¡.«.×!=§Ý&&¤Ã.µ(¡.«.°)){¢²[¢².Ë++]=¡;¢Ê(¡);£Þ(¡)}};¢².Ë=0;à.ï(§â+£«,¢²);¢ £Þ(¡){¡.¦.°=¦ô;£ ½=ã(¡);£ À=(¡.¦.¢Ô)?¡.£É().À-2:¢ä(¡,¡.«.À);£ °=½.Í-¢ä(¡,¡.«.×)-À-¤Â(¡);if(!¢§)°-=£à(¡)+£ß(¡);if(°<0)°=0;if(ö(¡)||¤Á||¡.¢¼<°){¡.¦.ä=°;¡.¦.°=°}};£ Í=ù.Í;Ó(¢¡,§ã,¢(){£ i,¢å=(Í<ù.Í);Í=ù.Í;®(i=0;i<Ú.Ë;i++){£ ¡=Ú[i];£ ä=(¡.¦.°==¡.«.Ú);if(¢å&&ä)¡.¦.°=¦ô;if(¢å==ä)£ª(¡)}®(i=0;i<ý.Ë;i++){£ ¡=ý[i];£ ä=(¡.¦.°==¡.«.ý);if(!¢å&&ä)¡.¦.°=¦ô;if(¢å!=ä)£ª(¡)}®(i=0;i<¢².Ë;i++)£Þ(¢²[i]);¤À()});¢ ¢É(¡,©){if(£Ý.µ(©))¥ ø(©);if(¢Ö.µ(©))¥ ø(£Æ(©)/100*ã(¡).Í);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);¹.Ì.°=©;¥ ¹.¢¼};¢ ¢ä(¡,©){if(ø(©)>0)¥ ¢É(¡,©);if(£Ý.µ(©))¥ ø(©);¡.½.¢»(¹);¹.Ì.À=©;¥ ¹.¢¤}};Ü(¢ó(ì).¬(¦Óg,§ä).¬(¦Ôg,§å).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦×g,§è).¬(¦Øg,§é));ì();¥É(Ö)});ª.¢©(§ê,¢(){£ ¤§=¦Ùg,¤½=¦Úi;ª.¢á=[];ª.¤¿=¶ ¤¾;ª.·=·;ª.Ò=Ò;ª.Ã=Ã;ª.¢â=¢(){¥Ç(¤.¤¿)¤.¨=£§(¢â(£©(¤.¨)));®(£ i=0;i<ª.¢á.¯;i++)ª.¢á[i].¢ß();®(i=0;i<£¡.¯;i++)£¡[i].¤º()};¢ã=¢(¿,Á){¥ ê(¿.¾,Á)};£ ££=[];¢ ¤¾(){¤.¢â=¢(¨){·.û=¶ ç(§ë+¢®+§ì,§í);·.¤¨=¶ ç(§î+¢®+§­+¢­+§ï,§í);Ò.û=¶ ç(§ð+¢­+§ñ,§í);¥ ¨.¬(Ã.û,Ã.ID).¬(Ò.û,Ò.ID).¬(·.û,·.ID)};¤.£©=¢(¨){ñ.û=¶ ç(§ò+¢¬+§ó+¢¬+§ô,§í);¥ ¨.¬(ñ.û,ñ.ID).¬(¦Ûg,¢($){¥ §õ+(¸(££,$)-1)+§ö}).¬(¦Üg,§¸).¬(¦Ýg,¢(§,À,×){¥ À.£¨(§ª).¢Ü(×)+×})};¤.£§=¢(¨){¥ ¨.¬(¦Þg,¢($,$1){¥ ££[$1]})}};¢ _·(){¤.È=¢(){¥ §µ+¤.¢Ç};¤.æ=¢(¡){¡.¢Ý+=§²+¤.¢Ç};¤.¤©=¢(¡){¡.¢Ý=¡.¢Ý.¬(¤.¢¾,¦ô)};¤.¢ß=¢(){£ §=ü(¤.´);®(£ i=0;i<§.¯;i++)¤.æ(§[i])}};¢ ·(´,¨){¤.id=ª.¢á.¯;¤.¢Ç=·.¢ø+¤.id;¤.´=´;¤.¢¾=¶ ç(§÷+¤.¢Ç+§ø,§í);¸(ª.¢á,¤)};·.£Ú=_·;·.¢ª=¶ _·;·.¢ø=§ù;·.ID=¢(§){¥ £Õ(§)+¶ ·(§)};¢ _Ò(){¤.¢ß=¢(){£ §=ü(¤.¢°);®(£ i=0;i<§.¯;i++){£ º=(¤.º)?ü(¤.º,§[i]):[§[i]];if(º)¤.¢¯(§[i],º,¤)}}};_Ò.¢ª=¶ _·;¢ Ò(´,¢°,¢¯,º){¤.¢°=¢°;¤.¢¯=¢­[¢¯];¤.º=º;¤.£¢=·;¤.£¢(´)};Ò.£Ú=_Ò;Ò.¢ª=¶ _Ò;Ò.ID=¢(§,¢°,¢¯,º){if(¢±&&¢¯!=§ú&&¤½.µ(¢°)&&!¦ß.µ(º))¥ §;¥ £Õ(§)+¶ Ò(§,¢°,¢¯,º)};£¦+=§û;£ ¤·=¦àg;¢ ¤¶(§,£Ü){¥ Ü(§ü+§ý.Æ(£Ü.¯)+£Ü+§½)};£ £¡=[];¢ _Ã(){¤.Å=¢Þ;¤.È=¢(){¥ ¦ô};¤.¥Ã=0;¢ ¤¸(¢Ä,Å,¨){£ ÿ=¥Â(¢(){¢Æ{if(!¢Ä.ê)¥;¢Ä.ê(¢Ä,Å,¨);¤»(ÿ)}¢·(£¥){¤»(ÿ)}},10)};¤.¤º=¢(){if(¤.Å==¢Þ)¥;®(£ i=0;i<¤.§.¯;i++){£ º=¤.§[i];£ ¢Å=º.¦[¤.³];if(¢Å){£ ½=º.£Ì?º:º.½;£ £¤=¦á.µ(¤.Å);£ ¡=².£Û(£¤?Ã.¤³:§Â);¡.¢ÿ=Ö;¡.¦.¨=¢Å.¨;if(!£¤)¡.¥Á=¢Å.Å;if(¤.³==§þ){½.¥À(¡,½.¤¹)}Û{½.¢»(¡)}if(£¤)¤¸(¡,¢Å.Å,¢Å.¨);º.¦[¤.³]=¢Þ}}};¤.¢ß=¢(){¤.§=ü(¤.´);®(£ i=0;i<¤.§.¯;i++){£ ¦=¤.§[i].¦;if(!¦[¤.³])¦[¤.³]={¨:¦ô};¦[¤.³].¨+=§ÿ+¤.¨;if(¤.Å!=¢Þ)¦[¤.³].Å=¤.Å}}};_Ã.¢ª=¶ _·;¢ Ã(´,³,¨){¤.³=³;¤.¨=££[¨].Æ(1,-1);£ Å=¤.¨.§(Ã.¤´);if(Å)¤.Å=¢ö(Å[1]).¬(¤·,¤¶);¤.£¢=·;¤.£¢(´);¸(£¡,¤)};Ã.£Ú=_Ã;Ã.¢ª=¶ _Ã;Ã.ID=¢(§,´,³,¨){¥ ¶ Ã(´,³,¨)};Ã.û=¦âg;Ã.¤´=¦ã;Ã.¤³=¨¡+¢À(¨¢,Á)+¨£;ò[§Ç]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=­[i].¥º;®(£ j=0;j<ó.¯;j++)if(£Ù(ó[j],±,Ê))¸(¼,ó[j])}};ò[¨¤]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ¢ý=¢þ(­[i]);if(¢ý&&£Ù(¢ý,±,Ê))¸(¼,¢ý)}};ò[¨¥]=¢(¼,­,±){±=¢ú[±];®(£ i=0;i<­.¯;i++)if(±(­[i]))¸(¼,­[i])};¢®[¨¦]=¢(¡){¥!¤²(¡)};¢®[¨§]=¢(¡,É){É=¶ ç(¨¨+É,¨©);Ý(¡&&!¡.£×(¨§))¡=¡.¢ü;¥ ¡&&É.µ(¡.£×(¨§))};¢­.¢Ù=¢(¡){£ Â=í;Ó(¡,¨ª,¢(){ª.Ð.¢Ù.¢Û(Â)});Ó(¡,¨«,¢(){ª.Ð.¢Ù.¢Ú(Â)})};¢­.¢÷=¢(¡){£ Â=í;Ó(¡,¨¬,¢(){ª.Ð.¢÷.¢Û(Â)})};¢­.¢Á=¢(¡){£ Â=í;Ó(¡,¨­,¢(){ª.Ð.¢Á.¢Û(Â)});Ó(¡,¨®,¢(){ª.Ð.¢Á.¢Ú(Â)});if(¡==².¥²){ª.Ð.¢Á.¢Û(Â)}};Ó(²,¨¯,¢(){£ ú=ª.Ð.¢÷;£ Ù=ú.Ù,i;®(i in Ù)ú.¢Ú(Ù[i]);ú=ª.Ð.¢Ù;Ù=ú.Ù;®(i in Ù)if(!Ù[i][0].£õ(£ü.¥°))ú.¢Ú(Ù[i])});£ ¢ú=[];£ ¤«=¦äg;¢ ñ(Ä,¢Â,©){©=¢ö(©);¤.id=¢ú.¯;£ò(Ä.¥¯()){¢¦ ¨°:Ä=¨±;¤­;¢¦ ¨²:Ä=¨³;¤­;£ñ:Ä=¨´+Ä+¨µ}¢Â=¢¬[¢Â];¸(¢ú,¶ ¤¬(¨¶,¨·+¢Â(Ä,©)))};ñ.ID=¢(§,Ä,¢Â,©){¥ ¶ ñ(Ä,¢Â,©)};ñ.¢ª.È=¢(){¥ ñ.¢ø+¤.id};¢¬={È:¢(){£ È=[];®(£ i in ¤)if(i&&i!=¨¸)¸(È,i);¥ È.¢Ü(¦ô).¬(¦åg,¦ô)},¢ù:¢(©){¥ ©.¬(¤«,¨¹)},¦ô:¢(Ä){¥ Ä},¨º:¢(Ä,©){¥ Ä+¨»+¤ª(©)},¨¼:¢(Ä,©){¥ ¨½+¢¬.¢ù(©)+¨¾+Ä+§®},¨¿:¢(Ä,©){¥ ¨À+¢¬.¢ù(©)+¨Á+Ä+§®}};ñ.¢ø=¨¥;¢ _ú(){¤.¢Û=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.æ(º[i]);¤.Ù[·.id+¡.¢«]=Â};¤.¢Ú=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.¤©(º[i]);£Ö ¤.Ù[·.id+¡.¢«]}};ª.Ð=¢(Õ){¤.Õ=Õ;¤.Ù={};ª.Ð[Õ]=¤};ª.Ð.¢ª=¶ _ú;¶ ª.Ð(¨Â);¶ ª.Ð(¨Ã);¶ ª.Ð(§ú);¢ £Õ(´){¥ ´.¬(·.¤¨,¦ô).¬(¤§,§²)}},Ö);ª.¢©(¨Ä,¢(){if(á<5.5)¥;£ £Ô=¨Å;£ £ý=(¦æ.µ(¤¥.¥©))?¢À(¨Æ,Á):¨Ç;£ £Ó=¶ ç((¢¡.¤ý||¨È)+¨É,¨©);¢ £þ(¡,î){¡.¦.±=£Ô.¬(¦ç,î)};£ ¢¾=¦ègi;à.¢¿(¢¾,¢ ¬(§,¢õ,¤¡,Ô,£ÿ){Ô=¢ö(Ô);¥ £Ó.µ(Ô)?¨Ê+£Ô.¬(¦é,¨Ë).¬(¦ç,Ô)+¨Ì+(¢õ||¦ô)+§¸+(¤¡||¦ô)+¨Í+(£ÿ||¦ô):§});if(¢½){¢ £Ò(¡){if(£Ó.µ(¡.î)){£ °=¡.°,÷=¡.÷;£þ(¡,¡.î);¡.î=£ý;¡.°=°;¡.÷=÷}Û ¡.¦.±=¦ô};¢½.æ(¨Î,¢(¡){if(¡.Ï==¨Ï&&¡.Õ!=¨Ð)¥;£Ò(¡);Ó(¡,¨Ñ,¢(){if(£ü.£Ê==¨Ò)£Ò(¡)})})}});ª.¢©(¨Ó,¢(){£ ¢Ö=¦Ì;à.ï(¨Ô,¢¢);à.ï(¨Õ,¢£);£ ß=².ß;£ Þ$=(¢§)?¨Ö:¨×;£ Þ=Ü(Þ$);¢ ¢ñ(){if(ß.«.£Î!=§Ú){if(ß.«.£Í==¨Í){ß.¦.£Í=¨Ø+¢ô.¤÷+§®}ß.¦.£Î=§Ú}¢ñ=¢Ø};£ ¹=£Ï(¨Ù);¢ ¢º(£ú){¥ ¢ó(£ú).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦Óg,§ä).¬(¦êg,¨Ú)};¢ ¢£(¡){if(¡.«.£Î!=§Ú)¥;if(!¡.£õ(ß)){¢ñ();¢£[¢£.Ë++]=¡;£Ë(¡);¤ö(¡);£Â(¡)}};¢£.Ë=0;¢ £Â(¡){¹.î=¡.«.£Í.Æ(5,-2);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);£È(¡);¤õ(¡);½.¢Õ(¹)};¢ £Ë(¡){¡.Ì.¢×=¡.«.¢×;if(!ö(¡)){£ £ô=¨Û+Þ$+¨Ü;¡.¦.£ð(¨Ý,£ô)}};Ü(¢º(£Ë));¢ £È(¡){£ £Ê=ö(¡)?¨Ý:¨Þ;¡.¦[£Ê]=£Ç(¡,¡.Ì.¢×)-¡.£É().À-¡.¤ô};Ü(¢º(£È));¢ ö(¡){if(!¡)¥ ë;if(¡.Ì.³==§Ú||¡.«.³==§Ú)¥ Ö;¥ í.£ó(¡.½)};¢ £Ç(¡,³){£ò(³){¢¦ ¨ß:¢¦ §ç:¥ 0;¢¦ §â:¢¦ §é:¥ Þ.Í-¹.¢¼;¢¦ ¨à:¥(Þ.Í-¹.¢¼)/2;£ñ:if(¢Ö.µ(³)){¥ ø((Þ.Í-¹.¢¼)*£Æ(³)/100)}¹.Ì.À=³;¥ ¹.¢¤}};Ü(¢º(£Ç));¢ ¢¢(¡){if(¡.«.³!=§Ú)¥;¢ñ();¢¢[¢¢.Ë++]=¡;¡.Ì.³=§Ú;¡.¦.³=§á;£Á(¡)};¢¢.Ë=0;¢ £Á(¡,Ø){£Å(¡,Ø);¤ò(¡,Ø);if(!Ø||¡.¦.¤ñ){if(ø(¡.«.¢î)==0)¡.¦.¤ð++}};¢ £Å(¡,Ø){if(!Ø&&¢Ö.µ(¡.«.°))¡.¦.ì=¡.«.°;if(¡.¦.ì)¡.¦.°=ø(£Æ(¡.¦.ì)/100*Þ.Í);if(Ø){if(!¡.¦.£Ä)¥}Û{¡.¦.£Ä=¡.«.×!=§Ý&&¡.«.À==§Ý}¡.¦.À=¦ô;¡.¦.¢Ô=¢¹(¡);if(¡.«.¢ï!=§Ý){¡.½.¢»(¹);¹.Ì.À=¡.«.¢ï;¡.¦.¢Ô-=¹.¢¤;¡.½.¢Õ(¹)}if(ö(¡.¢¥))¡.¦.£ï=¡.¦.¢Ô;Û if(!Ø)¡.¦.£ð(¨á,¨â+Þ$+¨ã)};Ü(¢º(£Å).¬(¦Øg,§é).¬(¦Ôg,§å));¢ ¢¹(¡){£ ¢¹=¡.¢¤,£Ã=ë;£ Ç=ö(¡.¢¥)&&¡.¦.£Ä;Ý(¡=¡.¢¥){if(!Ç&&¡.«.³!=¨ä)£Ã=Ö;¢¹+=¡.¢¤*(£Ã?-1:1)}¥ ¢¹};Ü(¢º(¢¹));¢ £ì(){®(£ i=0;i<¢£.Ë;i++)£Â(¢£[i]);®(i=0;i<¢¢.Ë;i++)£Á(¢¢[i],Ö);ÿ=0};£ ÿ;Ó(¢¡,§ã,¢(){if(!ÿ)ÿ=¢Ó(£ì,10)})});¢í=Ö;if(².£À==¦ú)_ê();Û Ó(²,¨å,¢(){if(!¢¸&&².£À==¦ú)¢Ó(_ê,0)})}¢·(¢ë){¢ì();¢¶(¨æ+¢ë.£ë)}£¾{}}();',493,0,/./,String,95,'element`function`var`this`return`runtimeStyle`match`cssText`value`IE7`currentStyle`replace`from`for`length`width`filter`document`position`selector`test`new`Class`push`ie7_tmp`target`x5cs`filtered`parentElement`href`styleSheet`left`path`instance`PseudoElement`attribute`content`slice`fixed`toString`filterArgs`scopeName`count`style`clientWidth`ie7`tagName`Event`x5c`DynamicStyle`addEventHandler`url`type`true`right`recalc`instances`minWidth`else`eval`while`viewport`body`CSSFixes`appVersion`link`layoutParent`fixedWidth`auto`add`RegExp`fixes`styleSheets`load`false`fixWidth`arguments`src`addRecalc`input`AttributeSelector`selectors`subset`recalcs`nextSibling`isFixed`height`parseInt`documentElement`ie7Event`ALL`cssQuery`maxWidth`handler`timer`window`positionFixed`backgroundFixed`offsetLeft`offsetParent`case`quirksMode`x5cw`addModule`prototype`uniqueID`attributeTests`dynamicPseudoClasses`pseudoClasses`dynamicPseudoClass`attach`isHTML`fixRight`token`SIZES`pattern`alert`catch`complete`getScreenLeft`topFunction`appendChild`offsetWidth`HTMLFixes`MATCH`addFix`makePath`focus`compare`x5cd`object`pseudoElement`try`name`visited`getPixelWidth`boxSizing`getFixedWidth`all`elements`isElement`pseudoClass`cacheSelector`modules`script`setTimeout`screenLeft`removeChild`PERCENT`backgroundPositionX`DUMMY`hover`unregister`register`join`className`null`exec`display`classes`parse`getCSSText`getPixelLeft`wider`max`disabled`cssCache`node`Boolean`error`unHide`loaded`bottom`marginLeft`absolute`fixBackground`top`String`location`image`getString`active`PREFIX`escape`attributeSelectors`x2f`parentNode`adjacent`nextElement`ie7_anon`pseudoElements`inherit`encoded`isURL`ignore`HEADER`decode`split`encode`resizeWidth`NUMERIC`rect`min`hasLayout`outerHTML`apply`fixedElement`QUOTED`handlers`pop`strings`string`item`small`getPath`styles`pathname`array`httpRequest`finally`Error`readyState`foregroundPosition`backgroundPosition`nested`autoLeft`positionLeft`parseFloat`getOffsetLeft`setOffsetLeft`getBoundingClientRect`propertyName`backgroundLeft`canHaveChildren`backgroundImage`backgroundAttachment`tmpElement`none`background`fixImg`pngTest`FILTER`simpleSelector`delete`getAttribute`lang`compareTagName`ancestor`createElement`code`PIXEL`resizeRight`getPaddingWidth`getBorderWidth`box`submit`clicked`fix`select`useCache`base`large`inlineStyles`LINKS`description`resize`onresize`scrollLeft`pixelLeft`setExpression`default`switch`callee`expression`contains`Height`Width`Top`Left`leftFunction`img`event`NULL`addFilter`suffix`prefix`scale`png`define`navigator`Microsoft`CHILD`COMPLEX`remove`quote`ESCAPE`Function`break`ie7_`x5cb`class`ms_`previousElement`OBJECT`CONTENT`before`unicode`HEX`addTimer`firstChild`create`clearInterval`inline`ANCHOR`Parser`parser`removeTempElement`HEIGHT`getMarginWidth`AUTO`minHeight`marginRight`UNIT`toUpperCase`charAt`BUTTON`UNSUCCESSFUL`button`abbr`htmlFor`HTML`endTag`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`autoload`mimeType`search`message`onreadystatechange`static`screenTop`autoTop`positionTop`center`clientLeft`setOffsetTop`backgroundTop`protocol`onpropertychange`INPUT`zoom`crop`trans`IE7_PNG_SUFFIX`x00`x_bits`char`x5cnstatic`x_height`x5cn`x_width`javascript`gif`blank`userAgent`bSV1`sizingMethod`AlphaImageLoader`DXImageTransform`progid`toLowerCase`srcElement`onmouseup`activeElement`onblur`onfocus`onmousedown`onmouseout`onmouseover`child`first`children`scriptlet`text`htm`data`after`insertBefore`innerText`setInterval`specificity`x5cu`align`vertical`with`css2`fixHeight`Bottom`Right`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`previousSibling`nodeType`clip`border`padding`unquote`contentEditable`onbeforeunload`detachEvent`import`namespace`concat`Array`constructor`size`font`medium`list`float`relative`sizing`lastIndex`successfully`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`ActiveXObject`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ie7_off`MSIE`ie7_debug`alpha`version`visible`visibility`fromCharCode`¦®`¦­ (\\d\\.\\d)`¦¬`^¤±`\\.¦§$`^[\\w\\.]+[^:]*$`(Ô\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¥ö\\b|\\¥õ\\b|^$`Î-â`(¥ï\\s*:\\s*(À|×))`¢à\\s*:\\s*¥î-£·`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢û\\*[^\\*]*\\*+([^\\¢û][^\\*]*\\*+)*\\¢û)|(\x27[^\x27]*\x27)|("[^"]*")`@(¥ç|¥æ)[^;\\n]+[;\\n]|`\\Ñ:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ©="([^"]*)"`^(£â|¥Ñ|¤Ë)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(£­|¢æ)-(°|÷)\\s*:\\s*\\d`\\b(£­|¢æ)-°\\s*:\\s*\\d`^å|0cm$`^å$`£­`£÷`°`£ù`À`¥Ë`×`>`(\\ba(\\.[\\w-]+)?)$`\\{[^\\}]*\\}`::`([^\\}\\s]*\\,[^\\{]*)(\\{\\d+\\})`\\{(\\d+)\\}`[+>~]`\\Ñ([a-fA-F\\d]+)`^Ô\\(.*\\)$`([^}]*):(¤µ|¥¿)[^{]*\\{([^}]*)\\}`Å\\s*:\\s*([^;]*)(;|$)`([\\¢û()[\\]?{}|*+])`=`\\¥ª\\b`%1`£Ñ(-¢õ)?\\s*:([^(};]*)Ô\\(([^\\)]+)\\)([^;}]*)`¤¢`X`¦±`ª ¦° 0.7.3 (¦¯)`\\n\\n`¦ª`¦¨`¦¦ ¦¥`:â{Î-â:â}:¢È{Î-â:¢È}`*{¦¤:0}`¢Ò=``/`¤¦.¦¢`¥ÿ`£¿ [1]: ¥ü ¥û ê ¥ú `Î-¥ù.js`¢¸`<Ì>`$1`$2`Ì`¢í ¥ó`£¿ [2]: `([^{}]*)\\Ñ{([^}]*[^\\¢¨-])?`gi`£á-¥ñ\\»*:\\»*Å-£á`³\\»*:\\»*¢ð`¥ð`¢à:¤¼;$1`¢à:¤Ò`xx-£¸,x-£¸,£¸,¥í,£è,x-£è,xx-£è`,`xx-£¸`(¥ì(-¥ë)?\\»*:\\»*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\»)`(\\»|$)`:`â`¢È`\\Ñ([^)]*\\Ñ)`Î-â`\x27`\\Ñ:`¥ä`¢Ä`³:¢ð;¥á:0;¢à:¤Ò;¥à:£Ð;¥ß:£¬(0 0 0 0);À:-9999`!`Î-¥Ü`<¤Î:`/>``¤Î`¥Ù://¥Ø.w3.¥×/1999/¥Ö`¥Õ`ð,£å,¥Ô`¤Ì` ¤Ì`¤Ë,ð`¤É`£â`¥Ó`².¢Ì.`.¦.£ã=ë`¥Ò`¥Ð`.¢ç=ë`.©=\x27`Î-£á-¥Ï`\\»*:\\»*\\¢Ã[\\¢¨%]*`Ç`HR`°\\»*:\\»*\\¢Ã\\¢¨*[^%]`å`£­-°`¢æ`¢æ-°`¢ð`×`£í`£ö`÷`£ø`¢ò`¥Ê`¢î`Î-¥È`[^},\\»]*([>+~][^:@,\\»{]+|:(`)|\\Ñ.[\\¢¨-]+\\Ñ.[\\¢¨-.]+|@[@\\¢Ã]+)`g`[^\\»(]+[+~]|@\\¢Ã+|:(â|¢È|`)|\\Ñ.[\\¢¨-.]+`([^}]*):(`)([^{]*)`\\Ñ[([^`=\\Ñ]]+)([`]?=?)([^\\Ñ]]+)?\\Ñ]`{`}`\\»`\\¤¯`¤®`¢Á`.¢ÿ{¥Æ-¥Å:¢ò;¢à:¤¼}`\x27\\¥Ä`0000`¤µ`;`<¢Ä ¤°=¢ÿ ¥¾=\x27`Î-Å.¥½`\x27 °=100% ÷=0 Õ=¥¼/x-¥»>`+`@`¥¹-¥¸`£Ø`^`i`¥·`¥¶`¥µ`¥´`¥³`¥±`id`¡.id.¬(/¤±\\¢Ã+/g,\x27\x27)`¤°`¡.¢Ý.¬(/\\¤¯\\»*¤®\\¢Ã+/g,\x27\x27)`¡.£×(\x27`\x27)`¡`¥ `¢ù`\\Ñ$1`=`==`~=`/(^|\\»)`(\\»|$)/.µ(`|=`/^`(-|$)/.µ(`¢Ù`¢÷`Î-¤£`¥®:¥­.¤¦.¥¬(î=%1,¥«=\x27¤¢\x27)`¥¨.¥§`¥¦:\x27#¤¤ ¥¥ 1\\¥¤#¤¤ ¥£ 1\\¥¢ ¥¡ ¤ÿ[]={0¤þ}\x27`-¤ü.¤£`$`±:`¤û`;¤ú:1;£Ñ`£Ð`£û,ð`¤ù`¢õ`¤ø`î`Î-Ç`³\\»*:\\»*Ç`£Ñ[\\¢¨\\»-]*:[^};]*Ç`ß`ù`Ô(`£û`Y`(ø(¦.¢¤)+².`.£î)||0`¢×`¢¤`À`¤ó`£ï`¦.¢Ô+².`.£î`¤ï`¤î`£¿ [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-standard.js b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-standard.js new file mode 100644 index 0000000..2109905 --- /dev/null +++ b/src/usr/local/www/themes/_corporate/javascript/ie7/ie7-standard.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i=0){ + var optar=opt.split(" "); + for(i=0;i=0) ecolor=optar[i]; + if(ecolor=="") ecolor="#666"; + cn+="e"; + edges=true; + } +else if(opt && opt.indexOf("smooth")>=0){ + cn+="a"; + ecolor=Mix(bk,color); + } +if(opt && opt.indexOf("small")>=0) cn+="s"; +prefixt=cn; +prefixb=cn; +if(wich.indexOf("all")>=0){t=true;b=true;} +else if(wich.indexOf("top")>=0) t="true"; +else if(wich.indexOf("tl")>=0){ + t="true"; + if(wich.indexOf("tr")<0) prefixt+="l"; + } +else if(wich.indexOf("tr")>=0){ + t="true"; + prefixt+="r"; + } +if(wich.indexOf("bottom")>=0) b=true; +else if(wich.indexOf("bl")>=0){ + b="true"; + if(wich.indexOf("br")<0) prefixb+="l"; + } +else if(wich.indexOf("br")>=0){ + b="true"; + prefixb+="r"; + } +var v=getElementsBySelector(selector); +var l=v.length; +for(i=0;i=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=1;i<=lim;i++){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingTop=0; +el.insertBefore(d,el.firstChild); +} + +function AddBottom(el,bk,color,bc,cn){ +var i,lim=4,d=CreateEl("b"); + +if(cn.indexOf("s")>=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=lim;i>0;i--){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingBottom=0; +el.appendChild(d); +} + +function CreateEl(x){ +if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x)); +else return(document.createElement(x)); +} + +function getElementsBySelector(selector){ +var i,selid="",selclass="",tag=selector,f,s=[],objlist=[]; + +if(selector.indexOf(" ")>0){ //descendant selector like "tag#id tag" + s=selector.split(" "); + var fs=s[0].split("#"); + if(fs.length==1) return(objlist); + f=document.getElementById(fs[1]); + if(f) return(f.getElementsByTagName(s[1])); + return(objlist); + } +if(selector.indexOf("#")>0){ //id selector like "tag#id" + s=selector.split("#"); + tag=s[0]; + selid=s[1]; + } +if(selid!=""){ + f=document.getElementById(selid); + if(f) objlist.push(f); + return(objlist); + } +if(selector.indexOf(".")>0){ //class selector like "tag.class" + s=selector.split("."); + tag=s[0]; + selclass=s[1]; + } +var v=document.getElementsByTagName(tag); // tag selector like "tag" +if(selclass=="") + return(v); +for(i=0;i=0){ + objlist.push(v[i]); + } + } +return(objlist); +} + +function Mix(c1,c2){ +var i,step1,step2,x,y,r=new Array(3); +if(c1.length==4)step1=1; +else step1=2; +if(c2.length==4) step2=1; +else step2=2; +for(i=0;i<3;i++){ + x=parseInt(c1.substr(1+step1*i,step1),16); + if(step1==1) x=16*x+x; + y=parseInt(c2.substr(1+step2*i,step2),16); + if(step2==1) y=16*y+y; + r[i]=Math.floor((x*50+y*50)/100); + } +return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16)); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/_corporate/loader.js b/src/usr/local/www/themes/_corporate/loader.js new file mode 100644 index 0000000..4512d5e --- /dev/null +++ b/src/usr/local/www/themes/_corporate/loader.js @@ -0,0 +1,29 @@ +//'); +} + +document.write(''); + +//]]> diff --git a/src/usr/local/www/themes/_corporate/new_tab_menu.css b/src/usr/local/www/themes/_corporate/new_tab_menu.css new file mode 100644 index 0000000..aae94e3 --- /dev/null +++ b/src/usr/local/www/themes/_corporate/new_tab_menu.css @@ -0,0 +1,101 @@ +/* + new_tab_menu.css + part of pfSense + Copyright (C) 2010-2011 Robert Zelaya + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + + Replace your old tab menu with the following code. To add a second tab menu line just cut and paste again. + The following code is dependent on new_tab_menu.css and images/new_tab_menu.png. + + + + + + + +*/ + +.newtabmenu ul, li{border:0; margin:0; padding:0; list-style:none;} + +.newtabmenu li{float:left; margin-right:2px; text-align: center;} +.newtabmenu a:link, .newtabmenu a:visited{ + background:url(imagesimages/new_tab_menu.png) right 45px; + color:#ffffff; /* noactive font */ + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + font-weight:bold; + font-size:.9em; + height:20px; + line-height:20px; + text-decoration:none; +} +.newtabmenu a span{ + background:url(images/new_tab_menu.png) left 45px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + height:20px; + margin-right:7px; + padding-left:7px; +} +.newtabmenu a:hover{ + background:url(images/new_tab_menu.png) right 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + color:#ffffff; /* hover over font */ +} +.newtabmenu a:hover span{ + background:url(images/new_tab_menu.png) left 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ +} + +/* -------------------------------- */ +/* ACTIVE ELEMENTS */ +.newtabmenu_active a:link, .newtabmenu_active a:visited, .newtabmenu_active a:visited, .newtabmenu_active a:hover{ + color:#000000; /* active font */ + background:url(images/new_tab_menu.png) right 0 no-repeat; +} +.newtabmenu_active a span, .newtabmenu_active a:hover span{ + background:url(images/new_tab_menu.png) left 0 no-repeat; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/_corporate/new_tab_menu.png b/src/usr/local/www/themes/_corporate/new_tab_menu.png new file mode 100755 index 0000000..4bdfcef Binary files /dev/null and b/src/usr/local/www/themes/_corporate/new_tab_menu.png differ diff --git a/src/usr/local/www/themes/_corporate/rrdcolors.inc.php b/src/usr/local/www/themes/_corporate/rrdcolors.inc.php new file mode 100644 index 0000000..dcb7a39 --- /dev/null +++ b/src/usr/local/www/themes/_corporate/rrdcolors.inc.php @@ -0,0 +1,89 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This file is included by the RRD graphing page and sets the colors */ + +/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Traffic Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colortrafficdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* Packets Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colorpacketsup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Packets Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colorpacketsdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* 95th Percentile Lines Out, In */ +$colortraffic95 = array('660000', 'FF0000'); + +/* State Table pfrate, pfstates, pfnat, srcip, dstip */ +$colorstates = array('00AA00','990000','0000FF','000000','DD9B00'); + +/* Processor Usage user, nice, system, int, processes */ +$colorprocessor = array('00AA00','990000','0000FF','DD9B00','000000'); + +/* Memory Usage active, inact, free, cache, wire */ +$colormemory = array('00AA00','990000','0000FF','666666','DD9B00'); + +/* MBUF Usage current, cache, total, max */ +$colormbuf = array('0080FF','00E344','FF0000','000000'); + +/* Traffic Shaper Queues q1, q2, q3, q4, q5, q6, q7, q8, q9 */ +$colorqueuesup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +$colorqueuesdropup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +/* Quality Graph Delay >420, 180-420, 60-180, 20-60, <20, Delay Avg */ +$colorqualityrtt = array('990000','a83c3c','b36666','bd9090','cccccc','000000'); +/* Quality Graph Loss */ +$colorqualityloss = 'ee0000'; + +/* Wireless Graph SNR, Rate, Channel*/ +/* Cellular Graph RSSI, */ +$colorwireless = array('333333','a83c3c','999999'); + +/* SPAMD Times min area, avg area, max area, Time line */ +$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); +/* SPAMD Connections max area, min area, min line, max line, avg line */ +$colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600'); + +/* OpenVPN Users Online Users */ +$colorvpnusers = array('990000'); + +/* Captive Portal Total Users Total Users */ +/* Captive Portal Concurrent Concurrent Users */ +$colorcaptiveportalusers = array('990000'); + +?> diff --git a/src/usr/local/www/themes/_corporate/styles/jquery-ui-1.11.1.css b/src/usr/local/www/themes/_corporate/styles/jquery-ui-1.11.1.css new file mode 100644 index 0000000..8a8c54f --- /dev/null +++ b/src/usr/local/www/themes/_corporate/styles/jquery-ui-1.11.1.css @@ -0,0 +1,1226 @@ +/*! jQuery UI - v1.11.1 - 2014-09-22 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2C%20Helvetica%2C%20Arial%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=glass&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=inset_soft&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=glass&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=bbbbbb&fcHover=599fcf&iconColorHover=3383bb&bgColorActive=999999&bgTextureActive=inset_hard&bgImgOpacityActive=75&borderColorActive=999999&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=444444&iconColorHighlight=3383bb&bgColorError=c0402a&bgTextureError=flat&bgImgOpacityError=55&borderColorError=c0402a&fcError=ffffff&iconColorError=fbc856&bgColorOverlay=eeeeee&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0pxdow +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; + background-color: #990000; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #c9c9c9 url("../../../javascript/jquery/images/ui-bg_inset-soft_50_c9c9c9_1x100.png") 50% bottom repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #bbbbbb; + /* background: #dddddd url("../../../javascript/jquery/images/ui-bg_glass_35_dddddd_1x400.png") 50% 50% repeat-x; */ + color: #444444; + font-weight: bold; +} +.ui-widget-header a { + color: #444444; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_glass_60_eeeeee_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #3383bb; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #3383bb; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #bbbbbb; + background: #f8f8f8 url("../../../javascript/jquery/images/ui-bg_glass_100_f8f8f8_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #599fcf; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #599fcf; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #999999; + background: #999999 url("../../../javascript/jquery/images/ui-bg_inset-hard_75_999999_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #ffffff; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_55_eeeeee_40x100.png") 50% 50% repeat-x; + color: #444444; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #444444; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #c0402a; + background: #c0402a url("../../../javascript/jquery/images/ui-bg_flat_55_c0402a_40x100.png") 50% 50% repeat-x; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_70b2e1_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_454545_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_fbc856_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_0_eeeeee_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -4px 0 0 -4px; + padding: 4px; + background: #aaaaaa url("../../../javascript/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 0pxdow; +} diff --git a/src/usr/local/www/themes/code-red/all.css b/src/usr/local/www/themes/code-red/all.css new file mode 100644 index 0000000..c26ec3d --- /dev/null +++ b/src/usr/local/www/themes/code-red/all.css @@ -0,0 +1,1301 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, sans-serif; + font-size: 0.9em; + +} + +.nowrap { white-space: nowrap; } + +.addgatewaybox { + background-color: #990000; + border-style: none none none none; + width: 225px; +} + +.infobox { + width:100%; +} + +.infoboxsave { + padding-right: 10px; +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +.inputerrorsleft { + background-color: #990000; + width: 36px; +} + +.inputerrorsright { + background-color: #FFD9D1; + color: #000000; + font-size: 11px; + padding-left: 8px; + padding-top: 6px; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 220px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 11px; + font-family: "Trebuchet MS", sans-serif; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background: url('images/background.gif') no-repeat; + background-position : center 0px; + background-color: #4a0203; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} + +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 29px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 22px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 15px; + left: 210px; + font-size: 14px; + color: #990000; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #990000; + text-align: right; + padding-right: 18px; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -5px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 82px; + color: #999999; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + position: relative; + top: -35px; + left: 3px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + width: 80px; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + /* top: 2em; + left: -2px; */ + width: 120px; + font-weight: normal; + /* background: transparent bottom left no-repeat; */ + /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; */ + /* background: url("images/menubgr_footer.png") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 5px; + padding-bottom: 10px; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 0px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; +/* background-color: #990000; */ + background: url(images/menubgr.png) repeat-y; + z-index: 2; +/* color: #FFF; */ +} +#navigation ul li ul li:hover { +/* background-color: #666666; */ + background-image: url(images/menubgr_highlight.png); + background-repeat: repeat-y; +} + +#navigation li li a { + display: block; + padding-left: 5px; + margin-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 10; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + + +#graph { + position: relative; + z-index: 10; +} + + + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #999999; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listrborder { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-left: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + color: #FFFFFF; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} + +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #DDDDDD; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 6px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; + +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password, #password2 { + font-size: small; + width: 60%; + padding-left: 19px; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #B1B1B1; + padding-right: 6px; + padding-left: 6px; + color: #000000; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} +.widgetconfigdiv{ + background:#BBBBBB; + font-size: 11px; + color: #000000; + padding-right: 5px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +div#log div.log-entry-mini { + clear: both; +} + +div#log div.log-entry-mini span { + padding: 2px 2px 2px 2px; + padding-left: 6px; +} + +div#log span.log-action-mini-header, +div#log span.log-time-mini-header, +div#log span.log-interface-mini-header, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header, +div#log span.log-protocol-mini-header { + float: left; + text-align: left; + background-color: #B1B1B1; + font-size: 12px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-time-mini, +div#log span.log-interface-mini, +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-protocol-mini { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 11px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-action-mini-header { + width: 6%; +} + +div#log span.log-time-mini, +div#log span.log-time-mini-header { + width: 19%; +} + +div#log span.log-interface-mini, +div#log span.log-interface-mini-header { + width: 8%; +} + +div#log span.log-source-mini, +div#log span.log-source-mini-header { + width: 23%; +} + +div#log span.log-destination-mini, +div#log span.log-destination-mini-header { + width: 31%; +} + +div#log span.log-protocol-mini, +div#log span.log-protocol-mini-header { + width: 8%; + border-right: 1px solid #999; +} + +/* Sortable tables */ +table.sortable thead { + background-color:#eee; + color:#666666; + font-weight: bold; + cursor: default; +} + +/*thermal_sensors widget styles*/ + +.thermalSensorRow { width: 100%; border: 0px solid #ddd; padding: 1px; border-radius: 3px; } +.thermalSensorBarShell { position: relative; width: 100%; height: 5px; border: 1px solid lightgray; border-radius: 3px; } +.thermalSensorBar { position: absolute; width: 0%; height: 1px; z-index: 1; border-style: solid; border-radius: 3px; + background-color: LimeGreen; + border-top-width: 2px; border-top-color: Lime; + border-left-width: 0px; + border-right-width: 0px; + border-bottom-width: 2px; border-bottom-color: Green; +} +.thermalSensorTextShell { height: 20px; width: 100%; top: 3px; } +.thermalSensorText { float: left; height: 20px; top: 3px; } +.thermalSensorValue { float: left; height: 20px; top: 3px; font-weight: bold; margin-left: 10px;} + +.thermalSensorWarnThresh { position: absolute; background-color: orange; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } +.thermalSensorCritThresh { position: absolute; background-color: red; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } + +.thermal_sensors_widget_scale000 { position: absolute; height: 5px; width: 1px; left: -1px; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale020 { position: absolute; height: 3px; width: 1px; left: 10%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale010 { position: absolute; height: 3px; width: 1px; left: 20%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale030 { position: absolute; height: 3px; width: 1px; left: 30%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale040 { position: absolute; height: 3px; width: 1px; left: 40%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale050 { position: absolute; height: 3px; width: 1px; left: 50%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale060 { position: absolute; height: 3px; width: 1px; left: 60%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale070 { position: absolute; height: 3px; width: 1px; left: 70%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale080 { position: absolute; height: 3px; width: 1px; left: 80%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale090 { position: absolute; height: 3px; width: 1px; left: 90%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; } + +.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; } + +/* widget textarea styles - full width */ +.textarea_widget { + width: 100%; + resize:vertical; + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* IE 8+ */ +} diff --git a/src/usr/local/www/themes/code-red/bottom-loader.js b/src/usr/local/www/themes/code-red/bottom-loader.js new file mode 100755 index 0000000..a21f775 --- /dev/null +++ b/src/usr/local/www/themes/code-red/bottom-loader.js @@ -0,0 +1,10 @@ +// diff --git a/src/usr/local/www/themes/code-red/favicon.ico b/src/usr/local/www/themes/code-red/favicon.ico new file mode 100755 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/code-red/favicon.ico differ diff --git a/src/usr/local/www/themes/code-red/graphlink.css b/src/usr/local/www/themes/code-red/graphlink.css new file mode 100755 index 0000000..13f65f0 --- /dev/null +++ b/src/usr/local/www/themes/code-red/graphlink.css @@ -0,0 +1,43 @@ +/******************************************************************************* + $Id$ + + This file is part of the GraphLink software. + GraphLink is distributed under the MIT License. + Copyright (C) 2005-2006 Max Khitrov +*******************************************************************************/ + +/** + * Defines the background image used for the graph, as well as the actual data + * locations. + * Use padding-left and padding-top to align the data area correctly with your + * background image. + * Width and height should same as the dimensions of the image, minus the + * padding values in both directions. + */ +div.GraphLink { + width: 212px; + height: 60px; + padding-left: 38px; + padding-top: 10px; + background-image: url(/themes/nervecenter/images/misc/graph.png); + overflow: hidden; +} + +/** + * Defines the data display area. Modify to fit your background image. + */ +div.GraphLinkData { + width: 200px; + height: 50px; + overflow: hidden; +} + +/** + * Defines the look of one bar. Nothing to change here other than the color. + */ +span.GraphLinkBar { + background-color: #990000; + height: 100%; + float: left; + overflow: hidden; +} diff --git a/src/usr/local/www/themes/code-red/images/alert_bgr.png b/src/usr/local/www/themes/code-red/images/alert_bgr.png new file mode 100755 index 0000000..f84afd4 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/alert_bgr.png differ diff --git a/src/usr/local/www/themes/code-red/images/background.gif b/src/usr/local/www/themes/code-red/images/background.gif new file mode 100755 index 0000000..3f0dc77 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/background.gif differ diff --git a/src/usr/local/www/themes/code-red/images/background.png b/src/usr/local/www/themes/code-red/images/background.png new file mode 100755 index 0000000..e68893d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/background.png differ diff --git a/src/usr/local/www/themes/code-red/images/button_left.gif b/src/usr/local/www/themes/code-red/images/button_left.gif new file mode 100755 index 0000000..2e46d25 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/button_left.gif differ diff --git a/src/usr/local/www/themes/code-red/images/button_mid.gif b/src/usr/local/www/themes/code-red/images/button_mid.gif new file mode 100755 index 0000000..4198d93 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/button_mid.gif differ diff --git a/src/usr/local/www/themes/code-red/images/button_right.gif b/src/usr/local/www/themes/code-red/images/button_right.gif new file mode 100755 index 0000000..0faaa67 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/button_right.gif differ diff --git a/src/usr/local/www/themes/code-red/images/footer.png b/src/usr/local/www/themes/code-red/images/footer.png new file mode 100755 index 0000000..e609b9d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/footer.png differ diff --git a/src/usr/local/www/themes/code-red/images/header.png b/src/usr/local/www/themes/code-red/images/header.png new file mode 100755 index 0000000..4525e61 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/header.png differ diff --git a/src/usr/local/www/themes/code-red/images/help.png b/src/usr/local/www/themes/code-red/images/help.png new file mode 100755 index 0000000..1de05e3 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/help.png differ diff --git a/src/usr/local/www/themes/code-red/images/horizontal.gif b/src/usr/local/www/themes/code-red/images/horizontal.gif new file mode 100755 index 0000000..a280dcb Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/horizontal.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/favicon.ico b/src/usr/local/www/themes/code-red/images/icons/favicon.ico new file mode 100755 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/favicon.ico differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_3g.gif b/src/usr/local/www/themes/code-red/images/icons/icon_3g.gif new file mode 100755 index 0000000..46ccb92 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_3g.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_3g_inactive.gif b/src/usr/local/www/themes/code-red/images/icons/icon_3g_inactive.gif new file mode 100755 index 0000000..cf983e4 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_3g_inactive.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_advanced.gif b/src/usr/local/www/themes/code-red/images/icons/icon_advanced.gif new file mode 100644 index 0000000..3ede1ff Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_advanced.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_advanced_s.gif b/src/usr/local/www/themes/code-red/images/icons/icon_advanced_s.gif new file mode 100644 index 0000000..b233549 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_advanced_s.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_alert.gif b/src/usr/local/www/themes/code-red/images/icons/icon_alert.gif new file mode 100755 index 0000000..7646941 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_alert.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_alias_host.gif b/src/usr/local/www/themes/code-red/images/icons/icon_alias_host.gif new file mode 100755 index 0000000..ad43e17 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_alias_host.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_alias_net.gif b/src/usr/local/www/themes/code-red/images/icons/icon_alias_net.gif new file mode 100755 index 0000000..abd1b8b Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_alias_net.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_alias_port.gif b/src/usr/local/www/themes/code-red/images/icons/icon_alias_port.gif new file mode 100755 index 0000000..4acf2aa Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_alias_port.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_alias_url.gif b/src/usr/local/www/themes/code-red/images/icons/icon_alias_url.gif new file mode 100755 index 0000000..660571e Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_alias_url.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_alias_url_reload.gif b/src/usr/local/www/themes/code-red/images/icons/icon_alias_url_reload.gif new file mode 100755 index 0000000..55c1c4a Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_alias_url_reload.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_block.gif b/src/usr/local/www/themes/code-red/images/icons/icon_block.gif new file mode 100755 index 0000000..670c968 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_block.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_block_add.gif b/src/usr/local/www/themes/code-red/images/icons/icon_block_add.gif new file mode 100755 index 0000000..eb726d6 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_block_add.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_block_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_block_d.gif new file mode 100755 index 0000000..e6345fe Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_block_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_cablenic.gif b/src/usr/local/www/themes/code-red/images/icons/icon_cablenic.gif new file mode 100755 index 0000000..9173058 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_cablenic.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_cal.gif b/src/usr/local/www/themes/code-red/images/icons/icon_cal.gif new file mode 100755 index 0000000..a9c7c87 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_cal.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_cal_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_cal_mo.gif new file mode 100755 index 0000000..1647e2f Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_cal_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_carp.gif b/src/usr/local/www/themes/code-red/images/icons/icon_carp.gif new file mode 100755 index 0000000..9454a82 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_carp.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_carp_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_carp_d.gif new file mode 100755 index 0000000..2ba8db2 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_carp_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_chain.png b/src/usr/local/www/themes/code-red/images/icons/icon_chain.png new file mode 100644 index 0000000..12db07a Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_chain.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_check.gif b/src/usr/local/www/themes/code-red/images/icons/icon_check.gif new file mode 100755 index 0000000..393674d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_check.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_clock_green.gif b/src/usr/local/www/themes/code-red/images/icons/icon_clock_green.gif new file mode 100755 index 0000000..e171ba8 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_clock_green.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_clock_grey.gif b/src/usr/local/www/themes/code-red/images/icons/icon_clock_grey.gif new file mode 100755 index 0000000..00c865a Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_clock_grey.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_clock_red.gif b/src/usr/local/www/themes/code-red/images/icons/icon_clock_red.gif new file mode 100755 index 0000000..7b412ee Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_clock_red.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_close.gif b/src/usr/local/www/themes/code-red/images/icons/icon_close.gif new file mode 100755 index 0000000..e0f86a7 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_close.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_configure.gif b/src/usr/local/www/themes/code-red/images/icons/icon_configure.gif new file mode 100755 index 0000000..7182e0d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_configure.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_down.gif b/src/usr/local/www/themes/code-red/images/icons/icon_down.gif new file mode 100755 index 0000000..b71a9c5 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_down.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_down_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_down_d.gif new file mode 100755 index 0000000..70a7473 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_down_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_down_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_down_mo.gif new file mode 100755 index 0000000..584587a Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_down_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_e.gif b/src/usr/local/www/themes/code-red/images/icons/icon_e.gif new file mode 100755 index 0000000..2950800 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_e.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_e_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_e_mo.gif new file mode 100755 index 0000000..9ba5738 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_e_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_error.gif b/src/usr/local/www/themes/code-red/images/icons/icon_error.gif new file mode 100755 index 0000000..e0fa659 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_error.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_exclam.gif b/src/usr/local/www/themes/code-red/images/icons/icon_exclam.gif new file mode 100755 index 0000000..36c2ec7 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_exclam.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_flag_de.png b/src/usr/local/www/themes/code-red/images/icons/icon_flag_de.png new file mode 100755 index 0000000..069cbbe Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_flag_de.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_flag_en.png b/src/usr/local/www/themes/code-red/images/icons/icon_flag_en.png new file mode 100755 index 0000000..bd7f9a5 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_flag_en.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_flag_es.png b/src/usr/local/www/themes/code-red/images/icons/icon_flag_es.png new file mode 100755 index 0000000..434776c Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_flag_es.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_flag_pt_BR.png b/src/usr/local/www/themes/code-red/images/icons/icon_flag_pt_BR.png new file mode 100755 index 0000000..f786349 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_flag_pt_BR.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_cert.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_cert.png new file mode 100755 index 0000000..48a34b6 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_cert.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_file.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_file.png new file mode 100755 index 0000000..48a9ed2 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_file.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_group.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_group.png new file mode 100755 index 0000000..7d929c0 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_group.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_host.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_host.png new file mode 100755 index 0000000..867ef2c Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_host.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_imp.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_imp.png new file mode 100755 index 0000000..f667cfc Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_imp.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_mail.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_mail.png new file mode 100755 index 0000000..d2d4548 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_mail.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_pwd.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_pwd.png new file mode 100755 index 0000000..06b53a1 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_pwd.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_search.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_search.png new file mode 100755 index 0000000..33de926 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_search.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_time.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_time.png new file mode 100755 index 0000000..aa8300a Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_time.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_unknown.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_unknown.png new file mode 100755 index 0000000..1857d0e Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_unknown.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_url.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_url.png new file mode 100755 index 0000000..cf56792 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_url.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_user.png b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_user.png new file mode 100755 index 0000000..e00eebe Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_frmfld_user.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_fw-update.gif b/src/usr/local/www/themes/code-red/images/icons/icon_fw-update.gif new file mode 100755 index 0000000..52c18ac Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_fw-update.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_help.gif b/src/usr/local/www/themes/code-red/images/icons/icon_help.gif new file mode 100644 index 0000000..84c84db Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_help.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_ifalias.gif b/src/usr/local/www/themes/code-red/images/icons/icon_ifalias.gif new file mode 100755 index 0000000..0c569a7 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_ifalias.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_ifalias_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_ifalias_d.gif new file mode 100755 index 0000000..faa84d4 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_ifalias_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_import_alias.gif b/src/usr/local/www/themes/code-red/images/icons/icon_import_alias.gif new file mode 100755 index 0000000..d11a5f0 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_import_alias.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_in.gif b/src/usr/local/www/themes/code-red/images/icons/icon_in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_in.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_in_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_in_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_info_pkg.gif b/src/usr/local/www/themes/code-red/images/icons/icon_info_pkg.gif new file mode 100755 index 0000000..cd3a532 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_info_pkg.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_interface_down.gif b/src/usr/local/www/themes/code-red/images/icons/icon_interface_down.gif new file mode 100755 index 0000000..0626655 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_interface_down.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_interface_up.gif b/src/usr/local/www/themes/code-red/images/icons/icon_interface_up.gif new file mode 100755 index 0000000..1449513 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_interface_up.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_left.gif b/src/usr/local/www/themes/code-red/images/icons/icon_left.gif new file mode 100755 index 0000000..8effefe Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_left.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_left_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_left_d.gif new file mode 100755 index 0000000..c778014 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_left_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_left_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_left_mo.gif new file mode 100755 index 0000000..84c6fa2 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_left_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_log.gif b/src/usr/local/www/themes/code-red/images/icons/icon_log.gif new file mode 100755 index 0000000..4a1983a Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_log.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_log_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_log_d.gif new file mode 100755 index 0000000..d31bd9b Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_log_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_log_s.gif b/src/usr/local/www/themes/code-red/images/icons/icon_log_s.gif new file mode 100755 index 0000000..f9fda33 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_log_s.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_log_s_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_log_s_d.gif new file mode 100755 index 0000000..fb2c05f Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_log_s_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_logs.gif b/src/usr/local/www/themes/code-red/images/icons/icon_logs.gif new file mode 100644 index 0000000..afe0104 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_logs.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_match.gif b/src/usr/local/www/themes/code-red/images/icons/icon_match.gif new file mode 100644 index 0000000..215571f Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_match.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_match_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_match_d.gif new file mode 100644 index 0000000..6e4c364 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_match_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_minus.gif b/src/usr/local/www/themes/code-red/images/icons/icon_minus.gif new file mode 100755 index 0000000..417544f Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_minus.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_open.gif b/src/usr/local/www/themes/code-red/images/icons/icon_open.gif new file mode 100755 index 0000000..ac3da14 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_open.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_other.gif b/src/usr/local/www/themes/code-red/images/icons/icon_other.gif new file mode 100755 index 0000000..e6f780f Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_other.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_other_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_other_d.gif new file mode 100755 index 0000000..b08d970 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_other_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_out.gif b/src/usr/local/www/themes/code-red/images/icons/icon_out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_out.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_out_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_out_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_parp.gif b/src/usr/local/www/themes/code-red/images/icons/icon_parp.gif new file mode 100755 index 0000000..96acaf3 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_parp.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_parp_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_parp_d.gif new file mode 100755 index 0000000..7d7d00e Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_parp_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_pass.gif b/src/usr/local/www/themes/code-red/images/icons/icon_pass.gif new file mode 100755 index 0000000..fe1bb0d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_pass.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_pass_add.gif b/src/usr/local/www/themes/code-red/images/icons/icon_pass_add.gif new file mode 100755 index 0000000..f7f4c20 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_pass_add.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_pass_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_pass_d.gif new file mode 100755 index 0000000..6adc431 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_pass_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_plus.gif b/src/usr/local/www/themes/code-red/images/icons/icon_plus.gif new file mode 100755 index 0000000..2a94eeb Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_plus.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_plus_bl.gif b/src/usr/local/www/themes/code-red/images/icons/icon_plus_bl.gif new file mode 100755 index 0000000..8dcd7c0 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_plus_bl.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_plus_bl_p.gif b/src/usr/local/www/themes/code-red/images/icons/icon_plus_bl_p.gif new file mode 100755 index 0000000..0c79849 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_plus_bl_p.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_plus_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_plus_d.gif new file mode 100755 index 0000000..ebc7457 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_plus_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_plus_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_plus_mo.gif new file mode 100755 index 0000000..1c7ca08 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_plus_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_plus_p.gif b/src/usr/local/www/themes/code-red/images/icons/icon_plus_p.gif new file mode 100755 index 0000000..eb41284 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_plus_p.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reinstall.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall.gif new file mode 100755 index 0000000..d78b867 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_d.gif new file mode 100755 index 0000000..13658f7 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_mo.gif new file mode 100755 index 0000000..90b576e Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg.gif new file mode 100755 index 0000000..9aebb03 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg_d.gif new file mode 100755 index 0000000..4ab4992 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg_mo.gif new file mode 100755 index 0000000..7025d20 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_pkg_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml.gif new file mode 100755 index 0000000..4542432 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml_d.gif new file mode 100755 index 0000000..8d3a68d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml_mo.gif new file mode 100755 index 0000000..15e0aed Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reinstall_xml_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reject.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reject.gif new file mode 100755 index 0000000..5565cd6 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reject.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_reject_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_reject_d.gif new file mode 100755 index 0000000..6c09fae Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_reject_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_right.gif b/src/usr/local/www/themes/code-red/images/icons/icon_right.gif new file mode 100755 index 0000000..fdf2d8b Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_right.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_service_restart.gif b/src/usr/local/www/themes/code-red/images/icons/icon_service_restart.gif new file mode 100755 index 0000000..e49fbd7 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_service_restart.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_service_restart_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_service_restart_d.gif new file mode 100755 index 0000000..a5d6d7c Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_service_restart_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_service_running.gif b/src/usr/local/www/themes/code-red/images/icons/icon_service_running.gif new file mode 100644 index 0000000..543fd56 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_service_running.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_service_start.gif b/src/usr/local/www/themes/code-red/images/icons/icon_service_start.gif new file mode 100755 index 0000000..09bb58f Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_service_start.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_service_start_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_service_start_d.gif new file mode 100755 index 0000000..f58f111 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_service_start_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_service_status.gif b/src/usr/local/www/themes/code-red/images/icons/icon_service_status.gif new file mode 100644 index 0000000..a93bcfb Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_service_status.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_service_stop.gif b/src/usr/local/www/themes/code-red/images/icons/icon_service_stop.gif new file mode 100755 index 0000000..922addc Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_service_stop.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_service_stop_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_service_stop_d.gif new file mode 100755 index 0000000..b4cfdea Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_service_stop_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_service_stopped.gif b/src/usr/local/www/themes/code-red/images/icons/icon_service_stopped.gif new file mode 100644 index 0000000..f93a25d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_service_stopped.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_services_restart_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_services_restart_mo.gif new file mode 100755 index 0000000..a092b40 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_services_restart_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_services_start_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_services_start_mo.gif new file mode 100755 index 0000000..ecdb58f Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_services_start_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_services_stop_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_services_stop_mo.gif new file mode 100755 index 0000000..c00e208 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_services_stop_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_system-group-grey.png b/src/usr/local/www/themes/code-red/images/icons/icon_system-group-grey.png new file mode 100755 index 0000000..d7b964d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_system-group-grey.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_system-group.png b/src/usr/local/www/themes/code-red/images/icons/icon_system-group.png new file mode 100755 index 0000000..1c974f2 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_system-group.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_system-user-grey.png b/src/usr/local/www/themes/code-red/images/icons/icon_system-user-grey.png new file mode 100755 index 0000000..2f6047d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_system-user-grey.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_system-user.png b/src/usr/local/www/themes/code-red/images/icons/icon_system-user.png new file mode 100755 index 0000000..ef82156 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_system-user.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_system_lock_screen.png b/src/usr/local/www/themes/code-red/images/icons/icon_system_lock_screen.png new file mode 100755 index 0000000..30f306d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_system_lock_screen.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_system_logout.png b/src/usr/local/www/themes/code-red/images/icons/icon_system_logout.png new file mode 100755 index 0000000..9bbb6c7 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_system_logout.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_trapped.gif b/src/usr/local/www/themes/code-red/images/icons/icon_trapped.gif new file mode 100755 index 0000000..ffeb2cd Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_trapped.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_trapped_p.gif b/src/usr/local/www/themes/code-red/images/icons/icon_trapped_p.gif new file mode 100755 index 0000000..6d46aaf Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_trapped_p.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_ts_rule.gif b/src/usr/local/www/themes/code-red/images/icons/icon_ts_rule.gif new file mode 100755 index 0000000..e15ab6c Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_ts_rule.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_ts_rule_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_ts_rule_d.gif new file mode 100755 index 0000000..f776281 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_ts_rule_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_up.gif b/src/usr/local/www/themes/code-red/images/icons/icon_up.gif new file mode 100755 index 0000000..883c5a2 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_up.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_up_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_up_d.gif new file mode 100755 index 0000000..0ddcce2 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_up_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_up_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_up_mo.gif new file mode 100755 index 0000000..9f869a4 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_up_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_wlan.gif b/src/usr/local/www/themes/code-red/images/icons/icon_wlan.gif new file mode 100755 index 0000000..1f0addc Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_wlan.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_wlan_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_wlan_d.gif new file mode 100755 index 0000000..35bf580 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_wlan_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_wol_all.gif b/src/usr/local/www/themes/code-red/images/icons/icon_wol_all.gif new file mode 100755 index 0000000..2d22182 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_wol_all.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_wzd_nsaved.png b/src/usr/local/www/themes/code-red/images/icons/icon_wzd_nsaved.png new file mode 100755 index 0000000..21cb27d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_wzd_nsaved.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_wzd_saved.png b/src/usr/local/www/themes/code-red/images/icons/icon_wzd_saved.png new file mode 100755 index 0000000..ab82946 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_wzd_saved.png differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_x.gif b/src/usr/local/www/themes/code-red/images/icons/icon_x.gif new file mode 100755 index 0000000..24e4d49 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_x.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_x_d.gif b/src/usr/local/www/themes/code-red/images/icons/icon_x_d.gif new file mode 100755 index 0000000..d2bfbc8 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_x_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_x_mo.gif b/src/usr/local/www/themes/code-red/images/icons/icon_x_mo.gif new file mode 100755 index 0000000..da7b57c Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_x_mo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/icon_x_p.gif b/src/usr/local/www/themes/code-red/images/icons/icon_x_p.gif new file mode 100755 index 0000000..8828fa6 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/icon_x_p.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/in.gif b/src/usr/local/www/themes/code-red/images/icons/in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/in.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/in_d.gif b/src/usr/local/www/themes/code-red/images/icons/in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/in_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/out.gif b/src/usr/local/www/themes/code-red/images/icons/out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/out.gif differ diff --git a/src/usr/local/www/themes/code-red/images/icons/out_d.gif b/src/usr/local/www/themes/code-red/images/icons/out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/icons/out_d.gif differ diff --git a/src/usr/local/www/themes/code-red/images/log.png b/src/usr/local/www/themes/code-red/images/log.png new file mode 100755 index 0000000..762ba80 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/log.png differ diff --git a/src/usr/local/www/themes/code-red/images/logo.gif b/src/usr/local/www/themes/code-red/images/logo.gif new file mode 100755 index 0000000..3455d6b Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/logo.gif differ diff --git a/src/usr/local/www/themes/code-red/images/logobig.jpg b/src/usr/local/www/themes/code-red/images/logobig.jpg new file mode 100755 index 0000000..62922ce Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/logobig.jpg differ diff --git a/src/usr/local/www/themes/code-red/images/logon-background.gif b/src/usr/local/www/themes/code-red/images/logon-background.gif new file mode 100755 index 0000000..0176101 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/logon-background.gif differ diff --git a/src/usr/local/www/themes/code-red/images/menu_down.gif b/src/usr/local/www/themes/code-red/images/menu_down.gif new file mode 100755 index 0000000..137de8d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/menu_down.gif differ diff --git a/src/usr/local/www/themes/code-red/images/menu_footer.gif b/src/usr/local/www/themes/code-red/images/menu_footer.gif new file mode 100755 index 0000000..d06faa4 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/menu_footer.gif differ diff --git a/src/usr/local/www/themes/code-red/images/menu_right.gif b/src/usr/local/www/themes/code-red/images/menu_right.gif new file mode 100755 index 0000000..881327c Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/menu_right.gif differ diff --git a/src/usr/local/www/themes/code-red/images/menubgr.png b/src/usr/local/www/themes/code-red/images/menubgr.png new file mode 100755 index 0000000..45e0ec7 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/menubgr.png differ diff --git a/src/usr/local/www/themes/code-red/images/menubgr_footer.png b/src/usr/local/www/themes/code-red/images/menubgr_footer.png new file mode 100755 index 0000000..5d351e4 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/menubgr_footer.png differ diff --git a/src/usr/local/www/themes/code-red/images/menubgr_highlight.png b/src/usr/local/www/themes/code-red/images/menubgr_highlight.png new file mode 100755 index 0000000..f00582b Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/menubgr_highlight.png differ diff --git a/src/usr/local/www/themes/code-red/images/metal_bgr.gif b/src/usr/local/www/themes/code-red/images/metal_bgr.gif new file mode 100755 index 0000000..a0ca6c8 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/metal_bgr.gif differ diff --git a/src/usr/local/www/themes/code-red/images/metal_bgr_red.gif b/src/usr/local/www/themes/code-red/images/metal_bgr_red.gif new file mode 100755 index 0000000..c4a1465 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/metal_bgr_red.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/background.gif b/src/usr/local/www/themes/code-red/images/misc/background.gif new file mode 100755 index 0000000..87cceb3 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/background.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/bar_blue.gif b/src/usr/local/www/themes/code-red/images/misc/bar_blue.gif new file mode 100755 index 0000000..741186a Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/bar_blue.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/bar_gray.gif b/src/usr/local/www/themes/code-red/images/misc/bar_gray.gif new file mode 100755 index 0000000..e86e245 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/bar_gray.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/bar_left.gif b/src/usr/local/www/themes/code-red/images/misc/bar_left.gif new file mode 100755 index 0000000..af751fa Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/bar_left.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/bar_right.gif b/src/usr/local/www/themes/code-red/images/misc/bar_right.gif new file mode 100755 index 0000000..ff12d9e Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/bar_right.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/bullet_toggle_minus.png b/src/usr/local/www/themes/code-red/images/misc/bullet_toggle_minus.png new file mode 100755 index 0000000..37db2fd Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/bullet_toggle_minus.png differ diff --git a/src/usr/local/www/themes/code-red/images/misc/bullet_toggle_plus.png b/src/usr/local/www/themes/code-red/images/misc/bullet_toggle_plus.png new file mode 100755 index 0000000..fba7af9 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/bullet_toggle_plus.png differ diff --git a/src/usr/local/www/themes/code-red/images/misc/button.gif b/src/usr/local/www/themes/code-red/images/misc/button.gif new file mode 100755 index 0000000..e85dbb3 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/button.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/graph.png b/src/usr/local/www/themes/code-red/images/misc/graph.png new file mode 100755 index 0000000..507ec75 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/graph.png differ diff --git a/src/usr/local/www/themes/code-red/images/misc/key_128.gif b/src/usr/local/www/themes/code-red/images/misc/key_128.gif new file mode 100755 index 0000000..ea5ae34 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/key_128.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/key_152.gif b/src/usr/local/www/themes/code-red/images/misc/key_152.gif new file mode 100755 index 0000000..6c7fc03 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/key_152.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/key_256.gif b/src/usr/local/www/themes/code-red/images/misc/key_256.gif new file mode 100755 index 0000000..3e1c377 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/key_256.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/key_64.gif b/src/usr/local/www/themes/code-red/images/misc/key_64.gif new file mode 100755 index 0000000..87892bd Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/key_64.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/left_background.gif b/src/usr/local/www/themes/code-red/images/misc/left_background.gif new file mode 100755 index 0000000..529d827 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/left_background.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/loader.gif b/src/usr/local/www/themes/code-red/images/misc/loader.gif new file mode 100755 index 0000000..5d10ac3 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/loader.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/loader_all.gif b/src/usr/local/www/themes/code-red/images/misc/loader_all.gif new file mode 100755 index 0000000..cb6bc0c Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/loader_all.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/loader_filter.gif b/src/usr/local/www/themes/code-red/images/misc/loader_filter.gif new file mode 100755 index 0000000..b838b17 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/loader_filter.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/loader_tab.gif b/src/usr/local/www/themes/code-red/images/misc/loader_tab.gif new file mode 100755 index 0000000..05bb04c Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/loader_tab.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/logon.png b/src/usr/local/www/themes/code-red/images/misc/logon.png new file mode 100755 index 0000000..7921782 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/logon.png differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_0.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_0.gif new file mode 100755 index 0000000..160b56d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_0.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_1.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_1.gif new file mode 100755 index 0000000..50342d6 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_1.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_10.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_10.gif new file mode 100755 index 0000000..06cba14 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_10.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_2.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_2.gif new file mode 100755 index 0000000..9d10230 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_2.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_3.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_3.gif new file mode 100755 index 0000000..1983f87 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_3.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_4.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_4.gif new file mode 100755 index 0000000..f7158bd Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_4.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_5.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_5.gif new file mode 100755 index 0000000..c7af593 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_5.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_6.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_6.gif new file mode 100755 index 0000000..310eb22 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_6.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_7.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_7.gif new file mode 100755 index 0000000..06bd2e8 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_7.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_8.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_8.gif new file mode 100755 index 0000000..c6ef564 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_8.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/plogo_9.gif b/src/usr/local/www/themes/code-red/images/misc/plogo_9.gif new file mode 100755 index 0000000..4f0cd4d Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/plogo_9.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/progress_bar.gif b/src/usr/local/www/themes/code-red/images/misc/progress_bar.gif new file mode 100755 index 0000000..3b4aa52 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/progress_bar.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/rrd_error.png b/src/usr/local/www/themes/code-red/images/misc/rrd_error.png new file mode 100755 index 0000000..a79ecf3 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/rrd_error.png differ diff --git a/src/usr/local/www/themes/code-red/images/misc/status_alerter.gif b/src/usr/local/www/themes/code-red/images/misc/status_alerter.gif new file mode 100755 index 0000000..7ff1e95 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/status_alerter.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/status_carpmaster.gif b/src/usr/local/www/themes/code-red/images/misc/status_carpmaster.gif new file mode 100755 index 0000000..2c32908 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/status_carpmaster.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/status_left.gif b/src/usr/local/www/themes/code-red/images/misc/status_left.gif new file mode 100755 index 0000000..b5a2930 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/status_left.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/status_page_loading.gif b/src/usr/local/www/themes/code-red/images/misc/status_page_loading.gif new file mode 100755 index 0000000..067ef18 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/status_page_loading.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/status_reload_all.gif b/src/usr/local/www/themes/code-red/images/misc/status_reload_all.gif new file mode 100755 index 0000000..72de6bd Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/status_reload_all.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/status_reload_filter.gif b/src/usr/local/www/themes/code-red/images/misc/status_reload_filter.gif new file mode 100755 index 0000000..d72761a Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/status_reload_filter.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/status_right.gif b/src/usr/local/www/themes/code-red/images/misc/status_right.gif new file mode 100755 index 0000000..bf66fdb Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/status_right.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/tri_c.gif b/src/usr/local/www/themes/code-red/images/misc/tri_c.gif new file mode 100755 index 0000000..317b758 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/tri_c.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/tri_c_black.gif b/src/usr/local/www/themes/code-red/images/misc/tri_c_black.gif new file mode 100755 index 0000000..309846e Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/tri_c_black.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/tri_o.gif b/src/usr/local/www/themes/code-red/images/misc/tri_o.gif new file mode 100755 index 0000000..eb95c32 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/tri_o.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/tri_o_black.gif b/src/usr/local/www/themes/code-red/images/misc/tri_o_black.gif new file mode 100755 index 0000000..f818f3b Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/tri_o_black.gif differ diff --git a/src/usr/local/www/themes/code-red/images/misc/widget_loader.gif b/src/usr/local/www/themes/code-red/images/misc/widget_loader.gif new file mode 100755 index 0000000..ca35e2a Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/misc/widget_loader.gif differ diff --git a/src/usr/local/www/themes/code-red/images/new_tab_menu.png b/src/usr/local/www/themes/code-red/images/new_tab_menu.png new file mode 100755 index 0000000..4bdfcef Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/new_tab_menu.png differ diff --git a/src/usr/local/www/themes/code-red/images/status.png b/src/usr/local/www/themes/code-red/images/status.png new file mode 100755 index 0000000..a3e368e Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/status.png differ diff --git a/src/usr/local/www/themes/code-red/images/transparent.gif b/src/usr/local/www/themes/code-red/images/transparent.gif new file mode 100755 index 0000000..89c5530 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/transparent.gif differ diff --git a/src/usr/local/www/themes/code-red/images/transparent_pixel.gif b/src/usr/local/www/themes/code-red/images/transparent_pixel.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/src/usr/local/www/themes/code-red/images/transparent_pixel.gif differ diff --git a/src/usr/local/www/themes/code-red/javascript/ie7/blank.gif b/src/usr/local/www/themes/code-red/javascript/ie7/blank.gif new file mode 100755 index 0000000..a4fe2e6 Binary files /dev/null and b/src/usr/local/www/themes/code-red/javascript/ie7/blank.gif differ diff --git a/src/usr/local/www/themes/code-red/javascript/ie7/ie7-box-model.js b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-box-model.js new file mode 100755 index 0000000..45543f6 --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-box-model.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-box-model",function(){var NUMERIC="\x5cs*:\x5cs*\x5cd[\x5cw%]*",UNIT=/^\d\w*$/,PERCENT=/^\d+%$/,PIXEL=/^\d+(px)?$/;var MATCH=(appVersion<6)?/\b(min|max)-(width|height)\s*:\s*\d/gi:/\b(min|max)-width\s*:\s*\d/gi;var AUTO=(appVersion<5.5)?/^auto|0cm$/:/^auto$/;var ie7_tmp=tmpElement();push(IE7.recalcs,function removeTempElement(){if(ie7_tmp.parentElement)ie7_tmp.parentElement.removeChild(ie7_tmp)});CSSFixes.addFix(MATCH,function(match){return match.slice(0,3)+match.charAt(4).toUpperCase()+match.slice(5)});var viewport=(quirksMode)?document.body:documentElement;function isFixed(element){return element.style.position=="fixed"||element.currentStyle.position=="fixed"};function layoutParent(element){var layoutParent=element.offsetParent;while(layoutParent&&!hasLayout(layoutParent))layoutParent=layoutParent.offsetParent;if(!layoutParent||isFixed(element))layoutParent=viewport;return layoutParent};function fixWidth(HEIGHT){fixWidth=function(element,value){if(!element.runtimeStyle.fixedWidth&&(!isHTML||element.tagName!="HR")){if(!value)value=element.currentStyle.width;element.runtimeStyle.fixedWidth=(UNIT.test(value))?Math.max(0,getFixedWidth(element,value)):value;element.runtimeStyle.width=element.runtimeStyle.fixedWidth;boxSizing(element)}};if(quirksMode)CSSFixes.addRecalc("width\x5cs*:\x5cs*\x5cd\x5cw*[^%]",fixWidth);var getFixedWidth=(quirksMode)?function(element,value){return getPixelWidth(element,value)+getBorderWidth(element)+getPaddingWidth(element)}:function(element,value){return getPixelWidth(element,value)};function getBorderWidth(element){return element.offsetWidth-element.clientWidth};function getPaddingWidth(element){return getPixelWidth(element,element.currentStyle.paddingLeft)+getPixelWidth(element,element.currentStyle.paddingRight)};function getMarginWidth(element){return((element.currentStyle.marginLeft=="auto")?0:getPixelLeft(element,element.currentStyle.marginLeft))+((element.currentStyle.marginRight=="auto")?0:getPixelLeft(element,element.currentStyle.marginRight))};function minWidth(element){minWidth[minWidth.count++]=element;if(element.currentStyle.minHeight=="auto")element.runtimeStyle.minHeight=0;fixWidth(element);boxSizing(element);resizeWidth(element)};minWidth.count=0;CSSFixes.addRecalc("min-width"+NUMERIC,minWidth);eval(String(minWidth).replace(/min/g,"max"));maxWidth.count=0;CSSFixes.addRecalc("max-width"+NUMERIC,maxWidth);function resizeWidth(element){var rect=element.getBoundingClientRect();var width=rect.right-rect.left;if(element.currentStyle.maxWidth&&width>=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)}); diff --git a/src/usr/local/www/themes/code-red/javascript/ie7/ie7-core.js b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-core.js new file mode 100755 index 0000000..b11e2b1 --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-core.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/code-red/javascript/ie7/ie7-css-strict.js b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-css-strict.js new file mode 100755 index 0000000..4406d7a --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-css-strict.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-strict",function(){if(!modules["ie7-css2"])return;var NONE=[],ID=/#/g,CLASS=/[:@\.]/g,TAG=/^\w|[\s>+~]\w/g;IE7.parser.parse=function(cssText){var DYNAMIC=new RegExp("(.*):("+dynamicPseudoClasses+")(.*)");function addRule(selector,cssText){var match=selector.match(DYNAMIC);if(match)new DynamicRule(selector,match[1],match[2],match[3],cssText);else new Rule(selector,cssText)};cssText=cssText.replace(IE7.PseudoElement.ALL,IE7.PseudoElement.ID);var RULE=/([^\{]+)\{(\d+)\}/g,match;while(match=RULE.exec(cssText)){addRule(match[1],match[2]);if(appVersion<5.5)cssText=cssText.slice(match.lastIndex)}IE7.classes.sort(Rule.compare);return IE7.classes.join("\n")};function Rule(selector,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.Class;this.inherit(selector)};Rule.prototype=new IE7.Class.ancestor;Rule.prototype.toString=function(){return "."+this.name+"{"+this.cssText+"}"};Rule.score=function(selector){return(selector.match(ID)||NONE).length*10000+(selector.match(CLASS)||NONE).length*100+(selector.match(TAG)||NONE).length};Rule.compare=function(rule1,rule2){return rule1.specificity-rule2.specificity};function DynamicRule(selector,attach,dynamicPseudoClass,target,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.DynamicStyle;this.inherit(selector,attach,dynamicPseudoClass,target)};DynamicRule.prototype=new IE7.DynamicStyle.ancestor;DynamicRule.prototype.toString=Rule.prototype.toString}); diff --git a/src/usr/local/www/themes/code-red/javascript/ie7/ie7-css2.js b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-css2.js new file mode 100755 index 0000000..7121c8e --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-css2.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i"){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!ù.´)Ó £(){ÿ{ù.´=ª;¢ ¢Æ=ª.¢´=Ó ¤×;£ ¢©(){if(«.¢Ù)«.¢Ù.Í.¤Ö=¤þ};ª.Õ=£(){¤ ¤ÿ};¢ â=(¤Ù.±(¢î.£Ë))?£(£Ì){ù.â(´+¥¡+£Ì)}:¢Æ;¢ Å=¤Ñ.Å.¬(¤Ú)[1];if(¤Û.±(¢î.£Ë)||Å<5||!¤Ü.±(«.Ù.ü))¤ ¢©();¢ è=¢£(«.¤Í!=¥¢);¢ ë=(¤Ë «.£Ê==¥£)?!¤Ýi.±(¢î.¢Ç):¢£(«.£Ê!=¥¤);¢ ¢í=¥¥;¢ ¢ë=¢í;if(!ë)¢ë+=¥¦;¢ ¢¹;¢ Ù=«.Ù;¢ ó={};ª.¢´=£(£È,ô,£É){if(!ó)¤;if(¢«)¢¬(¥§+¢Î(ô));if(£É){ô();ô=¢Æ}ó[£È]=ô};¢ £Ç=¤Þ;£ ¢È(²,¹){if(£Ç.±(²))²=(¹||¥¨)+²;¤ ²};£ ¢Ä(²,¹){²=¢È(²,¹);¤ ².»(0,².£Ã(¥©)+1)};¢ ¹=¢Ä(«.£Æ[«.£Æ.­-1].¤Å);¢ ¢Ê=Ó ¤Ä(¥ª);£ ã(²,¹){ÿ{²=¢È(²,¹);¢Ê.¤Á(¥«,²,Þ);¢Ê.¤¿();¤ ¢Ê.¤¾}õ(¢à){â(¥¬+²);¤ ¥¨}};¢ ·=£(¢É,¢À){¤ ¢É.·(¢À)};¢ ¢½=£(¢É){¤ ¢É.¢½()};if(Å<5.5)¢¬(ã(¥­,¹));if(«.¢Í==¥®||!ë)«.¤¹();Ö «.¤¸(¥¯);ª.¶=«.É[«.É.­-1];ª.¶.§=¢í;ª.¶.Æ=×;¢ §={};£ £¿(¶,¹){¢ ¢§=¢È(¶.²,¹);if(§[¢§])¤ ¥¨;§[¢§]=(¶.ý)?¥¨:£Å(¢Ã(¶,¹),¢Ä(¶.²,¹));¤ §[¢§]};¢ ¢Ã=£(¶){¤ ¶.§};¢ £Ä=¤ßgi;£ £Å(§,¢Ç){¤ §.³(£Ä,¥°+¢Ç.»(0,¢Ç.£Ã(¥©)+1)+¥±)};ª.Ë=[];ª.£¾=¢Æ;¢ ä=Þ;£ _ã(){ÿ{ä=×;¢ £Á=¤ài;¢ É=«.É;¢ ¢ì=[];¢ ¢Å=«.£µ(¥²);¯(¢ i=¢Å.­-1;i>=0;i--){·(¢ì,¤á.±(¢Å[i].£Â)?¥¨:¢Å[i].£Â)}£ ¢Ã(¶,¹){¢ §=¥¨;if(£Á.±(¶.¤µ)){¯(¢ i=0;i<¶.£À.­;i++){§+=¢¡.¤´(¶.£À[i],¢Ä(¶.²,¹))}§+=((¶.²)?£¿(¶,¹):¢½(¢ì))}¤ §};´.§=¥¨;¯(i=0;i<É.­;i++)´.§+=¢Ã(É[i],¥¨);´.§=£´(´.§);¯(i in ó)ó[i]();£¦ ó;if(¢¹)¢¹.¢·();Ñ.¢·();´.£¾();´.¶.§=¢ë+£³(´.§);¯(i=0;i<É.­;i++){if(!É[i].ý&&!É[i].Æ)É[i].§=¥¨}´.¢Â();â(¥³)}õ(¢¨){â(¥´+¢¨.¢ï)}¢Ë{¢©()}};ª.¢Â=£(){Ñ.¢Â();¯(¢ i=0;i<ª.Ë.­;i++)ª.Ë[i]()};¢ Ñ=Ó £(){¢ Ç=[];ª.û=£(){·(Ç,¢¡)};¢ Ë=[];ª.Ú=£(á,¢Þ){¢ £½=Ó ¢æ(¥µ+á,¥¶);¢ §=´.§;á=[];Ê(¬=£½.¤²(§)){·(á,¬[1]);if(Å<5.5)§=§.»(¬.¤±)}if(á.­){á=á.Õ();·(Ë,¢¡)}};ª.¢·=£(){¯(¢ i=0;i<Ç.­;i++){´.§=´.§.³(Ç[i][0],Ç[i][1])}ª.Ú(¥·,é);ª.Ú(¥¸,£(¡){if(¡.¢².©.Ü==¥¹)é(¡.¢²)})};ª.¢Â=£(){¯(¢ i=0;i<Ë.­;i++){¢ î=¢¶(Ë[i][0]);¯(¢ j=0;j<î.­;j++)Ë[i][1](î[j])}};ª.û(¤âgi,¥º);if(Å<6)ª.û(¤ãgi,¥»);if(è){¢ à=¥¼.¢ç(¥½);¯(¢ i=0;i<à.­;i++)à[à[i]]=à[i-1]||¥¾;£ ³($,$1,$2,$3){¤ $1+à[$3]};ª.û(Ó ¢æ(¥¿+à.¢å(¥À)+¥Á,¥¶),³)}};¢ £¹=¤ä;¢ £¸=¤åg;¢ £·=¤æ;¢ £¼=¤çg;¢ £»=¥Â;¢ þ={};£ ¢¶(µ,¦){¢ ¢è=!¦;¢ ¢é=(¦)?(¦.¤§==¤¦)?¦:[¦]:[«];¢ ñ=µ.³(£¼,£»).¢ç(¥½);¢ ¬=[];¯(¢ i=0;i<ñ.­;i++){µ=£º(ñ[i]);if(µ.»(0,3).¢å(¥¨)==¥Ã){µ=µ.»(2);¦=£¶(¢é,µ[1])}Ö ¦=¢é;¢ j=0,ß,®,Á,ò=¥¨;Ê(j<µ.­){ß=µ[j++];®=µ[j++];ò+=ß+®;Á=¥¨;if(µ[j]==¥Ä){Ê(µ[j++]!=¥Á)Á+=µ[j];Á=Á.»(0,-1);ò+=¥Ä+Á+¥Á}¦=(¢è&&þ[ò])?þ[ò]:¢ß(¦,ß,®,Á);if(¢è)þ[ò]=¦}¬=¬.¤¥(¦)}¤ ¬};£ £º(µ){if(£¹.±(µ))µ=¥Å+µ;¤ µ.¬(£¸)};£ ¢ß(¦,ß,®,Á){¢ À=¥¨;if(£·.±(®)){®=®.¢ç(¥À);À=®[0];®=®[1]}¢ ¸=[];if(ñ[ß])ñ[ß](¸,¦,®,À||Á);¤ ¸};£ £¶(¦,id){¢ ¸=[],i,j;¯(i=0;i<¦.­;i++){¢ ¬=¦[i].ì.¢À(id);if(¬){if(¬.­==¤¤)·(¸,¬);Ö ¯(j=0;j<¬.­;j++)·(¸,¬[j])}}¤ ¸};¢ ñ={¥Å:£(¸,¦,®,À){¯(¢ i=0;i<¦.­;i++){¢ ¢¦=(®==¥Æ&&¦[i].ì)?¦[i].ì:¦[i].£µ(®);¯(¢ j=0;j<¢¦.­;j++){if(ï(¢¦[j])&&(!À||¢¦[j].À==À))·(¸,¢¦[j])}}},¥Ç:£(¸,¦,®){¯(¢ i=0;i<¦.­;i++)if(¦[i].id==®)·(¸,¦[i])},¥È:£(¸,¦,®){®=Ó ¢æ(¥É+®+¥Ê);¯(¢ i=0;i<¦.­;i++)if(®.±(¦[i].¤£))·(¸,¦[i])},¥Ë:£(¸,¦,®,Á){®=¢ä[®];if(®)¯(¢ i=0;i<¦.­;i++)if(®(¦[i],Á))·(¸,¦[i])}};¢ ¤¢=¥¨;¢ ¢ä={Õ:£(){¢ Õ=[];¯(¢ ð in ª){if(ð!=¥Ì&&ð!=¥Í){if(ª[ð].­>1)ð+=¥Î;·(Õ,ð)}}¤ Õ.¢å(¥À)},¥Ì:£(¡){¤ ¢£(¡.©[¥Ï]==¥Ì)},¥Í:£(¡){¤ ¢£(¡.©[¥Ï]==¥Í)}};¢ ¤¡={Õ:¢ä.Õ};£ £ÿ(¡,º,À){if(À&&¡.À!=À)¤ Þ;¤(º==¥Æ)?ï(¡):(ë)?(¡.º==º.¢ý()):(¡.º==º)};¢ ¢¾=[];£ £þ(¢¿){¤ ¢».±(¢¿)?¢¾[¢¿.»(1,-1)]:¢¿};¢ £´=£(§){¤ §.³(¤èg,£(¬){¤(¬.¢þ(0)==¥©)?¥¨:¥Ð+(·(¢¾,¬.»(1,-1))-1)+¥Ð}).³(¤ég,¥¨).³(¤êg,¥À).³(¤ëg,¥°)};£ £³(§){¤ §.³(¤æg,¥Ñ).³(¤ìg,£(¬,£²){¤ ¢¾[£²]})};¢ ¢¼=[];£ ö(¡,Ý,Ô){¡.£±(Ý,Ô);·(¢¼,¢¡)};£ £°(¡,Ý,Ô){ÿ{¡.£û(Ý,Ô)}õ(¢à){}};ù.£±(¥Ò,£(){Ê(¢¼.­){¢ Ô=¢½(¢¼);£°(Ô[0],Ô[1],Ô[2])}});¢ ¢³=(Å<6)?£(¡){¤ ¡.Ä}:£(¡){¤ ¡.©.¢³};£ é(¡){if(!¢³(¡)){¡.£ù=Þ;£¯(£«(¡))}};£ £¯(¡){Ê(¡){¡.°.£®=¡.©.£®;¡=¢â(¡)}};¢ ¢»=¤í;£ £ø(¥){¤(¢».±(¥))?¥:¥Ð+¥+¥Ð};£ £÷(¥){¤(¢».±(¥))?¥.»(1,-1):¥};£ £¡(º){¢ ¡=«.£ª(º||¥Ó);¡.Í.§=¥Ô;¤ ¡};£ ï(¢¢){¤ ¢£(¢¢&&¢¢.£ñ==1&&¢¢.º!=¥Õ&&!¢¢.£ð)};£ £ï(¡){Ê(¡&&(¡=¡.£î)&&!ï(¡))£¬;¤ ¡};£ ¢â(¡){Ê(¡&&(¡=¡.Ì)&&!ï(¡))£¬;¤ ¡};£ £«(¡){¡=¡.£í;¤(ï(¡))?¡:¢â(¡)};¢ ¢«=Þ;´.¢´(¥Ö,£(){if(ë)¢¹=Ó £(){¢ Ç=[];£ ¢Þ(¡){¢ ¢¸=«.£ª(¥×+¡.¢µ.»(1));if(¡.¢µ.»(-2)!=¥Ø){¢ £©=¥Ù+¡.º+¥Ú,Ì;Ê((Ì=¡.Ì)&&Ì.¢µ!=£©){¡.¢á.¢Ú(Ì);¢¸.¢Ï(Ì)}if(Ì)¡.¢á.¢Ú(Ì)}¡.¢á.£ë(¢¸,¡);¤ ¢¸};ª.í=£(){·(Ç,¢¡)};ª.¢·=£(){ÿ{if(Å>5)«.£ê.í(¥Û,¥Ü)}õ(¢à){}¢Ë{¯(¢ i=0;i<Ç.­;i++){¢ î=¢¶(Ç[i][0]);¯(¢ j=0;j<î.­;j++)Ç[i][1](î[j])}}};ª.í(¥Ý,£(¡){if(!¡.£§){¢ Ò=¢¶(¥Þ,¡)[0];if(Ò){if(!Ò.id)Ò.id=Ò.ü;¡.£§=Ò.id}}});ª.í(¥ß,£(¡){¢Þ(¡);£¦ þ[¥à]});ª.í(¥á,£(¡){if(¡.º==¥â){¢ ¬=¡.¢µ.¬(¤îi);¡.°.¥=(¬)?¬[1]:¥¨}if(¡.Ý==¥ã){ö(¡,¥ä,£(){¡.°.¢Ý=×;¢ª(¥å+¡.ü+¥æ,1)})}});ª.í(¥ç,£(¡){¢ ££=¤ï;ö(¡,¥è,£(){¯(¢ i=0;i<¡.­;i++){if(££.±(¡[i].Ý)&&!¡[i].ý&&!¡[i].°.¢Ý){¡[i].ý=×;¢ª(¥å+¡[i].ü+¥é,1)}Ö if(¡[i].º==¥â&&¡[i].Ý==¥ã){¢ª(¥å+¡[i].ü+¥ê+¡[i].¥+¥Ð,1);¡[i].¥=¡[i].°.¥}}})})}},×);´.¢´(¥ë,£(){¢ ¢¯=¥ì,¢û=¤ð,¢ñ=¤ñ,¢Ð=¤ò;¢ ¢ÿ=(Å<6)?¤ógi:¤ôgi;¢ ¢ö=(Å<5.5)?¤õ:¤ö;¢ Ã=£¡();·(´.Ë,£ ¢ò(){if(Ã.Î)Ã.Î.¢Ú(Ã)});Ñ.û(¢ÿ,£(¬){¤ ¬.»(0,3)+¬.¢þ(4).¢ý()+¬.»(5)});¢ ¢ü=(è)?«.¢Ù:Ù;£ ¢Ó(¡){¤ ¡.Í.Ü==¥í||¡.©.Ü==¥í};£ ¾(¡){¢ ¾=¡.¢²;Ê(¾&&!¢³(¾))¾=¾.¢²;if(!¾||¢Ó(¡))¾=¢ü;¤ ¾};£ å(¢ó){å=£(¡,¥){if(!¡.°.¿&&(!ë||¡.º!=¥î)){if(!¥)¥=¡.©.¨;¡.°.¿=(¢û.±(¥))?£Þ.ú(0,ê(¡,¥)):¥;¡.°.¨=¡.°.¿;é(¡)}};if(è)Ñ.Ú(¥ï,å);¢ ê=(è)?£(¡,¥){¤ ç(¡,¥)+¢Õ(¡)+¢Ô(¡)}:£(¡,¥){¤ ç(¡,¥)};£ ¢Õ(¡){¤ ¡.¢Ñ-¡.Ä};£ ¢Ô(¡){¤ ç(¡,¡.©.£Ý)+ç(¡,¡.©.£Ü)};£ ¢ô(¡){¤((¡.©.¢ù==¥ð)?0:÷(¡,¡.©.¢ù))+((¡.©.¢ø==¥ð)?0:÷(¡,¡.©.¢ø))};£ ¼(¡){¼[¼.Ï++]=¡;if(¡.©.¢÷==¥ð)¡.°.¢÷=0;å(¡);é(¡);¢®(¡)};¼.Ï=0;Ñ.Ú(¥ñ+¢¯,¼);¢¬(¢Î(¼).³(¤÷g,¥ò));Ð.Ï=0;Ñ.Ú(¥ó+¢¯,Ð);£ ¢®(¡){¢ ¢°=¡.¢õ();¢ ¨=¢°.æ-¢°.Â;if(¡.©.Ð&&¨>=ê(¡,¡.©.Ð))¡.°.¨=ê(¡,¡.©.Ð);Ö if(¡.©.¼&&¨<=ê(¡,¡.©.¼))¡.°.¨=ê(¡,¡.©.¼);Ö ¡.°.¨=¡.°.¿};£ Ø(¡){if((¡.©.Ü==¥ô||¡.©.Ü==¥í)&&¡.©.Â!=¥ð&&¡.©.æ!=¥ð&&¢ö.±(¡.©.¨)){Ø[Ø.Ï++]=¡;é(¡);¢Ò(¡)}};Ø.Ï=0;Ñ.Ú(¥õ+¢¯,Ø);£ ¢Ò(¡){¡.°.¨=¥¨;¢ Î=¾(¡);¢ Â=(¡.°.£Û)?¡.¢õ().Â-2:÷(¡,¡.©.Â);¢ ¨=Î.Ä-÷(¡,¡.©.æ)-Â-¢ô(¡);if(!è)¨-=¢Õ(¡)+¢Ô(¡);if(¨<0)¨=0;if(¢Ó(¡)||¢ó||¡.¢Ñ<¨){¡.°.¿=¨;¡.°.¨=¨}};¢ Ä=Ù.Ä;ö(ù,¥ö,£(){¢ i,ø=(Ä<Ù.Ä);Ä=Ù.Ä;¯(i=0;i<¼.Ï;i++){¢ ¡=¼[i];¢ ¿=(¡.°.¨==¡.©.¼);if(ø&&¿)¡.°.¨=¥¨;if(ø==¿)¢®(¡)}¯(i=0;i<Ð.Ï;i++){¢ ¡=Ð[i];¢ ¿=(¡.°.¨==¡.©.Ð);if(!ø&&¿)¡.°.¨=¥¨;if(ø!=¿)¢®(¡)}¯(i=0;i<Ø.Ï;i++)¢Ò(Ø[i]);¢ò()});£ ç(¡,¥){if(¢Ð.±(¥))¤ ¢­(¥);if(¢ñ.±(¥))¤ ¢­(£Ù(¥)/100*¾(¡).Ä);¢ Î=(¡.£Ø)?¡:¡.Î;Î.¢Ï(Ã);Ã.Í.¨=¥;¤ Ã.¢Ñ};£ ÷(¡,¥){if(¢­(¥)>0)¤ ç(¡,¥);if(¢Ð.±(¥))¤ ¢­(¥);¡.Î.¢Ï(Ã);Ã.Í.Â=¥;¤ Ã.£×}};¢¬(¢Î(å).³(¤øg,¥÷).³(¤ùg,¥ø).³(¤úg,¥ù).³(¤ûg,¥ú).³(¤üg,¥û).³(¤ýg,¥ü));å();£Î(×)});¢«=×;if(«.¢Í==¥®)_ã();Ö ö(«,¥ý,£(){if(!ä&&«.¢Í==¥®)¢ª(_ã,0)})}õ(¢¨){¢©();â(¥þ+¢¨.¢ï)}¢Ë{}}();',340,0,/./,String,95,'element`var`function`return`value`from`cssText`width`currentStyle`this`document`match`length`filter`for`runtimeStyle`test`href`replace`IE7`selector`styleSheet`push`filtered`path`tagName`slice`minWidth`x5cs`layoutParent`fixedWidth`scopeName`filterArgs`left`ie7_tmp`clientWidth`appVersion`ie7`fixes`link`styleSheets`while`recalcs`nextSibling`style`parentElement`count`maxWidth`CSSFixes`input`new`handler`toString`else`true`fixRight`documentElement`addRecalc`auto`position`type`false`token`SIZES`pattern`alert`load`complete`fixWidth`right`getPixelWidth`quirksMode`boxSizing`getFixedWidth`isHTML`all`add`elements`isElement`pseudoClass`selectors`cacheSelector`modules`script`catch`addEventHandler`getPixelLeft`wider`window`max`addFix`uniqueID`disabled`cssCache`try`arguments`node`Boolean`x5c`visited`subset`url`error`unHide`setTimeout`loaded`eval`parseInt`resizeWidth`NUMERIC`rect`min`offsetParent`hasLayout`addModule`outerHTML`cssQuery`apply`fixedElement`HTMLFixes`display`QUOTED`handlers`pop`strings`string`item`small`recalc`getCSSText`getPath`styles`DUMMY`pathname`makePath`array`httpRequest`finally`Error`readyState`String`appendChild`PIXEL`offsetWidth`resizeRight`isFixed`getPaddingWidth`getBorderWidth`fixed`absolute`x5cw`body`removeChild`box`submit`clicked`fix`select`ignore`parentNode`nextElement`x2f`pseudoClasses`join`RegExp`split`useCache`base`large`HEADER`inlineStyles`LINKS`location`description`height`PERCENT`removeTempElement`HEIGHT`getMarginWidth`getBoundingClientRect`AUTO`minHeight`marginRight`marginLeft`x5cd`UNIT`viewport`toUpperCase`charAt`MATCH`tmpElement`BUTTON`UNSUCCESSFUL`button`abbr`delete`htmlFor`HTML`endTag`createElement`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`decode`encode`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`parse`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`name`autoload`mimeType`search`message`onreadystatechange`fixHeight`bottom`Bottom`Right`top`Top`Left`Height`Width`offsetLeft`canHaveChildren`parseFloat`onresize`screenLeft`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`firstChild`previousSibling`previousElement`ie7_anon`nodeType`clip`none`border`padding`object`unquote`quote`contentEditable`onbeforeunload`detachEvent`import`namespace`getString`compareTagName`dynamicPseudoClasses`attributeTests`className`null`concat`Array`constructor`size`font`medium`list`inline`float`relative`content`sizing`lastIndex`exec`successfully`callee`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`Microsoft`ActiveXObject`src`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ms_`ie7_off`MSIE`navigator`ie7_debug`alpha`version`visible`visibility`Function`fromCharCode`¤Ò`¤Ð (\\d\\.\\d)`¤Ï`^¤Î`\\.¤É$`^[\\w\\.]+[^:]*$`(¢§\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¤·\\b|\\¤¶\\b|^$`Æ-È`(¤­\\s*:\\s*(Â|æ))`¢º\\s*:\\s*¤«-¢À`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢ã\\*[^\\*]*\\*+([^\\¢ã][^\\*]*\\*+)*\\¢ã)|(\x27[^\x27]*\x27)|("[^"]*")`@(£ý|£ü)[^;\\n]+[;\\n]|`\\¢¤:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ¥="([^"]*)"`^(¢Ü|£á|£¤)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(¢±|ú)-(¨|¢ð)\\s*:\\s*\\d`\\b(¢±|ú)-¨\\s*:\\s*\\d`^Û|0cm$`^Û$`¢±`£Ö`¨`£Ô`Â`£Ñ`æ`¤Õ`´ ¤Ô 0.7.3 (¤Ó)`\\n\\n`¤Ì`¤Ê`¤È ¤Ç`:È{Æ-È:È}:¢¥{Æ-È:¢¥}`*{¤Æ:0}`ô=``/`¤Ã.¤Â`¤À`¢Ì [1]: ¤½ ¤¼ ã ¤» `Æ-¤º.js`ä`<Í>`$1`$2`Í`¢« ¤³`¢Ì [2]: `([^{}]*)\\¢¤{([^}]*[^\\¢Ø-])?`gi`¢Û-¤°\\½*:\\½*¤¯-¢Û`Ü\\½*:\\½*¢×`¤®`¢º:¤¬;$1`¢º:£­`xx-¢Á,x-¢Á,¢Á,¤ª,¢ê,x-¢ê,xx-¢ê`,`xx-¢Á`(¤©(-¤¨)?\\½*:\\½*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\½)`(\\½|$)`:`È`¢¥`\\¢¤([^)]*\\¢¤)`Æ-È`\x27`\\¢¤:`£ú`£ö`Ü:¢×;£õ:0;¢º:£­;£ô:£ó;£ò:¢°(0 0 0 0);Â:-9999`!`Æ-£ì`<£¨:`/>``£¨`£é://£è.w3.£ç/1999/£æ`£å`Ò,¢ß,£ä`£¥` £¥`£¤,Ò`£¢`¢Ü`£ã`«.ì.`.°.¢Ý=Þ`£â`£à`.ý=Þ`.¥=\x27`Æ-¢Û-£ß`\\½*:\\½*\\¢ú[\\¢Ø%]*`¢Ö`HR`¨\\½*:\\½*\\¢ú\\¢Ø*[^%]`Û`¢±-¨`ú`ú-¨`¢×`æ`£Ú`£Õ`¢ð`£Ó`£Ò`£Ð`£Ï`£Í`¢Ì [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/code-red/javascript/ie7/ie7-lite.js b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-lite.js new file mode 100755 index 0000000..88c764f --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-lite.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/code-red/javascript/ie7/ie7-png.js b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-png.js new file mode 100755 index 0000000..7b8f2cf --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-png.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-png",function(){if(appVersion<5.5)return;var FILTER="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=%1,sizingMethod='scale')";var NULL=(/\bSV1\b/.test(navigator.userAgent))?makePath("blank.gif",path):"javascript:'#define x_width 1\x5cn#define x_height 1\x5cnstatic char x_bits[]={0x00}'";var pngTest=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");function addFilter(element,src){element.runtimeStyle.filter=FILTER.replace(/%1/,src)};var MATCH=/background(-image)?\s*:([^(};]*)url\(([^\)]+)\)([^;}]*)/gi;CSSFixes.addFix(MATCH,function replace(match,image,prefix,url,suffix){url=getString(url);return pngTest.test(url)?"filter:"+FILTER.replace(/scale/,"crop").replace(/%1/,url)+";zoom:1;background"+(image||"")+":"+(prefix||"")+"none"+(suffix||""):match});if(HTMLFixes){function fixImg(element){if(pngTest.test(element.src)){var width=element.width,height=element.height;addFilter(element,element.src);element.src=NULL;element.width=width;element.height=height}else element.runtimeStyle.filter=""};HTMLFixes.add("img,input",function(element){if(element.tagName=="INPUT"&&element.type!="image")return;fixImg(element);addEventHandler(element,"onpropertychange",function(){if(event.propertyName=="src")fixImg(element)})})}}); diff --git a/src/usr/local/www/themes/code-red/javascript/ie7/ie7-server.css b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-server.css new file mode 100755 index 0000000..47c7edd --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-server.css @@ -0,0 +1,43 @@ +body, td, dd {font: 10pt Verdana, Arial, Helvetica, sans-serif; color: black;} +body {margin: 8px; background: #333;} +h1 {margin: 0;} +h1 a:hover {background-color: transparent;} +h2 {font-size: 1.75em;} +h3 {font-size: 1.1em;} +a:active {color: #ff0000;} +a:link {color: #0a6cce;} +a:visited {color: #0a6cce;} +code, *.code {font-family: monospace; font-size: 100%; font-style: normal; white-space: nowrap; + padding: 0 1px; background: #f2f3f8; border: #d6d9e9 1px solid;} +code.box {display: block; padding: 10px; margin: 0.5em 0;} +ul {list-style-type: square;} +dd {margin: .2em 0 .5em 1em;} +dl.library dt {display: list-item; margin-left: 3em; list-style-type: square;} +dl.library dd {font-style: italic; margin-left: 3em;} +dt {font-weight: bold;} +dt.pack {color: brown;} +a img {border-style: none;} +hr {height: 1px; color: #000; border-style: solid;} +hr.short {height: 2px; width: 100px;} +div.document {background: #eef; padding: 20px 20px 5px 20px; width: 600px; border: 1px solid black;} +hr {border-bottom-width: 0px;} +div.header hr {color: #0a6cce; background-color: #0a6cce;} +div.content {min-height: 100px;} +div.footer hr {color: #898e79; background-color: #898e79; } +div.header, div.header a:link, div.header a:visited, h3 a:link, h3 a:visited {text-decoration: none;} +a:hover {color: #fff; background-color: #0a6cce; text-decoration: none;} +div.footer a:hover {background-color: transparent; text-decoration: none;} +div.header .menu {text-align: right;} +div.footer {font-size: x-small; margin-top: 8px;} +div.footnote {font-family: "times new roman", times; font-style: italic; margin-top: 10px;} +#license {margin-top: 5px; font-size: xx-small;} +table {border-top: 1px solid #000; border-left: 1px solid #000;} +th {background-color: #fff; text-align: left;} +th, td {border-right: 1px solid #000; border-bottom: 1px solid #000;} +th.small {width: 100px;} +th.medium {width: 200px;} +th.large {width: 270px;} +th.x-large {width: 408px;} +table.fixed {table-layout: fixed;} +span.comment {color: #666;} + diff --git a/src/usr/local/www/themes/code-red/javascript/ie7/ie7-standard-p.js b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-standard-p.js new file mode 100644 index 0000000..73e99ac --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-standard-p.js @@ -0,0 +1,3 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +eval(function(A,r,s,e,n,a,l){s=function(e){return((e=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!¢¡.ª)¶ ¢(){¢Æ{¢¡.ª=¤;£ ¢Ø=¤.¢©=¶ ¤¬;¢ ¢ì(){if(².ß)².ß.Ì.¦²=¦ë};¤.È=¢(){¥ ¦ì};£ ¢¶=(¦´.µ(¢ô.¤ì))?¢(¤í){¢¡.¢¶(ª+¦í+¤í)}:¢Ø;£ á=¤¥.á.§(¦µ)[1];if(¦¶.µ(¢ô.¤ì)||á<5||!¦·.µ(².ù.¢«))¥ ¢ì();£ ¢§=¢ê(².¦«!=¦î);£ ¢±=(¦© ².¤ë==¦ï)?!¦¸i.µ(¢ô.£»):¢ê(².¤ë!=¦ð);£ £ê=¦ñ;£ £¦=£ê;if(!¢±)£¦+=¦ò;£ ¢½;£ ù=².ù;£ ¢Ñ={};¤.¢©=¢(¢Ç,¢Ò,¤ê){if(!¢Ñ)¥;if(¢í)Ü(¦ó+¢ó(¢Ò));if(¤ê){¢Ò();¢Ò=¢Ø}¢Ñ[¢Ç]=¢Ò};£ ¤é=¦¹;¢ ¢À(¾,Á){if(¤é.µ(¾))¾=(Á||¦ô)+¾;¥ ¾};¢ £¹(¾,Á){¾=¢À(¾,Á);¥ ¾.Æ(0,¾.¤å(¦õ)+1)};£ Á=£¹(².¤è[².¤è.¯-1].î);£ £½=¶ ¦£(¦ö);¢ ê(¾,Á){¢Æ{¾=¢À(¾,Á);£½.¦¡(¦÷,¾,ë);£½.¥þ();¥ £½.¥ý}¢·(£¥){¢¶(¦ø+¾);¥ ¦ô}};£ ¸=¢(£¼,£·){¥ £¼.¸(£·)};£ £´=¢(£¼){¥ £¼.£´()};if(á<5.5)Ü(ê(¦ù,Á));if(².£À==¦ú||!¢±)².¥ø();Û ².¥÷(¦û);¤.¿=².é[².é.¯-1];¤.¿.¨=£ê;¤.¿.Î=Ö;£ ¨={};¢ ¤á(¿,Á){£ Ô=¢À(¿.¾,Á);if(¨[Ô])¥ ¦ô;¨[Ô]=(¿.¢ç)?¦ô:¤ç(¢ã(¿,Á),£¹(¿.¾,Á));¥ ¨[Ô]};£ ¢ã=¢(¿){¥ ¿.¨};£ ¤æ=¦ºgi;¢ ¤ç(¨,£»){¥ ¨.¬(¤æ,¦ü+£».Æ(0,£».¤å(¦õ)+1)+¦ý)};¤.ô=[];¤.¢â=¢Ø;£ ¢¸=ë;¢ _ê(){¢Æ{¢¸=Ö;£ ¤ã=¦»i;£ é=².é;£ £é=[];£ £º=².¤Ø(¦þ);®(£ i=£º.¯-1;i>=0;i--){¸(£é,¦¼.µ(£º[i].¤ä)?¦ô:£º[i].¤ä)}¢ ¢ã(¿,Á){£ ¨=¦ô;if(¤ã.µ(¿.¥ô)){®(£ i=0;i<¿.¤â.¯;i++){¨+=í.£ó(¿.¤â[i],£¹(¿.¾,Á))}¨+=((¿.¾)?¤á(¿,Á):£´(£é))}¥ ¨};ª.¨=¦ô;®(i=0;i<é.¯;i++)ª.¨+=¢ã(é[i],¦ô);ª.¨=£©(ª.¨);®(i in ¢Ñ)¢Ñ[i]();£Ö ¢Ñ;if(¢½)¢½.£°();à.£°();ª.¢â();ª.¿.¨=£¦+£§(ª.¨);®(i=0;i<é.¯;i++){if(!é[i].¢ç&&!é[i].Î)é[i].¨=¦ô}ª.Ø();¢¶(¦ÿ)}¢·(¢ë){¢¶(§¡+¢ë.£ë)}£¾{¢ì()}};¤.Ø=¢(){à.Ø();®(£ i=0;i<¤.ô.¯;i++)¤.ô[i]()};£ à=¶ ¢(){£ è=[];¤.¢¿=¢(){¸(è,í)};£ ô=[];¤.ï=¢(¢µ,£ä){£ ¤à=¶ ç(§¢+¢µ,§£);£ ¨=ª.¨;¢µ=[];Ý(§=¤à.¢ß(¨)){¸(¢µ,§[1]);if(á<5.5)¨=¨.Æ(§.¥ò)}if(¢µ.¯){¢µ=¢µ.È();¸(ô,í)}};¤.£°=¢(){®(£ i=0;i<è.¯;i++){ª.¨=ª.¨.¬(è[i][0],è[i][1])}¤.ï(§¤,¢Ê);¤.ï(§¥,¢(¡){if(¡.¢¥.«.³==§¦)¢Ê(¡.¢¥)})};¤.Ø=¢(){®(£ i=0;i<ô.¯;i++){£ ¢Í=ü(ô[i][0]);®(£ j=0;j<¢Í.¯;j++)ô[i][1](¢Í[j])}};¤.¢¿(¦½gi,§§);if(á<6)¤.¢¿(¦¾gi,§¨);if(¢§){£ ¢´=§©.£¨(§ª);®(£ i=0;i<¢´.¯;i++)¢´[¢´[i]]=¢´[i-1]||§«;¢ ¬($,$1,$2,$3){¥ $1+¢´[$3]};¤.¢¿(¶ ç(§¬+¢´.¢Ü(§­)+§®,§£),¬)}};£ ¤Ü=¦¿;£ ¤Û=¦Àg;£ ¤Ú=¦Á;£ ¤ß=¦Âg;£ ¤Þ=§¯;£ ¢è={};¢ ü(´,­){£ £æ=!­;£ £ç=(­)?(­.¥ê==¥é)?­:[­]:[²];£ ò=´.¬(¤ß,¤Þ).£¨(§ª);£ §=[];®(£ i=0;i<ò.¯;i++){´=¤Ý(ò[i]);if(´.Æ(0,3).¢Ü(¦ô)==§°){´=´.Æ(2);­=¤Ù(£ç,´[1])}Û ­=£ç;£ j=0,¢³,±,É,¢Ð=¦ô;Ý(j<´.¯){¢³=´[j++];±=´[j++];¢Ð+=¢³+±;É=¦ô;if(´[j]==§±){Ý(´[j++]!=§®)É+=´[j];É=É.Æ(0,-1);¢Ð+=§±+É+§®}­=(£æ&&¢è[¢Ð])?¢è[¢Ð]:£å(­,¢³,±,É);if(£æ)¢è[¢Ð]=­}§=§.¥è(­)}¥ §};¢ ¤Ý(´){if(¤Ü.µ(´))´=§²+´;¥ ´.§(¤Û)};¢ £å(­,¢³,±,É){£ Ê=¦ô;if(¤Ú.µ(±)){±=±.£¨(§­);Ê=±[0];±=±[1]}£ ¼=[];if(ò[¢³])ò[¢³](¼,­,±,Ê||É);¥ ¼};¢ ¤Ù(­,id){£ ¼=[],i,j;®(i=0;i<­.¯;i++){£ §=­[i].¢Ì.£·(id);if(§){if(§.¯==¢Þ)¸(¼,§);Û ®(j=0;j<§.¯;j++)¸(¼,§[j])}}¥ ¼};£ ò={§²:¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=(±==§³&&­[i].¢Ì)?­[i].¢Ì:­[i].¤Ø(±);®(£ j=0;j<ó.¯;j++){if(¢Î(ó[j])&&(!Ê||ó[j].Ê==Ê))¸(¼,ó[j])}}},§´:¢(¼,­,±){®(£ i=0;i<­.¯;i++)if(­[i].id==±)¸(¼,­[i])},§µ:¢(¼,­,±){±=¶ ç(§¶+±+§·);®(£ i=0;i<­.¯;i++)if(±.µ(­[i].¢Ý))¸(¼,­[i])},§¸:¢(¼,­,±,É){±=¢®[±];if(±)®(£ i=0;i<­.¯;i++)if(±(­[i],É))¸(¼,­[i])}};£ ¢¬=¦ô;£ ¢®={È:¢(){£ È=[];®(£ ¢Ï in ¤){if(¢Ï!=§¹&&¢Ï!=§º){if(¤[¢Ï].¯>1)¢Ï+=§»;¸(È,¢Ï)}}¥ È.¢Ü(§­)},§¹:¢(¡){¥ ¢ê(¡.«[§¼]==§¹)},§º:¢(¡){¥ ¢ê(¡.«[§¼]==§º)}};£ ¢­={È:¢®.È};¢ £Ù(¡,Ï,Ê){if(Ê&&¡.Ê!=Ê)¥ ë;¥(Ï==§³)?¢Î(¡):(¢±)?(¡.Ï==Ï.¤Ç()):(¡.Ï==Ï)};£ £µ=[];¢ ¢ö(£¶){¥ £².µ(£¶)?£µ[£¶.Æ(1,-1)]:£¶};£ £©=¢(¨){¥ ¨.¬(¦Ãg,¢(§){¥(§.¤È(0)==¦õ)?¦ô:§½+(¸(£µ,§.Æ(1,-1))-1)+§½}).¬(¦Äg,¦ô).¬(¦Åg,§­).¬(¦Æg,¦ü)};¢ £§(¨){¥ ¨.¬(¦Ág,§¾).¬(¦Çg,¢(§,¤×){¥ £µ[¤×]})};£ £³=[];¢ Ó(¡,Õ,þ){¡.¤Ö(Õ,þ);¸(£³,í)};¢ ¤Õ(¡,Õ,þ){¢Æ{¡.¥å(Õ,þ)}¢·(£¥){}};¢¡.¤Ö(§¿,¢(){Ý(£³.¯){£ þ=£´(£³);¤Õ(þ[0],þ[1],þ[2])}});£ £®=(á<6)?¢(¡){¥ ¡.Í}:¢(¡){¥ ¡.«.£®};¢ ¢Ê(¡){if(!£®(¡)){¡.¥ã=ë;¤Ô(¤Ð(¡))}};¢ ¤Ô(¡){Ý(¡){¡.¦.¤Ó=¡.«.¤Ó;¡=¢þ(¡)}};£ £²=¦È;¢ ¤ª(©){¥(£².µ(©))?©:§½+©+§½};¢ ¥â(©){¥(£².µ(©))?©.Æ(1,-1):©};¢ £Ï(Ï){£ ¡=².£Û(Ï||§À);¡.Ì.¨=§Á;¥ ¡};¢ ¢Î(¢é){¥ ¢ê(¢é&&¢é.¥Þ==1&&¢é.Ï!=§Â&&!¢é.¢ÿ)};¢ ¤²(¡){Ý(¡&&(¡=¡.¥Ý)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¢þ(¡){Ý(¡&&(¡=¡.õ)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¤Ð(¡){¡=¡.¤¹;¥(¢Î(¡))?¡:¢þ(¡)};£ ¢í=ë;ª.¢©(§Ã,¢(){if(¢±)¢½=¶ ¢(){£ è=[];¢ £ä(¡){£ £±=².£Û(§Ä+¡.£¯.Æ(1));if(¡.£¯.Æ(-2)!=§Å){£ ¤Ï=§Æ+¡.Ï+§Ç,õ;Ý((õ=¡.õ)&&õ.£¯!=¤Ï){¡.¢ü.¢Õ(õ);£±.¢»(õ)}if(õ)¡.¢ü.¢Õ(õ)}¡.¢ü.¥Û(£±,¡);¥ £±};¤.æ=¢(){¸(è,í)};¤.£°=¢(){¢Æ{if(á>5)².¥Ú.æ(§È,§É)}¢·(£¥){}£¾{®(£ i=0;i<è.¯;i++){£ ¢Í=ü(è[i][0]);®(£ j=0;j<¢Í.¯;j++)è[i][1](¢Í[j])}}};¤.æ(§Ê,¢(¡){if(!¡.¤Í){£ ð=ü(§Ë,¡)[0];if(ð){if(!ð.id)ð.id=ð.¢«;¡.¤Í=ð.id}}});¤.æ(§Ì,¢(¡){£ä(¡);£Ö ¢è[§Í]});¤.æ(§Î,¢(¡){if(¡.Ï==§Ï){£ §=¡.£¯.§(¦Éi);¡.¦.©=(§)?§[1]:¦ô}if(¡.Õ==§Ð){Ó(¡,§Ñ,¢(){¡.¦.£ã=Ö;¢Ó(§Ò+¡.¢«+§Ó,1)})}});¤.æ(§Ô,¢(¡){£ ¤Ê=¦Ê;Ó(¡,§Õ,¢(){®(£ i=0;i<¡.¯;i++){if(¤Ê.µ(¡[i].Õ)&&!¡[i].¢ç&&!¡[i].¦.£ã){¡[i].¢ç=Ö;¢Ó(§Ò+¡[i].¢«+§Ö,1)}Û if(¡[i].Ï==§Ï&&¡[i].Õ==§Ð){¢Ó(§Ò+¡[i].¢«+§×+¡[i].©+§½,1);¡[i].©=¡[i].¦.©}}})})}},Ö);ª.¢©(§Ø,¢(){£ £«=§Ù,¤Æ=¦Ë,¢Ö=¦Ì,£Ý=¦Í;£ ¢¾=(á<6)?¦Îgi:¦Ïgi;£ ¤Ã=(á<5.5)?¦Ð:¦Ñ;£ ¹=£Ï();¸(ª.ô,¢ ¤À(){if(¹.½)¹.½.¢Õ(¹)});à.¢¿(¢¾,¢(§){¥ §.Æ(0,3)+§.¤È(4).¤Ç()+§.Æ(5)});£ Þ=(¢§)?².ß:ù;¢ ö(¡){¥ ¡.Ì.³==§Ú||¡.«.³==§Ú};¢ ã(¡){£ ã=¡.¢¥;Ý(ã&&!£®(ã))ã=ã.¢¥;if(!ã||ö(¡))ã=Þ;¥ ã};¢ ì(¤Á){ì=¢(¡,©){if(!¡.¦.ä&&(!¢±||¡.Ï!=§Û)){if(!©)©=¡.«.°;¡.¦.ä=(¤Æ.µ(©))?¥Î.¢æ(0,¢Ë(¡,©)):©;¡.¦.°=¡.¦.ä;¢Ê(¡)}};if(¢§)à.ï(§Ü,ì);£ ¢Ë=(¢§)?¢(¡,©){¥ ¢É(¡,©)+£à(¡)+£ß(¡)}:¢(¡,©){¥ ¢É(¡,©)};¢ £à(¡){¥ ¡.¢¼-¡.Í};¢ £ß(¡){¥ ¢É(¡,¡.«.¥Í)+¢É(¡,¡.«.¥Ì)};¢ ¤Â(¡){¥((¡.«.¢ï==§Ý)?0:¢ä(¡,¡.«.¢ï))+((¡.«.¤Å==§Ý)?0:¢ä(¡,¡.«.¤Å))};¢ Ú(¡){Ú[Ú.Ë++]=¡;if(¡.«.¤Ä==§Ý)¡.¦.¤Ä=0;ì(¡);¢Ê(¡);£ª(¡)};Ú.Ë=0;à.ï(§Þ+£«,Ú);Ü(¢ó(Ú).¬(¦Òg,§ß));ý.Ë=0;à.ï(§à+£«,ý);¢ £ª(¡){£ £¬=¡.£É();£ °=£¬.×-£¬.À;if(¡.«.ý&&°>=¢Ë(¡,¡.«.ý))¡.¦.°=¢Ë(¡,¡.«.ý);Û if(¡.«.Ú&&°<=¢Ë(¡,¡.«.Ú))¡.¦.°=¢Ë(¡,¡.«.Ú);Û ¡.¦.°=¡.¦.ä};¢ ¢²(¡){if((¡.«.³==§á||¡.«.³==§Ú)&&¡.«.À!=§Ý&&¡.«.×!=§Ý&&¤Ã.µ(¡.«.°)){¢²[¢².Ë++]=¡;¢Ê(¡);£Þ(¡)}};¢².Ë=0;à.ï(§â+£«,¢²);¢ £Þ(¡){¡.¦.°=¦ô;£ ½=ã(¡);£ À=(¡.¦.¢Ô)?¡.£É().À-2:¢ä(¡,¡.«.À);£ °=½.Í-¢ä(¡,¡.«.×)-À-¤Â(¡);if(!¢§)°-=£à(¡)+£ß(¡);if(°<0)°=0;if(ö(¡)||¤Á||¡.¢¼<°){¡.¦.ä=°;¡.¦.°=°}};£ Í=ù.Í;Ó(¢¡,§ã,¢(){£ i,¢å=(Í<ù.Í);Í=ù.Í;®(i=0;i<Ú.Ë;i++){£ ¡=Ú[i];£ ä=(¡.¦.°==¡.«.Ú);if(¢å&&ä)¡.¦.°=¦ô;if(¢å==ä)£ª(¡)}®(i=0;i<ý.Ë;i++){£ ¡=ý[i];£ ä=(¡.¦.°==¡.«.ý);if(!¢å&&ä)¡.¦.°=¦ô;if(¢å!=ä)£ª(¡)}®(i=0;i<¢².Ë;i++)£Þ(¢²[i]);¤À()});¢ ¢É(¡,©){if(£Ý.µ(©))¥ ø(©);if(¢Ö.µ(©))¥ ø(£Æ(©)/100*ã(¡).Í);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);¹.Ì.°=©;¥ ¹.¢¼};¢ ¢ä(¡,©){if(ø(©)>0)¥ ¢É(¡,©);if(£Ý.µ(©))¥ ø(©);¡.½.¢»(¹);¹.Ì.À=©;¥ ¹.¢¤}};Ü(¢ó(ì).¬(¦Óg,§ä).¬(¦Ôg,§å).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦×g,§è).¬(¦Øg,§é));ì();¥É(Ö)});ª.¢©(§ê,¢(){£ ¤§=¦Ùg,¤½=¦Úi;ª.¢á=[];ª.¤¿=¶ ¤¾;ª.·=·;ª.Ò=Ò;ª.Ã=Ã;ª.¢â=¢(){¥Ç(¤.¤¿)¤.¨=£§(¢â(£©(¤.¨)));®(£ i=0;i<ª.¢á.¯;i++)ª.¢á[i].¢ß();®(i=0;i<£¡.¯;i++)£¡[i].¤º()};¢ã=¢(¿,Á){¥ ê(¿.¾,Á)};£ ££=[];¢ ¤¾(){¤.¢â=¢(¨){·.û=¶ ç(§ë+¢®+§ì,§í);·.¤¨=¶ ç(§î+¢®+§­+¢­+§ï,§í);Ò.û=¶ ç(§ð+¢­+§ñ,§í);¥ ¨.¬(Ã.û,Ã.ID).¬(Ò.û,Ò.ID).¬(·.û,·.ID)};¤.£©=¢(¨){ñ.û=¶ ç(§ò+¢¬+§ó+¢¬+§ô,§í);¥ ¨.¬(ñ.û,ñ.ID).¬(¦Ûg,¢($){¥ §õ+(¸(££,$)-1)+§ö}).¬(¦Üg,§¸).¬(¦Ýg,¢(§,À,×){¥ À.£¨(§ª).¢Ü(×)+×})};¤.£§=¢(¨){¥ ¨.¬(¦Þg,¢($,$1){¥ ££[$1]})}};¢ _·(){¤.È=¢(){¥ §µ+¤.¢Ç};¤.æ=¢(¡){¡.¢Ý+=§²+¤.¢Ç};¤.¤©=¢(¡){¡.¢Ý=¡.¢Ý.¬(¤.¢¾,¦ô)};¤.¢ß=¢(){£ §=ü(¤.´);®(£ i=0;i<§.¯;i++)¤.æ(§[i])}};¢ ·(´,¨){¤.id=ª.¢á.¯;¤.¢Ç=·.¢ø+¤.id;¤.´=´;¤.¢¾=¶ ç(§÷+¤.¢Ç+§ø,§í);¸(ª.¢á,¤)};·.£Ú=_·;·.¢ª=¶ _·;·.¢ø=§ù;·.ID=¢(§){¥ £Õ(§)+¶ ·(§)};¢ _Ò(){¤.¢ß=¢(){£ §=ü(¤.¢°);®(£ i=0;i<§.¯;i++){£ º=(¤.º)?ü(¤.º,§[i]):[§[i]];if(º)¤.¢¯(§[i],º,¤)}}};_Ò.¢ª=¶ _·;¢ Ò(´,¢°,¢¯,º){¤.¢°=¢°;¤.¢¯=¢­[¢¯];¤.º=º;¤.£¢=·;¤.£¢(´)};Ò.£Ú=_Ò;Ò.¢ª=¶ _Ò;Ò.ID=¢(§,¢°,¢¯,º){if(¢±&&¢¯!=§ú&&¤½.µ(¢°)&&!¦ß.µ(º))¥ §;¥ £Õ(§)+¶ Ò(§,¢°,¢¯,º)};£¦+=§û;£ ¤·=¦àg;¢ ¤¶(§,£Ü){¥ Ü(§ü+§ý.Æ(£Ü.¯)+£Ü+§½)};£ £¡=[];¢ _Ã(){¤.Å=¢Þ;¤.È=¢(){¥ ¦ô};¤.¥Ã=0;¢ ¤¸(¢Ä,Å,¨){£ ÿ=¥Â(¢(){¢Æ{if(!¢Ä.ê)¥;¢Ä.ê(¢Ä,Å,¨);¤»(ÿ)}¢·(£¥){¤»(ÿ)}},10)};¤.¤º=¢(){if(¤.Å==¢Þ)¥;®(£ i=0;i<¤.§.¯;i++){£ º=¤.§[i];£ ¢Å=º.¦[¤.³];if(¢Å){£ ½=º.£Ì?º:º.½;£ £¤=¦á.µ(¤.Å);£ ¡=².£Û(£¤?Ã.¤³:§Â);¡.¢ÿ=Ö;¡.¦.¨=¢Å.¨;if(!£¤)¡.¥Á=¢Å.Å;if(¤.³==§þ){½.¥À(¡,½.¤¹)}Û{½.¢»(¡)}if(£¤)¤¸(¡,¢Å.Å,¢Å.¨);º.¦[¤.³]=¢Þ}}};¤.¢ß=¢(){¤.§=ü(¤.´);®(£ i=0;i<¤.§.¯;i++){£ ¦=¤.§[i].¦;if(!¦[¤.³])¦[¤.³]={¨:¦ô};¦[¤.³].¨+=§ÿ+¤.¨;if(¤.Å!=¢Þ)¦[¤.³].Å=¤.Å}}};_Ã.¢ª=¶ _·;¢ Ã(´,³,¨){¤.³=³;¤.¨=££[¨].Æ(1,-1);£ Å=¤.¨.§(Ã.¤´);if(Å)¤.Å=¢ö(Å[1]).¬(¤·,¤¶);¤.£¢=·;¤.£¢(´);¸(£¡,¤)};Ã.£Ú=_Ã;Ã.¢ª=¶ _Ã;Ã.ID=¢(§,´,³,¨){¥ ¶ Ã(´,³,¨)};Ã.û=¦âg;Ã.¤´=¦ã;Ã.¤³=¨¡+¢À(¨¢,Á)+¨£;ò[§Ç]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=­[i].¥º;®(£ j=0;j<ó.¯;j++)if(£Ù(ó[j],±,Ê))¸(¼,ó[j])}};ò[¨¤]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ¢ý=¢þ(­[i]);if(¢ý&&£Ù(¢ý,±,Ê))¸(¼,¢ý)}};ò[¨¥]=¢(¼,­,±){±=¢ú[±];®(£ i=0;i<­.¯;i++)if(±(­[i]))¸(¼,­[i])};¢®[¨¦]=¢(¡){¥!¤²(¡)};¢®[¨§]=¢(¡,É){É=¶ ç(¨¨+É,¨©);Ý(¡&&!¡.£×(¨§))¡=¡.¢ü;¥ ¡&&É.µ(¡.£×(¨§))};¢­.¢Ù=¢(¡){£ Â=í;Ó(¡,¨ª,¢(){ª.Ð.¢Ù.¢Û(Â)});Ó(¡,¨«,¢(){ª.Ð.¢Ù.¢Ú(Â)})};¢­.¢÷=¢(¡){£ Â=í;Ó(¡,¨¬,¢(){ª.Ð.¢÷.¢Û(Â)})};¢­.¢Á=¢(¡){£ Â=í;Ó(¡,¨­,¢(){ª.Ð.¢Á.¢Û(Â)});Ó(¡,¨®,¢(){ª.Ð.¢Á.¢Ú(Â)});if(¡==².¥²){ª.Ð.¢Á.¢Û(Â)}};Ó(²,¨¯,¢(){£ ú=ª.Ð.¢÷;£ Ù=ú.Ù,i;®(i in Ù)ú.¢Ú(Ù[i]);ú=ª.Ð.¢Ù;Ù=ú.Ù;®(i in Ù)if(!Ù[i][0].£õ(£ü.¥°))ú.¢Ú(Ù[i])});£ ¢ú=[];£ ¤«=¦äg;¢ ñ(Ä,¢Â,©){©=¢ö(©);¤.id=¢ú.¯;£ò(Ä.¥¯()){¢¦ ¨°:Ä=¨±;¤­;¢¦ ¨²:Ä=¨³;¤­;£ñ:Ä=¨´+Ä+¨µ}¢Â=¢¬[¢Â];¸(¢ú,¶ ¤¬(¨¶,¨·+¢Â(Ä,©)))};ñ.ID=¢(§,Ä,¢Â,©){¥ ¶ ñ(Ä,¢Â,©)};ñ.¢ª.È=¢(){¥ ñ.¢ø+¤.id};¢¬={È:¢(){£ È=[];®(£ i in ¤)if(i&&i!=¨¸)¸(È,i);¥ È.¢Ü(¦ô).¬(¦åg,¦ô)},¢ù:¢(©){¥ ©.¬(¤«,¨¹)},¦ô:¢(Ä){¥ Ä},¨º:¢(Ä,©){¥ Ä+¨»+¤ª(©)},¨¼:¢(Ä,©){¥ ¨½+¢¬.¢ù(©)+¨¾+Ä+§®},¨¿:¢(Ä,©){¥ ¨À+¢¬.¢ù(©)+¨Á+Ä+§®}};ñ.¢ø=¨¥;¢ _ú(){¤.¢Û=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.æ(º[i]);¤.Ù[·.id+¡.¢«]=Â};¤.¢Ú=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.¤©(º[i]);£Ö ¤.Ù[·.id+¡.¢«]}};ª.Ð=¢(Õ){¤.Õ=Õ;¤.Ù={};ª.Ð[Õ]=¤};ª.Ð.¢ª=¶ _ú;¶ ª.Ð(¨Â);¶ ª.Ð(¨Ã);¶ ª.Ð(§ú);¢ £Õ(´){¥ ´.¬(·.¤¨,¦ô).¬(¤§,§²)}},Ö);ª.¢©(¨Ä,¢(){if(á<5.5)¥;£ £Ô=¨Å;£ £ý=(¦æ.µ(¤¥.¥©))?¢À(¨Æ,Á):¨Ç;£ £Ó=¶ ç((¢¡.¤ý||¨È)+¨É,¨©);¢ £þ(¡,î){¡.¦.±=£Ô.¬(¦ç,î)};£ ¢¾=¦ègi;à.¢¿(¢¾,¢ ¬(§,¢õ,¤¡,Ô,£ÿ){Ô=¢ö(Ô);¥ £Ó.µ(Ô)?¨Ê+£Ô.¬(¦é,¨Ë).¬(¦ç,Ô)+¨Ì+(¢õ||¦ô)+§¸+(¤¡||¦ô)+¨Í+(£ÿ||¦ô):§});if(¢½){¢ £Ò(¡){if(£Ó.µ(¡.î)){£ °=¡.°,÷=¡.÷;£þ(¡,¡.î);¡.î=£ý;¡.°=°;¡.÷=÷}Û ¡.¦.±=¦ô};¢½.æ(¨Î,¢(¡){if(¡.Ï==¨Ï&&¡.Õ!=¨Ð)¥;£Ò(¡);Ó(¡,¨Ñ,¢(){if(£ü.£Ê==¨Ò)£Ò(¡)})})}});ª.¢©(¨Ó,¢(){£ ¢Ö=¦Ì;à.ï(¨Ô,¢¢);à.ï(¨Õ,¢£);£ ß=².ß;£ Þ$=(¢§)?¨Ö:¨×;£ Þ=Ü(Þ$);¢ ¢ñ(){if(ß.«.£Î!=§Ú){if(ß.«.£Í==¨Í){ß.¦.£Í=¨Ø+¢ô.¤÷+§®}ß.¦.£Î=§Ú}¢ñ=¢Ø};£ ¹=£Ï(¨Ù);¢ ¢º(£ú){¥ ¢ó(£ú).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦Óg,§ä).¬(¦êg,¨Ú)};¢ ¢£(¡){if(¡.«.£Î!=§Ú)¥;if(!¡.£õ(ß)){¢ñ();¢£[¢£.Ë++]=¡;£Ë(¡);¤ö(¡);£Â(¡)}};¢£.Ë=0;¢ £Â(¡){¹.î=¡.«.£Í.Æ(5,-2);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);£È(¡);¤õ(¡);½.¢Õ(¹)};¢ £Ë(¡){¡.Ì.¢×=¡.«.¢×;if(!ö(¡)){£ £ô=¨Û+Þ$+¨Ü;¡.¦.£ð(¨Ý,£ô)}};Ü(¢º(£Ë));¢ £È(¡){£ £Ê=ö(¡)?¨Ý:¨Þ;¡.¦[£Ê]=£Ç(¡,¡.Ì.¢×)-¡.£É().À-¡.¤ô};Ü(¢º(£È));¢ ö(¡){if(!¡)¥ ë;if(¡.Ì.³==§Ú||¡.«.³==§Ú)¥ Ö;¥ í.£ó(¡.½)};¢ £Ç(¡,³){£ò(³){¢¦ ¨ß:¢¦ §ç:¥ 0;¢¦ §â:¢¦ §é:¥ Þ.Í-¹.¢¼;¢¦ ¨à:¥(Þ.Í-¹.¢¼)/2;£ñ:if(¢Ö.µ(³)){¥ ø((Þ.Í-¹.¢¼)*£Æ(³)/100)}¹.Ì.À=³;¥ ¹.¢¤}};Ü(¢º(£Ç));¢ ¢¢(¡){if(¡.«.³!=§Ú)¥;¢ñ();¢¢[¢¢.Ë++]=¡;¡.Ì.³=§Ú;¡.¦.³=§á;£Á(¡)};¢¢.Ë=0;¢ £Á(¡,Ø){£Å(¡,Ø);¤ò(¡,Ø);if(!Ø||¡.¦.¤ñ){if(ø(¡.«.¢î)==0)¡.¦.¤ð++}};¢ £Å(¡,Ø){if(!Ø&&¢Ö.µ(¡.«.°))¡.¦.ì=¡.«.°;if(¡.¦.ì)¡.¦.°=ø(£Æ(¡.¦.ì)/100*Þ.Í);if(Ø){if(!¡.¦.£Ä)¥}Û{¡.¦.£Ä=¡.«.×!=§Ý&&¡.«.À==§Ý}¡.¦.À=¦ô;¡.¦.¢Ô=¢¹(¡);if(¡.«.¢ï!=§Ý){¡.½.¢»(¹);¹.Ì.À=¡.«.¢ï;¡.¦.¢Ô-=¹.¢¤;¡.½.¢Õ(¹)}if(ö(¡.¢¥))¡.¦.£ï=¡.¦.¢Ô;Û if(!Ø)¡.¦.£ð(¨á,¨â+Þ$+¨ã)};Ü(¢º(£Å).¬(¦Øg,§é).¬(¦Ôg,§å));¢ ¢¹(¡){£ ¢¹=¡.¢¤,£Ã=ë;£ Ç=ö(¡.¢¥)&&¡.¦.£Ä;Ý(¡=¡.¢¥){if(!Ç&&¡.«.³!=¨ä)£Ã=Ö;¢¹+=¡.¢¤*(£Ã?-1:1)}¥ ¢¹};Ü(¢º(¢¹));¢ £ì(){®(£ i=0;i<¢£.Ë;i++)£Â(¢£[i]);®(i=0;i<¢¢.Ë;i++)£Á(¢¢[i],Ö);ÿ=0};£ ÿ;Ó(¢¡,§ã,¢(){if(!ÿ)ÿ=¢Ó(£ì,10)})});¢í=Ö;if(².£À==¦ú)_ê();Û Ó(²,¨å,¢(){if(!¢¸&&².£À==¦ú)¢Ó(_ê,0)})}¢·(¢ë){¢ì();¢¶(¨æ+¢ë.£ë)}£¾{}}();',493,0,/./,String,95,'element`function`var`this`return`runtimeStyle`match`cssText`value`IE7`currentStyle`replace`from`for`length`width`filter`document`position`selector`test`new`Class`push`ie7_tmp`target`x5cs`filtered`parentElement`href`styleSheet`left`path`instance`PseudoElement`attribute`content`slice`fixed`toString`filterArgs`scopeName`count`style`clientWidth`ie7`tagName`Event`x5c`DynamicStyle`addEventHandler`url`type`true`right`recalc`instances`minWidth`else`eval`while`viewport`body`CSSFixes`appVersion`link`layoutParent`fixedWidth`auto`add`RegExp`fixes`styleSheets`load`false`fixWidth`arguments`src`addRecalc`input`AttributeSelector`selectors`subset`recalcs`nextSibling`isFixed`height`parseInt`documentElement`ie7Event`ALL`cssQuery`maxWidth`handler`timer`window`positionFixed`backgroundFixed`offsetLeft`offsetParent`case`quirksMode`x5cw`addModule`prototype`uniqueID`attributeTests`dynamicPseudoClasses`pseudoClasses`dynamicPseudoClass`attach`isHTML`fixRight`token`SIZES`pattern`alert`catch`complete`getScreenLeft`topFunction`appendChild`offsetWidth`HTMLFixes`MATCH`addFix`makePath`focus`compare`x5cd`object`pseudoElement`try`name`visited`getPixelWidth`boxSizing`getFixedWidth`all`elements`isElement`pseudoClass`cacheSelector`modules`script`setTimeout`screenLeft`removeChild`PERCENT`backgroundPositionX`DUMMY`hover`unregister`register`join`className`null`exec`display`classes`parse`getCSSText`getPixelLeft`wider`max`disabled`cssCache`node`Boolean`error`unHide`loaded`bottom`marginLeft`absolute`fixBackground`top`String`location`image`getString`active`PREFIX`escape`attributeSelectors`x2f`parentNode`adjacent`nextElement`ie7_anon`pseudoElements`inherit`encoded`isURL`ignore`HEADER`decode`split`encode`resizeWidth`NUMERIC`rect`min`hasLayout`outerHTML`apply`fixedElement`QUOTED`handlers`pop`strings`string`item`small`getPath`styles`pathname`array`httpRequest`finally`Error`readyState`foregroundPosition`backgroundPosition`nested`autoLeft`positionLeft`parseFloat`getOffsetLeft`setOffsetLeft`getBoundingClientRect`propertyName`backgroundLeft`canHaveChildren`backgroundImage`backgroundAttachment`tmpElement`none`background`fixImg`pngTest`FILTER`simpleSelector`delete`getAttribute`lang`compareTagName`ancestor`createElement`code`PIXEL`resizeRight`getPaddingWidth`getBorderWidth`box`submit`clicked`fix`select`useCache`base`large`inlineStyles`LINKS`description`resize`onresize`scrollLeft`pixelLeft`setExpression`default`switch`callee`expression`contains`Height`Width`Top`Left`leftFunction`img`event`NULL`addFilter`suffix`prefix`scale`png`define`navigator`Microsoft`CHILD`COMPLEX`remove`quote`ESCAPE`Function`break`ie7_`x5cb`class`ms_`previousElement`OBJECT`CONTENT`before`unicode`HEX`addTimer`firstChild`create`clearInterval`inline`ANCHOR`Parser`parser`removeTempElement`HEIGHT`getMarginWidth`AUTO`minHeight`marginRight`UNIT`toUpperCase`charAt`BUTTON`UNSUCCESSFUL`button`abbr`htmlFor`HTML`endTag`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`autoload`mimeType`search`message`onreadystatechange`static`screenTop`autoTop`positionTop`center`clientLeft`setOffsetTop`backgroundTop`protocol`onpropertychange`INPUT`zoom`crop`trans`IE7_PNG_SUFFIX`x00`x_bits`char`x5cnstatic`x_height`x5cn`x_width`javascript`gif`blank`userAgent`bSV1`sizingMethod`AlphaImageLoader`DXImageTransform`progid`toLowerCase`srcElement`onmouseup`activeElement`onblur`onfocus`onmousedown`onmouseout`onmouseover`child`first`children`scriptlet`text`htm`data`after`insertBefore`innerText`setInterval`specificity`x5cu`align`vertical`with`css2`fixHeight`Bottom`Right`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`previousSibling`nodeType`clip`border`padding`unquote`contentEditable`onbeforeunload`detachEvent`import`namespace`concat`Array`constructor`size`font`medium`list`float`relative`sizing`lastIndex`successfully`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`ActiveXObject`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ie7_off`MSIE`ie7_debug`alpha`version`visible`visibility`fromCharCode`¦®`¦­ (\\d\\.\\d)`¦¬`^¤±`\\.¦§$`^[\\w\\.]+[^:]*$`(Ô\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¥ö\\b|\\¥õ\\b|^$`Î-â`(¥ï\\s*:\\s*(À|×))`¢à\\s*:\\s*¥î-£·`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢û\\*[^\\*]*\\*+([^\\¢û][^\\*]*\\*+)*\\¢û)|(\x27[^\x27]*\x27)|("[^"]*")`@(¥ç|¥æ)[^;\\n]+[;\\n]|`\\Ñ:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ©="([^"]*)"`^(£â|¥Ñ|¤Ë)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(£­|¢æ)-(°|÷)\\s*:\\s*\\d`\\b(£­|¢æ)-°\\s*:\\s*\\d`^å|0cm$`^å$`£­`£÷`°`£ù`À`¥Ë`×`>`(\\ba(\\.[\\w-]+)?)$`\\{[^\\}]*\\}`::`([^\\}\\s]*\\,[^\\{]*)(\\{\\d+\\})`\\{(\\d+)\\}`[+>~]`\\Ñ([a-fA-F\\d]+)`^Ô\\(.*\\)$`([^}]*):(¤µ|¥¿)[^{]*\\{([^}]*)\\}`Å\\s*:\\s*([^;]*)(;|$)`([\\¢û()[\\]?{}|*+])`=`\\¥ª\\b`%1`£Ñ(-¢õ)?\\s*:([^(};]*)Ô\\(([^\\)]+)\\)([^;}]*)`¤¢`X`¦±`ª ¦° 0.7.3 (¦¯)`\\n\\n`¦ª`¦¨`¦¦ ¦¥`:â{Î-â:â}:¢È{Î-â:¢È}`*{¦¤:0}`¢Ò=``/`¤¦.¦¢`¥ÿ`£¿ [1]: ¥ü ¥û ê ¥ú `Î-¥ù.js`¢¸`<Ì>`$1`$2`Ì`¢í ¥ó`£¿ [2]: `([^{}]*)\\Ñ{([^}]*[^\\¢¨-])?`gi`£á-¥ñ\\»*:\\»*Å-£á`³\\»*:\\»*¢ð`¥ð`¢à:¤¼;$1`¢à:¤Ò`xx-£¸,x-£¸,£¸,¥í,£è,x-£è,xx-£è`,`xx-£¸`(¥ì(-¥ë)?\\»*:\\»*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\»)`(\\»|$)`:`â`¢È`\\Ñ([^)]*\\Ñ)`Î-â`\x27`\\Ñ:`¥ä`¢Ä`³:¢ð;¥á:0;¢à:¤Ò;¥à:£Ð;¥ß:£¬(0 0 0 0);À:-9999`!`Î-¥Ü`<¤Î:`/>``¤Î`¥Ù://¥Ø.w3.¥×/1999/¥Ö`¥Õ`ð,£å,¥Ô`¤Ì` ¤Ì`¤Ë,ð`¤É`£â`¥Ó`².¢Ì.`.¦.£ã=ë`¥Ò`¥Ð`.¢ç=ë`.©=\x27`Î-£á-¥Ï`\\»*:\\»*\\¢Ã[\\¢¨%]*`Ç`HR`°\\»*:\\»*\\¢Ã\\¢¨*[^%]`å`£­-°`¢æ`¢æ-°`¢ð`×`£í`£ö`÷`£ø`¢ò`¥Ê`¢î`Î-¥È`[^},\\»]*([>+~][^:@,\\»{]+|:(`)|\\Ñ.[\\¢¨-]+\\Ñ.[\\¢¨-.]+|@[@\\¢Ã]+)`g`[^\\»(]+[+~]|@\\¢Ã+|:(â|¢È|`)|\\Ñ.[\\¢¨-.]+`([^}]*):(`)([^{]*)`\\Ñ[([^`=\\Ñ]]+)([`]?=?)([^\\Ñ]]+)?\\Ñ]`{`}`\\»`\\¤¯`¤®`¢Á`.¢ÿ{¥Æ-¥Å:¢ò;¢à:¤¼}`\x27\\¥Ä`0000`¤µ`;`<¢Ä ¤°=¢ÿ ¥¾=\x27`Î-Å.¥½`\x27 °=100% ÷=0 Õ=¥¼/x-¥»>`+`@`¥¹-¥¸`£Ø`^`i`¥·`¥¶`¥µ`¥´`¥³`¥±`id`¡.id.¬(/¤±\\¢Ã+/g,\x27\x27)`¤°`¡.¢Ý.¬(/\\¤¯\\»*¤®\\¢Ã+/g,\x27\x27)`¡.£×(\x27`\x27)`¡`¥ `¢ù`\\Ñ$1`=`==`~=`/(^|\\»)`(\\»|$)/.µ(`|=`/^`(-|$)/.µ(`¢Ù`¢÷`Î-¤£`¥®:¥­.¤¦.¥¬(î=%1,¥«=\x27¤¢\x27)`¥¨.¥§`¥¦:\x27#¤¤ ¥¥ 1\\¥¤#¤¤ ¥£ 1\\¥¢ ¥¡ ¤ÿ[]={0¤þ}\x27`-¤ü.¤£`$`±:`¤û`;¤ú:1;£Ñ`£Ð`£û,ð`¤ù`¢õ`¤ø`î`Î-Ç`³\\»*:\\»*Ç`£Ñ[\\¢¨\\»-]*:[^};]*Ç`ß`ù`Ô(`£û`Y`(ø(¦.¢¤)+².`.£î)||0`¢×`¢¤`À`¤ó`£ï`¦.¢Ô+².`.£î`¤ï`¤î`£¿ [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/code-red/javascript/ie7/ie7-standard.js b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-standard.js new file mode 100755 index 0000000..2109905 --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/ie7/ie7-standard.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i=0){ + var optar=opt.split(" "); + for(i=0;i=0) ecolor=optar[i]; + if(ecolor=="") ecolor="#666"; + cn+="e"; + edges=true; + } +else if(opt && opt.indexOf("smooth")>=0){ + cn+="a"; + ecolor=Mix(bk,color); + } +if(opt && opt.indexOf("small")>=0) cn+="s"; +prefixt=cn; +prefixb=cn; +if(wich.indexOf("all")>=0){t=true;b=true;} +else if(wich.indexOf("top")>=0) t="true"; +else if(wich.indexOf("tl")>=0){ + t="true"; + if(wich.indexOf("tr")<0) prefixt+="l"; + } +else if(wich.indexOf("tr")>=0){ + t="true"; + prefixt+="r"; + } +if(wich.indexOf("bottom")>=0) b=true; +else if(wich.indexOf("bl")>=0){ + b="true"; + if(wich.indexOf("br")<0) prefixb+="l"; + } +else if(wich.indexOf("br")>=0){ + b="true"; + prefixb+="r"; + } +var v=getElementsBySelector(selector); +var l=v.length; +for(i=0;i=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=1;i<=lim;i++){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingTop=0; +el.insertBefore(d,el.firstChild); +} + +function AddBottom(el,bk,color,bc,cn){ +var i,lim=4,d=CreateEl("b"); + +if(cn.indexOf("s")>=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=lim;i>0;i--){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingBottom=0; +el.appendChild(d); +} + +function CreateEl(x){ +if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x)); +else return(document.createElement(x)); +} + +function getElementsBySelector(selector){ +var i,selid="",selclass="",tag=selector,f,s=[],objlist=[]; + +if(selector.indexOf(" ")>0){ //descendant selector like "tag#id tag" + s=selector.split(" "); + var fs=s[0].split("#"); + if(fs.length==1) return(objlist); + f=document.getElementById(fs[1]); + if(f) return(f.getElementsByTagName(s[1])); + return(objlist); + } +if(selector.indexOf("#")>0){ //id selector like "tag#id" + s=selector.split("#"); + tag=s[0]; + selid=s[1]; + } +if(selid!=""){ + f=document.getElementById(selid); + if(f) objlist.push(f); + return(objlist); + } +if(selector.indexOf(".")>0){ //class selector like "tag.class" + s=selector.split("."); + tag=s[0]; + selclass=s[1]; + } +var v=document.getElementsByTagName(tag); // tag selector like "tag" +if(selclass=="") + return(v); +for(i=0;i=0){ + objlist.push(v[i]); + } + } +return(objlist); +} + +function Mix(c1,c2){ +var i,step1,step2,x,y,r=new Array(3); +if(c1.length==4)step1=1; +else step1=2; +if(c2.length==4) step2=1; +else step2=2; +for(i=0;i<3;i++){ + x=parseInt(c1.substr(1+step1*i,step1),16); + if(step1==1) x=16*x+x; + y=parseInt(c2.substr(1+step2*i,step2),16); + if(step2==1) y=16*y+y; + r[i]=Math.floor((x*50+y*50)/100); + } +return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16)); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/code-red/javascript/transmenu-body.php b/src/usr/local/www/themes/code-red/javascript/transmenu-body.php new file mode 100755 index 0000000..6da8efc --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/transmenu-body.php @@ -0,0 +1,53 @@ + + All rights reserved. + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +function nervecenterTransmenuGetBodyJS() { + global $rootmenu; + + if (isset($rootmenu)) { + return $rootmenu->getMenuJScript(); + } else if (empty($rootmenu)) { + return "alert('No rootmenu object found.');"; + } else { + return "alert('No JavaScript attached to rootmenu object.');"; + } +} + +?> diff --git a/src/usr/local/www/themes/code-red/javascript/transmenu-head.php b/src/usr/local/www/themes/code-red/javascript/transmenu-head.php new file mode 100755 index 0000000..7d72c30 --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/transmenu-head.php @@ -0,0 +1,87 @@ + + All rights reserved. + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +function nervecenterTransmenuGetHeadJS() { + global $g, $rootmenu; + + $transmenu_stub =<<getChildren() as $component) { + $id = "mnua_" . str_replace(" ", "", strtolower($component->getID())); + + $childJScript .=<< diff --git a/src/usr/local/www/themes/code-red/javascript/transmenu.org b/src/usr/local/www/themes/code-red/javascript/transmenu.org new file mode 100755 index 0000000..6c9e353 --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/transmenu.org @@ -0,0 +1,785 @@ +/* ================================================================================================= + * TransMenu + * March, 2003 + * + * Customizable multi-level animated DHTML menus with transparency. + * + * Copyright 2003-2004, Aaron Boodman (www.youngpup.net) + * ================================================================================================= + * "Can I use this?" + * + * Use of this library is governed by the Creative Commons Attribution 2.0 License. You can check it + * out at: http://creativecommons.org/licenses/by/2.0/ + * + * Basically: You may copy, distribute, and eat this code as you wish. But you must give me credit + * for writing it. You may not misrepresent yourself as the author of this code. + * ================================================================================================= + * "It's kinda hard to read, though" + * + * The uncompressed, commented version of this script can be found at: + * http://youngpup.net/projects/transMenus + * ================================================================================================= + * updates: + * 04.19.04 fixed cascade problem with menus nested greater than two levels. + * 12.23.03 added hideCurrent for menu actuators with no menus. renamed to TransMenu. + * 04.18.03 fixed render bug in IE 5.0 Mac by removing that browser from compatibility table ;) + * also made gecko check a little more strict by specifying build no. + * ============================================================================================== */ + + + +//================================================================================================== +// Configuration properties +//================================================================================================== +TransMenu.spacerGif = "themes/nervecenter/javascript/img/x.gif"; // path to a transparent spacer gif +TransMenu.dingbatOn = "themes/nervecenter/javascript/img/submenu-on.gif"; // path to the active sub menu dingbat +TransMenu.dingbatOff = "themes/nervecenter/javascript/img/submenu-off.gif"; // path to the inactive sub menu dingbat +TransMenu.dingbatSize = 14; // size of the dingbat (square shape assumed) +TransMenu.menuPadding = 5; // padding between menu border and items grid +TransMenu.itemPadding = 3; // additional padding around each item +TransMenu.shadowSize = 2; // size of shadow under menu +TransMenu.shadowOffset = 3; // distance shadow should be offset from leading edge +TransMenu.shadowColor = "#FF0000"; // color of shadow (transparency is set in CSS) +TransMenu.shadowPng = "themes/nervecenter/javascript/img/grey-40.png"; // a PNG graphic to serve as the shadow for mac IE5 +TransMenu.backgroundColor = "#990000"; // color of the background (transparency set in CSS) +TransMenu.backgroundPng = "themes/nervecenter/javascript/img/white-90.png"; // a PNG graphic to server as the background for mac IE5 +TransMenu.hideDelay = 1000; // number of milliseconds to wait before hiding a menu +TransMenu.slideTime = 400; // number of milliseconds it takes to open and close a menu + + +//================================================================================================== +// Internal use properties +//================================================================================================== +TransMenu.reference = {topLeft:1,topRight:2,bottomLeft:3,bottomRight:4}; +TransMenu.direction = {down:1,right:2}; +TransMenu.registry = []; +TransMenu._maxZ = 100; + + + +//================================================================================================== +// Static methods +//================================================================================================== +// supporting win ie5+, mac ie5.1+ and gecko >= mozilla 1.0 +TransMenu.isSupported = function() { + var ua = navigator.userAgent.toLowerCase(); + var pf = navigator.platform.toLowerCase(); + var an = navigator.appName; + var r = false; + + if (ua.indexOf("gecko") > -1 && navigator.productSub >= 20020605) r = true; // gecko >= moz 1.0 + else if (an == "Microsoft Internet Explorer") { + if (document.getElementById) { // ie5.1+ mac,win + if (pf.indexOf("mac") == 0) { + r = /msie (\d(.\d*)?)/.test(ua) && Number(RegExp.$1) >= 5.1; + } + else r = true; + } + } + + return r; +} + +// call this in onload once menus have been created +TransMenu.initialize = function() { + for (var i = 0, menu = null; menu = this.registry[i]; i++) { + menu.initialize(); + } +} + +// call this in document body to write out menu html +TransMenu.renderAll = function() { + var aMenuHtml = []; + for (var i = 0, menu = null; menu = this.registry[i]; i++) { + aMenuHtml[i] = menu.toString(); + } + document.write(aMenuHtml.join("")); +} + +//================================================================================================== +// TransMenu constructor (only called internally) +//================================================================================================== +// oActuator : The thing that causes the menu to be shown when it is mousedover. Either a +// reference to an HTML element, or a TransMenuItem from an existing menu. +// iDirection : The direction to slide out. One of TransMenu.direction. +// iLeft : Left pixel offset of menu from actuator +// iTop : Top pixel offset of menu from actuator +// iReferencePoint : Corner of actuator to measure from. One of TransMenu.referencePoint. +// parentMenuSet : Menuset this menu will be added to. +//================================================================================================== +function TransMenu(oActuator, iDirection, iLeft, iTop, iReferencePoint, parentMenuSet) { + // public methods + this.addItem = addItem; + this.addMenu = addMenu; + this.toString = toString; + this.initialize = initialize; + this.isOpen = false; + this.show = show; + this.hide = hide; + this.items = []; + + // events + this.onactivate = new Function(); // when the menu starts to slide open + this.ondeactivate = new Function(); // when the menu finishes sliding closed + this.onmouseover = new Function(); // when the menu has been moused over + this.onqueue = new Function(); // hack .. when the menu sets a timer to be closed a little while in the future + this.ondequeue = new Function(); + + // initialization + this.index = TransMenu.registry.length; + TransMenu.registry[this.index] = this; + + var id = "TransMenu" + this.index; + var contentHeight = null; + var contentWidth = null; + var childMenuSet = null; + var animating = false; + var childMenus = []; + var slideAccel = -1; + var elmCache = null; + var ready = false; + var _this = this; + var a = null; + + var pos = iDirection == TransMenu.direction.down ? "top" : "left"; + var dim = null; + + // private and public method implimentations + function addItem(sText, sUrl) { + var item = new TransMenuItem(sText, sUrl, this); + item._index = this.items.length; + this.items[item._index] = item; + } + + function addMenu(oMenuItem) { + if (!oMenuItem.parentMenu == this) throw new Error("Cannot add a menu here"); + + if (childMenuSet == null) childMenuSet = new TransMenuSet(TransMenu.direction.right, -5, 2, TransMenu.reference.topRight); + + var m = childMenuSet.addMenu(oMenuItem); + + childMenus[oMenuItem._index] = m; + m.onmouseover = child_mouseover; + m.ondeactivate = child_deactivate; + m.onqueue = child_queue; + m.ondequeue = child_dequeue; + + return m; + } + + function initialize() { + initCache(); + initEvents(); + initSize(); + ready = true; + } + + function show() { + //dbg_dump("show"); + if (ready) { + _this.isOpen = true; + animating = true; + setContainerPos(); + elmCache["clip"].style.visibility = "visible"; + elmCache["clip"].style.zIndex = TransMenu._maxZ++; + //dbg_dump("maxZ: " + TransMenu._maxZ); + slideStart(); + _this.onactivate(); + } + } + + function hide() { + if (ready) { + _this.isOpen = false; + animating = true; + + for (var i = 0, item = null; item = elmCache.item[i]; i++) + dehighlight(item); + + if (childMenuSet) childMenuSet.hide(); + + slideStart(); + _this.ondeactivate(); + } + } + + function setContainerPos() { + var sub = oActuator.constructor == TransMenuItem; + var act = sub ? oActuator.parentMenu.elmCache["item"][oActuator._index] : oActuator; + var el = act; + + var x = 0; + var y = 0; + + + var minX = 0; + var maxX = (window.innerWidth ? window.innerWidth : document.body.clientWidth) - parseInt(elmCache["clip"].style.width); + var minY = 0; + var maxY = (window.innerHeight ? window.innerHeight : document.body.clientHeight) - parseInt(elmCache["clip"].style.height); + + // add up all offsets... subtract any scroll offset + while (sub ? el.parentNode.className.indexOf("transMenu") == -1 : el.offsetParent) { + x += el.offsetLeft; + y += el.offsetTop; + + if (el.scrollLeft) x -= el.scrollLeft; + if (el.scrollTop) y -= el.scrollTop; + + el = el.offsetParent; + } + + if (oActuator.constructor == TransMenuItem) { + x += parseInt(el.parentNode.style.left); + y += parseInt(el.parentNode.style.top); + } + + switch (iReferencePoint) { + case TransMenu.reference.topLeft: + break; + case TransMenu.reference.topRight: + x += act.offsetWidth; + break; + case TransMenu.reference.bottomLeft: + y += act.offsetHeight; + break; + case TransMenu.reference.bottomRight: + x += act.offsetWidth; + y += act.offsetHeight; + break; + } + + x += iLeft; + y += iTop; + + x = Math.max(Math.min(x, maxX), minX); + y = Math.max(Math.min(y, maxY), minY); + + elmCache["clip"].style.left = x + "px"; + elmCache["clip"].style.top = y + "px"; + } + + function slideStart() { + var x0 = parseInt(elmCache["content"].style[pos]); + var x1 = _this.isOpen ? 0 : -dim; + + if (a != null) a.stop(); + a = new Accelimation(x0, x1, TransMenu.slideTime, slideAccel); + + a.onframe = slideFrame; + a.onend = slideEnd; + + a.start(); + } + + function slideFrame(x) { + elmCache["content"].style[pos] = x + "px"; + } + + function slideEnd() { + if (!_this.isOpen) elmCache["clip"].style.visibility = "hidden"; + animating = false; + } + + function initSize() { + // everything is based off the size of the items table... + var ow = elmCache["items"].offsetWidth; + var oh = elmCache["items"].offsetHeight; + var ua = navigator.userAgent.toLowerCase(); + + // clipping container should be ow/oh + the size of the shadow + elmCache["clip"].style.width = ow + TransMenu.shadowSize + 2 + "px"; + elmCache["clip"].style.height = oh + TransMenu.shadowSize + 2 + "px"; + + // same with content... + elmCache["content"].style.width = ow + TransMenu.shadowSize + "px"; + elmCache["content"].style.height = oh + TransMenu.shadowSize + "px"; + + contentHeight = oh + TransMenu.shadowSize; + contentWidth = ow + TransMenu.shadowSize; + + dim = iDirection == TransMenu.direction.down ? contentHeight : contentWidth; + + // set initially closed + elmCache["content"].style[pos] = -dim - TransMenu.shadowSize + "px"; + elmCache["clip"].style.visibility = "hidden"; + + // if *not* mac/ie 5 + if (ua.indexOf("mac") == -1 || ua.indexOf("gecko") > -1) { + // set background div to offset size + elmCache["background"].style.width = ow + "px"; + elmCache["background"].style.height = oh + "px"; + elmCache["background"].style.backgroundColor = TransMenu.backgroundColor; + + // shadow left starts at offset left and is offsetHeight pixels high + elmCache["shadowRight"].style.left = ow + "px"; + elmCache["shadowRight"].style.height = oh - (TransMenu.shadowOffset - TransMenu.shadowSize) + "px"; + elmCache["shadowRight"].style.backgroundColor = TransMenu.shadowColor; + + // shadow bottom starts at offset height and is offsetWidth - shadowOffset + // pixels wide (we don't want the bottom and right shadows to overlap or we + // get an extra bright bottom-right corner) + elmCache["shadowBottom"].style.top = oh + "px"; + elmCache["shadowBottom"].style.width = ow - TransMenu.shadowOffset + "px"; + elmCache["shadowBottom"].style.backgroundColor = TransMenu.shadowColor; + } + // mac ie is a little different because we use a PNG for the transparency + else { + // set background div to offset size + elmCache["background"].firstChild.src = TransMenu.backgroundPng; + elmCache["background"].firstChild.width = ow; + elmCache["background"].firstChild.height = oh; + + // shadow left starts at offset left and is offsetHeight pixels high + elmCache["shadowRight"].firstChild.src = TransMenu.shadowPng; + elmCache["shadowRight"].style.left = ow + "px"; + elmCache["shadowRight"].firstChild.width = TransMenu.shadowSize; + elmCache["shadowRight"].firstChild.height = oh - (TransMenu.shadowOffset - TransMenu.shadowSize); + + // shadow bottom starts at offset height and is offsetWidth - shadowOffset + // pixels wide (we don't want the bottom and right shadows to overlap or we + // get an extra bright bottom-right corner) + elmCache["shadowBottom"].firstChild.src = TransMenu.shadowPng; + elmCache["shadowBottom"].style.top = oh + "px"; + elmCache["shadowBottom"].firstChild.height = TransMenu.shadowSize; + elmCache["shadowBottom"].firstChild.width = ow - TransMenu.shadowOffset; + } + } + + function initCache() { + var menu = document.getElementById(id); + var all = menu.all ? menu.all : menu.getElementsByTagName("*"); // IE/win doesn't support * syntax, but does have the document.all thing + + elmCache = {}; + elmCache["clip"] = menu; + elmCache["item"] = []; + + for (var i = 0, elm = null; elm = all[i]; i++) { + switch (elm.className) { + case "items": + case "content": + case "background": + case "shadowRight": + case "shadowBottom": + elmCache[elm.className] = elm; + break; + case "item": + elm._index = elmCache["item"].length; + elmCache["item"][elm._index] = elm; + break; + } + } + + // hack! + _this.elmCache = elmCache; + } + + function initEvents() { + // hook item mouseover + for (var i = 0, item = null; item = elmCache.item[i]; i++) { + item.onmouseover = item_mouseover; + item.onmouseout = item_mouseout; + item.onclick = item_click; + } + + // hook actuation + if (typeof oActuator.tagName != "undefined") { + oActuator.onmouseover = actuator_mouseover; + oActuator.onmouseout = actuator_mouseout; + } + + // hook menu mouseover + elmCache["content"].onmouseover = content_mouseover; + elmCache["content"].onmouseout = content_mouseout; + } + + function highlight(oRow) { + oRow.className = "item hover"; + if (childMenus[oRow._index]) + oRow.lastChild.firstChild.src = TransMenu.dingbatOn; + } + + function dehighlight(oRow) { + oRow.className = "item"; + if (childMenus[oRow._index]) + oRow.lastChild.firstChild.src = TransMenu.dingbatOff; + } + + function item_mouseover() { + if (!animating) { + highlight(this); + + if (childMenus[this._index]) + childMenuSet.showMenu(childMenus[this._index]); + else if (childMenuSet) childMenuSet.hide(); + } + } + + function item_mouseout() { + if (!animating) { + if (childMenus[this._index]) + childMenuSet.hideMenu(childMenus[this._index]); + else // otherwise child_deactivate will do this + dehighlight(this); + } + } + + function item_click() { + if (!animating) { + if (_this.items[this._index].url) + location.href = _this.items[this._index].url; + } + } + + function actuator_mouseover() { + parentMenuSet.showMenu(_this); + } + + function actuator_mouseout() { + parentMenuSet.hideMenu(_this); + } + + function content_mouseover() { + if (!animating) { + parentMenuSet.showMenu(_this); + _this.onmouseover(); + } + } + + function content_mouseout() { + if (!animating) { + parentMenuSet.hideMenu(_this); + } + } + + function child_mouseover() { + if (!animating) { + parentMenuSet.showMenu(_this); + } + } + + function child_deactivate() { + for (var i = 0; i < childMenus.length; i++) { + if (childMenus[i] == this) { + dehighlight(elmCache["item"][i]); + break; + } + } + } + + function child_queue() { + parentMenuSet.hideMenu(_this); + } + + function child_dequeue() { + parentMenuSet.showMenu(_this); + } + + function toString() { + var aHtml = []; + var sClassName = "transMenu" + (oActuator.constructor != TransMenuItem ? " top" : ""); + + for (var i = 0, item = null; item = this.items[i]; i++) { + aHtml[i] = item.toString(childMenus[i]); + } + + return '

                            ' + + '
                            ' + + '' + + aHtml.join('') + + '
                            ' + + '
                            ' + + '
                            ' + + '
                            ' + + '
                            '; + } +} + + +//================================================================================================== +// TransMenuSet +//================================================================================================== +// iDirection : The direction to slide out. One of TransMenu.direction. +// iLeft : Left pixel offset of menus from actuator +// iTop : Top pixel offset of menus from actuator +// iReferencePoint : Corner of actuator to measure from. One of TransMenu.referencePoint. +//================================================================================================== +TransMenuSet.registry = []; + +function TransMenuSet(iDirection, iLeft, iTop, iReferencePoint) { + // public methods + this.addMenu = addMenu; + this.showMenu = showMenu; + this.hideMenu = hideMenu; + this.hide = hide; + this.hideCurrent = hideCurrent; + + // initialization + var menus = []; + var _this = this; + var current = null; + + this.index = TransMenuSet.registry.length; + TransMenuSet.registry[this.index] = this; + + // method implimentations... + function addMenu(oActuator) { + var m = new TransMenu(oActuator, iDirection, iLeft, iTop, iReferencePoint, this); + menus[menus.length] = m; + return m; + } + + function showMenu(oMenu) { + if (oMenu != current) { + // close currently open menu + if (current != null) hide(current); + + // set current menu to this one + current = oMenu; + + // if this menu is closed, open it + oMenu.show(); + } + else { + // hide pending calls to close this menu + cancelHide(oMenu); + } + } + + function hideMenu(oMenu) { + //dbg_dump("hideMenu a " + oMenu.index); + if (current == oMenu && oMenu.isOpen) { + //dbg_dump("hideMenu b " + oMenu.index); + if (!oMenu.hideTimer) scheduleHide(oMenu); + } + } + + function scheduleHide(oMenu) { + //dbg_dump("scheduleHide " + oMenu.index); + oMenu.onqueue(); + oMenu.hideTimer = window.setTimeout("TransMenuSet.registry[" + _this.index + "].hide(TransMenu.registry[" + oMenu.index + "])", TransMenu.hideDelay); + } + + function cancelHide(oMenu) { + //dbg_dump("cancelHide " + oMenu.index); + if (oMenu.hideTimer) { + oMenu.ondequeue(); + window.clearTimeout(oMenu.hideTimer); + oMenu.hideTimer = null; + } + } + + function hide(oMenu) { + if (!oMenu && current) oMenu = current; + + if (oMenu && current == oMenu && oMenu.isOpen) { + hideCurrent(); + } + } + + function hideCurrent() { + if (null != current) { + cancelHide(current); + current.hideTimer = null; + current.hide(); + current = null; + } + } +} + +//================================================================================================== +// TransMenuItem (internal) +// represents an item in a dropdown +//================================================================================================== +// sText : The item display text +// sUrl : URL to load when the item is clicked +// oParent : Menu this item is a part of +//================================================================================================== +function TransMenuItem(sText, sUrl, oParent) { + this.toString = toString; + this.text = sText; + this.url = sUrl; + this.parentMenu = oParent; + + function toString(bDingbat) { + var sDingbat = bDingbat ? TransMenu.dingbatOff : TransMenu.spacerGif; + var iEdgePadding = TransMenu.itemPadding + TransMenu.menuPadding; + var sPaddingLeft = "padding:" + TransMenu.itemPadding + "px; padding-left:" + iEdgePadding + "px;" + var sPaddingRight = "padding:" + TransMenu.itemPadding + "px; padding-right:" + iEdgePadding + "px;" + + return '' + + sText + '' + + ''; + } +} + + + + + + +//===================================================================== +// Accel[erated] [an]imation object +// change a property of an object over time in an accelerated fashion +//===================================================================== +// obj : reference to the object whose property you'd like to animate +// prop : property you would like to change eg: "left" +// to : final value of prop +// time : time the animation should take to run +// zip : optional. specify the zippiness of the acceleration. pick a +// number between -1 and 1 where -1 is full decelerated, 1 is +// full accelerated, and 0 is linear (no acceleration). default +// is 0. +// unit : optional. specify the units for use with prop. default is +// "px". +//===================================================================== +// bezier functions lifted from the lib_animation.js file in the +// 13th Parallel API. www.13thparallel.org +//===================================================================== + +function Accelimation(from, to, time, zip) { + if (typeof zip == "undefined") zip = 0; + if (typeof unit == "undefined") unit = "px"; + + this.x0 = from; + this.x1 = to; + this.dt = time; + this.zip = -zip; + this.unit = unit; + this.timer = null; + this.onend = new Function(); + this.onframe = new Function(); +} + + + +//===================================================================== +// public methods +//===================================================================== + +// after you create an accelimation, you call this to start it-a runnin' +Accelimation.prototype.start = function() { + this.t0 = new Date().getTime(); + this.t1 = this.t0 + this.dt; + var dx = this.x1 - this.x0; + this.c1 = this.x0 + ((1 + this.zip) * dx / 3); + this.c2 = this.x0 + ((2 + this.zip) * dx / 3); + Accelimation._add(this); +} + +// and if you need to stop it early for some reason... +Accelimation.prototype.stop = function() { + Accelimation._remove(this); +} + + + +//===================================================================== +// private methods +//===================================================================== + +// paints one frame. gets called by Accelimation._paintAll. +Accelimation.prototype._paint = function(time) { + if (time < this.t1) { + var elapsed = time - this.t0; + this.onframe(Accelimation._getBezier(elapsed/this.dt,this.x0,this.x1,this.c1,this.c2)); + } + else this._end(); +} + +// ends the animation +Accelimation.prototype._end = function() { + Accelimation._remove(this); + this.onframe(this.x1); + this.onend(); +} + + + + +//===================================================================== +// static methods (all private) +//===================================================================== + +// add a function to the list of ones to call periodically +Accelimation._add = function(o) { + var index = this.instances.length; + this.instances[index] = o; + // if this is the first one, start the engine + if (this.instances.length == 1) { + this.timerID = window.setInterval("Accelimation._paintAll()", this.targetRes); + } +} + +// remove a function from the list +Accelimation._remove = function(o) { + for (var i = 0; i < this.instances.length; i++) { + if (o == this.instances[i]) { + this.instances = this.instances.slice(0,i).concat( this.instances.slice(i+1) ); + break; + } + } + // if that was the last one, stop the engine + if (this.instances.length == 0) { + window.clearInterval(this.timerID); + this.timerID = null; + } +} + +// "engine" - call each function in the list every so often +Accelimation._paintAll = function() { + var now = new Date().getTime(); + for (var i = 0; i < this.instances.length; i++) { + this.instances[i]._paint(now); + } +} + + +// Bezier functions: +Accelimation._B1 = function(t) { return t*t*t } +Accelimation._B2 = function(t) { return 3*t*t*(1-t) } +Accelimation._B3 = function(t) { return 3*t*(1-t)*(1-t) } +Accelimation._B4 = function(t) { return (1-t)*(1-t)*(1-t) } + + +//Finds the coordinates of a point at a certain stage through a bezier curve +Accelimation._getBezier = function(percent,startPos,endPos,control1,control2) { + return endPos * this._B1(percent) + control2 * this._B2(percent) + control1 * this._B3(percent) + startPos * this._B4(percent); +} + + +//===================================================================== +// static properties +//===================================================================== + +Accelimation.instances = []; +Accelimation.targetRes = 10; +Accelimation.timerID = null; + + +//===================================================================== +// IE win memory cleanup +//===================================================================== + +if (window.attachEvent) { + var cearElementProps = [ + 'data', + 'onmouseover', + 'onmouseout', + 'onmousedown', + 'onmouseup', + 'ondblclick', + 'onclick', + 'onselectstart', + 'oncontextmenu' + ]; + + window.attachEvent("onunload", function() { + var el; + for(var d = document.all.length;d--;){ + el = document.all[d]; + for(var c = cearElementProps.length;c--;){ + el[cearElementProps[c]] = null; + } + } + }); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/code-red/javascript/transmenuC.js b/src/usr/local/www/themes/code-red/javascript/transmenuC.js new file mode 100755 index 0000000..88626c7 --- /dev/null +++ b/src/usr/local/www/themes/code-red/javascript/transmenuC.js @@ -0,0 +1,86 @@ +/* ================================================================================================= + * TransMenu + * March, 2003 + * Customizable multi-level animated DHTML menus with transparency. + * ================================================================================================= + * "Can I use this?" + * + * Use of this library is governed by the Creative Commons Attribution 2.0 License. You can check it + * out at: http://creativecommons.org/licenses/by/2.0/ + * + * Basically: You may copy, distribute, and eat this code as you wish. But you must give me credit + * for writing it. You may not misrepresent yourself as the author of this code. + * ================================================================================================= + * "It's kinda hard to read, though" + * + * The uncompressed, commented version of this script can be found at: + * http://youngpup.net/projects/transMenus + * ============================================================================================== */ +TransMenu.spacerGif="themes/nervecenter/javascript/img/x.gif";TransMenu.dingbatOn="themes/nervecenter/javascript/img/submenu-on.gif";TransMenu.dingbatOff="themes/nervecenter/javascript/img/submenu-off.gif";TransMenu.dingbatSize=14;TransMenu.menuPadding=5;TransMenu.itemPadding=3;TransMenu.shadowSize=2;TransMenu.shadowOffset=3;TransMenu.shadowColor="#000000";TransMenu.shadowPng="themes/nervecenter/javascript/img/grey-40.png";TransMenu.backgroundColor="#990000";TransMenu.backgroundPng="themes/nervecenter/javascript/img/white-90.png";TransMenu.hideDelay=1000;TransMenu.slideTime=400;TransMenu.reference={topLeft:1,topRight:2,bottomLeft:3,bottomRight:4};TransMenu.direction={down:1,right:2};TransMenu.registry=[];TransMenu._maxZ=100;TransMenu.isSupported=function(){var ua=navigator.userAgent.toLowerCase();var pf=navigator.platform.toLowerCase();var an=navigator.appName;var r=false;if(ua.indexOf("gecko")>-1&&navigator.productSub>=20020605)r=true;else if(an=="Microsoft Internet Explorer"){if(document.getElementById){if(pf.indexOf("mac")==0){r=/msie (\d(.\d*)?)/.test(ua)&&Number(RegExp.$1)>=5.1;} +else r=true;}} +return r;} +TransMenu.initialize=function(){for(var i=0,menu=null;menu=this.registry[i];i++){menu.initialize();}} +TransMenu.renderAll=function(){var aMenuHtml=[];for(var i=0,menu=null;menu=this.registry[i];i++){aMenuHtml[i]=menu.toString();} +document.write(aMenuHtml.join(""));} +function TransMenu(oActuator,iDirection,iLeft,iTop,iReferencePoint,parentMenuSet){this.addItem=addItem;this.addMenu=addMenu;this.toString=toString;this.initialize=initialize;this.isOpen=false;this.show=show;this.hide=hide;this.items=[];this.onactivate=new Function();this.ondeactivate=new Function();this.onmouseover=new Function();this.onqueue=new Function();this.ondequeue=new Function();this.index=TransMenu.registry.length;TransMenu.registry[this.index]=this;var id="TransMenu"+this.index;var contentHeight=null;var contentWidth=null;var childMenuSet=null;var animating=false;var childMenus=[];var slideAccel=-1;var elmCache=null;var ready=false;var _this=this;var a=null;var pos=iDirection==TransMenu.direction.down?"top":"left";var dim=null;function addItem(sText,sUrl){var item=new TransMenuItem(sText,sUrl,this);item._index=this.items.length;this.items[item._index]=item;} +function addMenu(oMenuItem){if(!oMenuItem.parentMenu==this)throw new Error("Cannot add a menu here");if(childMenuSet==null)childMenuSet=new TransMenuSet(TransMenu.direction.right,-5,2,TransMenu.reference.topRight);var m=childMenuSet.addMenu(oMenuItem);childMenus[oMenuItem._index]=m;m.onmouseover=child_mouseover;m.ondeactivate=child_deactivate;m.onqueue=child_queue;m.ondequeue=child_dequeue;return m;} +function initialize(){initCache();initEvents();initSize();ready=true;} +function show(){if(ready){_this.isOpen=true;animating=true;setContainerPos();elmCache["clip"].style.visibility="visible";elmCache["clip"].style.zIndex=TransMenu._maxZ++;slideStart();_this.onactivate();}} +function hide(){if(ready){_this.isOpen=false;animating=true;for(var i=0,item=null;item=elmCache.item[i];i++)dehighlight(item);if(childMenuSet)childMenuSet.hide();slideStart();_this.ondeactivate();}} +function setContainerPos(){var sub=oActuator.constructor==TransMenuItem;var act=sub?oActuator.parentMenu.elmCache["item"][oActuator._index]:oActuator;var el=act;var x=0;var y=0;var minX=0;var maxX=(window.innerWidth?window.innerWidth:document.body.clientWidth)-parseInt(elmCache["clip"].style.width);var minY=0;var maxY=(window.innerHeight?window.innerHeight:document.body.clientHeight)-parseInt(elmCache["clip"].style.height);while(sub?el.parentNode.className.indexOf("transMenu")==-1:el.offsetParent){x+=el.offsetLeft;y+=el.offsetTop;if(el.scrollLeft)x-=el.scrollLeft;if(el.scrollTop)y-=el.scrollTop;el=el.offsetParent;} +if(oActuator.constructor==TransMenuItem){x+=parseInt(el.parentNode.style.left);y+=parseInt(el.parentNode.style.top);} +switch(iReferencePoint){case TransMenu.reference.topLeft:break;case TransMenu.reference.topRight:x+=act.offsetWidth;break;case TransMenu.reference.bottomLeft:y+=act.offsetHeight;break;case TransMenu.reference.bottomRight:x+=act.offsetWidth;y+=act.offsetHeight;break;} +x+=iLeft;y+=iTop;x=Math.max(Math.min(x,maxX),minX);y=Math.max(Math.min(y,maxY),minY);elmCache["clip"].style.left=x+"px";elmCache["clip"].style.top=y+"px";} +function slideStart(){var x0=parseInt(elmCache["content"].style[pos]);var x1=_this.isOpen?0:-dim;if(a!=null)a.stop();a=new Accelimation(x0,x1,TransMenu.slideTime,slideAccel);a.onframe=slideFrame;a.onend=slideEnd;a.start();} +function slideFrame(x){elmCache["content"].style[pos]=x+"px";} +function slideEnd(){if(!_this.isOpen)elmCache["clip"].style.visibility="hidden";animating=false;} +function initSize(){var ow=elmCache["items"].offsetWidth;var oh=elmCache["items"].offsetHeight;var ua=navigator.userAgent.toLowerCase();elmCache["clip"].style.width=ow+TransMenu.shadowSize+2+"px";elmCache["clip"].style.height=oh+TransMenu.shadowSize+2+"px";elmCache["content"].style.width=ow+TransMenu.shadowSize+"px";elmCache["content"].style.height=oh+TransMenu.shadowSize+"px";contentHeight=oh+TransMenu.shadowSize;contentWidth=ow+TransMenu.shadowSize;dim=iDirection==TransMenu.direction.down?contentHeight:contentWidth;elmCache["content"].style[pos]=-dim-TransMenu.shadowSize+"px";elmCache["clip"].style.visibility="hidden";if(ua.indexOf("mac")==-1||ua.indexOf("gecko")>-1){elmCache["background"].style.width=ow+"px";elmCache["background"].style.height=oh+"px";elmCache["background"].style.backgroundColor=TransMenu.backgroundColor;elmCache["shadowRight"].style.left=ow+"px";elmCache["shadowRight"].style.height=oh-(TransMenu.shadowOffset-TransMenu.shadowSize)+"px";elmCache["shadowRight"].style.backgroundColor=TransMenu.shadowColor;elmCache["shadowBottom"].style.top=oh+"px";elmCache["shadowBottom"].style.width=ow-TransMenu.shadowOffset+"px";elmCache["shadowBottom"].style.backgroundColor=TransMenu.shadowColor;} +else{elmCache["background"].firstChild.src=TransMenu.backgroundPng;elmCache["background"].firstChild.width=ow;elmCache["background"].firstChild.height=oh;elmCache["shadowRight"].firstChild.src=TransMenu.shadowPng;elmCache["shadowRight"].style.left=ow+"px";elmCache["shadowRight"].firstChild.width=TransMenu.shadowSize;elmCache["shadowRight"].firstChild.height=oh-(TransMenu.shadowOffset-TransMenu.shadowSize);elmCache["shadowBottom"].firstChild.src=TransMenu.shadowPng;elmCache["shadowBottom"].style.top=oh+"px";elmCache["shadowBottom"].firstChild.height=TransMenu.shadowSize;elmCache["shadowBottom"].firstChild.width=ow-TransMenu.shadowOffset;}} +function initCache(){var menu=document.getElementById(id);var all=menu.all?menu.all:menu.getElementsByTagName("*");elmCache={};elmCache["clip"]=menu;elmCache["item"]=[];for(var i=0,elm=null;elm=all[i];i++){switch(elm.className){case"items":case"content":case"background":case"shadowRight":case"shadowBottom":elmCache[elm.className]=elm;break;case"item":elm._index=elmCache["item"].length;elmCache["item"][elm._index]=elm;break;}} +_this.elmCache=elmCache;} +function initEvents(){for(var i=0,item=null;item=elmCache.item[i];i++){item.onmouseover=item_mouseover;item.onmouseout=item_mouseout;item.onclick=item_click;} +if(typeof oActuator.tagName!="undefined"){oActuator.onmouseover=actuator_mouseover;oActuator.onmouseout=actuator_mouseout;} +elmCache["content"].onmouseover=content_mouseover;elmCache["content"].onmouseout=content_mouseout;} +function highlight(oRow){oRow.className="item hover";if(childMenus[oRow._index])oRow.lastChild.firstChild.src=TransMenu.dingbatOn;} +function dehighlight(oRow){oRow.className="item";if(childMenus[oRow._index])oRow.lastChild.firstChild.src=TransMenu.dingbatOff;} +function item_mouseover(){if(!animating){highlight(this);if(childMenus[this._index])childMenuSet.showMenu(childMenus[this._index]);else if(childMenuSet)childMenuSet.hide();}} +function item_mouseout(){if(!animating){if(childMenus[this._index])childMenuSet.hideMenu(childMenus[this._index]);else dehighlight(this);}} +function item_click(){if(!animating){if(_this.items[this._index].url)location.href=_this.items[this._index].url;}} +function actuator_mouseover(){parentMenuSet.showMenu(_this);} +function actuator_mouseout(){parentMenuSet.hideMenu(_this);} +function content_mouseover(){if(!animating){parentMenuSet.showMenu(_this);_this.onmouseover();}} +function content_mouseout(){if(!animating){parentMenuSet.hideMenu(_this);}} +function child_mouseover(){if(!animating){parentMenuSet.showMenu(_this);}} +function child_deactivate(){for(var i=0;i'+'
                            '+''+aHtml.join('')+'
                            '+'
                            '+'
                            '+'
                            '+'
                            ';}} +TransMenuSet.registry=[];function TransMenuSet(iDirection,iLeft,iTop,iReferencePoint){this.addMenu=addMenu;this.showMenu=showMenu;this.hideMenu=hideMenu;this.hide=hide;this.hideCurrent=hideCurrent;var menus=[];var _this=this;var current=null;this.index=TransMenuSet.registry.length;TransMenuSet.registry[this.index]=this;function addMenu(oActuator){var m=new TransMenu(oActuator,iDirection,iLeft,iTop,iReferencePoint,this);menus[menus.length]=m;return m;} +function showMenu(oMenu){if(oMenu!=current){if(current!=null)hide(current);current=oMenu;oMenu.show();} +else{cancelHide(oMenu);}} +function hideMenu(oMenu){if(current==oMenu&&oMenu.isOpen){if(!oMenu.hideTimer)scheduleHide(oMenu);}} +function scheduleHide(oMenu){oMenu.onqueue();oMenu.hideTimer=window.setTimeout("TransMenuSet.registry["+_this.index+"].hide(TransMenu.registry["+oMenu.index+"])",TransMenu.hideDelay);} +function cancelHide(oMenu){if(oMenu.hideTimer){oMenu.ondequeue();window.clearTimeout(oMenu.hideTimer);oMenu.hideTimer=null;}} +function hide(oMenu){if(!oMenu&¤t)oMenu=current;if(oMenu&¤t==oMenu&&oMenu.isOpen){hideCurrent();}} +function hideCurrent(){if (null != current){cancelHide(current);current.hideTimer=null;current.hide();current=null;}}} +function TransMenuItem(sText,sUrl,oParent){this.toString=toString;this.text=sText;this.url=sUrl;this.parentMenu=oParent;function toString(bDingbat){var sDingbat=bDingbat?TransMenu.dingbatOff:TransMenu.spacerGif;var iEdgePadding=TransMenu.itemPadding+TransMenu.menuPadding;var sPaddingLeft="padding:"+TransMenu.itemPadding+"px; padding-left:"+iEdgePadding+"px;" +var sPaddingRight="padding:"+TransMenu.itemPadding+"px; padding-right:"+iEdgePadding+"px;" +return''+sText+''+'';}} +function Accelimation(from,to,time,zip){if(typeof zip=="undefined")zip=0;if(typeof unit=="undefined")unit="px";this.x0=from;this.x1=to;this.dt=time;this.zip=-zip;this.unit=unit;this.timer=null;this.onend=new Function();this.onframe=new Function();} +Accelimation.prototype.start=function(){this.t0=new Date().getTime();this.t1=this.t0+this.dt;var dx=this.x1-this.x0;this.c1=this.x0+((1+this.zip)*dx/3);this.c2=this.x0+((2+this.zip)*dx/3);Accelimation._add(this);} +Accelimation.prototype.stop=function(){Accelimation._remove(this);} +Accelimation.prototype._paint=function(time){if(time= !,... +# where: forbidden pages are those pages that should *not* use +# the particular JavaScript function within the JS event +# specified below. +# $Id$ +# +onload=tmenuinit(); !wizard.php \ No newline at end of file diff --git a/src/usr/local/www/themes/code-red/loader.js b/src/usr/local/www/themes/code-red/loader.js new file mode 100644 index 0000000..7f67dc0 --- /dev/null +++ b/src/usr/local/www/themes/code-red/loader.js @@ -0,0 +1,29 @@ +//'); +} + +document.write(''); + +//]]> diff --git a/src/usr/local/www/themes/code-red/login.css b/src/usr/local/www/themes/code-red/login.css new file mode 100755 index 0000000..6ccdd42 --- /dev/null +++ b/src/usr/local/www/themes/code-red/login.css @@ -0,0 +1,1136 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background: url('images/logon-background.gif') no-repeat; + background-position : center 0px; + background-color: #4a0203; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 10; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + + +#graph { + position: relative; + z-index: 10; +} + + + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + + +#login { +/* background: #cccccc; */ + background-color: transparent; + border: 0px solid #cccccc; + margin: 5em auto; + padding: 0em; + width: 400px; +/* filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; */ +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; +/* background: #ffffff; */ + margin-top: 0; + display: block; + text-indent: -1000px; + height: 400px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: -40px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -390px; + left: 60px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + top: -300px; */ +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + left: 10px; + top: -300px; */ +} + +#login #submit { + font-size: 1em; + font-weight: bold; + text-align: center; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -20px; + left: 170px; +} + +/* loginerror box follows */ + +#login #inputerrors { + background-color: transparent; + border: 0px solid #666666; + margin: 5em auto; + vertical-align: middle; + padding: 0em; + width: 330px; + height: 50px; + position: relative; + top: -112px; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/code-red/menu.inc b/src/usr/local/www/themes/code-red/menu.inc new file mode 100755 index 0000000..a274410 --- /dev/null +++ b/src/usr/local/www/themes/code-red/menu.inc @@ -0,0 +1,177 @@ + + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +require("menu.inc"); + +define("TMENU_STUB", " + // set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. + // but you can experiment with effect on loadtime. + if (TransMenu.isSupported()) { + + //================================================================================================== + // create a set of dropdowns + //================================================================================================== + // the first param should always be down, as it is here + // + // The second and third param are the top and left offset positions of the menus from their actuators + // respectively. To make a menu appear a little to the left and bottom of an actuator, you could use + // something like -5, 5 + // + // The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner + // of the actuator from which to measure the offset positions above. Here we are saying we want the + // menu to appear directly below the bottom left corner of the actuator + //================================================================================================== + var ms = new TransMenuSet(TransMenu.direction.down, 1, 0, TransMenu.reference.bottomLeft); + + //================================================================================================== + // create a dropdown menu + //================================================================================================== + // the first parameter should be the HTML element which will act actuator for the menu + //================================================================================================== + + @@MENU_DEFINITIONS@@ + + //================================================================================================== + // write drop downs into page + //================================================================================================== + // this method writes all the HTML for the menus into the page with document.write(). It must be + // called within the body of the HTML page. + //================================================================================================== + TransMenu.renderAll(); + } +"); + +class NervecenterMenu extends Menu { + private $menuJScript = "NOT-SET"; + private $menuJScriptEvents = "NOT-SET"; + private $menuID = "NOT-SET"; + + public function __construct($identification = "", $filename = "", Component $c = NULL) { + parent::__construct($identification, $filename, $c); + + $id = "mnua_" . str_replace(" ", "", strtolower($this->getID())); + $this->menuID = $id; + + if ($this->hasParent()) { + $this->menuJScript = "\tvar {$id} = ms.addMenu(document.getElementById('{$id}'));\n"; + } + } // end __construct + + public function getMenuID() { + return $this->menuID; + } + + public function setMenuID($myMenuID) { + $this->menuID = $myMenuID; + } + + public function getMenuJScript() { + $childJScript = ""; + foreach ($this->getChildren() as $component) { + $childJScript .= $component->getMenuJScript(); + } + + if (! $this->hasParent()) { + $this->menuJScript = str_replace("@@MENU_DEFINITIONS@@", $childJScript, TMENU_STUB); + } else { + $this->menuJScript .= "\n$childJScript\n"; + } + + return $this->menuJScript; + } + + public function getMenuJScriptEvents() { + return $this->menuJScriptEvents; + } + + public function __toString() { + if (! $this->hasParent()) { + $menuMarkup =<< + @@CHILD_ELEMENTS@@ + + +EOD; + } else { + $name = gettext($this->getID()); + $id = "mnua_" . str_replace(" ", "", strtolower($this->getID())); + + $menuMarkup =<<{$name} + @@CHILD_ELEMENTS@@ +EOD; + } + + $childMarkup = ""; + foreach ($this->getChildren() as $component) { + $childMarkup .= $component; + } + + $menuMarkup = str_replace("@@CHILD_ELEMENTS@@", $childMarkup, $menuMarkup); + + return $menuMarkup; + } +} + +class NervecenterMenuItem extends MenuItem { + private $menuJScript = "NOT-SET"; + private $menuJScriptEvents = "NOT-SET"; + + public function __construct($identification = "", $filename = "", $href = "", Component $c = NULL) { + parent::__construct($identification, $filename, $href, $c); + + $href = $this->getHref() <> "" ? $this->getHref() : "{$this->getFile()}"; + $name = gettext($this->getID()); + $file = $this->getFile(); + + $this->menuJScript = $this->check_access("{$file}", "\t{$this->getParent()->getMenuID()}.addItem('{$name}', '{$href}');\n"); + } + + public function getMenuJScript() { + return $this->menuJScript; + } + + public function getMenuJScriptEvents() { + return $this->menuJScriptEvents; + } + + public function __toString() { + return ""; + } +} + +?> diff --git a/src/usr/local/www/themes/code-red/new_tab_menu.css b/src/usr/local/www/themes/code-red/new_tab_menu.css new file mode 100644 index 0000000..04c4cf2 --- /dev/null +++ b/src/usr/local/www/themes/code-red/new_tab_menu.css @@ -0,0 +1,101 @@ +/* + new_tab_menu.css + part of pfSense + Copyright (C) 2010-2011 Robert Zelaya + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + + Replace your old tab menu with the following code. To add a second tab menu line just cut and paste again. + The following code is dependent on new_tab_menu.css and images/new_tab_menu.png. + + + + + + + +*/ + +.newtabmenu ul, li{border:0; margin:0; padding:0; list-style:none;} + +.newtabmenu li{float:left; margin-right:2px; text-align: center;} +.newtabmenu a:link, .newtabmenu a:visited{ + background:url(images/new_tab_menu.png) right 45px; + color:#ffffff; /* noactive font */ + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + font-weight:bold; + font-size:.9em; + height:20px; + line-height:20px; + text-decoration:none; +} +.newtabmenu a span{ + background:url(images/new_tab_menu.png) left 45px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + height:20px; + margin-right:7px; + padding-left:7px; +} +.newtabmenu a:hover{ + background:url(images/new_tab_menu.png) right 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + color:#ffffff; /* hover over font */ +} +.newtabmenu a:hover span{ + background:url(images/new_tab_menu.png) left 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ +} + +/* -------------------------------- */ +/* ACTIVE ELEMENTS */ +.newtabmenu_active a:link, .newtabmenu_active a:visited, .newtabmenu_active a:visited, .newtabmenu_active a:hover{ + color:#000000; /* active font */ + background:url(images/new_tab_menu.png) right 0 no-repeat; +} +.newtabmenu_active a span, .newtabmenu_active a:hover span{ + background:url(images/new_tab_menu.png) left 0 no-repeat; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/code-red/no_big_logo b/src/usr/local/www/themes/code-red/no_big_logo new file mode 100755 index 0000000..6e5c70d --- /dev/null +++ b/src/usr/local/www/themes/code-red/no_big_logo @@ -0,0 +1 @@ +NO! DONT! \ No newline at end of file diff --git a/src/usr/local/www/themes/code-red/rrdcolors.inc.php b/src/usr/local/www/themes/code-red/rrdcolors.inc.php new file mode 100755 index 0000000..dcb7a39 --- /dev/null +++ b/src/usr/local/www/themes/code-red/rrdcolors.inc.php @@ -0,0 +1,89 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This file is included by the RRD graphing page and sets the colors */ + +/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Traffic Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colortrafficdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* Packets Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colorpacketsup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Packets Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colorpacketsdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* 95th Percentile Lines Out, In */ +$colortraffic95 = array('660000', 'FF0000'); + +/* State Table pfrate, pfstates, pfnat, srcip, dstip */ +$colorstates = array('00AA00','990000','0000FF','000000','DD9B00'); + +/* Processor Usage user, nice, system, int, processes */ +$colorprocessor = array('00AA00','990000','0000FF','DD9B00','000000'); + +/* Memory Usage active, inact, free, cache, wire */ +$colormemory = array('00AA00','990000','0000FF','666666','DD9B00'); + +/* MBUF Usage current, cache, total, max */ +$colormbuf = array('0080FF','00E344','FF0000','000000'); + +/* Traffic Shaper Queues q1, q2, q3, q4, q5, q6, q7, q8, q9 */ +$colorqueuesup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +$colorqueuesdropup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +/* Quality Graph Delay >420, 180-420, 60-180, 20-60, <20, Delay Avg */ +$colorqualityrtt = array('990000','a83c3c','b36666','bd9090','cccccc','000000'); +/* Quality Graph Loss */ +$colorqualityloss = 'ee0000'; + +/* Wireless Graph SNR, Rate, Channel*/ +/* Cellular Graph RSSI, */ +$colorwireless = array('333333','a83c3c','999999'); + +/* SPAMD Times min area, avg area, max area, Time line */ +$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); +/* SPAMD Connections max area, min area, min line, max line, avg line */ +$colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600'); + +/* OpenVPN Users Online Users */ +$colorvpnusers = array('990000'); + +/* Captive Portal Total Users Total Users */ +/* Captive Portal Concurrent Concurrent Users */ +$colorcaptiveportalusers = array('990000'); + +?> diff --git a/src/usr/local/www/themes/code-red/styles/jquery-ui-1.11.1.css b/src/usr/local/www/themes/code-red/styles/jquery-ui-1.11.1.css new file mode 100644 index 0000000..8a8c54f --- /dev/null +++ b/src/usr/local/www/themes/code-red/styles/jquery-ui-1.11.1.css @@ -0,0 +1,1226 @@ +/*! jQuery UI - v1.11.1 - 2014-09-22 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2C%20Helvetica%2C%20Arial%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=glass&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=inset_soft&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=glass&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=bbbbbb&fcHover=599fcf&iconColorHover=3383bb&bgColorActive=999999&bgTextureActive=inset_hard&bgImgOpacityActive=75&borderColorActive=999999&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=444444&iconColorHighlight=3383bb&bgColorError=c0402a&bgTextureError=flat&bgImgOpacityError=55&borderColorError=c0402a&fcError=ffffff&iconColorError=fbc856&bgColorOverlay=eeeeee&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0pxdow +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; + background-color: #990000; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #c9c9c9 url("../../../javascript/jquery/images/ui-bg_inset-soft_50_c9c9c9_1x100.png") 50% bottom repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #bbbbbb; + /* background: #dddddd url("../../../javascript/jquery/images/ui-bg_glass_35_dddddd_1x400.png") 50% 50% repeat-x; */ + color: #444444; + font-weight: bold; +} +.ui-widget-header a { + color: #444444; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_glass_60_eeeeee_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #3383bb; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #3383bb; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #bbbbbb; + background: #f8f8f8 url("../../../javascript/jquery/images/ui-bg_glass_100_f8f8f8_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #599fcf; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #599fcf; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #999999; + background: #999999 url("../../../javascript/jquery/images/ui-bg_inset-hard_75_999999_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #ffffff; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_55_eeeeee_40x100.png") 50% 50% repeat-x; + color: #444444; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #444444; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #c0402a; + background: #c0402a url("../../../javascript/jquery/images/ui-bg_flat_55_c0402a_40x100.png") 50% 50% repeat-x; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_70b2e1_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_454545_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_fbc856_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_0_eeeeee_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -4px 0 0 -4px; + padding: 4px; + background: #aaaaaa url("../../../javascript/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 0pxdow; +} diff --git a/src/usr/local/www/themes/code-red/styles/menustyles.css b/src/usr/local/www/themes/code-red/styles/menustyles.css new file mode 100755 index 0000000..06b3c7a --- /dev/null +++ b/src/usr/local/www/themes/code-red/styles/menustyles.css @@ -0,0 +1,44 @@ +#navigation { + /* border:1px solid black; */ + width: 98%; + vertical-align: middle; + height: 16px; + padding-top: 4px; + } + +#menu { + /* background: #990000; */ + /* border-bottom:1px solid white; */ + padding: 0 0 0 0; + width: 98%; + vertical-align: middle; + height: 16px; + } +#menu a { + padding: 2px 28px 4px 28px; + text-decoration: none; + font-weight: bold; + font-size: 1.0em; + color: #FFFFFF; + width: 08%; + height: 16px; + } +#menu a.hover { + background: #AF2020; + } +#menu span { + display: none; + } + +#subnav { + font-size: 10px; + margin-bottom: 2em; + } +#subnav a { + color: #FF0000; /* #FB3B00; */ + margin-right: 1em; + } +#subnav span { + color: silver; + margin-right: 1em; + } diff --git a/src/usr/local/www/themes/code-red/styles/transmenu.css b/src/usr/local/www/themes/code-red/styles/transmenu.css new file mode 100755 index 0000000..f683574 --- /dev/null +++ b/src/usr/local/www/themes/code-red/styles/transmenu.css @@ -0,0 +1,75 @@ +/* this is the clipping region for the menu. it's width and height get set by script, depending on the size of the items table */ +.transMenu { + position:absolute; + overflow:hidden; + left:-1000px; + top:-1000px; + } + +/* this is the main container for the menu itself. it's width and height get set by script, depending on the size of the items table */ +.transMenu .content { + position:absolute; + } + +/* this table comprises all menu items. each TR is one item. It is relatively positioned so that the shadow and background transparent divs can be positioned underneath it */ +.transMenu .items { + position:relative; + left:0px; top:0px; + z-index:2; + } + +.transMenu.top .items { + border-top:none; + } + +/* each TR.item is one menu item */ +.transMenu .item { + color: #FFFFFF; /* #336; */ + font-size: 1.1em; + font-weight: normal; + font-family:sans-serif; + text-decoration:none; + /* this is a hack for mac/ie5, whom incorrectly cascades the border properties of the parent table to each row */ + border:none; + cursor:pointer; + cursor:hand; + } + +/* this DIV is the semi-transparent white background of each menu. the -moz-opacity is a proprietary way to get transparency in mozilla, the filter is for IE/windows 5.0+. */ +/* we set the background color in script because ie mac does not use it; that browser only uses a semi-transparent white PNG that the spacer gif inside this DIV is replaced by */ +.transMenu .background { + position:absolute; + left:0px; top:0px; + z-index:1; + -moz-opacity:.8; + filter:alpha(opacity=80); + } + +/* same concept as .background, but this is the sliver of shadow on the right of the menu. It's left, height, and background are set by script. In IE5/mac, it uses a PNG */ +.transMenu .shadowRight { + position:absolute; + z-index:3; + top:3px; width:2px; + -moz-opacity:.4; + filter:alpha(opacity=40); + } + +/* same concept as .background, but this is the sliver of shadow on the bottom of the menu. It's top, width, and background are set by script. In IE5/mac, it uses a PNG */ +.transMenu .shadowBottom { + position:absolute; + z-index:1; + left:3px; height:2px; + -moz-opacity:.4; + filter:alpha(opacity=40); + } + +/* this is the class that is used when the mouse is over an item. script sets the row to this class when required. */ +.transMenu .item.hover { + background:#fdfdfd; + color:black; + } + +/* this is either the dingbat that indicates there is a submenu, or a spacer gif in it's place. We give it extra margin to create some space between the text and the dingbat */ +.transMenu .item img { + margin-left:10px; + } \ No newline at end of file diff --git a/src/usr/local/www/themes/code-red/wizard.css b/src/usr/local/www/themes/code-red/wizard.css new file mode 100755 index 0000000..c0a7546 --- /dev/null +++ b/src/usr/local/www/themes/code-red/wizard.css @@ -0,0 +1,1068 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.nowrap { white-space: nowrap; } + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #5f0406; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background: url('images/logon-background.gif') no-repeat; + background-position : center 0px; + background-color: #4a0203; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 10; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + + +#graph { + position: relative; + z-index: 10; +} + + + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} diff --git a/src/usr/local/www/themes/metallic/all.css b/src/usr/local/www/themes/metallic/all.css new file mode 100644 index 0000000..18a8c0b --- /dev/null +++ b/src/usr/local/www/themes/metallic/all.css @@ -0,0 +1,1269 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, sans-serif; + font-size: 0.9em; +} + +.nowrap { white-space: nowrap; } + +.infobox { + width:100%; +} + +.addgatewaybox { + background-color: #990000; + border-style: none none none none; + width: 225px; +} + +.infoboxsave { + padding-right: 10px; +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +.inputerrorsleft { + background-color: #990000; + width: 36px; +} + +.inputerrorsright { + background-color: #FFD9D1; + color: #000000; + font-size: 11px; + padding-left: 8px; + padding-top: 6px; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 220px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 11px; + font-family: "Trebuchet MS", sans-serif; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + background-color: #333333; + margin: 5px auto; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} + +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 815px; + margin: 5px auto; +} + +#header { + background: url('images/header.gif') no-repeat; + background-position: 4px; + height: 102px; + width: 808px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.gif') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: bold; + font-family: Verdana; + text-align: center; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 4px; + margin-top: 0px; + margin-left: 5px; + padding-top: 0px; + width: 800px; + background: url('images/horizontal.gif') repeat-y; +} + +#left { + width: 800px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.gif') no-repeat; + top: -18px; + left: 7px; + width: 800px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + position: relative; + top: -24px; + left: -4px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + width: 80px; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #505050; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background: url('images/metal_bgr.gif') repeat-x; + color: #FFF; +} +#navigation ul li ul li:hover { + background: url('images/metal_bgr_red.gif') repeat-x; +} + +#navigation li li a { + display: block; + padding-left: 5px; + margin-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/metallic/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/metallic/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/metallic/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/metallic/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/metallic/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/metallic/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/metallic/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/metallic/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/metallic/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/metallic/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/metallic/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/metallic/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/metallic/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/metallic/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/metallic/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/metallic/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/metallic/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/metallic/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #FFFFFF; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listrborder { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-left: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + color: #FFFFFF; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #DDDDDD; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 6px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password, #password2 { + font-size: small; + width: 60%; + padding-left: 19px; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #B1B1B1; + padding-right: 6px; + padding-left: 6px; + color: #000000; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} +.widgetconfigdiv{ + background:#BBBBBB; + font-size: 11px; + color: #000000; + padding-right: 5px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +div#log div.log-entry-mini { + clear: both; +} + +div#log div.log-entry-mini span { + padding: 2px 2px 2px 2px; + padding-left: 6px; +} + +div#log span.log-action-mini-header, +div#log span.log-time-mini-header, +div#log span.log-interface-mini-header, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header, +div#log span.log-protocol-mini-header { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 12px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-time-mini, +div#log span.log-interface-mini, +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-protocol-mini { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 11px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-action-mini-header { + width: 6%; +} + +div#log span.log-time-mini, +div#log span.log-time-mini-header { + width: 19%; +} + +div#log span.log-interface-mini, +div#log span.log-interface-mini-header { + width: 8%; +} + +div#log span.log-source-mini, +div#log span.log-source-mini-header { + width: 23%; +} + +div#log span.log-destination-mini, +div#log span.log-destination-mini-header { + width: 31%; +} + +div#log span.log-protocol-mini, +div#log span.log-protocol-mini-header { + width: 8%; + border-right: 1px solid #999; +} + +/* Sortable tables */ +table.sortable thead { + cursor: default; + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} + +/*thermal_sensors widget styles*/ + +.thermalSensorRow { width: 100%; border: 0px solid #ddd; padding: 1px; border-radius: 3px; } +.thermalSensorBarShell { position: relative; width: 100%; height: 5px; border: 1px solid lightgray; border-radius: 3px; } +.thermalSensorBar { position: absolute; width: 0%; height: 1px; z-index: 1; border-style: solid; border-radius: 3px; + background-color: LimeGreen; + border-top-width: 2px; border-top-color: Lime; + border-left-width: 0px; + border-right-width: 0px; + border-bottom-width: 2px; border-bottom-color: Green; +} +.thermalSensorTextShell { height: 20px; width: 100%; top: 3px; } +.thermalSensorText { float: left; height: 20px; top: 3px; } +.thermalSensorValue { float: left; height: 20px; top: 3px; font-weight: bold; margin-left: 10px;} + +.thermalSensorWarnThresh { position: absolute; background-color: orange; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } +.thermalSensorCritThresh { position: absolute; background-color: red; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } + +.thermal_sensors_widget_scale000 { position: absolute; height: 5px; width: 1px; left: -1px; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale020 { position: absolute; height: 3px; width: 1px; left: 10%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale010 { position: absolute; height: 3px; width: 1px; left: 20%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale030 { position: absolute; height: 3px; width: 1px; left: 30%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale040 { position: absolute; height: 3px; width: 1px; left: 40%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale050 { position: absolute; height: 3px; width: 1px; left: 50%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale060 { position: absolute; height: 3px; width: 1px; left: 60%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale070 { position: absolute; height: 3px; width: 1px; left: 70%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale080 { position: absolute; height: 3px; width: 1px; left: 80%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale090 { position: absolute; height: 3px; width: 1px; left: 90%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; } + +.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; } + +/* widget textarea styles - full width */ +.textarea_widget { + width: 100%; + resize:vertical; + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* IE 8+ */ +} diff --git a/src/usr/local/www/themes/metallic/apple-touch-icon.png b/src/usr/local/www/themes/metallic/apple-touch-icon.png new file mode 100755 index 0000000..7a4b975 Binary files /dev/null and b/src/usr/local/www/themes/metallic/apple-touch-icon.png differ diff --git a/src/usr/local/www/themes/metallic/bottom-loader.js b/src/usr/local/www/themes/metallic/bottom-loader.js new file mode 100644 index 0000000..a21f775 --- /dev/null +++ b/src/usr/local/www/themes/metallic/bottom-loader.js @@ -0,0 +1,10 @@ +// diff --git a/src/usr/local/www/themes/metallic/images/alert_bgr.gif b/src/usr/local/www/themes/metallic/images/alert_bgr.gif new file mode 100755 index 0000000..65498f1 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/alert_bgr.gif differ diff --git a/src/usr/local/www/themes/metallic/images/footer.gif b/src/usr/local/www/themes/metallic/images/footer.gif new file mode 100755 index 0000000..f7c2af7 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/footer.gif differ diff --git a/src/usr/local/www/themes/metallic/images/header.gif b/src/usr/local/www/themes/metallic/images/header.gif new file mode 100755 index 0000000..0a44068 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/header.gif differ diff --git a/src/usr/local/www/themes/metallic/images/help.png b/src/usr/local/www/themes/metallic/images/help.png new file mode 100755 index 0000000..1de05e3 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/help.png differ diff --git a/src/usr/local/www/themes/metallic/images/horizontal.gif b/src/usr/local/www/themes/metallic/images/horizontal.gif new file mode 100755 index 0000000..a280dcb Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/horizontal.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/favicon.ico b/src/usr/local/www/themes/metallic/images/icons/favicon.ico new file mode 100755 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/favicon.ico differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_3g.gif b/src/usr/local/www/themes/metallic/images/icons/icon_3g.gif new file mode 100755 index 0000000..46ccb92 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_3g.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_3g_inactive.gif b/src/usr/local/www/themes/metallic/images/icons/icon_3g_inactive.gif new file mode 100755 index 0000000..cf983e4 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_3g_inactive.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_advanced.gif b/src/usr/local/www/themes/metallic/images/icons/icon_advanced.gif new file mode 100755 index 0000000..3ede1ff Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_advanced.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_advanced_s.gif b/src/usr/local/www/themes/metallic/images/icons/icon_advanced_s.gif new file mode 100755 index 0000000..b233549 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_advanced_s.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_alert.gif b/src/usr/local/www/themes/metallic/images/icons/icon_alert.gif new file mode 100755 index 0000000..7646941 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_alert.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_alias_host.gif b/src/usr/local/www/themes/metallic/images/icons/icon_alias_host.gif new file mode 100755 index 0000000..ad43e17 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_alias_host.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_alias_net.gif b/src/usr/local/www/themes/metallic/images/icons/icon_alias_net.gif new file mode 100755 index 0000000..abd1b8b Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_alias_net.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_alias_port.gif b/src/usr/local/www/themes/metallic/images/icons/icon_alias_port.gif new file mode 100755 index 0000000..4acf2aa Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_alias_port.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_alias_url.gif b/src/usr/local/www/themes/metallic/images/icons/icon_alias_url.gif new file mode 100755 index 0000000..660571e Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_alias_url.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_alias_url_reload.gif b/src/usr/local/www/themes/metallic/images/icons/icon_alias_url_reload.gif new file mode 100755 index 0000000..55c1c4a Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_alias_url_reload.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_block.gif b/src/usr/local/www/themes/metallic/images/icons/icon_block.gif new file mode 100755 index 0000000..670c968 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_block.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_block_add.gif b/src/usr/local/www/themes/metallic/images/icons/icon_block_add.gif new file mode 100755 index 0000000..eb726d6 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_block_add.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_block_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_block_d.gif new file mode 100755 index 0000000..e6345fe Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_block_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_cablenic.gif b/src/usr/local/www/themes/metallic/images/icons/icon_cablenic.gif new file mode 100755 index 0000000..a071c66 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_cablenic.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_cal.gif b/src/usr/local/www/themes/metallic/images/icons/icon_cal.gif new file mode 100755 index 0000000..a9c7c87 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_cal.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_cal_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_cal_mo.gif new file mode 100755 index 0000000..1647e2f Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_cal_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_carp.gif b/src/usr/local/www/themes/metallic/images/icons/icon_carp.gif new file mode 100755 index 0000000..9454a82 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_carp.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_carp_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_carp_d.gif new file mode 100755 index 0000000..2ba8db2 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_carp_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_chain.png b/src/usr/local/www/themes/metallic/images/icons/icon_chain.png new file mode 100644 index 0000000..12db07a Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_chain.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_check.gif b/src/usr/local/www/themes/metallic/images/icons/icon_check.gif new file mode 100755 index 0000000..393674d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_check.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_clock_green.gif b/src/usr/local/www/themes/metallic/images/icons/icon_clock_green.gif new file mode 100755 index 0000000..e171ba8 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_clock_green.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_clock_grey.gif b/src/usr/local/www/themes/metallic/images/icons/icon_clock_grey.gif new file mode 100755 index 0000000..00c865a Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_clock_grey.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_clock_red.gif b/src/usr/local/www/themes/metallic/images/icons/icon_clock_red.gif new file mode 100755 index 0000000..7b412ee Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_clock_red.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_close.gif b/src/usr/local/www/themes/metallic/images/icons/icon_close.gif new file mode 100755 index 0000000..e0f86a7 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_close.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_configure.gif b/src/usr/local/www/themes/metallic/images/icons/icon_configure.gif new file mode 100755 index 0000000..7182e0d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_configure.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_down.gif b/src/usr/local/www/themes/metallic/images/icons/icon_down.gif new file mode 100755 index 0000000..b71a9c5 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_down.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_down_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_down_d.gif new file mode 100755 index 0000000..70a7473 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_down_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_down_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_down_mo.gif new file mode 100755 index 0000000..584587a Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_down_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_e.gif b/src/usr/local/www/themes/metallic/images/icons/icon_e.gif new file mode 100755 index 0000000..2950800 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_e.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_e_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_e_mo.gif new file mode 100755 index 0000000..9ba5738 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_e_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_error.gif b/src/usr/local/www/themes/metallic/images/icons/icon_error.gif new file mode 100755 index 0000000..e0fa659 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_error.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_exclam.gif b/src/usr/local/www/themes/metallic/images/icons/icon_exclam.gif new file mode 100755 index 0000000..36c2ec7 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_exclam.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_flag_de.png b/src/usr/local/www/themes/metallic/images/icons/icon_flag_de.png new file mode 100755 index 0000000..069cbbe Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_flag_de.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_flag_en.png b/src/usr/local/www/themes/metallic/images/icons/icon_flag_en.png new file mode 100755 index 0000000..bd7f9a5 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_flag_en.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_flag_es.png b/src/usr/local/www/themes/metallic/images/icons/icon_flag_es.png new file mode 100755 index 0000000..434776c Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_flag_es.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_flag_pt_BR.png b/src/usr/local/www/themes/metallic/images/icons/icon_flag_pt_BR.png new file mode 100755 index 0000000..f786349 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_flag_pt_BR.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_cert.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_cert.png new file mode 100755 index 0000000..48a34b6 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_cert.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_file.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_file.png new file mode 100755 index 0000000..48a9ed2 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_file.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_group.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_group.png new file mode 100755 index 0000000..7d929c0 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_group.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_host.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_host.png new file mode 100755 index 0000000..867ef2c Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_host.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_imp.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_imp.png new file mode 100755 index 0000000..f667cfc Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_imp.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_mail.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_mail.png new file mode 100755 index 0000000..d2d4548 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_mail.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_pwd.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_pwd.png new file mode 100755 index 0000000..06b53a1 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_pwd.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_search.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_search.png new file mode 100755 index 0000000..33de926 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_search.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_time.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_time.png new file mode 100755 index 0000000..aa8300a Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_time.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_unknown.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_unknown.png new file mode 100755 index 0000000..1857d0e Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_unknown.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_url.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_url.png new file mode 100755 index 0000000..cf56792 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_url.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_user.png b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_user.png new file mode 100755 index 0000000..e00eebe Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_frmfld_user.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_fw-update.gif b/src/usr/local/www/themes/metallic/images/icons/icon_fw-update.gif new file mode 100755 index 0000000..52c18ac Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_fw-update.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_help.gif b/src/usr/local/www/themes/metallic/images/icons/icon_help.gif new file mode 100644 index 0000000..84c84db Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_help.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_ifalias.gif b/src/usr/local/www/themes/metallic/images/icons/icon_ifalias.gif new file mode 100755 index 0000000..0c569a7 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_ifalias.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_ifalias_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_ifalias_d.gif new file mode 100755 index 0000000..faa84d4 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_ifalias_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_import_alias.gif b/src/usr/local/www/themes/metallic/images/icons/icon_import_alias.gif new file mode 100755 index 0000000..d11a5f0 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_import_alias.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_in.gif b/src/usr/local/www/themes/metallic/images/icons/icon_in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_in.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_in_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_in_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_info_pkg.gif b/src/usr/local/www/themes/metallic/images/icons/icon_info_pkg.gif new file mode 100755 index 0000000..cd3a532 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_info_pkg.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_interface_down.gif b/src/usr/local/www/themes/metallic/images/icons/icon_interface_down.gif new file mode 100755 index 0000000..0626655 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_interface_down.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_interface_up.gif b/src/usr/local/www/themes/metallic/images/icons/icon_interface_up.gif new file mode 100755 index 0000000..1449513 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_interface_up.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_left.gif b/src/usr/local/www/themes/metallic/images/icons/icon_left.gif new file mode 100755 index 0000000..8effefe Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_left.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_left_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_left_d.gif new file mode 100755 index 0000000..c778014 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_left_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_left_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_left_mo.gif new file mode 100755 index 0000000..84c6fa2 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_left_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_log.gif b/src/usr/local/www/themes/metallic/images/icons/icon_log.gif new file mode 100755 index 0000000..4a1983a Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_log.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_log_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_log_d.gif new file mode 100755 index 0000000..d31bd9b Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_log_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_log_s.gif b/src/usr/local/www/themes/metallic/images/icons/icon_log_s.gif new file mode 100755 index 0000000..f9fda33 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_log_s.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_log_s_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_log_s_d.gif new file mode 100755 index 0000000..fb2c05f Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_log_s_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_logs.gif b/src/usr/local/www/themes/metallic/images/icons/icon_logs.gif new file mode 100644 index 0000000..afe0104 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_logs.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_match.gif b/src/usr/local/www/themes/metallic/images/icons/icon_match.gif new file mode 100644 index 0000000..215571f Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_match.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_match_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_match_d.gif new file mode 100644 index 0000000..6e4c364 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_match_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_minus.gif b/src/usr/local/www/themes/metallic/images/icons/icon_minus.gif new file mode 100755 index 0000000..417544f Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_minus.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_open.gif b/src/usr/local/www/themes/metallic/images/icons/icon_open.gif new file mode 100755 index 0000000..ac3da14 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_open.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_other.gif b/src/usr/local/www/themes/metallic/images/icons/icon_other.gif new file mode 100755 index 0000000..e6f780f Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_other.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_other_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_other_d.gif new file mode 100755 index 0000000..b08d970 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_other_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_out.gif b/src/usr/local/www/themes/metallic/images/icons/icon_out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_out.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_out_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_out_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_parp.gif b/src/usr/local/www/themes/metallic/images/icons/icon_parp.gif new file mode 100755 index 0000000..96acaf3 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_parp.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_parp_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_parp_d.gif new file mode 100755 index 0000000..7d7d00e Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_parp_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_pass.gif b/src/usr/local/www/themes/metallic/images/icons/icon_pass.gif new file mode 100755 index 0000000..fe1bb0d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_pass.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_pass_add.gif b/src/usr/local/www/themes/metallic/images/icons/icon_pass_add.gif new file mode 100755 index 0000000..f7f4c20 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_pass_add.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_pass_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_pass_d.gif new file mode 100755 index 0000000..6adc431 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_pass_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_plus.gif b/src/usr/local/www/themes/metallic/images/icons/icon_plus.gif new file mode 100755 index 0000000..2a94eeb Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_plus.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_plus_bl.gif b/src/usr/local/www/themes/metallic/images/icons/icon_plus_bl.gif new file mode 100755 index 0000000..8dcd7c0 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_plus_bl.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_plus_bl_p.gif b/src/usr/local/www/themes/metallic/images/icons/icon_plus_bl_p.gif new file mode 100755 index 0000000..0c79849 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_plus_bl_p.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_plus_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_plus_d.gif new file mode 100755 index 0000000..ebc7457 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_plus_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_plus_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_plus_mo.gif new file mode 100755 index 0000000..1c7ca08 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_plus_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_plus_p.gif b/src/usr/local/www/themes/metallic/images/icons/icon_plus_p.gif new file mode 100755 index 0000000..eb41284 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_plus_p.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reinstall.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall.gif new file mode 100755 index 0000000..d78b867 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_d.gif new file mode 100755 index 0000000..13658f7 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_mo.gif new file mode 100755 index 0000000..90b576e Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg.gif new file mode 100755 index 0000000..9aebb03 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg_d.gif new file mode 100755 index 0000000..4ab4992 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg_mo.gif new file mode 100755 index 0000000..7025d20 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_pkg_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml.gif new file mode 100755 index 0000000..4542432 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml_d.gif new file mode 100755 index 0000000..8d3a68d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml_mo.gif new file mode 100755 index 0000000..15e0aed Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reinstall_xml_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reject.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reject.gif new file mode 100755 index 0000000..5565cd6 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reject.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_reject_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_reject_d.gif new file mode 100755 index 0000000..6c09fae Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_reject_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_right.gif b/src/usr/local/www/themes/metallic/images/icons/icon_right.gif new file mode 100755 index 0000000..fdf2d8b Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_right.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_service_restart.gif b/src/usr/local/www/themes/metallic/images/icons/icon_service_restart.gif new file mode 100755 index 0000000..e49fbd7 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_service_restart.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_service_restart_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_service_restart_d.gif new file mode 100755 index 0000000..a5d6d7c Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_service_restart_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_service_running.gif b/src/usr/local/www/themes/metallic/images/icons/icon_service_running.gif new file mode 100644 index 0000000..543fd56 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_service_running.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_service_start.gif b/src/usr/local/www/themes/metallic/images/icons/icon_service_start.gif new file mode 100755 index 0000000..09bb58f Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_service_start.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_service_start_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_service_start_d.gif new file mode 100755 index 0000000..f58f111 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_service_start_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_service_status.gif b/src/usr/local/www/themes/metallic/images/icons/icon_service_status.gif new file mode 100644 index 0000000..a93bcfb Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_service_status.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_service_stop.gif b/src/usr/local/www/themes/metallic/images/icons/icon_service_stop.gif new file mode 100755 index 0000000..922addc Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_service_stop.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_service_stop_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_service_stop_d.gif new file mode 100755 index 0000000..b4cfdea Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_service_stop_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_service_stopped.gif b/src/usr/local/www/themes/metallic/images/icons/icon_service_stopped.gif new file mode 100644 index 0000000..f93a25d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_service_stopped.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_services_restart_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_services_restart_mo.gif new file mode 100755 index 0000000..a092b40 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_services_restart_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_services_start_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_services_start_mo.gif new file mode 100755 index 0000000..ecdb58f Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_services_start_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_services_stop_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_services_stop_mo.gif new file mode 100755 index 0000000..c00e208 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_services_stop_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_system-group-grey.png b/src/usr/local/www/themes/metallic/images/icons/icon_system-group-grey.png new file mode 100755 index 0000000..d7b964d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_system-group-grey.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_system-group.png b/src/usr/local/www/themes/metallic/images/icons/icon_system-group.png new file mode 100755 index 0000000..1c974f2 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_system-group.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_system-user-grey.png b/src/usr/local/www/themes/metallic/images/icons/icon_system-user-grey.png new file mode 100755 index 0000000..2f6047d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_system-user-grey.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_system-user.png b/src/usr/local/www/themes/metallic/images/icons/icon_system-user.png new file mode 100755 index 0000000..ef82156 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_system-user.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_system_lock_screen.png b/src/usr/local/www/themes/metallic/images/icons/icon_system_lock_screen.png new file mode 100755 index 0000000..30f306d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_system_lock_screen.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_system_logout.png b/src/usr/local/www/themes/metallic/images/icons/icon_system_logout.png new file mode 100755 index 0000000..9bbb6c7 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_system_logout.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_trapped.gif b/src/usr/local/www/themes/metallic/images/icons/icon_trapped.gif new file mode 100755 index 0000000..ffeb2cd Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_trapped.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_trapped_p.gif b/src/usr/local/www/themes/metallic/images/icons/icon_trapped_p.gif new file mode 100755 index 0000000..6d46aaf Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_trapped_p.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_ts_rule.gif b/src/usr/local/www/themes/metallic/images/icons/icon_ts_rule.gif new file mode 100755 index 0000000..e15ab6c Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_ts_rule.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_ts_rule_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_ts_rule_d.gif new file mode 100755 index 0000000..f776281 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_ts_rule_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_up.gif b/src/usr/local/www/themes/metallic/images/icons/icon_up.gif new file mode 100755 index 0000000..883c5a2 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_up.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_up_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_up_d.gif new file mode 100755 index 0000000..0ddcce2 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_up_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_up_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_up_mo.gif new file mode 100755 index 0000000..9f869a4 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_up_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_wlan.gif b/src/usr/local/www/themes/metallic/images/icons/icon_wlan.gif new file mode 100755 index 0000000..1f0addc Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_wlan.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_wlan_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_wlan_d.gif new file mode 100755 index 0000000..35bf580 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_wlan_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_wol_all.gif b/src/usr/local/www/themes/metallic/images/icons/icon_wol_all.gif new file mode 100755 index 0000000..2d22182 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_wol_all.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_wzd_nsaved.png b/src/usr/local/www/themes/metallic/images/icons/icon_wzd_nsaved.png new file mode 100755 index 0000000..21cb27d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_wzd_nsaved.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_wzd_saved.png b/src/usr/local/www/themes/metallic/images/icons/icon_wzd_saved.png new file mode 100755 index 0000000..ab82946 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_wzd_saved.png differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_x.gif b/src/usr/local/www/themes/metallic/images/icons/icon_x.gif new file mode 100755 index 0000000..24e4d49 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_x.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_x_d.gif b/src/usr/local/www/themes/metallic/images/icons/icon_x_d.gif new file mode 100755 index 0000000..d2bfbc8 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_x_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_x_mo.gif b/src/usr/local/www/themes/metallic/images/icons/icon_x_mo.gif new file mode 100755 index 0000000..da7b57c Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_x_mo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/icon_x_p.gif b/src/usr/local/www/themes/metallic/images/icons/icon_x_p.gif new file mode 100755 index 0000000..8828fa6 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/icon_x_p.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/in.gif b/src/usr/local/www/themes/metallic/images/icons/in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/in.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/in_d.gif b/src/usr/local/www/themes/metallic/images/icons/in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/in_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/out.gif b/src/usr/local/www/themes/metallic/images/icons/out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/out.gif differ diff --git a/src/usr/local/www/themes/metallic/images/icons/out_d.gif b/src/usr/local/www/themes/metallic/images/icons/out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/icons/out_d.gif differ diff --git a/src/usr/local/www/themes/metallic/images/log.png b/src/usr/local/www/themes/metallic/images/log.png new file mode 100755 index 0000000..762ba80 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/log.png differ diff --git a/src/usr/local/www/themes/metallic/images/logo.gif b/src/usr/local/www/themes/metallic/images/logo.gif new file mode 100755 index 0000000..08638ff Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/logo.gif differ diff --git a/src/usr/local/www/themes/metallic/images/logobig.jpg b/src/usr/local/www/themes/metallic/images/logobig.jpg new file mode 100755 index 0000000..2ef196d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/logobig.jpg differ diff --git a/src/usr/local/www/themes/metallic/images/menu_down.gif b/src/usr/local/www/themes/metallic/images/menu_down.gif new file mode 100755 index 0000000..137de8d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/menu_down.gif differ diff --git a/src/usr/local/www/themes/metallic/images/menu_footer.gif b/src/usr/local/www/themes/metallic/images/menu_footer.gif new file mode 100755 index 0000000..d06faa4 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/menu_footer.gif differ diff --git a/src/usr/local/www/themes/metallic/images/menu_right.gif b/src/usr/local/www/themes/metallic/images/menu_right.gif new file mode 100755 index 0000000..881327c Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/menu_right.gif differ diff --git a/src/usr/local/www/themes/metallic/images/metal_bgr.gif b/src/usr/local/www/themes/metallic/images/metal_bgr.gif new file mode 100755 index 0000000..a0ca6c8 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/metal_bgr.gif differ diff --git a/src/usr/local/www/themes/metallic/images/metal_bgr_red.gif b/src/usr/local/www/themes/metallic/images/metal_bgr_red.gif new file mode 100755 index 0000000..c4a1465 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/metal_bgr_red.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/bar_blue.gif b/src/usr/local/www/themes/metallic/images/misc/bar_blue.gif new file mode 100755 index 0000000..741186a Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/bar_blue.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/bar_gray.gif b/src/usr/local/www/themes/metallic/images/misc/bar_gray.gif new file mode 100755 index 0000000..e86e245 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/bar_gray.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/bar_left.gif b/src/usr/local/www/themes/metallic/images/misc/bar_left.gif new file mode 100755 index 0000000..af751fa Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/bar_left.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/bar_right.gif b/src/usr/local/www/themes/metallic/images/misc/bar_right.gif new file mode 100755 index 0000000..ff12d9e Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/bar_right.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/bullet_toggle_minus.png b/src/usr/local/www/themes/metallic/images/misc/bullet_toggle_minus.png new file mode 100755 index 0000000..37db2fd Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/bullet_toggle_minus.png differ diff --git a/src/usr/local/www/themes/metallic/images/misc/bullet_toggle_plus.png b/src/usr/local/www/themes/metallic/images/misc/bullet_toggle_plus.png new file mode 100755 index 0000000..fba7af9 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/bullet_toggle_plus.png differ diff --git a/src/usr/local/www/themes/metallic/images/misc/button.gif b/src/usr/local/www/themes/metallic/images/misc/button.gif new file mode 100755 index 0000000..e85dbb3 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/button.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/graph.png b/src/usr/local/www/themes/metallic/images/misc/graph.png new file mode 100755 index 0000000..507ec75 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/graph.png differ diff --git a/src/usr/local/www/themes/metallic/images/misc/key_128.gif b/src/usr/local/www/themes/metallic/images/misc/key_128.gif new file mode 100755 index 0000000..ea5ae34 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/key_128.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/key_152.gif b/src/usr/local/www/themes/metallic/images/misc/key_152.gif new file mode 100755 index 0000000..6c7fc03 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/key_152.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/key_256.gif b/src/usr/local/www/themes/metallic/images/misc/key_256.gif new file mode 100755 index 0000000..3e1c377 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/key_256.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/key_64.gif b/src/usr/local/www/themes/metallic/images/misc/key_64.gif new file mode 100755 index 0000000..87892bd Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/key_64.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/left_background.gif b/src/usr/local/www/themes/metallic/images/misc/left_background.gif new file mode 100755 index 0000000..529d827 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/left_background.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/loader.gif b/src/usr/local/www/themes/metallic/images/misc/loader.gif new file mode 100755 index 0000000..5d10ac3 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/loader.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/loader_all.gif b/src/usr/local/www/themes/metallic/images/misc/loader_all.gif new file mode 100755 index 0000000..cb6bc0c Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/loader_all.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/loader_filter.gif b/src/usr/local/www/themes/metallic/images/misc/loader_filter.gif new file mode 100755 index 0000000..b838b17 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/loader_filter.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/loader_tab.gif b/src/usr/local/www/themes/metallic/images/misc/loader_tab.gif new file mode 100755 index 0000000..05bb04c Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/loader_tab.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/logon.png b/src/usr/local/www/themes/metallic/images/misc/logon.png new file mode 100755 index 0000000..baf8a9d Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/logon.png differ diff --git a/src/usr/local/www/themes/metallic/images/misc/progress_bar.gif b/src/usr/local/www/themes/metallic/images/misc/progress_bar.gif new file mode 100755 index 0000000..3b4aa52 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/progress_bar.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/rrd_error.png b/src/usr/local/www/themes/metallic/images/misc/rrd_error.png new file mode 100755 index 0000000..a79ecf3 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/rrd_error.png differ diff --git a/src/usr/local/www/themes/metallic/images/misc/status_alerter.gif b/src/usr/local/www/themes/metallic/images/misc/status_alerter.gif new file mode 100755 index 0000000..7ff1e95 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/status_alerter.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/status_carpmaster.gif b/src/usr/local/www/themes/metallic/images/misc/status_carpmaster.gif new file mode 100755 index 0000000..2c32908 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/status_carpmaster.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/status_left.gif b/src/usr/local/www/themes/metallic/images/misc/status_left.gif new file mode 100755 index 0000000..b5a2930 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/status_left.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/status_page_loading.gif b/src/usr/local/www/themes/metallic/images/misc/status_page_loading.gif new file mode 100755 index 0000000..067ef18 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/status_page_loading.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/status_reload_all.gif b/src/usr/local/www/themes/metallic/images/misc/status_reload_all.gif new file mode 100755 index 0000000..72de6bd Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/status_reload_all.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/status_reload_filter.gif b/src/usr/local/www/themes/metallic/images/misc/status_reload_filter.gif new file mode 100755 index 0000000..d72761a Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/status_reload_filter.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/status_right.gif b/src/usr/local/www/themes/metallic/images/misc/status_right.gif new file mode 100755 index 0000000..bf66fdb Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/status_right.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/tri_c.gif b/src/usr/local/www/themes/metallic/images/misc/tri_c.gif new file mode 100755 index 0000000..317b758 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/tri_c.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/tri_c_black.gif b/src/usr/local/www/themes/metallic/images/misc/tri_c_black.gif new file mode 100755 index 0000000..3d33d49 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/tri_c_black.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/tri_o.gif b/src/usr/local/www/themes/metallic/images/misc/tri_o.gif new file mode 100755 index 0000000..eb95c32 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/tri_o.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/tri_o_black.gif b/src/usr/local/www/themes/metallic/images/misc/tri_o_black.gif new file mode 100755 index 0000000..4ed30d1 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/tri_o_black.gif differ diff --git a/src/usr/local/www/themes/metallic/images/misc/widget_loader.gif b/src/usr/local/www/themes/metallic/images/misc/widget_loader.gif new file mode 100755 index 0000000..fad101f Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/misc/widget_loader.gif differ diff --git a/src/usr/local/www/themes/metallic/images/new_tab_menu.png b/src/usr/local/www/themes/metallic/images/new_tab_menu.png new file mode 100755 index 0000000..4bdfcef Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/new_tab_menu.png differ diff --git a/src/usr/local/www/themes/metallic/images/status.png b/src/usr/local/www/themes/metallic/images/status.png new file mode 100755 index 0000000..a3e368e Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/status.png differ diff --git a/src/usr/local/www/themes/metallic/images/transparent.gif b/src/usr/local/www/themes/metallic/images/transparent.gif new file mode 100755 index 0000000..89c5530 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/transparent.gif differ diff --git a/src/usr/local/www/themes/metallic/images/transparent_pixel.gif b/src/usr/local/www/themes/metallic/images/transparent_pixel.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/src/usr/local/www/themes/metallic/images/transparent_pixel.gif differ diff --git a/src/usr/local/www/themes/metallic/javascript/ie7/blank.gif b/src/usr/local/www/themes/metallic/javascript/ie7/blank.gif new file mode 100755 index 0000000..a4fe2e6 Binary files /dev/null and b/src/usr/local/www/themes/metallic/javascript/ie7/blank.gif differ diff --git a/src/usr/local/www/themes/metallic/javascript/ie7/ie7-box-model.js b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-box-model.js new file mode 100644 index 0000000..45543f6 --- /dev/null +++ b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-box-model.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-box-model",function(){var NUMERIC="\x5cs*:\x5cs*\x5cd[\x5cw%]*",UNIT=/^\d\w*$/,PERCENT=/^\d+%$/,PIXEL=/^\d+(px)?$/;var MATCH=(appVersion<6)?/\b(min|max)-(width|height)\s*:\s*\d/gi:/\b(min|max)-width\s*:\s*\d/gi;var AUTO=(appVersion<5.5)?/^auto|0cm$/:/^auto$/;var ie7_tmp=tmpElement();push(IE7.recalcs,function removeTempElement(){if(ie7_tmp.parentElement)ie7_tmp.parentElement.removeChild(ie7_tmp)});CSSFixes.addFix(MATCH,function(match){return match.slice(0,3)+match.charAt(4).toUpperCase()+match.slice(5)});var viewport=(quirksMode)?document.body:documentElement;function isFixed(element){return element.style.position=="fixed"||element.currentStyle.position=="fixed"};function layoutParent(element){var layoutParent=element.offsetParent;while(layoutParent&&!hasLayout(layoutParent))layoutParent=layoutParent.offsetParent;if(!layoutParent||isFixed(element))layoutParent=viewport;return layoutParent};function fixWidth(HEIGHT){fixWidth=function(element,value){if(!element.runtimeStyle.fixedWidth&&(!isHTML||element.tagName!="HR")){if(!value)value=element.currentStyle.width;element.runtimeStyle.fixedWidth=(UNIT.test(value))?Math.max(0,getFixedWidth(element,value)):value;element.runtimeStyle.width=element.runtimeStyle.fixedWidth;boxSizing(element)}};if(quirksMode)CSSFixes.addRecalc("width\x5cs*:\x5cs*\x5cd\x5cw*[^%]",fixWidth);var getFixedWidth=(quirksMode)?function(element,value){return getPixelWidth(element,value)+getBorderWidth(element)+getPaddingWidth(element)}:function(element,value){return getPixelWidth(element,value)};function getBorderWidth(element){return element.offsetWidth-element.clientWidth};function getPaddingWidth(element){return getPixelWidth(element,element.currentStyle.paddingLeft)+getPixelWidth(element,element.currentStyle.paddingRight)};function getMarginWidth(element){return((element.currentStyle.marginLeft=="auto")?0:getPixelLeft(element,element.currentStyle.marginLeft))+((element.currentStyle.marginRight=="auto")?0:getPixelLeft(element,element.currentStyle.marginRight))};function minWidth(element){minWidth[minWidth.count++]=element;if(element.currentStyle.minHeight=="auto")element.runtimeStyle.minHeight=0;fixWidth(element);boxSizing(element);resizeWidth(element)};minWidth.count=0;CSSFixes.addRecalc("min-width"+NUMERIC,minWidth);eval(String(minWidth).replace(/min/g,"max"));maxWidth.count=0;CSSFixes.addRecalc("max-width"+NUMERIC,maxWidth);function resizeWidth(element){var rect=element.getBoundingClientRect();var width=rect.right-rect.left;if(element.currentStyle.maxWidth&&width>=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)}); diff --git a/src/usr/local/www/themes/metallic/javascript/ie7/ie7-core.js b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-core.js new file mode 100644 index 0000000..b11e2b1 --- /dev/null +++ b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-core.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/metallic/javascript/ie7/ie7-css-strict.js b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-css-strict.js new file mode 100644 index 0000000..4406d7a --- /dev/null +++ b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-css-strict.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-strict",function(){if(!modules["ie7-css2"])return;var NONE=[],ID=/#/g,CLASS=/[:@\.]/g,TAG=/^\w|[\s>+~]\w/g;IE7.parser.parse=function(cssText){var DYNAMIC=new RegExp("(.*):("+dynamicPseudoClasses+")(.*)");function addRule(selector,cssText){var match=selector.match(DYNAMIC);if(match)new DynamicRule(selector,match[1],match[2],match[3],cssText);else new Rule(selector,cssText)};cssText=cssText.replace(IE7.PseudoElement.ALL,IE7.PseudoElement.ID);var RULE=/([^\{]+)\{(\d+)\}/g,match;while(match=RULE.exec(cssText)){addRule(match[1],match[2]);if(appVersion<5.5)cssText=cssText.slice(match.lastIndex)}IE7.classes.sort(Rule.compare);return IE7.classes.join("\n")};function Rule(selector,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.Class;this.inherit(selector)};Rule.prototype=new IE7.Class.ancestor;Rule.prototype.toString=function(){return "."+this.name+"{"+this.cssText+"}"};Rule.score=function(selector){return(selector.match(ID)||NONE).length*10000+(selector.match(CLASS)||NONE).length*100+(selector.match(TAG)||NONE).length};Rule.compare=function(rule1,rule2){return rule1.specificity-rule2.specificity};function DynamicRule(selector,attach,dynamicPseudoClass,target,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.DynamicStyle;this.inherit(selector,attach,dynamicPseudoClass,target)};DynamicRule.prototype=new IE7.DynamicStyle.ancestor;DynamicRule.prototype.toString=Rule.prototype.toString}); diff --git a/src/usr/local/www/themes/metallic/javascript/ie7/ie7-css2.js b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-css2.js new file mode 100644 index 0000000..7121c8e --- /dev/null +++ b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-css2.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i"){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!ù.´)Ó £(){ÿ{ù.´=ª;¢ ¢Æ=ª.¢´=Ó ¤×;£ ¢©(){if(«.¢Ù)«.¢Ù.Í.¤Ö=¤þ};ª.Õ=£(){¤ ¤ÿ};¢ â=(¤Ù.±(¢î.£Ë))?£(£Ì){ù.â(´+¥¡+£Ì)}:¢Æ;¢ Å=¤Ñ.Å.¬(¤Ú)[1];if(¤Û.±(¢î.£Ë)||Å<5||!¤Ü.±(«.Ù.ü))¤ ¢©();¢ è=¢£(«.¤Í!=¥¢);¢ ë=(¤Ë «.£Ê==¥£)?!¤Ýi.±(¢î.¢Ç):¢£(«.£Ê!=¥¤);¢ ¢í=¥¥;¢ ¢ë=¢í;if(!ë)¢ë+=¥¦;¢ ¢¹;¢ Ù=«.Ù;¢ ó={};ª.¢´=£(£È,ô,£É){if(!ó)¤;if(¢«)¢¬(¥§+¢Î(ô));if(£É){ô();ô=¢Æ}ó[£È]=ô};¢ £Ç=¤Þ;£ ¢È(²,¹){if(£Ç.±(²))²=(¹||¥¨)+²;¤ ²};£ ¢Ä(²,¹){²=¢È(²,¹);¤ ².»(0,².£Ã(¥©)+1)};¢ ¹=¢Ä(«.£Æ[«.£Æ.­-1].¤Å);¢ ¢Ê=Ó ¤Ä(¥ª);£ ã(²,¹){ÿ{²=¢È(²,¹);¢Ê.¤Á(¥«,²,Þ);¢Ê.¤¿();¤ ¢Ê.¤¾}õ(¢à){â(¥¬+²);¤ ¥¨}};¢ ·=£(¢É,¢À){¤ ¢É.·(¢À)};¢ ¢½=£(¢É){¤ ¢É.¢½()};if(Å<5.5)¢¬(ã(¥­,¹));if(«.¢Í==¥®||!ë)«.¤¹();Ö «.¤¸(¥¯);ª.¶=«.É[«.É.­-1];ª.¶.§=¢í;ª.¶.Æ=×;¢ §={};£ £¿(¶,¹){¢ ¢§=¢È(¶.²,¹);if(§[¢§])¤ ¥¨;§[¢§]=(¶.ý)?¥¨:£Å(¢Ã(¶,¹),¢Ä(¶.²,¹));¤ §[¢§]};¢ ¢Ã=£(¶){¤ ¶.§};¢ £Ä=¤ßgi;£ £Å(§,¢Ç){¤ §.³(£Ä,¥°+¢Ç.»(0,¢Ç.£Ã(¥©)+1)+¥±)};ª.Ë=[];ª.£¾=¢Æ;¢ ä=Þ;£ _ã(){ÿ{ä=×;¢ £Á=¤ài;¢ É=«.É;¢ ¢ì=[];¢ ¢Å=«.£µ(¥²);¯(¢ i=¢Å.­-1;i>=0;i--){·(¢ì,¤á.±(¢Å[i].£Â)?¥¨:¢Å[i].£Â)}£ ¢Ã(¶,¹){¢ §=¥¨;if(£Á.±(¶.¤µ)){¯(¢ i=0;i<¶.£À.­;i++){§+=¢¡.¤´(¶.£À[i],¢Ä(¶.²,¹))}§+=((¶.²)?£¿(¶,¹):¢½(¢ì))}¤ §};´.§=¥¨;¯(i=0;i<É.­;i++)´.§+=¢Ã(É[i],¥¨);´.§=£´(´.§);¯(i in ó)ó[i]();£¦ ó;if(¢¹)¢¹.¢·();Ñ.¢·();´.£¾();´.¶.§=¢ë+£³(´.§);¯(i=0;i<É.­;i++){if(!É[i].ý&&!É[i].Æ)É[i].§=¥¨}´.¢Â();â(¥³)}õ(¢¨){â(¥´+¢¨.¢ï)}¢Ë{¢©()}};ª.¢Â=£(){Ñ.¢Â();¯(¢ i=0;i<ª.Ë.­;i++)ª.Ë[i]()};¢ Ñ=Ó £(){¢ Ç=[];ª.û=£(){·(Ç,¢¡)};¢ Ë=[];ª.Ú=£(á,¢Þ){¢ £½=Ó ¢æ(¥µ+á,¥¶);¢ §=´.§;á=[];Ê(¬=£½.¤²(§)){·(á,¬[1]);if(Å<5.5)§=§.»(¬.¤±)}if(á.­){á=á.Õ();·(Ë,¢¡)}};ª.¢·=£(){¯(¢ i=0;i<Ç.­;i++){´.§=´.§.³(Ç[i][0],Ç[i][1])}ª.Ú(¥·,é);ª.Ú(¥¸,£(¡){if(¡.¢².©.Ü==¥¹)é(¡.¢²)})};ª.¢Â=£(){¯(¢ i=0;i<Ë.­;i++){¢ î=¢¶(Ë[i][0]);¯(¢ j=0;j<î.­;j++)Ë[i][1](î[j])}};ª.û(¤âgi,¥º);if(Å<6)ª.û(¤ãgi,¥»);if(è){¢ à=¥¼.¢ç(¥½);¯(¢ i=0;i<à.­;i++)à[à[i]]=à[i-1]||¥¾;£ ³($,$1,$2,$3){¤ $1+à[$3]};ª.û(Ó ¢æ(¥¿+à.¢å(¥À)+¥Á,¥¶),³)}};¢ £¹=¤ä;¢ £¸=¤åg;¢ £·=¤æ;¢ £¼=¤çg;¢ £»=¥Â;¢ þ={};£ ¢¶(µ,¦){¢ ¢è=!¦;¢ ¢é=(¦)?(¦.¤§==¤¦)?¦:[¦]:[«];¢ ñ=µ.³(£¼,£»).¢ç(¥½);¢ ¬=[];¯(¢ i=0;i<ñ.­;i++){µ=£º(ñ[i]);if(µ.»(0,3).¢å(¥¨)==¥Ã){µ=µ.»(2);¦=£¶(¢é,µ[1])}Ö ¦=¢é;¢ j=0,ß,®,Á,ò=¥¨;Ê(j<µ.­){ß=µ[j++];®=µ[j++];ò+=ß+®;Á=¥¨;if(µ[j]==¥Ä){Ê(µ[j++]!=¥Á)Á+=µ[j];Á=Á.»(0,-1);ò+=¥Ä+Á+¥Á}¦=(¢è&&þ[ò])?þ[ò]:¢ß(¦,ß,®,Á);if(¢è)þ[ò]=¦}¬=¬.¤¥(¦)}¤ ¬};£ £º(µ){if(£¹.±(µ))µ=¥Å+µ;¤ µ.¬(£¸)};£ ¢ß(¦,ß,®,Á){¢ À=¥¨;if(£·.±(®)){®=®.¢ç(¥À);À=®[0];®=®[1]}¢ ¸=[];if(ñ[ß])ñ[ß](¸,¦,®,À||Á);¤ ¸};£ £¶(¦,id){¢ ¸=[],i,j;¯(i=0;i<¦.­;i++){¢ ¬=¦[i].ì.¢À(id);if(¬){if(¬.­==¤¤)·(¸,¬);Ö ¯(j=0;j<¬.­;j++)·(¸,¬[j])}}¤ ¸};¢ ñ={¥Å:£(¸,¦,®,À){¯(¢ i=0;i<¦.­;i++){¢ ¢¦=(®==¥Æ&&¦[i].ì)?¦[i].ì:¦[i].£µ(®);¯(¢ j=0;j<¢¦.­;j++){if(ï(¢¦[j])&&(!À||¢¦[j].À==À))·(¸,¢¦[j])}}},¥Ç:£(¸,¦,®){¯(¢ i=0;i<¦.­;i++)if(¦[i].id==®)·(¸,¦[i])},¥È:£(¸,¦,®){®=Ó ¢æ(¥É+®+¥Ê);¯(¢ i=0;i<¦.­;i++)if(®.±(¦[i].¤£))·(¸,¦[i])},¥Ë:£(¸,¦,®,Á){®=¢ä[®];if(®)¯(¢ i=0;i<¦.­;i++)if(®(¦[i],Á))·(¸,¦[i])}};¢ ¤¢=¥¨;¢ ¢ä={Õ:£(){¢ Õ=[];¯(¢ ð in ª){if(ð!=¥Ì&&ð!=¥Í){if(ª[ð].­>1)ð+=¥Î;·(Õ,ð)}}¤ Õ.¢å(¥À)},¥Ì:£(¡){¤ ¢£(¡.©[¥Ï]==¥Ì)},¥Í:£(¡){¤ ¢£(¡.©[¥Ï]==¥Í)}};¢ ¤¡={Õ:¢ä.Õ};£ £ÿ(¡,º,À){if(À&&¡.À!=À)¤ Þ;¤(º==¥Æ)?ï(¡):(ë)?(¡.º==º.¢ý()):(¡.º==º)};¢ ¢¾=[];£ £þ(¢¿){¤ ¢».±(¢¿)?¢¾[¢¿.»(1,-1)]:¢¿};¢ £´=£(§){¤ §.³(¤èg,£(¬){¤(¬.¢þ(0)==¥©)?¥¨:¥Ð+(·(¢¾,¬.»(1,-1))-1)+¥Ð}).³(¤ég,¥¨).³(¤êg,¥À).³(¤ëg,¥°)};£ £³(§){¤ §.³(¤æg,¥Ñ).³(¤ìg,£(¬,£²){¤ ¢¾[£²]})};¢ ¢¼=[];£ ö(¡,Ý,Ô){¡.£±(Ý,Ô);·(¢¼,¢¡)};£ £°(¡,Ý,Ô){ÿ{¡.£û(Ý,Ô)}õ(¢à){}};ù.£±(¥Ò,£(){Ê(¢¼.­){¢ Ô=¢½(¢¼);£°(Ô[0],Ô[1],Ô[2])}});¢ ¢³=(Å<6)?£(¡){¤ ¡.Ä}:£(¡){¤ ¡.©.¢³};£ é(¡){if(!¢³(¡)){¡.£ù=Þ;£¯(£«(¡))}};£ £¯(¡){Ê(¡){¡.°.£®=¡.©.£®;¡=¢â(¡)}};¢ ¢»=¤í;£ £ø(¥){¤(¢».±(¥))?¥:¥Ð+¥+¥Ð};£ £÷(¥){¤(¢».±(¥))?¥.»(1,-1):¥};£ £¡(º){¢ ¡=«.£ª(º||¥Ó);¡.Í.§=¥Ô;¤ ¡};£ ï(¢¢){¤ ¢£(¢¢&&¢¢.£ñ==1&&¢¢.º!=¥Õ&&!¢¢.£ð)};£ £ï(¡){Ê(¡&&(¡=¡.£î)&&!ï(¡))£¬;¤ ¡};£ ¢â(¡){Ê(¡&&(¡=¡.Ì)&&!ï(¡))£¬;¤ ¡};£ £«(¡){¡=¡.£í;¤(ï(¡))?¡:¢â(¡)};¢ ¢«=Þ;´.¢´(¥Ö,£(){if(ë)¢¹=Ó £(){¢ Ç=[];£ ¢Þ(¡){¢ ¢¸=«.£ª(¥×+¡.¢µ.»(1));if(¡.¢µ.»(-2)!=¥Ø){¢ £©=¥Ù+¡.º+¥Ú,Ì;Ê((Ì=¡.Ì)&&Ì.¢µ!=£©){¡.¢á.¢Ú(Ì);¢¸.¢Ï(Ì)}if(Ì)¡.¢á.¢Ú(Ì)}¡.¢á.£ë(¢¸,¡);¤ ¢¸};ª.í=£(){·(Ç,¢¡)};ª.¢·=£(){ÿ{if(Å>5)«.£ê.í(¥Û,¥Ü)}õ(¢à){}¢Ë{¯(¢ i=0;i<Ç.­;i++){¢ î=¢¶(Ç[i][0]);¯(¢ j=0;j<î.­;j++)Ç[i][1](î[j])}}};ª.í(¥Ý,£(¡){if(!¡.£§){¢ Ò=¢¶(¥Þ,¡)[0];if(Ò){if(!Ò.id)Ò.id=Ò.ü;¡.£§=Ò.id}}});ª.í(¥ß,£(¡){¢Þ(¡);£¦ þ[¥à]});ª.í(¥á,£(¡){if(¡.º==¥â){¢ ¬=¡.¢µ.¬(¤îi);¡.°.¥=(¬)?¬[1]:¥¨}if(¡.Ý==¥ã){ö(¡,¥ä,£(){¡.°.¢Ý=×;¢ª(¥å+¡.ü+¥æ,1)})}});ª.í(¥ç,£(¡){¢ ££=¤ï;ö(¡,¥è,£(){¯(¢ i=0;i<¡.­;i++){if(££.±(¡[i].Ý)&&!¡[i].ý&&!¡[i].°.¢Ý){¡[i].ý=×;¢ª(¥å+¡[i].ü+¥é,1)}Ö if(¡[i].º==¥â&&¡[i].Ý==¥ã){¢ª(¥å+¡[i].ü+¥ê+¡[i].¥+¥Ð,1);¡[i].¥=¡[i].°.¥}}})})}},×);´.¢´(¥ë,£(){¢ ¢¯=¥ì,¢û=¤ð,¢ñ=¤ñ,¢Ð=¤ò;¢ ¢ÿ=(Å<6)?¤ógi:¤ôgi;¢ ¢ö=(Å<5.5)?¤õ:¤ö;¢ Ã=£¡();·(´.Ë,£ ¢ò(){if(Ã.Î)Ã.Î.¢Ú(Ã)});Ñ.û(¢ÿ,£(¬){¤ ¬.»(0,3)+¬.¢þ(4).¢ý()+¬.»(5)});¢ ¢ü=(è)?«.¢Ù:Ù;£ ¢Ó(¡){¤ ¡.Í.Ü==¥í||¡.©.Ü==¥í};£ ¾(¡){¢ ¾=¡.¢²;Ê(¾&&!¢³(¾))¾=¾.¢²;if(!¾||¢Ó(¡))¾=¢ü;¤ ¾};£ å(¢ó){å=£(¡,¥){if(!¡.°.¿&&(!ë||¡.º!=¥î)){if(!¥)¥=¡.©.¨;¡.°.¿=(¢û.±(¥))?£Þ.ú(0,ê(¡,¥)):¥;¡.°.¨=¡.°.¿;é(¡)}};if(è)Ñ.Ú(¥ï,å);¢ ê=(è)?£(¡,¥){¤ ç(¡,¥)+¢Õ(¡)+¢Ô(¡)}:£(¡,¥){¤ ç(¡,¥)};£ ¢Õ(¡){¤ ¡.¢Ñ-¡.Ä};£ ¢Ô(¡){¤ ç(¡,¡.©.£Ý)+ç(¡,¡.©.£Ü)};£ ¢ô(¡){¤((¡.©.¢ù==¥ð)?0:÷(¡,¡.©.¢ù))+((¡.©.¢ø==¥ð)?0:÷(¡,¡.©.¢ø))};£ ¼(¡){¼[¼.Ï++]=¡;if(¡.©.¢÷==¥ð)¡.°.¢÷=0;å(¡);é(¡);¢®(¡)};¼.Ï=0;Ñ.Ú(¥ñ+¢¯,¼);¢¬(¢Î(¼).³(¤÷g,¥ò));Ð.Ï=0;Ñ.Ú(¥ó+¢¯,Ð);£ ¢®(¡){¢ ¢°=¡.¢õ();¢ ¨=¢°.æ-¢°.Â;if(¡.©.Ð&&¨>=ê(¡,¡.©.Ð))¡.°.¨=ê(¡,¡.©.Ð);Ö if(¡.©.¼&&¨<=ê(¡,¡.©.¼))¡.°.¨=ê(¡,¡.©.¼);Ö ¡.°.¨=¡.°.¿};£ Ø(¡){if((¡.©.Ü==¥ô||¡.©.Ü==¥í)&&¡.©.Â!=¥ð&&¡.©.æ!=¥ð&&¢ö.±(¡.©.¨)){Ø[Ø.Ï++]=¡;é(¡);¢Ò(¡)}};Ø.Ï=0;Ñ.Ú(¥õ+¢¯,Ø);£ ¢Ò(¡){¡.°.¨=¥¨;¢ Î=¾(¡);¢ Â=(¡.°.£Û)?¡.¢õ().Â-2:÷(¡,¡.©.Â);¢ ¨=Î.Ä-÷(¡,¡.©.æ)-Â-¢ô(¡);if(!è)¨-=¢Õ(¡)+¢Ô(¡);if(¨<0)¨=0;if(¢Ó(¡)||¢ó||¡.¢Ñ<¨){¡.°.¿=¨;¡.°.¨=¨}};¢ Ä=Ù.Ä;ö(ù,¥ö,£(){¢ i,ø=(Ä<Ù.Ä);Ä=Ù.Ä;¯(i=0;i<¼.Ï;i++){¢ ¡=¼[i];¢ ¿=(¡.°.¨==¡.©.¼);if(ø&&¿)¡.°.¨=¥¨;if(ø==¿)¢®(¡)}¯(i=0;i<Ð.Ï;i++){¢ ¡=Ð[i];¢ ¿=(¡.°.¨==¡.©.Ð);if(!ø&&¿)¡.°.¨=¥¨;if(ø!=¿)¢®(¡)}¯(i=0;i<Ø.Ï;i++)¢Ò(Ø[i]);¢ò()});£ ç(¡,¥){if(¢Ð.±(¥))¤ ¢­(¥);if(¢ñ.±(¥))¤ ¢­(£Ù(¥)/100*¾(¡).Ä);¢ Î=(¡.£Ø)?¡:¡.Î;Î.¢Ï(Ã);Ã.Í.¨=¥;¤ Ã.¢Ñ};£ ÷(¡,¥){if(¢­(¥)>0)¤ ç(¡,¥);if(¢Ð.±(¥))¤ ¢­(¥);¡.Î.¢Ï(Ã);Ã.Í.Â=¥;¤ Ã.£×}};¢¬(¢Î(å).³(¤øg,¥÷).³(¤ùg,¥ø).³(¤úg,¥ù).³(¤ûg,¥ú).³(¤üg,¥û).³(¤ýg,¥ü));å();£Î(×)});¢«=×;if(«.¢Í==¥®)_ã();Ö ö(«,¥ý,£(){if(!ä&&«.¢Í==¥®)¢ª(_ã,0)})}õ(¢¨){¢©();â(¥þ+¢¨.¢ï)}¢Ë{}}();',340,0,/./,String,95,'element`var`function`return`value`from`cssText`width`currentStyle`this`document`match`length`filter`for`runtimeStyle`test`href`replace`IE7`selector`styleSheet`push`filtered`path`tagName`slice`minWidth`x5cs`layoutParent`fixedWidth`scopeName`filterArgs`left`ie7_tmp`clientWidth`appVersion`ie7`fixes`link`styleSheets`while`recalcs`nextSibling`style`parentElement`count`maxWidth`CSSFixes`input`new`handler`toString`else`true`fixRight`documentElement`addRecalc`auto`position`type`false`token`SIZES`pattern`alert`load`complete`fixWidth`right`getPixelWidth`quirksMode`boxSizing`getFixedWidth`isHTML`all`add`elements`isElement`pseudoClass`selectors`cacheSelector`modules`script`catch`addEventHandler`getPixelLeft`wider`window`max`addFix`uniqueID`disabled`cssCache`try`arguments`node`Boolean`x5c`visited`subset`url`error`unHide`setTimeout`loaded`eval`parseInt`resizeWidth`NUMERIC`rect`min`offsetParent`hasLayout`addModule`outerHTML`cssQuery`apply`fixedElement`HTMLFixes`display`QUOTED`handlers`pop`strings`string`item`small`recalc`getCSSText`getPath`styles`DUMMY`pathname`makePath`array`httpRequest`finally`Error`readyState`String`appendChild`PIXEL`offsetWidth`resizeRight`isFixed`getPaddingWidth`getBorderWidth`fixed`absolute`x5cw`body`removeChild`box`submit`clicked`fix`select`ignore`parentNode`nextElement`x2f`pseudoClasses`join`RegExp`split`useCache`base`large`HEADER`inlineStyles`LINKS`location`description`height`PERCENT`removeTempElement`HEIGHT`getMarginWidth`getBoundingClientRect`AUTO`minHeight`marginRight`marginLeft`x5cd`UNIT`viewport`toUpperCase`charAt`MATCH`tmpElement`BUTTON`UNSUCCESSFUL`button`abbr`delete`htmlFor`HTML`endTag`createElement`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`decode`encode`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`parse`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`name`autoload`mimeType`search`message`onreadystatechange`fixHeight`bottom`Bottom`Right`top`Top`Left`Height`Width`offsetLeft`canHaveChildren`parseFloat`onresize`screenLeft`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`firstChild`previousSibling`previousElement`ie7_anon`nodeType`clip`none`border`padding`object`unquote`quote`contentEditable`onbeforeunload`detachEvent`import`namespace`getString`compareTagName`dynamicPseudoClasses`attributeTests`className`null`concat`Array`constructor`size`font`medium`list`inline`float`relative`content`sizing`lastIndex`exec`successfully`callee`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`Microsoft`ActiveXObject`src`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ms_`ie7_off`MSIE`navigator`ie7_debug`alpha`version`visible`visibility`Function`fromCharCode`¤Ò`¤Ð (\\d\\.\\d)`¤Ï`^¤Î`\\.¤É$`^[\\w\\.]+[^:]*$`(¢§\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¤·\\b|\\¤¶\\b|^$`Æ-È`(¤­\\s*:\\s*(Â|æ))`¢º\\s*:\\s*¤«-¢À`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢ã\\*[^\\*]*\\*+([^\\¢ã][^\\*]*\\*+)*\\¢ã)|(\x27[^\x27]*\x27)|("[^"]*")`@(£ý|£ü)[^;\\n]+[;\\n]|`\\¢¤:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ¥="([^"]*)"`^(¢Ü|£á|£¤)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(¢±|ú)-(¨|¢ð)\\s*:\\s*\\d`\\b(¢±|ú)-¨\\s*:\\s*\\d`^Û|0cm$`^Û$`¢±`£Ö`¨`£Ô`Â`£Ñ`æ`¤Õ`´ ¤Ô 0.7.3 (¤Ó)`\\n\\n`¤Ì`¤Ê`¤È ¤Ç`:È{Æ-È:È}:¢¥{Æ-È:¢¥}`*{¤Æ:0}`ô=``/`¤Ã.¤Â`¤À`¢Ì [1]: ¤½ ¤¼ ã ¤» `Æ-¤º.js`ä`<Í>`$1`$2`Í`¢« ¤³`¢Ì [2]: `([^{}]*)\\¢¤{([^}]*[^\\¢Ø-])?`gi`¢Û-¤°\\½*:\\½*¤¯-¢Û`Ü\\½*:\\½*¢×`¤®`¢º:¤¬;$1`¢º:£­`xx-¢Á,x-¢Á,¢Á,¤ª,¢ê,x-¢ê,xx-¢ê`,`xx-¢Á`(¤©(-¤¨)?\\½*:\\½*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\½)`(\\½|$)`:`È`¢¥`\\¢¤([^)]*\\¢¤)`Æ-È`\x27`\\¢¤:`£ú`£ö`Ü:¢×;£õ:0;¢º:£­;£ô:£ó;£ò:¢°(0 0 0 0);Â:-9999`!`Æ-£ì`<£¨:`/>``£¨`£é://£è.w3.£ç/1999/£æ`£å`Ò,¢ß,£ä`£¥` £¥`£¤,Ò`£¢`¢Ü`£ã`«.ì.`.°.¢Ý=Þ`£â`£à`.ý=Þ`.¥=\x27`Æ-¢Û-£ß`\\½*:\\½*\\¢ú[\\¢Ø%]*`¢Ö`HR`¨\\½*:\\½*\\¢ú\\¢Ø*[^%]`Û`¢±-¨`ú`ú-¨`¢×`æ`£Ú`£Õ`¢ð`£Ó`£Ò`£Ð`£Ï`£Í`¢Ì [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/metallic/javascript/ie7/ie7-lite.js b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-lite.js new file mode 100644 index 0000000..88c764f --- /dev/null +++ b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-lite.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/metallic/javascript/ie7/ie7-png.js b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-png.js new file mode 100644 index 0000000..7b8f2cf --- /dev/null +++ b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-png.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-png",function(){if(appVersion<5.5)return;var FILTER="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=%1,sizingMethod='scale')";var NULL=(/\bSV1\b/.test(navigator.userAgent))?makePath("blank.gif",path):"javascript:'#define x_width 1\x5cn#define x_height 1\x5cnstatic char x_bits[]={0x00}'";var pngTest=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");function addFilter(element,src){element.runtimeStyle.filter=FILTER.replace(/%1/,src)};var MATCH=/background(-image)?\s*:([^(};]*)url\(([^\)]+)\)([^;}]*)/gi;CSSFixes.addFix(MATCH,function replace(match,image,prefix,url,suffix){url=getString(url);return pngTest.test(url)?"filter:"+FILTER.replace(/scale/,"crop").replace(/%1/,url)+";zoom:1;background"+(image||"")+":"+(prefix||"")+"none"+(suffix||""):match});if(HTMLFixes){function fixImg(element){if(pngTest.test(element.src)){var width=element.width,height=element.height;addFilter(element,element.src);element.src=NULL;element.width=width;element.height=height}else element.runtimeStyle.filter=""};HTMLFixes.add("img,input",function(element){if(element.tagName=="INPUT"&&element.type!="image")return;fixImg(element);addEventHandler(element,"onpropertychange",function(){if(event.propertyName=="src")fixImg(element)})})}}); diff --git a/src/usr/local/www/themes/metallic/javascript/ie7/ie7-server.css b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-server.css new file mode 100644 index 0000000..47c7edd --- /dev/null +++ b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-server.css @@ -0,0 +1,43 @@ +body, td, dd {font: 10pt Verdana, Arial, Helvetica, sans-serif; color: black;} +body {margin: 8px; background: #333;} +h1 {margin: 0;} +h1 a:hover {background-color: transparent;} +h2 {font-size: 1.75em;} +h3 {font-size: 1.1em;} +a:active {color: #ff0000;} +a:link {color: #0a6cce;} +a:visited {color: #0a6cce;} +code, *.code {font-family: monospace; font-size: 100%; font-style: normal; white-space: nowrap; + padding: 0 1px; background: #f2f3f8; border: #d6d9e9 1px solid;} +code.box {display: block; padding: 10px; margin: 0.5em 0;} +ul {list-style-type: square;} +dd {margin: .2em 0 .5em 1em;} +dl.library dt {display: list-item; margin-left: 3em; list-style-type: square;} +dl.library dd {font-style: italic; margin-left: 3em;} +dt {font-weight: bold;} +dt.pack {color: brown;} +a img {border-style: none;} +hr {height: 1px; color: #000; border-style: solid;} +hr.short {height: 2px; width: 100px;} +div.document {background: #eef; padding: 20px 20px 5px 20px; width: 600px; border: 1px solid black;} +hr {border-bottom-width: 0px;} +div.header hr {color: #0a6cce; background-color: #0a6cce;} +div.content {min-height: 100px;} +div.footer hr {color: #898e79; background-color: #898e79; } +div.header, div.header a:link, div.header a:visited, h3 a:link, h3 a:visited {text-decoration: none;} +a:hover {color: #fff; background-color: #0a6cce; text-decoration: none;} +div.footer a:hover {background-color: transparent; text-decoration: none;} +div.header .menu {text-align: right;} +div.footer {font-size: x-small; margin-top: 8px;} +div.footnote {font-family: "times new roman", times; font-style: italic; margin-top: 10px;} +#license {margin-top: 5px; font-size: xx-small;} +table {border-top: 1px solid #000; border-left: 1px solid #000;} +th {background-color: #fff; text-align: left;} +th, td {border-right: 1px solid #000; border-bottom: 1px solid #000;} +th.small {width: 100px;} +th.medium {width: 200px;} +th.large {width: 270px;} +th.x-large {width: 408px;} +table.fixed {table-layout: fixed;} +span.comment {color: #666;} + diff --git a/src/usr/local/www/themes/metallic/javascript/ie7/ie7-standard-p.js b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-standard-p.js new file mode 100644 index 0000000..73e99ac --- /dev/null +++ b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-standard-p.js @@ -0,0 +1,3 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +eval(function(A,r,s,e,n,a,l){s=function(e){return((e=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!¢¡.ª)¶ ¢(){¢Æ{¢¡.ª=¤;£ ¢Ø=¤.¢©=¶ ¤¬;¢ ¢ì(){if(².ß)².ß.Ì.¦²=¦ë};¤.È=¢(){¥ ¦ì};£ ¢¶=(¦´.µ(¢ô.¤ì))?¢(¤í){¢¡.¢¶(ª+¦í+¤í)}:¢Ø;£ á=¤¥.á.§(¦µ)[1];if(¦¶.µ(¢ô.¤ì)||á<5||!¦·.µ(².ù.¢«))¥ ¢ì();£ ¢§=¢ê(².¦«!=¦î);£ ¢±=(¦© ².¤ë==¦ï)?!¦¸i.µ(¢ô.£»):¢ê(².¤ë!=¦ð);£ £ê=¦ñ;£ £¦=£ê;if(!¢±)£¦+=¦ò;£ ¢½;£ ù=².ù;£ ¢Ñ={};¤.¢©=¢(¢Ç,¢Ò,¤ê){if(!¢Ñ)¥;if(¢í)Ü(¦ó+¢ó(¢Ò));if(¤ê){¢Ò();¢Ò=¢Ø}¢Ñ[¢Ç]=¢Ò};£ ¤é=¦¹;¢ ¢À(¾,Á){if(¤é.µ(¾))¾=(Á||¦ô)+¾;¥ ¾};¢ £¹(¾,Á){¾=¢À(¾,Á);¥ ¾.Æ(0,¾.¤å(¦õ)+1)};£ Á=£¹(².¤è[².¤è.¯-1].î);£ £½=¶ ¦£(¦ö);¢ ê(¾,Á){¢Æ{¾=¢À(¾,Á);£½.¦¡(¦÷,¾,ë);£½.¥þ();¥ £½.¥ý}¢·(£¥){¢¶(¦ø+¾);¥ ¦ô}};£ ¸=¢(£¼,£·){¥ £¼.¸(£·)};£ £´=¢(£¼){¥ £¼.£´()};if(á<5.5)Ü(ê(¦ù,Á));if(².£À==¦ú||!¢±)².¥ø();Û ².¥÷(¦û);¤.¿=².é[².é.¯-1];¤.¿.¨=£ê;¤.¿.Î=Ö;£ ¨={};¢ ¤á(¿,Á){£ Ô=¢À(¿.¾,Á);if(¨[Ô])¥ ¦ô;¨[Ô]=(¿.¢ç)?¦ô:¤ç(¢ã(¿,Á),£¹(¿.¾,Á));¥ ¨[Ô]};£ ¢ã=¢(¿){¥ ¿.¨};£ ¤æ=¦ºgi;¢ ¤ç(¨,£»){¥ ¨.¬(¤æ,¦ü+£».Æ(0,£».¤å(¦õ)+1)+¦ý)};¤.ô=[];¤.¢â=¢Ø;£ ¢¸=ë;¢ _ê(){¢Æ{¢¸=Ö;£ ¤ã=¦»i;£ é=².é;£ £é=[];£ £º=².¤Ø(¦þ);®(£ i=£º.¯-1;i>=0;i--){¸(£é,¦¼.µ(£º[i].¤ä)?¦ô:£º[i].¤ä)}¢ ¢ã(¿,Á){£ ¨=¦ô;if(¤ã.µ(¿.¥ô)){®(£ i=0;i<¿.¤â.¯;i++){¨+=í.£ó(¿.¤â[i],£¹(¿.¾,Á))}¨+=((¿.¾)?¤á(¿,Á):£´(£é))}¥ ¨};ª.¨=¦ô;®(i=0;i<é.¯;i++)ª.¨+=¢ã(é[i],¦ô);ª.¨=£©(ª.¨);®(i in ¢Ñ)¢Ñ[i]();£Ö ¢Ñ;if(¢½)¢½.£°();à.£°();ª.¢â();ª.¿.¨=£¦+£§(ª.¨);®(i=0;i<é.¯;i++){if(!é[i].¢ç&&!é[i].Î)é[i].¨=¦ô}ª.Ø();¢¶(¦ÿ)}¢·(¢ë){¢¶(§¡+¢ë.£ë)}£¾{¢ì()}};¤.Ø=¢(){à.Ø();®(£ i=0;i<¤.ô.¯;i++)¤.ô[i]()};£ à=¶ ¢(){£ è=[];¤.¢¿=¢(){¸(è,í)};£ ô=[];¤.ï=¢(¢µ,£ä){£ ¤à=¶ ç(§¢+¢µ,§£);£ ¨=ª.¨;¢µ=[];Ý(§=¤à.¢ß(¨)){¸(¢µ,§[1]);if(á<5.5)¨=¨.Æ(§.¥ò)}if(¢µ.¯){¢µ=¢µ.È();¸(ô,í)}};¤.£°=¢(){®(£ i=0;i<è.¯;i++){ª.¨=ª.¨.¬(è[i][0],è[i][1])}¤.ï(§¤,¢Ê);¤.ï(§¥,¢(¡){if(¡.¢¥.«.³==§¦)¢Ê(¡.¢¥)})};¤.Ø=¢(){®(£ i=0;i<ô.¯;i++){£ ¢Í=ü(ô[i][0]);®(£ j=0;j<¢Í.¯;j++)ô[i][1](¢Í[j])}};¤.¢¿(¦½gi,§§);if(á<6)¤.¢¿(¦¾gi,§¨);if(¢§){£ ¢´=§©.£¨(§ª);®(£ i=0;i<¢´.¯;i++)¢´[¢´[i]]=¢´[i-1]||§«;¢ ¬($,$1,$2,$3){¥ $1+¢´[$3]};¤.¢¿(¶ ç(§¬+¢´.¢Ü(§­)+§®,§£),¬)}};£ ¤Ü=¦¿;£ ¤Û=¦Àg;£ ¤Ú=¦Á;£ ¤ß=¦Âg;£ ¤Þ=§¯;£ ¢è={};¢ ü(´,­){£ £æ=!­;£ £ç=(­)?(­.¥ê==¥é)?­:[­]:[²];£ ò=´.¬(¤ß,¤Þ).£¨(§ª);£ §=[];®(£ i=0;i<ò.¯;i++){´=¤Ý(ò[i]);if(´.Æ(0,3).¢Ü(¦ô)==§°){´=´.Æ(2);­=¤Ù(£ç,´[1])}Û ­=£ç;£ j=0,¢³,±,É,¢Ð=¦ô;Ý(j<´.¯){¢³=´[j++];±=´[j++];¢Ð+=¢³+±;É=¦ô;if(´[j]==§±){Ý(´[j++]!=§®)É+=´[j];É=É.Æ(0,-1);¢Ð+=§±+É+§®}­=(£æ&&¢è[¢Ð])?¢è[¢Ð]:£å(­,¢³,±,É);if(£æ)¢è[¢Ð]=­}§=§.¥è(­)}¥ §};¢ ¤Ý(´){if(¤Ü.µ(´))´=§²+´;¥ ´.§(¤Û)};¢ £å(­,¢³,±,É){£ Ê=¦ô;if(¤Ú.µ(±)){±=±.£¨(§­);Ê=±[0];±=±[1]}£ ¼=[];if(ò[¢³])ò[¢³](¼,­,±,Ê||É);¥ ¼};¢ ¤Ù(­,id){£ ¼=[],i,j;®(i=0;i<­.¯;i++){£ §=­[i].¢Ì.£·(id);if(§){if(§.¯==¢Þ)¸(¼,§);Û ®(j=0;j<§.¯;j++)¸(¼,§[j])}}¥ ¼};£ ò={§²:¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=(±==§³&&­[i].¢Ì)?­[i].¢Ì:­[i].¤Ø(±);®(£ j=0;j<ó.¯;j++){if(¢Î(ó[j])&&(!Ê||ó[j].Ê==Ê))¸(¼,ó[j])}}},§´:¢(¼,­,±){®(£ i=0;i<­.¯;i++)if(­[i].id==±)¸(¼,­[i])},§µ:¢(¼,­,±){±=¶ ç(§¶+±+§·);®(£ i=0;i<­.¯;i++)if(±.µ(­[i].¢Ý))¸(¼,­[i])},§¸:¢(¼,­,±,É){±=¢®[±];if(±)®(£ i=0;i<­.¯;i++)if(±(­[i],É))¸(¼,­[i])}};£ ¢¬=¦ô;£ ¢®={È:¢(){£ È=[];®(£ ¢Ï in ¤){if(¢Ï!=§¹&&¢Ï!=§º){if(¤[¢Ï].¯>1)¢Ï+=§»;¸(È,¢Ï)}}¥ È.¢Ü(§­)},§¹:¢(¡){¥ ¢ê(¡.«[§¼]==§¹)},§º:¢(¡){¥ ¢ê(¡.«[§¼]==§º)}};£ ¢­={È:¢®.È};¢ £Ù(¡,Ï,Ê){if(Ê&&¡.Ê!=Ê)¥ ë;¥(Ï==§³)?¢Î(¡):(¢±)?(¡.Ï==Ï.¤Ç()):(¡.Ï==Ï)};£ £µ=[];¢ ¢ö(£¶){¥ £².µ(£¶)?£µ[£¶.Æ(1,-1)]:£¶};£ £©=¢(¨){¥ ¨.¬(¦Ãg,¢(§){¥(§.¤È(0)==¦õ)?¦ô:§½+(¸(£µ,§.Æ(1,-1))-1)+§½}).¬(¦Äg,¦ô).¬(¦Åg,§­).¬(¦Æg,¦ü)};¢ £§(¨){¥ ¨.¬(¦Ág,§¾).¬(¦Çg,¢(§,¤×){¥ £µ[¤×]})};£ £³=[];¢ Ó(¡,Õ,þ){¡.¤Ö(Õ,þ);¸(£³,í)};¢ ¤Õ(¡,Õ,þ){¢Æ{¡.¥å(Õ,þ)}¢·(£¥){}};¢¡.¤Ö(§¿,¢(){Ý(£³.¯){£ þ=£´(£³);¤Õ(þ[0],þ[1],þ[2])}});£ £®=(á<6)?¢(¡){¥ ¡.Í}:¢(¡){¥ ¡.«.£®};¢ ¢Ê(¡){if(!£®(¡)){¡.¥ã=ë;¤Ô(¤Ð(¡))}};¢ ¤Ô(¡){Ý(¡){¡.¦.¤Ó=¡.«.¤Ó;¡=¢þ(¡)}};£ £²=¦È;¢ ¤ª(©){¥(£².µ(©))?©:§½+©+§½};¢ ¥â(©){¥(£².µ(©))?©.Æ(1,-1):©};¢ £Ï(Ï){£ ¡=².£Û(Ï||§À);¡.Ì.¨=§Á;¥ ¡};¢ ¢Î(¢é){¥ ¢ê(¢é&&¢é.¥Þ==1&&¢é.Ï!=§Â&&!¢é.¢ÿ)};¢ ¤²(¡){Ý(¡&&(¡=¡.¥Ý)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¢þ(¡){Ý(¡&&(¡=¡.õ)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¤Ð(¡){¡=¡.¤¹;¥(¢Î(¡))?¡:¢þ(¡)};£ ¢í=ë;ª.¢©(§Ã,¢(){if(¢±)¢½=¶ ¢(){£ è=[];¢ £ä(¡){£ £±=².£Û(§Ä+¡.£¯.Æ(1));if(¡.£¯.Æ(-2)!=§Å){£ ¤Ï=§Æ+¡.Ï+§Ç,õ;Ý((õ=¡.õ)&&õ.£¯!=¤Ï){¡.¢ü.¢Õ(õ);£±.¢»(õ)}if(õ)¡.¢ü.¢Õ(õ)}¡.¢ü.¥Û(£±,¡);¥ £±};¤.æ=¢(){¸(è,í)};¤.£°=¢(){¢Æ{if(á>5)².¥Ú.æ(§È,§É)}¢·(£¥){}£¾{®(£ i=0;i<è.¯;i++){£ ¢Í=ü(è[i][0]);®(£ j=0;j<¢Í.¯;j++)è[i][1](¢Í[j])}}};¤.æ(§Ê,¢(¡){if(!¡.¤Í){£ ð=ü(§Ë,¡)[0];if(ð){if(!ð.id)ð.id=ð.¢«;¡.¤Í=ð.id}}});¤.æ(§Ì,¢(¡){£ä(¡);£Ö ¢è[§Í]});¤.æ(§Î,¢(¡){if(¡.Ï==§Ï){£ §=¡.£¯.§(¦Éi);¡.¦.©=(§)?§[1]:¦ô}if(¡.Õ==§Ð){Ó(¡,§Ñ,¢(){¡.¦.£ã=Ö;¢Ó(§Ò+¡.¢«+§Ó,1)})}});¤.æ(§Ô,¢(¡){£ ¤Ê=¦Ê;Ó(¡,§Õ,¢(){®(£ i=0;i<¡.¯;i++){if(¤Ê.µ(¡[i].Õ)&&!¡[i].¢ç&&!¡[i].¦.£ã){¡[i].¢ç=Ö;¢Ó(§Ò+¡[i].¢«+§Ö,1)}Û if(¡[i].Ï==§Ï&&¡[i].Õ==§Ð){¢Ó(§Ò+¡[i].¢«+§×+¡[i].©+§½,1);¡[i].©=¡[i].¦.©}}})})}},Ö);ª.¢©(§Ø,¢(){£ £«=§Ù,¤Æ=¦Ë,¢Ö=¦Ì,£Ý=¦Í;£ ¢¾=(á<6)?¦Îgi:¦Ïgi;£ ¤Ã=(á<5.5)?¦Ð:¦Ñ;£ ¹=£Ï();¸(ª.ô,¢ ¤À(){if(¹.½)¹.½.¢Õ(¹)});à.¢¿(¢¾,¢(§){¥ §.Æ(0,3)+§.¤È(4).¤Ç()+§.Æ(5)});£ Þ=(¢§)?².ß:ù;¢ ö(¡){¥ ¡.Ì.³==§Ú||¡.«.³==§Ú};¢ ã(¡){£ ã=¡.¢¥;Ý(ã&&!£®(ã))ã=ã.¢¥;if(!ã||ö(¡))ã=Þ;¥ ã};¢ ì(¤Á){ì=¢(¡,©){if(!¡.¦.ä&&(!¢±||¡.Ï!=§Û)){if(!©)©=¡.«.°;¡.¦.ä=(¤Æ.µ(©))?¥Î.¢æ(0,¢Ë(¡,©)):©;¡.¦.°=¡.¦.ä;¢Ê(¡)}};if(¢§)à.ï(§Ü,ì);£ ¢Ë=(¢§)?¢(¡,©){¥ ¢É(¡,©)+£à(¡)+£ß(¡)}:¢(¡,©){¥ ¢É(¡,©)};¢ £à(¡){¥ ¡.¢¼-¡.Í};¢ £ß(¡){¥ ¢É(¡,¡.«.¥Í)+¢É(¡,¡.«.¥Ì)};¢ ¤Â(¡){¥((¡.«.¢ï==§Ý)?0:¢ä(¡,¡.«.¢ï))+((¡.«.¤Å==§Ý)?0:¢ä(¡,¡.«.¤Å))};¢ Ú(¡){Ú[Ú.Ë++]=¡;if(¡.«.¤Ä==§Ý)¡.¦.¤Ä=0;ì(¡);¢Ê(¡);£ª(¡)};Ú.Ë=0;à.ï(§Þ+£«,Ú);Ü(¢ó(Ú).¬(¦Òg,§ß));ý.Ë=0;à.ï(§à+£«,ý);¢ £ª(¡){£ £¬=¡.£É();£ °=£¬.×-£¬.À;if(¡.«.ý&&°>=¢Ë(¡,¡.«.ý))¡.¦.°=¢Ë(¡,¡.«.ý);Û if(¡.«.Ú&&°<=¢Ë(¡,¡.«.Ú))¡.¦.°=¢Ë(¡,¡.«.Ú);Û ¡.¦.°=¡.¦.ä};¢ ¢²(¡){if((¡.«.³==§á||¡.«.³==§Ú)&&¡.«.À!=§Ý&&¡.«.×!=§Ý&&¤Ã.µ(¡.«.°)){¢²[¢².Ë++]=¡;¢Ê(¡);£Þ(¡)}};¢².Ë=0;à.ï(§â+£«,¢²);¢ £Þ(¡){¡.¦.°=¦ô;£ ½=ã(¡);£ À=(¡.¦.¢Ô)?¡.£É().À-2:¢ä(¡,¡.«.À);£ °=½.Í-¢ä(¡,¡.«.×)-À-¤Â(¡);if(!¢§)°-=£à(¡)+£ß(¡);if(°<0)°=0;if(ö(¡)||¤Á||¡.¢¼<°){¡.¦.ä=°;¡.¦.°=°}};£ Í=ù.Í;Ó(¢¡,§ã,¢(){£ i,¢å=(Í<ù.Í);Í=ù.Í;®(i=0;i<Ú.Ë;i++){£ ¡=Ú[i];£ ä=(¡.¦.°==¡.«.Ú);if(¢å&&ä)¡.¦.°=¦ô;if(¢å==ä)£ª(¡)}®(i=0;i<ý.Ë;i++){£ ¡=ý[i];£ ä=(¡.¦.°==¡.«.ý);if(!¢å&&ä)¡.¦.°=¦ô;if(¢å!=ä)£ª(¡)}®(i=0;i<¢².Ë;i++)£Þ(¢²[i]);¤À()});¢ ¢É(¡,©){if(£Ý.µ(©))¥ ø(©);if(¢Ö.µ(©))¥ ø(£Æ(©)/100*ã(¡).Í);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);¹.Ì.°=©;¥ ¹.¢¼};¢ ¢ä(¡,©){if(ø(©)>0)¥ ¢É(¡,©);if(£Ý.µ(©))¥ ø(©);¡.½.¢»(¹);¹.Ì.À=©;¥ ¹.¢¤}};Ü(¢ó(ì).¬(¦Óg,§ä).¬(¦Ôg,§å).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦×g,§è).¬(¦Øg,§é));ì();¥É(Ö)});ª.¢©(§ê,¢(){£ ¤§=¦Ùg,¤½=¦Úi;ª.¢á=[];ª.¤¿=¶ ¤¾;ª.·=·;ª.Ò=Ò;ª.Ã=Ã;ª.¢â=¢(){¥Ç(¤.¤¿)¤.¨=£§(¢â(£©(¤.¨)));®(£ i=0;i<ª.¢á.¯;i++)ª.¢á[i].¢ß();®(i=0;i<£¡.¯;i++)£¡[i].¤º()};¢ã=¢(¿,Á){¥ ê(¿.¾,Á)};£ ££=[];¢ ¤¾(){¤.¢â=¢(¨){·.û=¶ ç(§ë+¢®+§ì,§í);·.¤¨=¶ ç(§î+¢®+§­+¢­+§ï,§í);Ò.û=¶ ç(§ð+¢­+§ñ,§í);¥ ¨.¬(Ã.û,Ã.ID).¬(Ò.û,Ò.ID).¬(·.û,·.ID)};¤.£©=¢(¨){ñ.û=¶ ç(§ò+¢¬+§ó+¢¬+§ô,§í);¥ ¨.¬(ñ.û,ñ.ID).¬(¦Ûg,¢($){¥ §õ+(¸(££,$)-1)+§ö}).¬(¦Üg,§¸).¬(¦Ýg,¢(§,À,×){¥ À.£¨(§ª).¢Ü(×)+×})};¤.£§=¢(¨){¥ ¨.¬(¦Þg,¢($,$1){¥ ££[$1]})}};¢ _·(){¤.È=¢(){¥ §µ+¤.¢Ç};¤.æ=¢(¡){¡.¢Ý+=§²+¤.¢Ç};¤.¤©=¢(¡){¡.¢Ý=¡.¢Ý.¬(¤.¢¾,¦ô)};¤.¢ß=¢(){£ §=ü(¤.´);®(£ i=0;i<§.¯;i++)¤.æ(§[i])}};¢ ·(´,¨){¤.id=ª.¢á.¯;¤.¢Ç=·.¢ø+¤.id;¤.´=´;¤.¢¾=¶ ç(§÷+¤.¢Ç+§ø,§í);¸(ª.¢á,¤)};·.£Ú=_·;·.¢ª=¶ _·;·.¢ø=§ù;·.ID=¢(§){¥ £Õ(§)+¶ ·(§)};¢ _Ò(){¤.¢ß=¢(){£ §=ü(¤.¢°);®(£ i=0;i<§.¯;i++){£ º=(¤.º)?ü(¤.º,§[i]):[§[i]];if(º)¤.¢¯(§[i],º,¤)}}};_Ò.¢ª=¶ _·;¢ Ò(´,¢°,¢¯,º){¤.¢°=¢°;¤.¢¯=¢­[¢¯];¤.º=º;¤.£¢=·;¤.£¢(´)};Ò.£Ú=_Ò;Ò.¢ª=¶ _Ò;Ò.ID=¢(§,¢°,¢¯,º){if(¢±&&¢¯!=§ú&&¤½.µ(¢°)&&!¦ß.µ(º))¥ §;¥ £Õ(§)+¶ Ò(§,¢°,¢¯,º)};£¦+=§û;£ ¤·=¦àg;¢ ¤¶(§,£Ü){¥ Ü(§ü+§ý.Æ(£Ü.¯)+£Ü+§½)};£ £¡=[];¢ _Ã(){¤.Å=¢Þ;¤.È=¢(){¥ ¦ô};¤.¥Ã=0;¢ ¤¸(¢Ä,Å,¨){£ ÿ=¥Â(¢(){¢Æ{if(!¢Ä.ê)¥;¢Ä.ê(¢Ä,Å,¨);¤»(ÿ)}¢·(£¥){¤»(ÿ)}},10)};¤.¤º=¢(){if(¤.Å==¢Þ)¥;®(£ i=0;i<¤.§.¯;i++){£ º=¤.§[i];£ ¢Å=º.¦[¤.³];if(¢Å){£ ½=º.£Ì?º:º.½;£ £¤=¦á.µ(¤.Å);£ ¡=².£Û(£¤?Ã.¤³:§Â);¡.¢ÿ=Ö;¡.¦.¨=¢Å.¨;if(!£¤)¡.¥Á=¢Å.Å;if(¤.³==§þ){½.¥À(¡,½.¤¹)}Û{½.¢»(¡)}if(£¤)¤¸(¡,¢Å.Å,¢Å.¨);º.¦[¤.³]=¢Þ}}};¤.¢ß=¢(){¤.§=ü(¤.´);®(£ i=0;i<¤.§.¯;i++){£ ¦=¤.§[i].¦;if(!¦[¤.³])¦[¤.³]={¨:¦ô};¦[¤.³].¨+=§ÿ+¤.¨;if(¤.Å!=¢Þ)¦[¤.³].Å=¤.Å}}};_Ã.¢ª=¶ _·;¢ Ã(´,³,¨){¤.³=³;¤.¨=££[¨].Æ(1,-1);£ Å=¤.¨.§(Ã.¤´);if(Å)¤.Å=¢ö(Å[1]).¬(¤·,¤¶);¤.£¢=·;¤.£¢(´);¸(£¡,¤)};Ã.£Ú=_Ã;Ã.¢ª=¶ _Ã;Ã.ID=¢(§,´,³,¨){¥ ¶ Ã(´,³,¨)};Ã.û=¦âg;Ã.¤´=¦ã;Ã.¤³=¨¡+¢À(¨¢,Á)+¨£;ò[§Ç]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=­[i].¥º;®(£ j=0;j<ó.¯;j++)if(£Ù(ó[j],±,Ê))¸(¼,ó[j])}};ò[¨¤]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ¢ý=¢þ(­[i]);if(¢ý&&£Ù(¢ý,±,Ê))¸(¼,¢ý)}};ò[¨¥]=¢(¼,­,±){±=¢ú[±];®(£ i=0;i<­.¯;i++)if(±(­[i]))¸(¼,­[i])};¢®[¨¦]=¢(¡){¥!¤²(¡)};¢®[¨§]=¢(¡,É){É=¶ ç(¨¨+É,¨©);Ý(¡&&!¡.£×(¨§))¡=¡.¢ü;¥ ¡&&É.µ(¡.£×(¨§))};¢­.¢Ù=¢(¡){£ Â=í;Ó(¡,¨ª,¢(){ª.Ð.¢Ù.¢Û(Â)});Ó(¡,¨«,¢(){ª.Ð.¢Ù.¢Ú(Â)})};¢­.¢÷=¢(¡){£ Â=í;Ó(¡,¨¬,¢(){ª.Ð.¢÷.¢Û(Â)})};¢­.¢Á=¢(¡){£ Â=í;Ó(¡,¨­,¢(){ª.Ð.¢Á.¢Û(Â)});Ó(¡,¨®,¢(){ª.Ð.¢Á.¢Ú(Â)});if(¡==².¥²){ª.Ð.¢Á.¢Û(Â)}};Ó(²,¨¯,¢(){£ ú=ª.Ð.¢÷;£ Ù=ú.Ù,i;®(i in Ù)ú.¢Ú(Ù[i]);ú=ª.Ð.¢Ù;Ù=ú.Ù;®(i in Ù)if(!Ù[i][0].£õ(£ü.¥°))ú.¢Ú(Ù[i])});£ ¢ú=[];£ ¤«=¦äg;¢ ñ(Ä,¢Â,©){©=¢ö(©);¤.id=¢ú.¯;£ò(Ä.¥¯()){¢¦ ¨°:Ä=¨±;¤­;¢¦ ¨²:Ä=¨³;¤­;£ñ:Ä=¨´+Ä+¨µ}¢Â=¢¬[¢Â];¸(¢ú,¶ ¤¬(¨¶,¨·+¢Â(Ä,©)))};ñ.ID=¢(§,Ä,¢Â,©){¥ ¶ ñ(Ä,¢Â,©)};ñ.¢ª.È=¢(){¥ ñ.¢ø+¤.id};¢¬={È:¢(){£ È=[];®(£ i in ¤)if(i&&i!=¨¸)¸(È,i);¥ È.¢Ü(¦ô).¬(¦åg,¦ô)},¢ù:¢(©){¥ ©.¬(¤«,¨¹)},¦ô:¢(Ä){¥ Ä},¨º:¢(Ä,©){¥ Ä+¨»+¤ª(©)},¨¼:¢(Ä,©){¥ ¨½+¢¬.¢ù(©)+¨¾+Ä+§®},¨¿:¢(Ä,©){¥ ¨À+¢¬.¢ù(©)+¨Á+Ä+§®}};ñ.¢ø=¨¥;¢ _ú(){¤.¢Û=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.æ(º[i]);¤.Ù[·.id+¡.¢«]=Â};¤.¢Ú=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.¤©(º[i]);£Ö ¤.Ù[·.id+¡.¢«]}};ª.Ð=¢(Õ){¤.Õ=Õ;¤.Ù={};ª.Ð[Õ]=¤};ª.Ð.¢ª=¶ _ú;¶ ª.Ð(¨Â);¶ ª.Ð(¨Ã);¶ ª.Ð(§ú);¢ £Õ(´){¥ ´.¬(·.¤¨,¦ô).¬(¤§,§²)}},Ö);ª.¢©(¨Ä,¢(){if(á<5.5)¥;£ £Ô=¨Å;£ £ý=(¦æ.µ(¤¥.¥©))?¢À(¨Æ,Á):¨Ç;£ £Ó=¶ ç((¢¡.¤ý||¨È)+¨É,¨©);¢ £þ(¡,î){¡.¦.±=£Ô.¬(¦ç,î)};£ ¢¾=¦ègi;à.¢¿(¢¾,¢ ¬(§,¢õ,¤¡,Ô,£ÿ){Ô=¢ö(Ô);¥ £Ó.µ(Ô)?¨Ê+£Ô.¬(¦é,¨Ë).¬(¦ç,Ô)+¨Ì+(¢õ||¦ô)+§¸+(¤¡||¦ô)+¨Í+(£ÿ||¦ô):§});if(¢½){¢ £Ò(¡){if(£Ó.µ(¡.î)){£ °=¡.°,÷=¡.÷;£þ(¡,¡.î);¡.î=£ý;¡.°=°;¡.÷=÷}Û ¡.¦.±=¦ô};¢½.æ(¨Î,¢(¡){if(¡.Ï==¨Ï&&¡.Õ!=¨Ð)¥;£Ò(¡);Ó(¡,¨Ñ,¢(){if(£ü.£Ê==¨Ò)£Ò(¡)})})}});ª.¢©(¨Ó,¢(){£ ¢Ö=¦Ì;à.ï(¨Ô,¢¢);à.ï(¨Õ,¢£);£ ß=².ß;£ Þ$=(¢§)?¨Ö:¨×;£ Þ=Ü(Þ$);¢ ¢ñ(){if(ß.«.£Î!=§Ú){if(ß.«.£Í==¨Í){ß.¦.£Í=¨Ø+¢ô.¤÷+§®}ß.¦.£Î=§Ú}¢ñ=¢Ø};£ ¹=£Ï(¨Ù);¢ ¢º(£ú){¥ ¢ó(£ú).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦Óg,§ä).¬(¦êg,¨Ú)};¢ ¢£(¡){if(¡.«.£Î!=§Ú)¥;if(!¡.£õ(ß)){¢ñ();¢£[¢£.Ë++]=¡;£Ë(¡);¤ö(¡);£Â(¡)}};¢£.Ë=0;¢ £Â(¡){¹.î=¡.«.£Í.Æ(5,-2);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);£È(¡);¤õ(¡);½.¢Õ(¹)};¢ £Ë(¡){¡.Ì.¢×=¡.«.¢×;if(!ö(¡)){£ £ô=¨Û+Þ$+¨Ü;¡.¦.£ð(¨Ý,£ô)}};Ü(¢º(£Ë));¢ £È(¡){£ £Ê=ö(¡)?¨Ý:¨Þ;¡.¦[£Ê]=£Ç(¡,¡.Ì.¢×)-¡.£É().À-¡.¤ô};Ü(¢º(£È));¢ ö(¡){if(!¡)¥ ë;if(¡.Ì.³==§Ú||¡.«.³==§Ú)¥ Ö;¥ í.£ó(¡.½)};¢ £Ç(¡,³){£ò(³){¢¦ ¨ß:¢¦ §ç:¥ 0;¢¦ §â:¢¦ §é:¥ Þ.Í-¹.¢¼;¢¦ ¨à:¥(Þ.Í-¹.¢¼)/2;£ñ:if(¢Ö.µ(³)){¥ ø((Þ.Í-¹.¢¼)*£Æ(³)/100)}¹.Ì.À=³;¥ ¹.¢¤}};Ü(¢º(£Ç));¢ ¢¢(¡){if(¡.«.³!=§Ú)¥;¢ñ();¢¢[¢¢.Ë++]=¡;¡.Ì.³=§Ú;¡.¦.³=§á;£Á(¡)};¢¢.Ë=0;¢ £Á(¡,Ø){£Å(¡,Ø);¤ò(¡,Ø);if(!Ø||¡.¦.¤ñ){if(ø(¡.«.¢î)==0)¡.¦.¤ð++}};¢ £Å(¡,Ø){if(!Ø&&¢Ö.µ(¡.«.°))¡.¦.ì=¡.«.°;if(¡.¦.ì)¡.¦.°=ø(£Æ(¡.¦.ì)/100*Þ.Í);if(Ø){if(!¡.¦.£Ä)¥}Û{¡.¦.£Ä=¡.«.×!=§Ý&&¡.«.À==§Ý}¡.¦.À=¦ô;¡.¦.¢Ô=¢¹(¡);if(¡.«.¢ï!=§Ý){¡.½.¢»(¹);¹.Ì.À=¡.«.¢ï;¡.¦.¢Ô-=¹.¢¤;¡.½.¢Õ(¹)}if(ö(¡.¢¥))¡.¦.£ï=¡.¦.¢Ô;Û if(!Ø)¡.¦.£ð(¨á,¨â+Þ$+¨ã)};Ü(¢º(£Å).¬(¦Øg,§é).¬(¦Ôg,§å));¢ ¢¹(¡){£ ¢¹=¡.¢¤,£Ã=ë;£ Ç=ö(¡.¢¥)&&¡.¦.£Ä;Ý(¡=¡.¢¥){if(!Ç&&¡.«.³!=¨ä)£Ã=Ö;¢¹+=¡.¢¤*(£Ã?-1:1)}¥ ¢¹};Ü(¢º(¢¹));¢ £ì(){®(£ i=0;i<¢£.Ë;i++)£Â(¢£[i]);®(i=0;i<¢¢.Ë;i++)£Á(¢¢[i],Ö);ÿ=0};£ ÿ;Ó(¢¡,§ã,¢(){if(!ÿ)ÿ=¢Ó(£ì,10)})});¢í=Ö;if(².£À==¦ú)_ê();Û Ó(²,¨å,¢(){if(!¢¸&&².£À==¦ú)¢Ó(_ê,0)})}¢·(¢ë){¢ì();¢¶(¨æ+¢ë.£ë)}£¾{}}();',493,0,/./,String,95,'element`function`var`this`return`runtimeStyle`match`cssText`value`IE7`currentStyle`replace`from`for`length`width`filter`document`position`selector`test`new`Class`push`ie7_tmp`target`x5cs`filtered`parentElement`href`styleSheet`left`path`instance`PseudoElement`attribute`content`slice`fixed`toString`filterArgs`scopeName`count`style`clientWidth`ie7`tagName`Event`x5c`DynamicStyle`addEventHandler`url`type`true`right`recalc`instances`minWidth`else`eval`while`viewport`body`CSSFixes`appVersion`link`layoutParent`fixedWidth`auto`add`RegExp`fixes`styleSheets`load`false`fixWidth`arguments`src`addRecalc`input`AttributeSelector`selectors`subset`recalcs`nextSibling`isFixed`height`parseInt`documentElement`ie7Event`ALL`cssQuery`maxWidth`handler`timer`window`positionFixed`backgroundFixed`offsetLeft`offsetParent`case`quirksMode`x5cw`addModule`prototype`uniqueID`attributeTests`dynamicPseudoClasses`pseudoClasses`dynamicPseudoClass`attach`isHTML`fixRight`token`SIZES`pattern`alert`catch`complete`getScreenLeft`topFunction`appendChild`offsetWidth`HTMLFixes`MATCH`addFix`makePath`focus`compare`x5cd`object`pseudoElement`try`name`visited`getPixelWidth`boxSizing`getFixedWidth`all`elements`isElement`pseudoClass`cacheSelector`modules`script`setTimeout`screenLeft`removeChild`PERCENT`backgroundPositionX`DUMMY`hover`unregister`register`join`className`null`exec`display`classes`parse`getCSSText`getPixelLeft`wider`max`disabled`cssCache`node`Boolean`error`unHide`loaded`bottom`marginLeft`absolute`fixBackground`top`String`location`image`getString`active`PREFIX`escape`attributeSelectors`x2f`parentNode`adjacent`nextElement`ie7_anon`pseudoElements`inherit`encoded`isURL`ignore`HEADER`decode`split`encode`resizeWidth`NUMERIC`rect`min`hasLayout`outerHTML`apply`fixedElement`QUOTED`handlers`pop`strings`string`item`small`getPath`styles`pathname`array`httpRequest`finally`Error`readyState`foregroundPosition`backgroundPosition`nested`autoLeft`positionLeft`parseFloat`getOffsetLeft`setOffsetLeft`getBoundingClientRect`propertyName`backgroundLeft`canHaveChildren`backgroundImage`backgroundAttachment`tmpElement`none`background`fixImg`pngTest`FILTER`simpleSelector`delete`getAttribute`lang`compareTagName`ancestor`createElement`code`PIXEL`resizeRight`getPaddingWidth`getBorderWidth`box`submit`clicked`fix`select`useCache`base`large`inlineStyles`LINKS`description`resize`onresize`scrollLeft`pixelLeft`setExpression`default`switch`callee`expression`contains`Height`Width`Top`Left`leftFunction`img`event`NULL`addFilter`suffix`prefix`scale`png`define`navigator`Microsoft`CHILD`COMPLEX`remove`quote`ESCAPE`Function`break`ie7_`x5cb`class`ms_`previousElement`OBJECT`CONTENT`before`unicode`HEX`addTimer`firstChild`create`clearInterval`inline`ANCHOR`Parser`parser`removeTempElement`HEIGHT`getMarginWidth`AUTO`minHeight`marginRight`UNIT`toUpperCase`charAt`BUTTON`UNSUCCESSFUL`button`abbr`htmlFor`HTML`endTag`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`autoload`mimeType`search`message`onreadystatechange`static`screenTop`autoTop`positionTop`center`clientLeft`setOffsetTop`backgroundTop`protocol`onpropertychange`INPUT`zoom`crop`trans`IE7_PNG_SUFFIX`x00`x_bits`char`x5cnstatic`x_height`x5cn`x_width`javascript`gif`blank`userAgent`bSV1`sizingMethod`AlphaImageLoader`DXImageTransform`progid`toLowerCase`srcElement`onmouseup`activeElement`onblur`onfocus`onmousedown`onmouseout`onmouseover`child`first`children`scriptlet`text`htm`data`after`insertBefore`innerText`setInterval`specificity`x5cu`align`vertical`with`css2`fixHeight`Bottom`Right`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`previousSibling`nodeType`clip`border`padding`unquote`contentEditable`onbeforeunload`detachEvent`import`namespace`concat`Array`constructor`size`font`medium`list`float`relative`sizing`lastIndex`successfully`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`ActiveXObject`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ie7_off`MSIE`ie7_debug`alpha`version`visible`visibility`fromCharCode`¦®`¦­ (\\d\\.\\d)`¦¬`^¤±`\\.¦§$`^[\\w\\.]+[^:]*$`(Ô\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¥ö\\b|\\¥õ\\b|^$`Î-â`(¥ï\\s*:\\s*(À|×))`¢à\\s*:\\s*¥î-£·`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢û\\*[^\\*]*\\*+([^\\¢û][^\\*]*\\*+)*\\¢û)|(\x27[^\x27]*\x27)|("[^"]*")`@(¥ç|¥æ)[^;\\n]+[;\\n]|`\\Ñ:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ©="([^"]*)"`^(£â|¥Ñ|¤Ë)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(£­|¢æ)-(°|÷)\\s*:\\s*\\d`\\b(£­|¢æ)-°\\s*:\\s*\\d`^å|0cm$`^å$`£­`£÷`°`£ù`À`¥Ë`×`>`(\\ba(\\.[\\w-]+)?)$`\\{[^\\}]*\\}`::`([^\\}\\s]*\\,[^\\{]*)(\\{\\d+\\})`\\{(\\d+)\\}`[+>~]`\\Ñ([a-fA-F\\d]+)`^Ô\\(.*\\)$`([^}]*):(¤µ|¥¿)[^{]*\\{([^}]*)\\}`Å\\s*:\\s*([^;]*)(;|$)`([\\¢û()[\\]?{}|*+])`=`\\¥ª\\b`%1`£Ñ(-¢õ)?\\s*:([^(};]*)Ô\\(([^\\)]+)\\)([^;}]*)`¤¢`X`¦±`ª ¦° 0.7.3 (¦¯)`\\n\\n`¦ª`¦¨`¦¦ ¦¥`:â{Î-â:â}:¢È{Î-â:¢È}`*{¦¤:0}`¢Ò=``/`¤¦.¦¢`¥ÿ`£¿ [1]: ¥ü ¥û ê ¥ú `Î-¥ù.js`¢¸`<Ì>`$1`$2`Ì`¢í ¥ó`£¿ [2]: `([^{}]*)\\Ñ{([^}]*[^\\¢¨-])?`gi`£á-¥ñ\\»*:\\»*Å-£á`³\\»*:\\»*¢ð`¥ð`¢à:¤¼;$1`¢à:¤Ò`xx-£¸,x-£¸,£¸,¥í,£è,x-£è,xx-£è`,`xx-£¸`(¥ì(-¥ë)?\\»*:\\»*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\»)`(\\»|$)`:`â`¢È`\\Ñ([^)]*\\Ñ)`Î-â`\x27`\\Ñ:`¥ä`¢Ä`³:¢ð;¥á:0;¢à:¤Ò;¥à:£Ð;¥ß:£¬(0 0 0 0);À:-9999`!`Î-¥Ü`<¤Î:`/>``¤Î`¥Ù://¥Ø.w3.¥×/1999/¥Ö`¥Õ`ð,£å,¥Ô`¤Ì` ¤Ì`¤Ë,ð`¤É`£â`¥Ó`².¢Ì.`.¦.£ã=ë`¥Ò`¥Ð`.¢ç=ë`.©=\x27`Î-£á-¥Ï`\\»*:\\»*\\¢Ã[\\¢¨%]*`Ç`HR`°\\»*:\\»*\\¢Ã\\¢¨*[^%]`å`£­-°`¢æ`¢æ-°`¢ð`×`£í`£ö`÷`£ø`¢ò`¥Ê`¢î`Î-¥È`[^},\\»]*([>+~][^:@,\\»{]+|:(`)|\\Ñ.[\\¢¨-]+\\Ñ.[\\¢¨-.]+|@[@\\¢Ã]+)`g`[^\\»(]+[+~]|@\\¢Ã+|:(â|¢È|`)|\\Ñ.[\\¢¨-.]+`([^}]*):(`)([^{]*)`\\Ñ[([^`=\\Ñ]]+)([`]?=?)([^\\Ñ]]+)?\\Ñ]`{`}`\\»`\\¤¯`¤®`¢Á`.¢ÿ{¥Æ-¥Å:¢ò;¢à:¤¼}`\x27\\¥Ä`0000`¤µ`;`<¢Ä ¤°=¢ÿ ¥¾=\x27`Î-Å.¥½`\x27 °=100% ÷=0 Õ=¥¼/x-¥»>`+`@`¥¹-¥¸`£Ø`^`i`¥·`¥¶`¥µ`¥´`¥³`¥±`id`¡.id.¬(/¤±\\¢Ã+/g,\x27\x27)`¤°`¡.¢Ý.¬(/\\¤¯\\»*¤®\\¢Ã+/g,\x27\x27)`¡.£×(\x27`\x27)`¡`¥ `¢ù`\\Ñ$1`=`==`~=`/(^|\\»)`(\\»|$)/.µ(`|=`/^`(-|$)/.µ(`¢Ù`¢÷`Î-¤£`¥®:¥­.¤¦.¥¬(î=%1,¥«=\x27¤¢\x27)`¥¨.¥§`¥¦:\x27#¤¤ ¥¥ 1\\¥¤#¤¤ ¥£ 1\\¥¢ ¥¡ ¤ÿ[]={0¤þ}\x27`-¤ü.¤£`$`±:`¤û`;¤ú:1;£Ñ`£Ð`£û,ð`¤ù`¢õ`¤ø`î`Î-Ç`³\\»*:\\»*Ç`£Ñ[\\¢¨\\»-]*:[^};]*Ç`ß`ù`Ô(`£û`Y`(ø(¦.¢¤)+².`.£î)||0`¢×`¢¤`À`¤ó`£ï`¦.¢Ô+².`.£î`¤ï`¤î`£¿ [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/metallic/javascript/ie7/ie7-standard.js b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-standard.js new file mode 100644 index 0000000..2109905 --- /dev/null +++ b/src/usr/local/www/themes/metallic/javascript/ie7/ie7-standard.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i=0){ + var optar=opt.split(" "); + for(i=0;i=0) ecolor=optar[i]; + if(ecolor=="") ecolor="#666"; + cn+="e"; + edges=true; + } +else if(opt && opt.indexOf("smooth")>=0){ + cn+="a"; + ecolor=Mix(bk,color); + } +if(opt && opt.indexOf("small")>=0) cn+="s"; +prefixt=cn; +prefixb=cn; +if(wich.indexOf("all")>=0){t=true;b=true;} +else if(wich.indexOf("top")>=0) t="true"; +else if(wich.indexOf("tl")>=0){ + t="true"; + if(wich.indexOf("tr")<0) prefixt+="l"; + } +else if(wich.indexOf("tr")>=0){ + t="true"; + prefixt+="r"; + } +if(wich.indexOf("bottom")>=0) b=true; +else if(wich.indexOf("bl")>=0){ + b="true"; + if(wich.indexOf("br")<0) prefixb+="l"; + } +else if(wich.indexOf("br")>=0){ + b="true"; + prefixb+="r"; + } +var v=getElementsBySelector(selector); +var l=v.length; +for(i=0;i=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=1;i<=lim;i++){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingTop=0; +el.insertBefore(d,el.firstChild); +} + +function AddBottom(el,bk,color,bc,cn){ +var i,lim=4,d=CreateEl("b"); + +if(cn.indexOf("s")>=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=lim;i>0;i--){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingBottom=0; +el.appendChild(d); +} + +function CreateEl(x){ +if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x)); +else return(document.createElement(x)); +} + +function getElementsBySelector(selector){ +var i,selid="",selclass="",tag=selector,f,s=[],objlist=[]; + +if(selector.indexOf(" ")>0){ //descendant selector like "tag#id tag" + s=selector.split(" "); + var fs=s[0].split("#"); + if(fs.length==1) return(objlist); + f=document.getElementById(fs[1]); + if(f) return(f.getElementsByTagName(s[1])); + return(objlist); + } +if(selector.indexOf("#")>0){ //id selector like "tag#id" + s=selector.split("#"); + tag=s[0]; + selid=s[1]; + } +if(selid!=""){ + f=document.getElementById(selid); + if(f) objlist.push(f); + return(objlist); + } +if(selector.indexOf(".")>0){ //class selector like "tag.class" + s=selector.split("."); + tag=s[0]; + selclass=s[1]; + } +var v=document.getElementsByTagName(tag); // tag selector like "tag" +if(selclass=="") + return(v); +for(i=0;i=0){ + objlist.push(v[i]); + } + } +return(objlist); +} + +function Mix(c1,c2){ +var i,step1,step2,x,y,r=new Array(3); +if(c1.length==4)step1=1; +else step1=2; +if(c2.length==4) step2=1; +else step2=2; +for(i=0;i<3;i++){ + x=parseInt(c1.substr(1+step1*i,step1),16); + if(step1==1) x=16*x+x; + y=parseInt(c2.substr(1+step2*i,step2),16); + if(step2==1) y=16*y+y; + r[i]=Math.floor((x*50+y*50)/100); + } +return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16)); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/metallic/loader.js b/src/usr/local/www/themes/metallic/loader.js new file mode 100644 index 0000000..9b435d5 --- /dev/null +++ b/src/usr/local/www/themes/metallic/loader.js @@ -0,0 +1,29 @@ +//'); +} + +document.write(''); + +//]]> diff --git a/src/usr/local/www/themes/metallic/login.css b/src/usr/local/www/themes/metallic/login.css new file mode 100644 index 0000000..f8abdfc --- /dev/null +++ b/src/usr/local/www/themes/metallic/login.css @@ -0,0 +1,1127 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + + +#login { +/* background: #cccccc; */ + background-color: transparent; + border: 0px solid #cccccc; + margin: 5em auto; + padding: 0em; + width: 400px; +/* filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; */ +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; +/* background: #ffffff; */ + margin-top: 0; + display: block; + text-indent: -1000px; + height: 400px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -420px; + left: 70px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + top: -300px; */ +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + left: 10px; + top: -300px; */ +} + +#login #submit { + font-size: 1em; + font-weight: bold; + text-align: center; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -20px; + left: 170px; +} + +/* loginerror box follows */ + +#login #inputerrors { + background-color: transparent; + border: 0px solid #666666; + margin: 5em auto; + vertical-align: middle; + padding: 0em; + width: 330px; + height: 50px; + position: relative; + top: -370px; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/metallic/new_tab_menu.css b/src/usr/local/www/themes/metallic/new_tab_menu.css new file mode 100644 index 0000000..04c4cf2 --- /dev/null +++ b/src/usr/local/www/themes/metallic/new_tab_menu.css @@ -0,0 +1,101 @@ +/* + new_tab_menu.css + part of pfSense + Copyright (C) 2010-2011 Robert Zelaya + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + + Replace your old tab menu with the following code. To add a second tab menu line just cut and paste again. + The following code is dependent on new_tab_menu.css and images/new_tab_menu.png. + + + + + + + +*/ + +.newtabmenu ul, li{border:0; margin:0; padding:0; list-style:none;} + +.newtabmenu li{float:left; margin-right:2px; text-align: center;} +.newtabmenu a:link, .newtabmenu a:visited{ + background:url(images/new_tab_menu.png) right 45px; + color:#ffffff; /* noactive font */ + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + font-weight:bold; + font-size:.9em; + height:20px; + line-height:20px; + text-decoration:none; +} +.newtabmenu a span{ + background:url(images/new_tab_menu.png) left 45px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + height:20px; + margin-right:7px; + padding-left:7px; +} +.newtabmenu a:hover{ + background:url(images/new_tab_menu.png) right 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + color:#ffffff; /* hover over font */ +} +.newtabmenu a:hover span{ + background:url(images/new_tab_menu.png) left 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ +} + +/* -------------------------------- */ +/* ACTIVE ELEMENTS */ +.newtabmenu_active a:link, .newtabmenu_active a:visited, .newtabmenu_active a:visited, .newtabmenu_active a:hover{ + color:#000000; /* active font */ + background:url(images/new_tab_menu.png) right 0 no-repeat; +} +.newtabmenu_active a span, .newtabmenu_active a:hover span{ + background:url(images/new_tab_menu.png) left 0 no-repeat; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/metallic/no_big_logo b/src/usr/local/www/themes/metallic/no_big_logo new file mode 100644 index 0000000..6e5c70d --- /dev/null +++ b/src/usr/local/www/themes/metallic/no_big_logo @@ -0,0 +1 @@ +NO! DONT! \ No newline at end of file diff --git a/src/usr/local/www/themes/metallic/rrdcolors.inc.php b/src/usr/local/www/themes/metallic/rrdcolors.inc.php new file mode 100644 index 0000000..dcb7a39 --- /dev/null +++ b/src/usr/local/www/themes/metallic/rrdcolors.inc.php @@ -0,0 +1,89 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This file is included by the RRD graphing page and sets the colors */ + +/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Traffic Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colortrafficdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* Packets Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colorpacketsup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Packets Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colorpacketsdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* 95th Percentile Lines Out, In */ +$colortraffic95 = array('660000', 'FF0000'); + +/* State Table pfrate, pfstates, pfnat, srcip, dstip */ +$colorstates = array('00AA00','990000','0000FF','000000','DD9B00'); + +/* Processor Usage user, nice, system, int, processes */ +$colorprocessor = array('00AA00','990000','0000FF','DD9B00','000000'); + +/* Memory Usage active, inact, free, cache, wire */ +$colormemory = array('00AA00','990000','0000FF','666666','DD9B00'); + +/* MBUF Usage current, cache, total, max */ +$colormbuf = array('0080FF','00E344','FF0000','000000'); + +/* Traffic Shaper Queues q1, q2, q3, q4, q5, q6, q7, q8, q9 */ +$colorqueuesup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +$colorqueuesdropup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +/* Quality Graph Delay >420, 180-420, 60-180, 20-60, <20, Delay Avg */ +$colorqualityrtt = array('990000','a83c3c','b36666','bd9090','cccccc','000000'); +/* Quality Graph Loss */ +$colorqualityloss = 'ee0000'; + +/* Wireless Graph SNR, Rate, Channel*/ +/* Cellular Graph RSSI, */ +$colorwireless = array('333333','a83c3c','999999'); + +/* SPAMD Times min area, avg area, max area, Time line */ +$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); +/* SPAMD Connections max area, min area, min line, max line, avg line */ +$colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600'); + +/* OpenVPN Users Online Users */ +$colorvpnusers = array('990000'); + +/* Captive Portal Total Users Total Users */ +/* Captive Portal Concurrent Concurrent Users */ +$colorcaptiveportalusers = array('990000'); + +?> diff --git a/src/usr/local/www/themes/metallic/styles/jquery-ui-1.11.1.css b/src/usr/local/www/themes/metallic/styles/jquery-ui-1.11.1.css new file mode 100644 index 0000000..8a8c54f --- /dev/null +++ b/src/usr/local/www/themes/metallic/styles/jquery-ui-1.11.1.css @@ -0,0 +1,1226 @@ +/*! jQuery UI - v1.11.1 - 2014-09-22 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2C%20Helvetica%2C%20Arial%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=glass&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=inset_soft&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=glass&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=bbbbbb&fcHover=599fcf&iconColorHover=3383bb&bgColorActive=999999&bgTextureActive=inset_hard&bgImgOpacityActive=75&borderColorActive=999999&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=444444&iconColorHighlight=3383bb&bgColorError=c0402a&bgTextureError=flat&bgImgOpacityError=55&borderColorError=c0402a&fcError=ffffff&iconColorError=fbc856&bgColorOverlay=eeeeee&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0pxdow +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; + background-color: #990000; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #c9c9c9 url("../../../javascript/jquery/images/ui-bg_inset-soft_50_c9c9c9_1x100.png") 50% bottom repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #bbbbbb; + /* background: #dddddd url("../../../javascript/jquery/images/ui-bg_glass_35_dddddd_1x400.png") 50% 50% repeat-x; */ + color: #444444; + font-weight: bold; +} +.ui-widget-header a { + color: #444444; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_glass_60_eeeeee_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #3383bb; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #3383bb; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #bbbbbb; + background: #f8f8f8 url("../../../javascript/jquery/images/ui-bg_glass_100_f8f8f8_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #599fcf; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #599fcf; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #999999; + background: #999999 url("../../../javascript/jquery/images/ui-bg_inset-hard_75_999999_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #ffffff; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_55_eeeeee_40x100.png") 50% 50% repeat-x; + color: #444444; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #444444; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #c0402a; + background: #c0402a url("../../../javascript/jquery/images/ui-bg_flat_55_c0402a_40x100.png") 50% 50% repeat-x; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_70b2e1_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_454545_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_fbc856_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_0_eeeeee_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -4px 0 0 -4px; + padding: 4px; + background: #aaaaaa url("../../../javascript/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 0pxdow; +} diff --git a/src/usr/local/www/themes/nervecenter/all.css b/src/usr/local/www/themes/nervecenter/all.css new file mode 100644 index 0000000..ba0a5e4 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/all.css @@ -0,0 +1,1301 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, sans-serif; + font-size: 0.9em; + +} + +.nowrap { white-space: nowrap; } + +.infobox { + width:100%; +} + +.addgatewaybox { + background-color: #990000; + border-style: none none none none; + width: 225px; +} + +.infoboxsave { + padding-right: 10px; +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +.inputerrorsleft { + background-color: #990000; + width: 36px; +} + +.inputerrorsright { + background-color: #FFD9D1; + color: #000000; + font-size: 11px; + padding-left: 8px; + padding-top: 6px; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 220px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 11px; + font-family: "Trebuchet MS", sans-serif; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background: url('images/background.gif') no-repeat; + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} + +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* style of disabled formelements */ +#wrap div {margin:1em 0} +[disabled] { + color:#666666; + background:#eeeeee; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; + text-align: center; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + position: relative; + top: -25px; + left: 3px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + width: 80px; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 5px; + margin-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listrborder { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-left: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + color: #FFFFFF; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} + +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #DDDDDD; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + +/* style of disabled formelements */ +[disabled] { + color:#666666; + background:#eeeeee; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 6px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; + +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password, #password2 { + font-size: small; + width: 60%; + padding-left: 19px; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #B1B1B1; + padding-right: 6px; + padding-left: 6px; + color: #000000; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} +.widgetconfigdiv{ + background:#BBBBBB; + font-size: 11px; + color: #000000; + padding-right: 5px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +div#log div.log-entry-mini { + clear: both; +} + +div#log div.log-entry-mini span { + padding: 2px 2px 2px 2px; + padding-left: 6px; +} + +div#log span.log-action-mini-header, +div#log span.log-time-mini-header, +div#log span.log-interface-mini-header, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header, +div#log span.log-protocol-mini-header { + float: left; + text-align: left; + background-color: #B1B1B1; + font-size: 12px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-time-mini, +div#log span.log-interface-mini, +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-protocol-mini { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 11px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-action-mini-header { + width: 6%; +} + +div#log span.log-time-mini, +div#log span.log-time-mini-header { + width: 19%; +} + +div#log span.log-interface-mini, +div#log span.log-interface-mini-header { + width: 8%; +} + +div#log span.log-source-mini, +div#log span.log-source-mini-header { + width: 23%; +} + +div#log span.log-destination-mini, +div#log span.log-destination-mini-header { + width: 31%; +} + +div#log span.log-protocol-mini, +div#log span.log-protocol-mini-header { + width: 8%; + border-right: 1px solid #999; +} + +/* Sortable tables */ +table.sortable thead { + cursor: default; + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} + +/*thermal_sensors widget styles*/ + +.thermalSensorRow { width: 100%; border: 0px solid #ddd; padding: 1px; border-radius: 3px; } +.thermalSensorBarShell { position: relative; width: 100%; height: 5px; border: 1px solid lightgray; border-radius: 3px; } +.thermalSensorBar { position: absolute; width: 0%; height: 1px; z-index: 1; border-style: solid; border-radius: 3px; + background-color: LimeGreen; + border-top-width: 2px; border-top-color: Lime; + border-left-width: 0px; + border-right-width: 0px; + border-bottom-width: 2px; border-bottom-color: Green; +} +.thermalSensorTextShell { height: 20px; width: 100%; top: 3px; } +.thermalSensorText { float: left; height: 20px; top: 3px; } +.thermalSensorValue { float: left; height: 20px; top: 3px; font-weight: bold; margin-left: 10px;} + +.thermalSensorWarnThresh { position: absolute; background-color: orange; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } +.thermalSensorCritThresh { position: absolute; background-color: red; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } + +.thermal_sensors_widget_scale000 { position: absolute; height: 5px; width: 1px; left: -1px; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale020 { position: absolute; height: 3px; width: 1px; left: 10%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale010 { position: absolute; height: 3px; width: 1px; left: 20%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale030 { position: absolute; height: 3px; width: 1px; left: 30%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale040 { position: absolute; height: 3px; width: 1px; left: 40%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale050 { position: absolute; height: 3px; width: 1px; left: 50%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale060 { position: absolute; height: 3px; width: 1px; left: 60%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale070 { position: absolute; height: 3px; width: 1px; left: 70%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale080 { position: absolute; height: 3px; width: 1px; left: 80%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale090 { position: absolute; height: 3px; width: 1px; left: 90%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; } + +.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; } + +/* widget textarea styles - full width */ +.textarea_widget { + width: 100%; + resize:vertical; + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* IE 8+ */ +} diff --git a/src/usr/local/www/themes/nervecenter/apple-touch-icon.png b/src/usr/local/www/themes/nervecenter/apple-touch-icon.png new file mode 100755 index 0000000..7a4b975 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/apple-touch-icon.png differ diff --git a/src/usr/local/www/themes/nervecenter/bottom-loader.js b/src/usr/local/www/themes/nervecenter/bottom-loader.js new file mode 100644 index 0000000..a21f775 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/bottom-loader.js @@ -0,0 +1,10 @@ +// diff --git a/src/usr/local/www/themes/nervecenter/favicon.ico b/src/usr/local/www/themes/nervecenter/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/favicon.ico differ diff --git a/src/usr/local/www/themes/nervecenter/graphlink.css b/src/usr/local/www/themes/nervecenter/graphlink.css new file mode 100644 index 0000000..13f65f0 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/graphlink.css @@ -0,0 +1,43 @@ +/******************************************************************************* + $Id$ + + This file is part of the GraphLink software. + GraphLink is distributed under the MIT License. + Copyright (C) 2005-2006 Max Khitrov +*******************************************************************************/ + +/** + * Defines the background image used for the graph, as well as the actual data + * locations. + * Use padding-left and padding-top to align the data area correctly with your + * background image. + * Width and height should same as the dimensions of the image, minus the + * padding values in both directions. + */ +div.GraphLink { + width: 212px; + height: 60px; + padding-left: 38px; + padding-top: 10px; + background-image: url(/themes/nervecenter/images/misc/graph.png); + overflow: hidden; +} + +/** + * Defines the data display area. Modify to fit your background image. + */ +div.GraphLinkData { + width: 200px; + height: 50px; + overflow: hidden; +} + +/** + * Defines the look of one bar. Nothing to change here other than the color. + */ +span.GraphLinkBar { + background-color: #990000; + height: 100%; + float: left; + overflow: hidden; +} diff --git a/src/usr/local/www/themes/nervecenter/images/alert_bgr.png b/src/usr/local/www/themes/nervecenter/images/alert_bgr.png new file mode 100755 index 0000000..39901be Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/alert_bgr.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/background.gif b/src/usr/local/www/themes/nervecenter/images/background.gif new file mode 100755 index 0000000..bdfa5b3 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/background.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/background.png b/src/usr/local/www/themes/nervecenter/images/background.png new file mode 100755 index 0000000..e68893d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/background.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/footer.png b/src/usr/local/www/themes/nervecenter/images/footer.png new file mode 100755 index 0000000..90b1022 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/footer.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/header.png b/src/usr/local/www/themes/nervecenter/images/header.png new file mode 100755 index 0000000..3b38584 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/header.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/help.png b/src/usr/local/www/themes/nervecenter/images/help.png new file mode 100755 index 0000000..1de05e3 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/help.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/horizontal.gif b/src/usr/local/www/themes/nervecenter/images/horizontal.gif new file mode 100755 index 0000000..a280dcb Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/horizontal.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/favicon.ico b/src/usr/local/www/themes/nervecenter/images/icons/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/favicon.ico differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_3g.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_3g.gif new file mode 100755 index 0000000..46ccb92 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_3g.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_3g_inactive.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_3g_inactive.gif new file mode 100755 index 0000000..cf983e4 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_3g_inactive.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_advanced.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_advanced.gif new file mode 100755 index 0000000..3ede1ff Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_advanced.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_advanced_s.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_advanced_s.gif new file mode 100755 index 0000000..b233549 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_advanced_s.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_alert.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_alert.gif new file mode 100755 index 0000000..7646941 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_alert.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_host.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_host.gif new file mode 100755 index 0000000..ad43e17 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_host.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_net.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_net.gif new file mode 100755 index 0000000..abd1b8b Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_net.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_port.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_port.gif new file mode 100755 index 0000000..4acf2aa Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_port.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_url.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_url.gif new file mode 100755 index 0000000..660571e Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_url.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_url_reload.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_url_reload.gif new file mode 100755 index 0000000..55c1c4a Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_alias_url_reload.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_block.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_block.gif new file mode 100755 index 0000000..670c968 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_block.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_block_add.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_block_add.gif new file mode 100755 index 0000000..eb726d6 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_block_add.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_block_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_block_d.gif new file mode 100755 index 0000000..e6345fe Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_block_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_cablenic.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_cablenic.gif new file mode 100755 index 0000000..a071c66 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_cablenic.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_cal.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_cal.gif new file mode 100755 index 0000000..a9c7c87 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_cal.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_cal_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_cal_mo.gif new file mode 100755 index 0000000..1647e2f Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_cal_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_carp.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_carp.gif new file mode 100755 index 0000000..9454a82 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_carp.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_carp_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_carp_d.gif new file mode 100755 index 0000000..2ba8db2 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_carp_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_chain.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_chain.png new file mode 100644 index 0000000..12db07a Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_chain.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_check.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_check.gif new file mode 100755 index 0000000..393674d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_check.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_clock_green.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_clock_green.gif new file mode 100755 index 0000000..e171ba8 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_clock_green.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_clock_grey.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_clock_grey.gif new file mode 100755 index 0000000..00c865a Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_clock_grey.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_clock_red.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_clock_red.gif new file mode 100755 index 0000000..7b412ee Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_clock_red.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_close.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_close.gif new file mode 100755 index 0000000..e0f86a7 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_close.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_configure.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_configure.gif new file mode 100755 index 0000000..7182e0d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_configure.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_down.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_down.gif new file mode 100755 index 0000000..b71a9c5 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_down.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_down_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_down_d.gif new file mode 100755 index 0000000..70a7473 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_down_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_down_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_down_mo.gif new file mode 100755 index 0000000..584587a Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_down_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_e.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_e.gif new file mode 100755 index 0000000..2950800 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_e.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_e_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_e_mo.gif new file mode 100755 index 0000000..9ba5738 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_e_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_error.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_error.gif new file mode 100755 index 0000000..e0fa659 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_error.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_exclam.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_exclam.gif new file mode 100755 index 0000000..36c2ec7 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_exclam.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_de.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_de.png new file mode 100755 index 0000000..069cbbe Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_de.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_en.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_en.png new file mode 100755 index 0000000..bd7f9a5 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_en.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_es.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_es.png new file mode 100755 index 0000000..434776c Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_es.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_pt_BR.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_pt_BR.png new file mode 100755 index 0000000..f786349 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_flag_pt_BR.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_cert.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_cert.png new file mode 100755 index 0000000..48a34b6 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_cert.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_file.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_file.png new file mode 100755 index 0000000..48a9ed2 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_file.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_group.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_group.png new file mode 100755 index 0000000..7d929c0 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_group.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_host.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_host.png new file mode 100755 index 0000000..867ef2c Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_host.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_imp.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_imp.png new file mode 100755 index 0000000..f667cfc Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_imp.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_mail.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_mail.png new file mode 100755 index 0000000..d2d4548 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_mail.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_pwd.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_pwd.png new file mode 100755 index 0000000..06b53a1 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_pwd.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_search.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_search.png new file mode 100755 index 0000000..33de926 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_search.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_time.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_time.png new file mode 100755 index 0000000..aa8300a Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_time.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_unknown.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_unknown.png new file mode 100755 index 0000000..1857d0e Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_unknown.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_url.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_url.png new file mode 100755 index 0000000..cf56792 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_url.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_user.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_user.png new file mode 100755 index 0000000..e00eebe Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_frmfld_user.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_fw-update.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_fw-update.gif new file mode 100755 index 0000000..52c18ac Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_fw-update.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_help.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_help.gif new file mode 100644 index 0000000..84c84db Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_help.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_ifalias.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_ifalias.gif new file mode 100755 index 0000000..0c569a7 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_ifalias.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_ifalias_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_ifalias_d.gif new file mode 100755 index 0000000..faa84d4 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_ifalias_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_import_alias.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_import_alias.gif new file mode 100755 index 0000000..d11a5f0 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_import_alias.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_in.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_in.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_in_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_in_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_info_pkg.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_info_pkg.gif new file mode 100755 index 0000000..cd3a532 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_info_pkg.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_interface_down.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_interface_down.gif new file mode 100755 index 0000000..0626655 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_interface_down.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_interface_up.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_interface_up.gif new file mode 100755 index 0000000..1449513 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_interface_up.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_left.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_left.gif new file mode 100755 index 0000000..8effefe Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_left.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_left_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_left_d.gif new file mode 100755 index 0000000..c778014 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_left_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_left_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_left_mo.gif new file mode 100755 index 0000000..84c6fa2 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_left_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_log.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_log.gif new file mode 100755 index 0000000..4a1983a Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_log.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_log_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_log_d.gif new file mode 100755 index 0000000..d31bd9b Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_log_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_log_s.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_log_s.gif new file mode 100755 index 0000000..f9fda33 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_log_s.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_log_s_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_log_s_d.gif new file mode 100755 index 0000000..fb2c05f Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_log_s_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_logs.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_logs.gif new file mode 100644 index 0000000..afe0104 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_logs.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_match.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_match.gif new file mode 100644 index 0000000..215571f Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_match.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_match_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_match_d.gif new file mode 100644 index 0000000..6e4c364 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_match_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_minus.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_minus.gif new file mode 100755 index 0000000..417544f Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_minus.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_open.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_open.gif new file mode 100755 index 0000000..ac3da14 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_open.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_other.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_other.gif new file mode 100755 index 0000000..e6f780f Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_other.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_other_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_other_d.gif new file mode 100755 index 0000000..b08d970 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_other_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_out.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_out.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_out_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_out_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_parp.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_parp.gif new file mode 100755 index 0000000..96acaf3 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_parp.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_parp_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_parp_d.gif new file mode 100755 index 0000000..7d7d00e Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_parp_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_pass.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_pass.gif new file mode 100755 index 0000000..fe1bb0d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_pass.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_pass_add.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_pass_add.gif new file mode 100755 index 0000000..f7f4c20 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_pass_add.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_pass_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_pass_d.gif new file mode 100755 index 0000000..6adc431 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_pass_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_plus.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus.gif new file mode 100755 index 0000000..2a94eeb Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_bl.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_bl.gif new file mode 100755 index 0000000..8dcd7c0 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_bl.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_bl_p.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_bl_p.gif new file mode 100755 index 0000000..0c79849 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_bl_p.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_d.gif new file mode 100755 index 0000000..ebc7457 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_mo.gif new file mode 100755 index 0000000..1c7ca08 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_p.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_p.gif new file mode 100755 index 0000000..eb41284 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_plus_p.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall.gif new file mode 100755 index 0000000..d78b867 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_d.gif new file mode 100755 index 0000000..13658f7 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_mo.gif new file mode 100755 index 0000000..90b576e Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg.gif new file mode 100755 index 0000000..9aebb03 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg_d.gif new file mode 100755 index 0000000..4ab4992 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg_mo.gif new file mode 100755 index 0000000..7025d20 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_pkg_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml.gif new file mode 100755 index 0000000..4542432 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml_d.gif new file mode 100755 index 0000000..8d3a68d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml_mo.gif new file mode 100755 index 0000000..15e0aed Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reinstall_xml_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reject.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reject.gif new file mode 100755 index 0000000..5565cd6 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reject.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_reject_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_reject_d.gif new file mode 100755 index 0000000..6c09fae Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_reject_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_right.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_right.gif new file mode 100755 index 0000000..fdf2d8b Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_right.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_service_restart.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_restart.gif new file mode 100755 index 0000000..e49fbd7 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_restart.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_service_restart_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_restart_d.gif new file mode 100755 index 0000000..a5d6d7c Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_restart_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_service_running.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_running.gif new file mode 100644 index 0000000..543fd56 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_running.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_service_start.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_start.gif new file mode 100755 index 0000000..09bb58f Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_start.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_service_start_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_start_d.gif new file mode 100755 index 0000000..f58f111 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_start_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_service_status.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_status.gif new file mode 100644 index 0000000..a93bcfb Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_status.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_service_stop.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_stop.gif new file mode 100755 index 0000000..922addc Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_stop.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_service_stop_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_stop_d.gif new file mode 100755 index 0000000..b4cfdea Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_stop_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_service_stopped.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_stopped.gif new file mode 100644 index 0000000..f93a25d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_service_stopped.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_services_restart_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_services_restart_mo.gif new file mode 100755 index 0000000..a092b40 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_services_restart_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_services_start_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_services_start_mo.gif new file mode 100755 index 0000000..ecdb58f Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_services_start_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_services_stop_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_services_stop_mo.gif new file mode 100755 index 0000000..c00e208 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_services_stop_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_system-group-grey.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_system-group-grey.png new file mode 100755 index 0000000..d7b964d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_system-group-grey.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_system-group.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_system-group.png new file mode 100755 index 0000000..1c974f2 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_system-group.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_system-user-grey.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_system-user-grey.png new file mode 100755 index 0000000..2f6047d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_system-user-grey.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_system-user.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_system-user.png new file mode 100755 index 0000000..ef82156 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_system-user.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_system_lock_screen.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_system_lock_screen.png new file mode 100755 index 0000000..30f306d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_system_lock_screen.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_system_logout.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_system_logout.png new file mode 100755 index 0000000..9bbb6c7 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_system_logout.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_trapped.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_trapped.gif new file mode 100755 index 0000000..ffeb2cd Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_trapped.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_trapped_p.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_trapped_p.gif new file mode 100755 index 0000000..6d46aaf Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_trapped_p.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_ts_rule.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_ts_rule.gif new file mode 100755 index 0000000..e15ab6c Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_ts_rule.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_ts_rule_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_ts_rule_d.gif new file mode 100755 index 0000000..f776281 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_ts_rule_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_up.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_up.gif new file mode 100755 index 0000000..883c5a2 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_up.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_up_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_up_d.gif new file mode 100755 index 0000000..0ddcce2 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_up_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_up_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_up_mo.gif new file mode 100755 index 0000000..9f869a4 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_up_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_wlan.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_wlan.gif new file mode 100755 index 0000000..1f0addc Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_wlan.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_wlan_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_wlan_d.gif new file mode 100755 index 0000000..35bf580 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_wlan_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_wol_all.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_wol_all.gif new file mode 100755 index 0000000..2d22182 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_wol_all.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_wzd_nsaved.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_wzd_nsaved.png new file mode 100755 index 0000000..21cb27d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_wzd_nsaved.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_wzd_saved.png b/src/usr/local/www/themes/nervecenter/images/icons/icon_wzd_saved.png new file mode 100755 index 0000000..ab82946 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_wzd_saved.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_x.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_x.gif new file mode 100755 index 0000000..24e4d49 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_x.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_x_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_x_d.gif new file mode 100755 index 0000000..d2bfbc8 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_x_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_x_mo.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_x_mo.gif new file mode 100755 index 0000000..da7b57c Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_x_mo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/icon_x_p.gif b/src/usr/local/www/themes/nervecenter/images/icons/icon_x_p.gif new file mode 100755 index 0000000..8828fa6 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/icon_x_p.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/in.gif b/src/usr/local/www/themes/nervecenter/images/icons/in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/in.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/in_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/in_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/out.gif b/src/usr/local/www/themes/nervecenter/images/icons/out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/out.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/icons/out_d.gif b/src/usr/local/www/themes/nervecenter/images/icons/out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/icons/out_d.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/log.png b/src/usr/local/www/themes/nervecenter/images/log.png new file mode 100755 index 0000000..762ba80 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/log.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/logo.gif b/src/usr/local/www/themes/nervecenter/images/logo.gif new file mode 100755 index 0000000..a71ce5a Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/logo.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/logobig.jpg b/src/usr/local/www/themes/nervecenter/images/logobig.jpg new file mode 100755 index 0000000..2ef196d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/logobig.jpg differ diff --git a/src/usr/local/www/themes/nervecenter/images/menu_down.gif b/src/usr/local/www/themes/nervecenter/images/menu_down.gif new file mode 100755 index 0000000..137de8d Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/menu_down.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/menu_footer.gif b/src/usr/local/www/themes/nervecenter/images/menu_footer.gif new file mode 100755 index 0000000..d06faa4 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/menu_footer.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/menu_right.gif b/src/usr/local/www/themes/nervecenter/images/menu_right.gif new file mode 100755 index 0000000..881327c Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/menu_right.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/metal_bgr.gif b/src/usr/local/www/themes/nervecenter/images/metal_bgr.gif new file mode 100755 index 0000000..a0ca6c8 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/metal_bgr.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/metal_bgr_red.gif b/src/usr/local/www/themes/nervecenter/images/metal_bgr_red.gif new file mode 100755 index 0000000..c4a1465 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/metal_bgr_red.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/bar_blue.gif b/src/usr/local/www/themes/nervecenter/images/misc/bar_blue.gif new file mode 100755 index 0000000..741186a Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/bar_blue.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/bar_gray.gif b/src/usr/local/www/themes/nervecenter/images/misc/bar_gray.gif new file mode 100755 index 0000000..e86e245 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/bar_gray.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/bar_left.gif b/src/usr/local/www/themes/nervecenter/images/misc/bar_left.gif new file mode 100755 index 0000000..af751fa Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/bar_left.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/bar_right.gif b/src/usr/local/www/themes/nervecenter/images/misc/bar_right.gif new file mode 100755 index 0000000..ff12d9e Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/bar_right.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/bullet_toggle_minus.png b/src/usr/local/www/themes/nervecenter/images/misc/bullet_toggle_minus.png new file mode 100755 index 0000000..37db2fd Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/bullet_toggle_minus.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/bullet_toggle_plus.png b/src/usr/local/www/themes/nervecenter/images/misc/bullet_toggle_plus.png new file mode 100755 index 0000000..fba7af9 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/bullet_toggle_plus.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/button.gif b/src/usr/local/www/themes/nervecenter/images/misc/button.gif new file mode 100755 index 0000000..e85dbb3 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/button.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/graph.png b/src/usr/local/www/themes/nervecenter/images/misc/graph.png new file mode 100755 index 0000000..507ec75 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/graph.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/key_128.gif b/src/usr/local/www/themes/nervecenter/images/misc/key_128.gif new file mode 100755 index 0000000..ea5ae34 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/key_128.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/key_152.gif b/src/usr/local/www/themes/nervecenter/images/misc/key_152.gif new file mode 100755 index 0000000..6c7fc03 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/key_152.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/key_256.gif b/src/usr/local/www/themes/nervecenter/images/misc/key_256.gif new file mode 100755 index 0000000..3e1c377 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/key_256.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/key_64.gif b/src/usr/local/www/themes/nervecenter/images/misc/key_64.gif new file mode 100755 index 0000000..87892bd Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/key_64.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/left_background.gif b/src/usr/local/www/themes/nervecenter/images/misc/left_background.gif new file mode 100755 index 0000000..529d827 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/left_background.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/loader.gif b/src/usr/local/www/themes/nervecenter/images/misc/loader.gif new file mode 100755 index 0000000..5d10ac3 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/loader.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/loader_all.gif b/src/usr/local/www/themes/nervecenter/images/misc/loader_all.gif new file mode 100755 index 0000000..cb6bc0c Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/loader_all.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/loader_filter.gif b/src/usr/local/www/themes/nervecenter/images/misc/loader_filter.gif new file mode 100755 index 0000000..b838b17 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/loader_filter.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/loader_tab.gif b/src/usr/local/www/themes/nervecenter/images/misc/loader_tab.gif new file mode 100755 index 0000000..05bb04c Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/loader_tab.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/logon.png b/src/usr/local/www/themes/nervecenter/images/misc/logon.png new file mode 100755 index 0000000..ec644ed Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/logon.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/progress_bar.gif b/src/usr/local/www/themes/nervecenter/images/misc/progress_bar.gif new file mode 100755 index 0000000..3b4aa52 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/progress_bar.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/rrd_error.png b/src/usr/local/www/themes/nervecenter/images/misc/rrd_error.png new file mode 100755 index 0000000..a79ecf3 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/rrd_error.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/status_alerter.gif b/src/usr/local/www/themes/nervecenter/images/misc/status_alerter.gif new file mode 100755 index 0000000..7ff1e95 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/status_alerter.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/status_carpmaster.gif b/src/usr/local/www/themes/nervecenter/images/misc/status_carpmaster.gif new file mode 100755 index 0000000..2c32908 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/status_carpmaster.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/status_left.gif b/src/usr/local/www/themes/nervecenter/images/misc/status_left.gif new file mode 100755 index 0000000..b5a2930 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/status_left.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/status_page_loading.gif b/src/usr/local/www/themes/nervecenter/images/misc/status_page_loading.gif new file mode 100755 index 0000000..067ef18 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/status_page_loading.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/status_reload_all.gif b/src/usr/local/www/themes/nervecenter/images/misc/status_reload_all.gif new file mode 100755 index 0000000..72de6bd Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/status_reload_all.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/status_reload_filter.gif b/src/usr/local/www/themes/nervecenter/images/misc/status_reload_filter.gif new file mode 100755 index 0000000..d72761a Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/status_reload_filter.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/status_right.gif b/src/usr/local/www/themes/nervecenter/images/misc/status_right.gif new file mode 100755 index 0000000..bf66fdb Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/status_right.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/tri_c.gif b/src/usr/local/www/themes/nervecenter/images/misc/tri_c.gif new file mode 100755 index 0000000..317b758 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/tri_c.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/tri_c_black.gif b/src/usr/local/www/themes/nervecenter/images/misc/tri_c_black.gif new file mode 100755 index 0000000..309846e Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/tri_c_black.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/tri_o.gif b/src/usr/local/www/themes/nervecenter/images/misc/tri_o.gif new file mode 100755 index 0000000..eb95c32 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/tri_o.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/tri_o_black.gif b/src/usr/local/www/themes/nervecenter/images/misc/tri_o_black.gif new file mode 100755 index 0000000..f818f3b Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/tri_o_black.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/misc/widget_loader.gif b/src/usr/local/www/themes/nervecenter/images/misc/widget_loader.gif new file mode 100755 index 0000000..ca35e2a Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/misc/widget_loader.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/new_tab_menu.png b/src/usr/local/www/themes/nervecenter/images/new_tab_menu.png new file mode 100755 index 0000000..4bdfcef Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/new_tab_menu.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/status.png b/src/usr/local/www/themes/nervecenter/images/status.png new file mode 100755 index 0000000..a3e368e Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/status.png differ diff --git a/src/usr/local/www/themes/nervecenter/images/transparent.gif b/src/usr/local/www/themes/nervecenter/images/transparent.gif new file mode 100755 index 0000000..89c5530 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/transparent.gif differ diff --git a/src/usr/local/www/themes/nervecenter/images/transparent_pixel.gif b/src/usr/local/www/themes/nervecenter/images/transparent_pixel.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/images/transparent_pixel.gif differ diff --git a/src/usr/local/www/themes/nervecenter/javascript/ie7/blank.gif b/src/usr/local/www/themes/nervecenter/javascript/ie7/blank.gif new file mode 100755 index 0000000..a4fe2e6 Binary files /dev/null and b/src/usr/local/www/themes/nervecenter/javascript/ie7/blank.gif differ diff --git a/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-box-model.js b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-box-model.js new file mode 100644 index 0000000..45543f6 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-box-model.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-box-model",function(){var NUMERIC="\x5cs*:\x5cs*\x5cd[\x5cw%]*",UNIT=/^\d\w*$/,PERCENT=/^\d+%$/,PIXEL=/^\d+(px)?$/;var MATCH=(appVersion<6)?/\b(min|max)-(width|height)\s*:\s*\d/gi:/\b(min|max)-width\s*:\s*\d/gi;var AUTO=(appVersion<5.5)?/^auto|0cm$/:/^auto$/;var ie7_tmp=tmpElement();push(IE7.recalcs,function removeTempElement(){if(ie7_tmp.parentElement)ie7_tmp.parentElement.removeChild(ie7_tmp)});CSSFixes.addFix(MATCH,function(match){return match.slice(0,3)+match.charAt(4).toUpperCase()+match.slice(5)});var viewport=(quirksMode)?document.body:documentElement;function isFixed(element){return element.style.position=="fixed"||element.currentStyle.position=="fixed"};function layoutParent(element){var layoutParent=element.offsetParent;while(layoutParent&&!hasLayout(layoutParent))layoutParent=layoutParent.offsetParent;if(!layoutParent||isFixed(element))layoutParent=viewport;return layoutParent};function fixWidth(HEIGHT){fixWidth=function(element,value){if(!element.runtimeStyle.fixedWidth&&(!isHTML||element.tagName!="HR")){if(!value)value=element.currentStyle.width;element.runtimeStyle.fixedWidth=(UNIT.test(value))?Math.max(0,getFixedWidth(element,value)):value;element.runtimeStyle.width=element.runtimeStyle.fixedWidth;boxSizing(element)}};if(quirksMode)CSSFixes.addRecalc("width\x5cs*:\x5cs*\x5cd\x5cw*[^%]",fixWidth);var getFixedWidth=(quirksMode)?function(element,value){return getPixelWidth(element,value)+getBorderWidth(element)+getPaddingWidth(element)}:function(element,value){return getPixelWidth(element,value)};function getBorderWidth(element){return element.offsetWidth-element.clientWidth};function getPaddingWidth(element){return getPixelWidth(element,element.currentStyle.paddingLeft)+getPixelWidth(element,element.currentStyle.paddingRight)};function getMarginWidth(element){return((element.currentStyle.marginLeft=="auto")?0:getPixelLeft(element,element.currentStyle.marginLeft))+((element.currentStyle.marginRight=="auto")?0:getPixelLeft(element,element.currentStyle.marginRight))};function minWidth(element){minWidth[minWidth.count++]=element;if(element.currentStyle.minHeight=="auto")element.runtimeStyle.minHeight=0;fixWidth(element);boxSizing(element);resizeWidth(element)};minWidth.count=0;CSSFixes.addRecalc("min-width"+NUMERIC,minWidth);eval(String(minWidth).replace(/min/g,"max"));maxWidth.count=0;CSSFixes.addRecalc("max-width"+NUMERIC,maxWidth);function resizeWidth(element){var rect=element.getBoundingClientRect();var width=rect.right-rect.left;if(element.currentStyle.maxWidth&&width>=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)}); diff --git a/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-core.js b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-core.js new file mode 100644 index 0000000..b11e2b1 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-core.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-css-strict.js b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-css-strict.js new file mode 100644 index 0000000..4406d7a --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-css-strict.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-strict",function(){if(!modules["ie7-css2"])return;var NONE=[],ID=/#/g,CLASS=/[:@\.]/g,TAG=/^\w|[\s>+~]\w/g;IE7.parser.parse=function(cssText){var DYNAMIC=new RegExp("(.*):("+dynamicPseudoClasses+")(.*)");function addRule(selector,cssText){var match=selector.match(DYNAMIC);if(match)new DynamicRule(selector,match[1],match[2],match[3],cssText);else new Rule(selector,cssText)};cssText=cssText.replace(IE7.PseudoElement.ALL,IE7.PseudoElement.ID);var RULE=/([^\{]+)\{(\d+)\}/g,match;while(match=RULE.exec(cssText)){addRule(match[1],match[2]);if(appVersion<5.5)cssText=cssText.slice(match.lastIndex)}IE7.classes.sort(Rule.compare);return IE7.classes.join("\n")};function Rule(selector,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.Class;this.inherit(selector)};Rule.prototype=new IE7.Class.ancestor;Rule.prototype.toString=function(){return "."+this.name+"{"+this.cssText+"}"};Rule.score=function(selector){return(selector.match(ID)||NONE).length*10000+(selector.match(CLASS)||NONE).length*100+(selector.match(TAG)||NONE).length};Rule.compare=function(rule1,rule2){return rule1.specificity-rule2.specificity};function DynamicRule(selector,attach,dynamicPseudoClass,target,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.DynamicStyle;this.inherit(selector,attach,dynamicPseudoClass,target)};DynamicRule.prototype=new IE7.DynamicStyle.ancestor;DynamicRule.prototype.toString=Rule.prototype.toString}); diff --git a/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-css2.js b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-css2.js new file mode 100644 index 0000000..7121c8e --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-css2.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i"){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!ù.´)Ó £(){ÿ{ù.´=ª;¢ ¢Æ=ª.¢´=Ó ¤×;£ ¢©(){if(«.¢Ù)«.¢Ù.Í.¤Ö=¤þ};ª.Õ=£(){¤ ¤ÿ};¢ â=(¤Ù.±(¢î.£Ë))?£(£Ì){ù.â(´+¥¡+£Ì)}:¢Æ;¢ Å=¤Ñ.Å.¬(¤Ú)[1];if(¤Û.±(¢î.£Ë)||Å<5||!¤Ü.±(«.Ù.ü))¤ ¢©();¢ è=¢£(«.¤Í!=¥¢);¢ ë=(¤Ë «.£Ê==¥£)?!¤Ýi.±(¢î.¢Ç):¢£(«.£Ê!=¥¤);¢ ¢í=¥¥;¢ ¢ë=¢í;if(!ë)¢ë+=¥¦;¢ ¢¹;¢ Ù=«.Ù;¢ ó={};ª.¢´=£(£È,ô,£É){if(!ó)¤;if(¢«)¢¬(¥§+¢Î(ô));if(£É){ô();ô=¢Æ}ó[£È]=ô};¢ £Ç=¤Þ;£ ¢È(²,¹){if(£Ç.±(²))²=(¹||¥¨)+²;¤ ²};£ ¢Ä(²,¹){²=¢È(²,¹);¤ ².»(0,².£Ã(¥©)+1)};¢ ¹=¢Ä(«.£Æ[«.£Æ.­-1].¤Å);¢ ¢Ê=Ó ¤Ä(¥ª);£ ã(²,¹){ÿ{²=¢È(²,¹);¢Ê.¤Á(¥«,²,Þ);¢Ê.¤¿();¤ ¢Ê.¤¾}õ(¢à){â(¥¬+²);¤ ¥¨}};¢ ·=£(¢É,¢À){¤ ¢É.·(¢À)};¢ ¢½=£(¢É){¤ ¢É.¢½()};if(Å<5.5)¢¬(ã(¥­,¹));if(«.¢Í==¥®||!ë)«.¤¹();Ö «.¤¸(¥¯);ª.¶=«.É[«.É.­-1];ª.¶.§=¢í;ª.¶.Æ=×;¢ §={};£ £¿(¶,¹){¢ ¢§=¢È(¶.²,¹);if(§[¢§])¤ ¥¨;§[¢§]=(¶.ý)?¥¨:£Å(¢Ã(¶,¹),¢Ä(¶.²,¹));¤ §[¢§]};¢ ¢Ã=£(¶){¤ ¶.§};¢ £Ä=¤ßgi;£ £Å(§,¢Ç){¤ §.³(£Ä,¥°+¢Ç.»(0,¢Ç.£Ã(¥©)+1)+¥±)};ª.Ë=[];ª.£¾=¢Æ;¢ ä=Þ;£ _ã(){ÿ{ä=×;¢ £Á=¤ài;¢ É=«.É;¢ ¢ì=[];¢ ¢Å=«.£µ(¥²);¯(¢ i=¢Å.­-1;i>=0;i--){·(¢ì,¤á.±(¢Å[i].£Â)?¥¨:¢Å[i].£Â)}£ ¢Ã(¶,¹){¢ §=¥¨;if(£Á.±(¶.¤µ)){¯(¢ i=0;i<¶.£À.­;i++){§+=¢¡.¤´(¶.£À[i],¢Ä(¶.²,¹))}§+=((¶.²)?£¿(¶,¹):¢½(¢ì))}¤ §};´.§=¥¨;¯(i=0;i<É.­;i++)´.§+=¢Ã(É[i],¥¨);´.§=£´(´.§);¯(i in ó)ó[i]();£¦ ó;if(¢¹)¢¹.¢·();Ñ.¢·();´.£¾();´.¶.§=¢ë+£³(´.§);¯(i=0;i<É.­;i++){if(!É[i].ý&&!É[i].Æ)É[i].§=¥¨}´.¢Â();â(¥³)}õ(¢¨){â(¥´+¢¨.¢ï)}¢Ë{¢©()}};ª.¢Â=£(){Ñ.¢Â();¯(¢ i=0;i<ª.Ë.­;i++)ª.Ë[i]()};¢ Ñ=Ó £(){¢ Ç=[];ª.û=£(){·(Ç,¢¡)};¢ Ë=[];ª.Ú=£(á,¢Þ){¢ £½=Ó ¢æ(¥µ+á,¥¶);¢ §=´.§;á=[];Ê(¬=£½.¤²(§)){·(á,¬[1]);if(Å<5.5)§=§.»(¬.¤±)}if(á.­){á=á.Õ();·(Ë,¢¡)}};ª.¢·=£(){¯(¢ i=0;i<Ç.­;i++){´.§=´.§.³(Ç[i][0],Ç[i][1])}ª.Ú(¥·,é);ª.Ú(¥¸,£(¡){if(¡.¢².©.Ü==¥¹)é(¡.¢²)})};ª.¢Â=£(){¯(¢ i=0;i<Ë.­;i++){¢ î=¢¶(Ë[i][0]);¯(¢ j=0;j<î.­;j++)Ë[i][1](î[j])}};ª.û(¤âgi,¥º);if(Å<6)ª.û(¤ãgi,¥»);if(è){¢ à=¥¼.¢ç(¥½);¯(¢ i=0;i<à.­;i++)à[à[i]]=à[i-1]||¥¾;£ ³($,$1,$2,$3){¤ $1+à[$3]};ª.û(Ó ¢æ(¥¿+à.¢å(¥À)+¥Á,¥¶),³)}};¢ £¹=¤ä;¢ £¸=¤åg;¢ £·=¤æ;¢ £¼=¤çg;¢ £»=¥Â;¢ þ={};£ ¢¶(µ,¦){¢ ¢è=!¦;¢ ¢é=(¦)?(¦.¤§==¤¦)?¦:[¦]:[«];¢ ñ=µ.³(£¼,£»).¢ç(¥½);¢ ¬=[];¯(¢ i=0;i<ñ.­;i++){µ=£º(ñ[i]);if(µ.»(0,3).¢å(¥¨)==¥Ã){µ=µ.»(2);¦=£¶(¢é,µ[1])}Ö ¦=¢é;¢ j=0,ß,®,Á,ò=¥¨;Ê(j<µ.­){ß=µ[j++];®=µ[j++];ò+=ß+®;Á=¥¨;if(µ[j]==¥Ä){Ê(µ[j++]!=¥Á)Á+=µ[j];Á=Á.»(0,-1);ò+=¥Ä+Á+¥Á}¦=(¢è&&þ[ò])?þ[ò]:¢ß(¦,ß,®,Á);if(¢è)þ[ò]=¦}¬=¬.¤¥(¦)}¤ ¬};£ £º(µ){if(£¹.±(µ))µ=¥Å+µ;¤ µ.¬(£¸)};£ ¢ß(¦,ß,®,Á){¢ À=¥¨;if(£·.±(®)){®=®.¢ç(¥À);À=®[0];®=®[1]}¢ ¸=[];if(ñ[ß])ñ[ß](¸,¦,®,À||Á);¤ ¸};£ £¶(¦,id){¢ ¸=[],i,j;¯(i=0;i<¦.­;i++){¢ ¬=¦[i].ì.¢À(id);if(¬){if(¬.­==¤¤)·(¸,¬);Ö ¯(j=0;j<¬.­;j++)·(¸,¬[j])}}¤ ¸};¢ ñ={¥Å:£(¸,¦,®,À){¯(¢ i=0;i<¦.­;i++){¢ ¢¦=(®==¥Æ&&¦[i].ì)?¦[i].ì:¦[i].£µ(®);¯(¢ j=0;j<¢¦.­;j++){if(ï(¢¦[j])&&(!À||¢¦[j].À==À))·(¸,¢¦[j])}}},¥Ç:£(¸,¦,®){¯(¢ i=0;i<¦.­;i++)if(¦[i].id==®)·(¸,¦[i])},¥È:£(¸,¦,®){®=Ó ¢æ(¥É+®+¥Ê);¯(¢ i=0;i<¦.­;i++)if(®.±(¦[i].¤£))·(¸,¦[i])},¥Ë:£(¸,¦,®,Á){®=¢ä[®];if(®)¯(¢ i=0;i<¦.­;i++)if(®(¦[i],Á))·(¸,¦[i])}};¢ ¤¢=¥¨;¢ ¢ä={Õ:£(){¢ Õ=[];¯(¢ ð in ª){if(ð!=¥Ì&&ð!=¥Í){if(ª[ð].­>1)ð+=¥Î;·(Õ,ð)}}¤ Õ.¢å(¥À)},¥Ì:£(¡){¤ ¢£(¡.©[¥Ï]==¥Ì)},¥Í:£(¡){¤ ¢£(¡.©[¥Ï]==¥Í)}};¢ ¤¡={Õ:¢ä.Õ};£ £ÿ(¡,º,À){if(À&&¡.À!=À)¤ Þ;¤(º==¥Æ)?ï(¡):(ë)?(¡.º==º.¢ý()):(¡.º==º)};¢ ¢¾=[];£ £þ(¢¿){¤ ¢».±(¢¿)?¢¾[¢¿.»(1,-1)]:¢¿};¢ £´=£(§){¤ §.³(¤èg,£(¬){¤(¬.¢þ(0)==¥©)?¥¨:¥Ð+(·(¢¾,¬.»(1,-1))-1)+¥Ð}).³(¤ég,¥¨).³(¤êg,¥À).³(¤ëg,¥°)};£ £³(§){¤ §.³(¤æg,¥Ñ).³(¤ìg,£(¬,£²){¤ ¢¾[£²]})};¢ ¢¼=[];£ ö(¡,Ý,Ô){¡.£±(Ý,Ô);·(¢¼,¢¡)};£ £°(¡,Ý,Ô){ÿ{¡.£û(Ý,Ô)}õ(¢à){}};ù.£±(¥Ò,£(){Ê(¢¼.­){¢ Ô=¢½(¢¼);£°(Ô[0],Ô[1],Ô[2])}});¢ ¢³=(Å<6)?£(¡){¤ ¡.Ä}:£(¡){¤ ¡.©.¢³};£ é(¡){if(!¢³(¡)){¡.£ù=Þ;£¯(£«(¡))}};£ £¯(¡){Ê(¡){¡.°.£®=¡.©.£®;¡=¢â(¡)}};¢ ¢»=¤í;£ £ø(¥){¤(¢».±(¥))?¥:¥Ð+¥+¥Ð};£ £÷(¥){¤(¢».±(¥))?¥.»(1,-1):¥};£ £¡(º){¢ ¡=«.£ª(º||¥Ó);¡.Í.§=¥Ô;¤ ¡};£ ï(¢¢){¤ ¢£(¢¢&&¢¢.£ñ==1&&¢¢.º!=¥Õ&&!¢¢.£ð)};£ £ï(¡){Ê(¡&&(¡=¡.£î)&&!ï(¡))£¬;¤ ¡};£ ¢â(¡){Ê(¡&&(¡=¡.Ì)&&!ï(¡))£¬;¤ ¡};£ £«(¡){¡=¡.£í;¤(ï(¡))?¡:¢â(¡)};¢ ¢«=Þ;´.¢´(¥Ö,£(){if(ë)¢¹=Ó £(){¢ Ç=[];£ ¢Þ(¡){¢ ¢¸=«.£ª(¥×+¡.¢µ.»(1));if(¡.¢µ.»(-2)!=¥Ø){¢ £©=¥Ù+¡.º+¥Ú,Ì;Ê((Ì=¡.Ì)&&Ì.¢µ!=£©){¡.¢á.¢Ú(Ì);¢¸.¢Ï(Ì)}if(Ì)¡.¢á.¢Ú(Ì)}¡.¢á.£ë(¢¸,¡);¤ ¢¸};ª.í=£(){·(Ç,¢¡)};ª.¢·=£(){ÿ{if(Å>5)«.£ê.í(¥Û,¥Ü)}õ(¢à){}¢Ë{¯(¢ i=0;i<Ç.­;i++){¢ î=¢¶(Ç[i][0]);¯(¢ j=0;j<î.­;j++)Ç[i][1](î[j])}}};ª.í(¥Ý,£(¡){if(!¡.£§){¢ Ò=¢¶(¥Þ,¡)[0];if(Ò){if(!Ò.id)Ò.id=Ò.ü;¡.£§=Ò.id}}});ª.í(¥ß,£(¡){¢Þ(¡);£¦ þ[¥à]});ª.í(¥á,£(¡){if(¡.º==¥â){¢ ¬=¡.¢µ.¬(¤îi);¡.°.¥=(¬)?¬[1]:¥¨}if(¡.Ý==¥ã){ö(¡,¥ä,£(){¡.°.¢Ý=×;¢ª(¥å+¡.ü+¥æ,1)})}});ª.í(¥ç,£(¡){¢ ££=¤ï;ö(¡,¥è,£(){¯(¢ i=0;i<¡.­;i++){if(££.±(¡[i].Ý)&&!¡[i].ý&&!¡[i].°.¢Ý){¡[i].ý=×;¢ª(¥å+¡[i].ü+¥é,1)}Ö if(¡[i].º==¥â&&¡[i].Ý==¥ã){¢ª(¥å+¡[i].ü+¥ê+¡[i].¥+¥Ð,1);¡[i].¥=¡[i].°.¥}}})})}},×);´.¢´(¥ë,£(){¢ ¢¯=¥ì,¢û=¤ð,¢ñ=¤ñ,¢Ð=¤ò;¢ ¢ÿ=(Å<6)?¤ógi:¤ôgi;¢ ¢ö=(Å<5.5)?¤õ:¤ö;¢ Ã=£¡();·(´.Ë,£ ¢ò(){if(Ã.Î)Ã.Î.¢Ú(Ã)});Ñ.û(¢ÿ,£(¬){¤ ¬.»(0,3)+¬.¢þ(4).¢ý()+¬.»(5)});¢ ¢ü=(è)?«.¢Ù:Ù;£ ¢Ó(¡){¤ ¡.Í.Ü==¥í||¡.©.Ü==¥í};£ ¾(¡){¢ ¾=¡.¢²;Ê(¾&&!¢³(¾))¾=¾.¢²;if(!¾||¢Ó(¡))¾=¢ü;¤ ¾};£ å(¢ó){å=£(¡,¥){if(!¡.°.¿&&(!ë||¡.º!=¥î)){if(!¥)¥=¡.©.¨;¡.°.¿=(¢û.±(¥))?£Þ.ú(0,ê(¡,¥)):¥;¡.°.¨=¡.°.¿;é(¡)}};if(è)Ñ.Ú(¥ï,å);¢ ê=(è)?£(¡,¥){¤ ç(¡,¥)+¢Õ(¡)+¢Ô(¡)}:£(¡,¥){¤ ç(¡,¥)};£ ¢Õ(¡){¤ ¡.¢Ñ-¡.Ä};£ ¢Ô(¡){¤ ç(¡,¡.©.£Ý)+ç(¡,¡.©.£Ü)};£ ¢ô(¡){¤((¡.©.¢ù==¥ð)?0:÷(¡,¡.©.¢ù))+((¡.©.¢ø==¥ð)?0:÷(¡,¡.©.¢ø))};£ ¼(¡){¼[¼.Ï++]=¡;if(¡.©.¢÷==¥ð)¡.°.¢÷=0;å(¡);é(¡);¢®(¡)};¼.Ï=0;Ñ.Ú(¥ñ+¢¯,¼);¢¬(¢Î(¼).³(¤÷g,¥ò));Ð.Ï=0;Ñ.Ú(¥ó+¢¯,Ð);£ ¢®(¡){¢ ¢°=¡.¢õ();¢ ¨=¢°.æ-¢°.Â;if(¡.©.Ð&&¨>=ê(¡,¡.©.Ð))¡.°.¨=ê(¡,¡.©.Ð);Ö if(¡.©.¼&&¨<=ê(¡,¡.©.¼))¡.°.¨=ê(¡,¡.©.¼);Ö ¡.°.¨=¡.°.¿};£ Ø(¡){if((¡.©.Ü==¥ô||¡.©.Ü==¥í)&&¡.©.Â!=¥ð&&¡.©.æ!=¥ð&&¢ö.±(¡.©.¨)){Ø[Ø.Ï++]=¡;é(¡);¢Ò(¡)}};Ø.Ï=0;Ñ.Ú(¥õ+¢¯,Ø);£ ¢Ò(¡){¡.°.¨=¥¨;¢ Î=¾(¡);¢ Â=(¡.°.£Û)?¡.¢õ().Â-2:÷(¡,¡.©.Â);¢ ¨=Î.Ä-÷(¡,¡.©.æ)-Â-¢ô(¡);if(!è)¨-=¢Õ(¡)+¢Ô(¡);if(¨<0)¨=0;if(¢Ó(¡)||¢ó||¡.¢Ñ<¨){¡.°.¿=¨;¡.°.¨=¨}};¢ Ä=Ù.Ä;ö(ù,¥ö,£(){¢ i,ø=(Ä<Ù.Ä);Ä=Ù.Ä;¯(i=0;i<¼.Ï;i++){¢ ¡=¼[i];¢ ¿=(¡.°.¨==¡.©.¼);if(ø&&¿)¡.°.¨=¥¨;if(ø==¿)¢®(¡)}¯(i=0;i<Ð.Ï;i++){¢ ¡=Ð[i];¢ ¿=(¡.°.¨==¡.©.Ð);if(!ø&&¿)¡.°.¨=¥¨;if(ø!=¿)¢®(¡)}¯(i=0;i<Ø.Ï;i++)¢Ò(Ø[i]);¢ò()});£ ç(¡,¥){if(¢Ð.±(¥))¤ ¢­(¥);if(¢ñ.±(¥))¤ ¢­(£Ù(¥)/100*¾(¡).Ä);¢ Î=(¡.£Ø)?¡:¡.Î;Î.¢Ï(Ã);Ã.Í.¨=¥;¤ Ã.¢Ñ};£ ÷(¡,¥){if(¢­(¥)>0)¤ ç(¡,¥);if(¢Ð.±(¥))¤ ¢­(¥);¡.Î.¢Ï(Ã);Ã.Í.Â=¥;¤ Ã.£×}};¢¬(¢Î(å).³(¤øg,¥÷).³(¤ùg,¥ø).³(¤úg,¥ù).³(¤ûg,¥ú).³(¤üg,¥û).³(¤ýg,¥ü));å();£Î(×)});¢«=×;if(«.¢Í==¥®)_ã();Ö ö(«,¥ý,£(){if(!ä&&«.¢Í==¥®)¢ª(_ã,0)})}õ(¢¨){¢©();â(¥þ+¢¨.¢ï)}¢Ë{}}();',340,0,/./,String,95,'element`var`function`return`value`from`cssText`width`currentStyle`this`document`match`length`filter`for`runtimeStyle`test`href`replace`IE7`selector`styleSheet`push`filtered`path`tagName`slice`minWidth`x5cs`layoutParent`fixedWidth`scopeName`filterArgs`left`ie7_tmp`clientWidth`appVersion`ie7`fixes`link`styleSheets`while`recalcs`nextSibling`style`parentElement`count`maxWidth`CSSFixes`input`new`handler`toString`else`true`fixRight`documentElement`addRecalc`auto`position`type`false`token`SIZES`pattern`alert`load`complete`fixWidth`right`getPixelWidth`quirksMode`boxSizing`getFixedWidth`isHTML`all`add`elements`isElement`pseudoClass`selectors`cacheSelector`modules`script`catch`addEventHandler`getPixelLeft`wider`window`max`addFix`uniqueID`disabled`cssCache`try`arguments`node`Boolean`x5c`visited`subset`url`error`unHide`setTimeout`loaded`eval`parseInt`resizeWidth`NUMERIC`rect`min`offsetParent`hasLayout`addModule`outerHTML`cssQuery`apply`fixedElement`HTMLFixes`display`QUOTED`handlers`pop`strings`string`item`small`recalc`getCSSText`getPath`styles`DUMMY`pathname`makePath`array`httpRequest`finally`Error`readyState`String`appendChild`PIXEL`offsetWidth`resizeRight`isFixed`getPaddingWidth`getBorderWidth`fixed`absolute`x5cw`body`removeChild`box`submit`clicked`fix`select`ignore`parentNode`nextElement`x2f`pseudoClasses`join`RegExp`split`useCache`base`large`HEADER`inlineStyles`LINKS`location`description`height`PERCENT`removeTempElement`HEIGHT`getMarginWidth`getBoundingClientRect`AUTO`minHeight`marginRight`marginLeft`x5cd`UNIT`viewport`toUpperCase`charAt`MATCH`tmpElement`BUTTON`UNSUCCESSFUL`button`abbr`delete`htmlFor`HTML`endTag`createElement`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`decode`encode`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`parse`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`name`autoload`mimeType`search`message`onreadystatechange`fixHeight`bottom`Bottom`Right`top`Top`Left`Height`Width`offsetLeft`canHaveChildren`parseFloat`onresize`screenLeft`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`firstChild`previousSibling`previousElement`ie7_anon`nodeType`clip`none`border`padding`object`unquote`quote`contentEditable`onbeforeunload`detachEvent`import`namespace`getString`compareTagName`dynamicPseudoClasses`attributeTests`className`null`concat`Array`constructor`size`font`medium`list`inline`float`relative`content`sizing`lastIndex`exec`successfully`callee`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`Microsoft`ActiveXObject`src`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ms_`ie7_off`MSIE`navigator`ie7_debug`alpha`version`visible`visibility`Function`fromCharCode`¤Ò`¤Ð (\\d\\.\\d)`¤Ï`^¤Î`\\.¤É$`^[\\w\\.]+[^:]*$`(¢§\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¤·\\b|\\¤¶\\b|^$`Æ-È`(¤­\\s*:\\s*(Â|æ))`¢º\\s*:\\s*¤«-¢À`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢ã\\*[^\\*]*\\*+([^\\¢ã][^\\*]*\\*+)*\\¢ã)|(\x27[^\x27]*\x27)|("[^"]*")`@(£ý|£ü)[^;\\n]+[;\\n]|`\\¢¤:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ¥="([^"]*)"`^(¢Ü|£á|£¤)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(¢±|ú)-(¨|¢ð)\\s*:\\s*\\d`\\b(¢±|ú)-¨\\s*:\\s*\\d`^Û|0cm$`^Û$`¢±`£Ö`¨`£Ô`Â`£Ñ`æ`¤Õ`´ ¤Ô 0.7.3 (¤Ó)`\\n\\n`¤Ì`¤Ê`¤È ¤Ç`:È{Æ-È:È}:¢¥{Æ-È:¢¥}`*{¤Æ:0}`ô=``/`¤Ã.¤Â`¤À`¢Ì [1]: ¤½ ¤¼ ã ¤» `Æ-¤º.js`ä`<Í>`$1`$2`Í`¢« ¤³`¢Ì [2]: `([^{}]*)\\¢¤{([^}]*[^\\¢Ø-])?`gi`¢Û-¤°\\½*:\\½*¤¯-¢Û`Ü\\½*:\\½*¢×`¤®`¢º:¤¬;$1`¢º:£­`xx-¢Á,x-¢Á,¢Á,¤ª,¢ê,x-¢ê,xx-¢ê`,`xx-¢Á`(¤©(-¤¨)?\\½*:\\½*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\½)`(\\½|$)`:`È`¢¥`\\¢¤([^)]*\\¢¤)`Æ-È`\x27`\\¢¤:`£ú`£ö`Ü:¢×;£õ:0;¢º:£­;£ô:£ó;£ò:¢°(0 0 0 0);Â:-9999`!`Æ-£ì`<£¨:`/>``£¨`£é://£è.w3.£ç/1999/£æ`£å`Ò,¢ß,£ä`£¥` £¥`£¤,Ò`£¢`¢Ü`£ã`«.ì.`.°.¢Ý=Þ`£â`£à`.ý=Þ`.¥=\x27`Æ-¢Û-£ß`\\½*:\\½*\\¢ú[\\¢Ø%]*`¢Ö`HR`¨\\½*:\\½*\\¢ú\\¢Ø*[^%]`Û`¢±-¨`ú`ú-¨`¢×`æ`£Ú`£Õ`¢ð`£Ó`£Ò`£Ð`£Ï`£Í`¢Ì [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-lite.js b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-lite.js new file mode 100644 index 0000000..88c764f --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-lite.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-png.js b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-png.js new file mode 100644 index 0000000..7b8f2cf --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-png.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-png",function(){if(appVersion<5.5)return;var FILTER="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=%1,sizingMethod='scale')";var NULL=(/\bSV1\b/.test(navigator.userAgent))?makePath("blank.gif",path):"javascript:'#define x_width 1\x5cn#define x_height 1\x5cnstatic char x_bits[]={0x00}'";var pngTest=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");function addFilter(element,src){element.runtimeStyle.filter=FILTER.replace(/%1/,src)};var MATCH=/background(-image)?\s*:([^(};]*)url\(([^\)]+)\)([^;}]*)/gi;CSSFixes.addFix(MATCH,function replace(match,image,prefix,url,suffix){url=getString(url);return pngTest.test(url)?"filter:"+FILTER.replace(/scale/,"crop").replace(/%1/,url)+";zoom:1;background"+(image||"")+":"+(prefix||"")+"none"+(suffix||""):match});if(HTMLFixes){function fixImg(element){if(pngTest.test(element.src)){var width=element.width,height=element.height;addFilter(element,element.src);element.src=NULL;element.width=width;element.height=height}else element.runtimeStyle.filter=""};HTMLFixes.add("img,input",function(element){if(element.tagName=="INPUT"&&element.type!="image")return;fixImg(element);addEventHandler(element,"onpropertychange",function(){if(event.propertyName=="src")fixImg(element)})})}}); diff --git a/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-server.css b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-server.css new file mode 100644 index 0000000..47c7edd --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-server.css @@ -0,0 +1,43 @@ +body, td, dd {font: 10pt Verdana, Arial, Helvetica, sans-serif; color: black;} +body {margin: 8px; background: #333;} +h1 {margin: 0;} +h1 a:hover {background-color: transparent;} +h2 {font-size: 1.75em;} +h3 {font-size: 1.1em;} +a:active {color: #ff0000;} +a:link {color: #0a6cce;} +a:visited {color: #0a6cce;} +code, *.code {font-family: monospace; font-size: 100%; font-style: normal; white-space: nowrap; + padding: 0 1px; background: #f2f3f8; border: #d6d9e9 1px solid;} +code.box {display: block; padding: 10px; margin: 0.5em 0;} +ul {list-style-type: square;} +dd {margin: .2em 0 .5em 1em;} +dl.library dt {display: list-item; margin-left: 3em; list-style-type: square;} +dl.library dd {font-style: italic; margin-left: 3em;} +dt {font-weight: bold;} +dt.pack {color: brown;} +a img {border-style: none;} +hr {height: 1px; color: #000; border-style: solid;} +hr.short {height: 2px; width: 100px;} +div.document {background: #eef; padding: 20px 20px 5px 20px; width: 600px; border: 1px solid black;} +hr {border-bottom-width: 0px;} +div.header hr {color: #0a6cce; background-color: #0a6cce;} +div.content {min-height: 100px;} +div.footer hr {color: #898e79; background-color: #898e79; } +div.header, div.header a:link, div.header a:visited, h3 a:link, h3 a:visited {text-decoration: none;} +a:hover {color: #fff; background-color: #0a6cce; text-decoration: none;} +div.footer a:hover {background-color: transparent; text-decoration: none;} +div.header .menu {text-align: right;} +div.footer {font-size: x-small; margin-top: 8px;} +div.footnote {font-family: "times new roman", times; font-style: italic; margin-top: 10px;} +#license {margin-top: 5px; font-size: xx-small;} +table {border-top: 1px solid #000; border-left: 1px solid #000;} +th {background-color: #fff; text-align: left;} +th, td {border-right: 1px solid #000; border-bottom: 1px solid #000;} +th.small {width: 100px;} +th.medium {width: 200px;} +th.large {width: 270px;} +th.x-large {width: 408px;} +table.fixed {table-layout: fixed;} +span.comment {color: #666;} + diff --git a/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-standard-p.js b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-standard-p.js new file mode 100644 index 0000000..73e99ac --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-standard-p.js @@ -0,0 +1,3 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +eval(function(A,r,s,e,n,a,l){s=function(e){return((e=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!¢¡.ª)¶ ¢(){¢Æ{¢¡.ª=¤;£ ¢Ø=¤.¢©=¶ ¤¬;¢ ¢ì(){if(².ß)².ß.Ì.¦²=¦ë};¤.È=¢(){¥ ¦ì};£ ¢¶=(¦´.µ(¢ô.¤ì))?¢(¤í){¢¡.¢¶(ª+¦í+¤í)}:¢Ø;£ á=¤¥.á.§(¦µ)[1];if(¦¶.µ(¢ô.¤ì)||á<5||!¦·.µ(².ù.¢«))¥ ¢ì();£ ¢§=¢ê(².¦«!=¦î);£ ¢±=(¦© ².¤ë==¦ï)?!¦¸i.µ(¢ô.£»):¢ê(².¤ë!=¦ð);£ £ê=¦ñ;£ £¦=£ê;if(!¢±)£¦+=¦ò;£ ¢½;£ ù=².ù;£ ¢Ñ={};¤.¢©=¢(¢Ç,¢Ò,¤ê){if(!¢Ñ)¥;if(¢í)Ü(¦ó+¢ó(¢Ò));if(¤ê){¢Ò();¢Ò=¢Ø}¢Ñ[¢Ç]=¢Ò};£ ¤é=¦¹;¢ ¢À(¾,Á){if(¤é.µ(¾))¾=(Á||¦ô)+¾;¥ ¾};¢ £¹(¾,Á){¾=¢À(¾,Á);¥ ¾.Æ(0,¾.¤å(¦õ)+1)};£ Á=£¹(².¤è[².¤è.¯-1].î);£ £½=¶ ¦£(¦ö);¢ ê(¾,Á){¢Æ{¾=¢À(¾,Á);£½.¦¡(¦÷,¾,ë);£½.¥þ();¥ £½.¥ý}¢·(£¥){¢¶(¦ø+¾);¥ ¦ô}};£ ¸=¢(£¼,£·){¥ £¼.¸(£·)};£ £´=¢(£¼){¥ £¼.£´()};if(á<5.5)Ü(ê(¦ù,Á));if(².£À==¦ú||!¢±)².¥ø();Û ².¥÷(¦û);¤.¿=².é[².é.¯-1];¤.¿.¨=£ê;¤.¿.Î=Ö;£ ¨={};¢ ¤á(¿,Á){£ Ô=¢À(¿.¾,Á);if(¨[Ô])¥ ¦ô;¨[Ô]=(¿.¢ç)?¦ô:¤ç(¢ã(¿,Á),£¹(¿.¾,Á));¥ ¨[Ô]};£ ¢ã=¢(¿){¥ ¿.¨};£ ¤æ=¦ºgi;¢ ¤ç(¨,£»){¥ ¨.¬(¤æ,¦ü+£».Æ(0,£».¤å(¦õ)+1)+¦ý)};¤.ô=[];¤.¢â=¢Ø;£ ¢¸=ë;¢ _ê(){¢Æ{¢¸=Ö;£ ¤ã=¦»i;£ é=².é;£ £é=[];£ £º=².¤Ø(¦þ);®(£ i=£º.¯-1;i>=0;i--){¸(£é,¦¼.µ(£º[i].¤ä)?¦ô:£º[i].¤ä)}¢ ¢ã(¿,Á){£ ¨=¦ô;if(¤ã.µ(¿.¥ô)){®(£ i=0;i<¿.¤â.¯;i++){¨+=í.£ó(¿.¤â[i],£¹(¿.¾,Á))}¨+=((¿.¾)?¤á(¿,Á):£´(£é))}¥ ¨};ª.¨=¦ô;®(i=0;i<é.¯;i++)ª.¨+=¢ã(é[i],¦ô);ª.¨=£©(ª.¨);®(i in ¢Ñ)¢Ñ[i]();£Ö ¢Ñ;if(¢½)¢½.£°();à.£°();ª.¢â();ª.¿.¨=£¦+£§(ª.¨);®(i=0;i<é.¯;i++){if(!é[i].¢ç&&!é[i].Î)é[i].¨=¦ô}ª.Ø();¢¶(¦ÿ)}¢·(¢ë){¢¶(§¡+¢ë.£ë)}£¾{¢ì()}};¤.Ø=¢(){à.Ø();®(£ i=0;i<¤.ô.¯;i++)¤.ô[i]()};£ à=¶ ¢(){£ è=[];¤.¢¿=¢(){¸(è,í)};£ ô=[];¤.ï=¢(¢µ,£ä){£ ¤à=¶ ç(§¢+¢µ,§£);£ ¨=ª.¨;¢µ=[];Ý(§=¤à.¢ß(¨)){¸(¢µ,§[1]);if(á<5.5)¨=¨.Æ(§.¥ò)}if(¢µ.¯){¢µ=¢µ.È();¸(ô,í)}};¤.£°=¢(){®(£ i=0;i<è.¯;i++){ª.¨=ª.¨.¬(è[i][0],è[i][1])}¤.ï(§¤,¢Ê);¤.ï(§¥,¢(¡){if(¡.¢¥.«.³==§¦)¢Ê(¡.¢¥)})};¤.Ø=¢(){®(£ i=0;i<ô.¯;i++){£ ¢Í=ü(ô[i][0]);®(£ j=0;j<¢Í.¯;j++)ô[i][1](¢Í[j])}};¤.¢¿(¦½gi,§§);if(á<6)¤.¢¿(¦¾gi,§¨);if(¢§){£ ¢´=§©.£¨(§ª);®(£ i=0;i<¢´.¯;i++)¢´[¢´[i]]=¢´[i-1]||§«;¢ ¬($,$1,$2,$3){¥ $1+¢´[$3]};¤.¢¿(¶ ç(§¬+¢´.¢Ü(§­)+§®,§£),¬)}};£ ¤Ü=¦¿;£ ¤Û=¦Àg;£ ¤Ú=¦Á;£ ¤ß=¦Âg;£ ¤Þ=§¯;£ ¢è={};¢ ü(´,­){£ £æ=!­;£ £ç=(­)?(­.¥ê==¥é)?­:[­]:[²];£ ò=´.¬(¤ß,¤Þ).£¨(§ª);£ §=[];®(£ i=0;i<ò.¯;i++){´=¤Ý(ò[i]);if(´.Æ(0,3).¢Ü(¦ô)==§°){´=´.Æ(2);­=¤Ù(£ç,´[1])}Û ­=£ç;£ j=0,¢³,±,É,¢Ð=¦ô;Ý(j<´.¯){¢³=´[j++];±=´[j++];¢Ð+=¢³+±;É=¦ô;if(´[j]==§±){Ý(´[j++]!=§®)É+=´[j];É=É.Æ(0,-1);¢Ð+=§±+É+§®}­=(£æ&&¢è[¢Ð])?¢è[¢Ð]:£å(­,¢³,±,É);if(£æ)¢è[¢Ð]=­}§=§.¥è(­)}¥ §};¢ ¤Ý(´){if(¤Ü.µ(´))´=§²+´;¥ ´.§(¤Û)};¢ £å(­,¢³,±,É){£ Ê=¦ô;if(¤Ú.µ(±)){±=±.£¨(§­);Ê=±[0];±=±[1]}£ ¼=[];if(ò[¢³])ò[¢³](¼,­,±,Ê||É);¥ ¼};¢ ¤Ù(­,id){£ ¼=[],i,j;®(i=0;i<­.¯;i++){£ §=­[i].¢Ì.£·(id);if(§){if(§.¯==¢Þ)¸(¼,§);Û ®(j=0;j<§.¯;j++)¸(¼,§[j])}}¥ ¼};£ ò={§²:¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=(±==§³&&­[i].¢Ì)?­[i].¢Ì:­[i].¤Ø(±);®(£ j=0;j<ó.¯;j++){if(¢Î(ó[j])&&(!Ê||ó[j].Ê==Ê))¸(¼,ó[j])}}},§´:¢(¼,­,±){®(£ i=0;i<­.¯;i++)if(­[i].id==±)¸(¼,­[i])},§µ:¢(¼,­,±){±=¶ ç(§¶+±+§·);®(£ i=0;i<­.¯;i++)if(±.µ(­[i].¢Ý))¸(¼,­[i])},§¸:¢(¼,­,±,É){±=¢®[±];if(±)®(£ i=0;i<­.¯;i++)if(±(­[i],É))¸(¼,­[i])}};£ ¢¬=¦ô;£ ¢®={È:¢(){£ È=[];®(£ ¢Ï in ¤){if(¢Ï!=§¹&&¢Ï!=§º){if(¤[¢Ï].¯>1)¢Ï+=§»;¸(È,¢Ï)}}¥ È.¢Ü(§­)},§¹:¢(¡){¥ ¢ê(¡.«[§¼]==§¹)},§º:¢(¡){¥ ¢ê(¡.«[§¼]==§º)}};£ ¢­={È:¢®.È};¢ £Ù(¡,Ï,Ê){if(Ê&&¡.Ê!=Ê)¥ ë;¥(Ï==§³)?¢Î(¡):(¢±)?(¡.Ï==Ï.¤Ç()):(¡.Ï==Ï)};£ £µ=[];¢ ¢ö(£¶){¥ £².µ(£¶)?£µ[£¶.Æ(1,-1)]:£¶};£ £©=¢(¨){¥ ¨.¬(¦Ãg,¢(§){¥(§.¤È(0)==¦õ)?¦ô:§½+(¸(£µ,§.Æ(1,-1))-1)+§½}).¬(¦Äg,¦ô).¬(¦Åg,§­).¬(¦Æg,¦ü)};¢ £§(¨){¥ ¨.¬(¦Ág,§¾).¬(¦Çg,¢(§,¤×){¥ £µ[¤×]})};£ £³=[];¢ Ó(¡,Õ,þ){¡.¤Ö(Õ,þ);¸(£³,í)};¢ ¤Õ(¡,Õ,þ){¢Æ{¡.¥å(Õ,þ)}¢·(£¥){}};¢¡.¤Ö(§¿,¢(){Ý(£³.¯){£ þ=£´(£³);¤Õ(þ[0],þ[1],þ[2])}});£ £®=(á<6)?¢(¡){¥ ¡.Í}:¢(¡){¥ ¡.«.£®};¢ ¢Ê(¡){if(!£®(¡)){¡.¥ã=ë;¤Ô(¤Ð(¡))}};¢ ¤Ô(¡){Ý(¡){¡.¦.¤Ó=¡.«.¤Ó;¡=¢þ(¡)}};£ £²=¦È;¢ ¤ª(©){¥(£².µ(©))?©:§½+©+§½};¢ ¥â(©){¥(£².µ(©))?©.Æ(1,-1):©};¢ £Ï(Ï){£ ¡=².£Û(Ï||§À);¡.Ì.¨=§Á;¥ ¡};¢ ¢Î(¢é){¥ ¢ê(¢é&&¢é.¥Þ==1&&¢é.Ï!=§Â&&!¢é.¢ÿ)};¢ ¤²(¡){Ý(¡&&(¡=¡.¥Ý)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¢þ(¡){Ý(¡&&(¡=¡.õ)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¤Ð(¡){¡=¡.¤¹;¥(¢Î(¡))?¡:¢þ(¡)};£ ¢í=ë;ª.¢©(§Ã,¢(){if(¢±)¢½=¶ ¢(){£ è=[];¢ £ä(¡){£ £±=².£Û(§Ä+¡.£¯.Æ(1));if(¡.£¯.Æ(-2)!=§Å){£ ¤Ï=§Æ+¡.Ï+§Ç,õ;Ý((õ=¡.õ)&&õ.£¯!=¤Ï){¡.¢ü.¢Õ(õ);£±.¢»(õ)}if(õ)¡.¢ü.¢Õ(õ)}¡.¢ü.¥Û(£±,¡);¥ £±};¤.æ=¢(){¸(è,í)};¤.£°=¢(){¢Æ{if(á>5)².¥Ú.æ(§È,§É)}¢·(£¥){}£¾{®(£ i=0;i<è.¯;i++){£ ¢Í=ü(è[i][0]);®(£ j=0;j<¢Í.¯;j++)è[i][1](¢Í[j])}}};¤.æ(§Ê,¢(¡){if(!¡.¤Í){£ ð=ü(§Ë,¡)[0];if(ð){if(!ð.id)ð.id=ð.¢«;¡.¤Í=ð.id}}});¤.æ(§Ì,¢(¡){£ä(¡);£Ö ¢è[§Í]});¤.æ(§Î,¢(¡){if(¡.Ï==§Ï){£ §=¡.£¯.§(¦Éi);¡.¦.©=(§)?§[1]:¦ô}if(¡.Õ==§Ð){Ó(¡,§Ñ,¢(){¡.¦.£ã=Ö;¢Ó(§Ò+¡.¢«+§Ó,1)})}});¤.æ(§Ô,¢(¡){£ ¤Ê=¦Ê;Ó(¡,§Õ,¢(){®(£ i=0;i<¡.¯;i++){if(¤Ê.µ(¡[i].Õ)&&!¡[i].¢ç&&!¡[i].¦.£ã){¡[i].¢ç=Ö;¢Ó(§Ò+¡[i].¢«+§Ö,1)}Û if(¡[i].Ï==§Ï&&¡[i].Õ==§Ð){¢Ó(§Ò+¡[i].¢«+§×+¡[i].©+§½,1);¡[i].©=¡[i].¦.©}}})})}},Ö);ª.¢©(§Ø,¢(){£ £«=§Ù,¤Æ=¦Ë,¢Ö=¦Ì,£Ý=¦Í;£ ¢¾=(á<6)?¦Îgi:¦Ïgi;£ ¤Ã=(á<5.5)?¦Ð:¦Ñ;£ ¹=£Ï();¸(ª.ô,¢ ¤À(){if(¹.½)¹.½.¢Õ(¹)});à.¢¿(¢¾,¢(§){¥ §.Æ(0,3)+§.¤È(4).¤Ç()+§.Æ(5)});£ Þ=(¢§)?².ß:ù;¢ ö(¡){¥ ¡.Ì.³==§Ú||¡.«.³==§Ú};¢ ã(¡){£ ã=¡.¢¥;Ý(ã&&!£®(ã))ã=ã.¢¥;if(!ã||ö(¡))ã=Þ;¥ ã};¢ ì(¤Á){ì=¢(¡,©){if(!¡.¦.ä&&(!¢±||¡.Ï!=§Û)){if(!©)©=¡.«.°;¡.¦.ä=(¤Æ.µ(©))?¥Î.¢æ(0,¢Ë(¡,©)):©;¡.¦.°=¡.¦.ä;¢Ê(¡)}};if(¢§)à.ï(§Ü,ì);£ ¢Ë=(¢§)?¢(¡,©){¥ ¢É(¡,©)+£à(¡)+£ß(¡)}:¢(¡,©){¥ ¢É(¡,©)};¢ £à(¡){¥ ¡.¢¼-¡.Í};¢ £ß(¡){¥ ¢É(¡,¡.«.¥Í)+¢É(¡,¡.«.¥Ì)};¢ ¤Â(¡){¥((¡.«.¢ï==§Ý)?0:¢ä(¡,¡.«.¢ï))+((¡.«.¤Å==§Ý)?0:¢ä(¡,¡.«.¤Å))};¢ Ú(¡){Ú[Ú.Ë++]=¡;if(¡.«.¤Ä==§Ý)¡.¦.¤Ä=0;ì(¡);¢Ê(¡);£ª(¡)};Ú.Ë=0;à.ï(§Þ+£«,Ú);Ü(¢ó(Ú).¬(¦Òg,§ß));ý.Ë=0;à.ï(§à+£«,ý);¢ £ª(¡){£ £¬=¡.£É();£ °=£¬.×-£¬.À;if(¡.«.ý&&°>=¢Ë(¡,¡.«.ý))¡.¦.°=¢Ë(¡,¡.«.ý);Û if(¡.«.Ú&&°<=¢Ë(¡,¡.«.Ú))¡.¦.°=¢Ë(¡,¡.«.Ú);Û ¡.¦.°=¡.¦.ä};¢ ¢²(¡){if((¡.«.³==§á||¡.«.³==§Ú)&&¡.«.À!=§Ý&&¡.«.×!=§Ý&&¤Ã.µ(¡.«.°)){¢²[¢².Ë++]=¡;¢Ê(¡);£Þ(¡)}};¢².Ë=0;à.ï(§â+£«,¢²);¢ £Þ(¡){¡.¦.°=¦ô;£ ½=ã(¡);£ À=(¡.¦.¢Ô)?¡.£É().À-2:¢ä(¡,¡.«.À);£ °=½.Í-¢ä(¡,¡.«.×)-À-¤Â(¡);if(!¢§)°-=£à(¡)+£ß(¡);if(°<0)°=0;if(ö(¡)||¤Á||¡.¢¼<°){¡.¦.ä=°;¡.¦.°=°}};£ Í=ù.Í;Ó(¢¡,§ã,¢(){£ i,¢å=(Í<ù.Í);Í=ù.Í;®(i=0;i<Ú.Ë;i++){£ ¡=Ú[i];£ ä=(¡.¦.°==¡.«.Ú);if(¢å&&ä)¡.¦.°=¦ô;if(¢å==ä)£ª(¡)}®(i=0;i<ý.Ë;i++){£ ¡=ý[i];£ ä=(¡.¦.°==¡.«.ý);if(!¢å&&ä)¡.¦.°=¦ô;if(¢å!=ä)£ª(¡)}®(i=0;i<¢².Ë;i++)£Þ(¢²[i]);¤À()});¢ ¢É(¡,©){if(£Ý.µ(©))¥ ø(©);if(¢Ö.µ(©))¥ ø(£Æ(©)/100*ã(¡).Í);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);¹.Ì.°=©;¥ ¹.¢¼};¢ ¢ä(¡,©){if(ø(©)>0)¥ ¢É(¡,©);if(£Ý.µ(©))¥ ø(©);¡.½.¢»(¹);¹.Ì.À=©;¥ ¹.¢¤}};Ü(¢ó(ì).¬(¦Óg,§ä).¬(¦Ôg,§å).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦×g,§è).¬(¦Øg,§é));ì();¥É(Ö)});ª.¢©(§ê,¢(){£ ¤§=¦Ùg,¤½=¦Úi;ª.¢á=[];ª.¤¿=¶ ¤¾;ª.·=·;ª.Ò=Ò;ª.Ã=Ã;ª.¢â=¢(){¥Ç(¤.¤¿)¤.¨=£§(¢â(£©(¤.¨)));®(£ i=0;i<ª.¢á.¯;i++)ª.¢á[i].¢ß();®(i=0;i<£¡.¯;i++)£¡[i].¤º()};¢ã=¢(¿,Á){¥ ê(¿.¾,Á)};£ ££=[];¢ ¤¾(){¤.¢â=¢(¨){·.û=¶ ç(§ë+¢®+§ì,§í);·.¤¨=¶ ç(§î+¢®+§­+¢­+§ï,§í);Ò.û=¶ ç(§ð+¢­+§ñ,§í);¥ ¨.¬(Ã.û,Ã.ID).¬(Ò.û,Ò.ID).¬(·.û,·.ID)};¤.£©=¢(¨){ñ.û=¶ ç(§ò+¢¬+§ó+¢¬+§ô,§í);¥ ¨.¬(ñ.û,ñ.ID).¬(¦Ûg,¢($){¥ §õ+(¸(££,$)-1)+§ö}).¬(¦Üg,§¸).¬(¦Ýg,¢(§,À,×){¥ À.£¨(§ª).¢Ü(×)+×})};¤.£§=¢(¨){¥ ¨.¬(¦Þg,¢($,$1){¥ ££[$1]})}};¢ _·(){¤.È=¢(){¥ §µ+¤.¢Ç};¤.æ=¢(¡){¡.¢Ý+=§²+¤.¢Ç};¤.¤©=¢(¡){¡.¢Ý=¡.¢Ý.¬(¤.¢¾,¦ô)};¤.¢ß=¢(){£ §=ü(¤.´);®(£ i=0;i<§.¯;i++)¤.æ(§[i])}};¢ ·(´,¨){¤.id=ª.¢á.¯;¤.¢Ç=·.¢ø+¤.id;¤.´=´;¤.¢¾=¶ ç(§÷+¤.¢Ç+§ø,§í);¸(ª.¢á,¤)};·.£Ú=_·;·.¢ª=¶ _·;·.¢ø=§ù;·.ID=¢(§){¥ £Õ(§)+¶ ·(§)};¢ _Ò(){¤.¢ß=¢(){£ §=ü(¤.¢°);®(£ i=0;i<§.¯;i++){£ º=(¤.º)?ü(¤.º,§[i]):[§[i]];if(º)¤.¢¯(§[i],º,¤)}}};_Ò.¢ª=¶ _·;¢ Ò(´,¢°,¢¯,º){¤.¢°=¢°;¤.¢¯=¢­[¢¯];¤.º=º;¤.£¢=·;¤.£¢(´)};Ò.£Ú=_Ò;Ò.¢ª=¶ _Ò;Ò.ID=¢(§,¢°,¢¯,º){if(¢±&&¢¯!=§ú&&¤½.µ(¢°)&&!¦ß.µ(º))¥ §;¥ £Õ(§)+¶ Ò(§,¢°,¢¯,º)};£¦+=§û;£ ¤·=¦àg;¢ ¤¶(§,£Ü){¥ Ü(§ü+§ý.Æ(£Ü.¯)+£Ü+§½)};£ £¡=[];¢ _Ã(){¤.Å=¢Þ;¤.È=¢(){¥ ¦ô};¤.¥Ã=0;¢ ¤¸(¢Ä,Å,¨){£ ÿ=¥Â(¢(){¢Æ{if(!¢Ä.ê)¥;¢Ä.ê(¢Ä,Å,¨);¤»(ÿ)}¢·(£¥){¤»(ÿ)}},10)};¤.¤º=¢(){if(¤.Å==¢Þ)¥;®(£ i=0;i<¤.§.¯;i++){£ º=¤.§[i];£ ¢Å=º.¦[¤.³];if(¢Å){£ ½=º.£Ì?º:º.½;£ £¤=¦á.µ(¤.Å);£ ¡=².£Û(£¤?Ã.¤³:§Â);¡.¢ÿ=Ö;¡.¦.¨=¢Å.¨;if(!£¤)¡.¥Á=¢Å.Å;if(¤.³==§þ){½.¥À(¡,½.¤¹)}Û{½.¢»(¡)}if(£¤)¤¸(¡,¢Å.Å,¢Å.¨);º.¦[¤.³]=¢Þ}}};¤.¢ß=¢(){¤.§=ü(¤.´);®(£ i=0;i<¤.§.¯;i++){£ ¦=¤.§[i].¦;if(!¦[¤.³])¦[¤.³]={¨:¦ô};¦[¤.³].¨+=§ÿ+¤.¨;if(¤.Å!=¢Þ)¦[¤.³].Å=¤.Å}}};_Ã.¢ª=¶ _·;¢ Ã(´,³,¨){¤.³=³;¤.¨=££[¨].Æ(1,-1);£ Å=¤.¨.§(Ã.¤´);if(Å)¤.Å=¢ö(Å[1]).¬(¤·,¤¶);¤.£¢=·;¤.£¢(´);¸(£¡,¤)};Ã.£Ú=_Ã;Ã.¢ª=¶ _Ã;Ã.ID=¢(§,´,³,¨){¥ ¶ Ã(´,³,¨)};Ã.û=¦âg;Ã.¤´=¦ã;Ã.¤³=¨¡+¢À(¨¢,Á)+¨£;ò[§Ç]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=­[i].¥º;®(£ j=0;j<ó.¯;j++)if(£Ù(ó[j],±,Ê))¸(¼,ó[j])}};ò[¨¤]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ¢ý=¢þ(­[i]);if(¢ý&&£Ù(¢ý,±,Ê))¸(¼,¢ý)}};ò[¨¥]=¢(¼,­,±){±=¢ú[±];®(£ i=0;i<­.¯;i++)if(±(­[i]))¸(¼,­[i])};¢®[¨¦]=¢(¡){¥!¤²(¡)};¢®[¨§]=¢(¡,É){É=¶ ç(¨¨+É,¨©);Ý(¡&&!¡.£×(¨§))¡=¡.¢ü;¥ ¡&&É.µ(¡.£×(¨§))};¢­.¢Ù=¢(¡){£ Â=í;Ó(¡,¨ª,¢(){ª.Ð.¢Ù.¢Û(Â)});Ó(¡,¨«,¢(){ª.Ð.¢Ù.¢Ú(Â)})};¢­.¢÷=¢(¡){£ Â=í;Ó(¡,¨¬,¢(){ª.Ð.¢÷.¢Û(Â)})};¢­.¢Á=¢(¡){£ Â=í;Ó(¡,¨­,¢(){ª.Ð.¢Á.¢Û(Â)});Ó(¡,¨®,¢(){ª.Ð.¢Á.¢Ú(Â)});if(¡==².¥²){ª.Ð.¢Á.¢Û(Â)}};Ó(²,¨¯,¢(){£ ú=ª.Ð.¢÷;£ Ù=ú.Ù,i;®(i in Ù)ú.¢Ú(Ù[i]);ú=ª.Ð.¢Ù;Ù=ú.Ù;®(i in Ù)if(!Ù[i][0].£õ(£ü.¥°))ú.¢Ú(Ù[i])});£ ¢ú=[];£ ¤«=¦äg;¢ ñ(Ä,¢Â,©){©=¢ö(©);¤.id=¢ú.¯;£ò(Ä.¥¯()){¢¦ ¨°:Ä=¨±;¤­;¢¦ ¨²:Ä=¨³;¤­;£ñ:Ä=¨´+Ä+¨µ}¢Â=¢¬[¢Â];¸(¢ú,¶ ¤¬(¨¶,¨·+¢Â(Ä,©)))};ñ.ID=¢(§,Ä,¢Â,©){¥ ¶ ñ(Ä,¢Â,©)};ñ.¢ª.È=¢(){¥ ñ.¢ø+¤.id};¢¬={È:¢(){£ È=[];®(£ i in ¤)if(i&&i!=¨¸)¸(È,i);¥ È.¢Ü(¦ô).¬(¦åg,¦ô)},¢ù:¢(©){¥ ©.¬(¤«,¨¹)},¦ô:¢(Ä){¥ Ä},¨º:¢(Ä,©){¥ Ä+¨»+¤ª(©)},¨¼:¢(Ä,©){¥ ¨½+¢¬.¢ù(©)+¨¾+Ä+§®},¨¿:¢(Ä,©){¥ ¨À+¢¬.¢ù(©)+¨Á+Ä+§®}};ñ.¢ø=¨¥;¢ _ú(){¤.¢Û=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.æ(º[i]);¤.Ù[·.id+¡.¢«]=Â};¤.¢Ú=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.¤©(º[i]);£Ö ¤.Ù[·.id+¡.¢«]}};ª.Ð=¢(Õ){¤.Õ=Õ;¤.Ù={};ª.Ð[Õ]=¤};ª.Ð.¢ª=¶ _ú;¶ ª.Ð(¨Â);¶ ª.Ð(¨Ã);¶ ª.Ð(§ú);¢ £Õ(´){¥ ´.¬(·.¤¨,¦ô).¬(¤§,§²)}},Ö);ª.¢©(¨Ä,¢(){if(á<5.5)¥;£ £Ô=¨Å;£ £ý=(¦æ.µ(¤¥.¥©))?¢À(¨Æ,Á):¨Ç;£ £Ó=¶ ç((¢¡.¤ý||¨È)+¨É,¨©);¢ £þ(¡,î){¡.¦.±=£Ô.¬(¦ç,î)};£ ¢¾=¦ègi;à.¢¿(¢¾,¢ ¬(§,¢õ,¤¡,Ô,£ÿ){Ô=¢ö(Ô);¥ £Ó.µ(Ô)?¨Ê+£Ô.¬(¦é,¨Ë).¬(¦ç,Ô)+¨Ì+(¢õ||¦ô)+§¸+(¤¡||¦ô)+¨Í+(£ÿ||¦ô):§});if(¢½){¢ £Ò(¡){if(£Ó.µ(¡.î)){£ °=¡.°,÷=¡.÷;£þ(¡,¡.î);¡.î=£ý;¡.°=°;¡.÷=÷}Û ¡.¦.±=¦ô};¢½.æ(¨Î,¢(¡){if(¡.Ï==¨Ï&&¡.Õ!=¨Ð)¥;£Ò(¡);Ó(¡,¨Ñ,¢(){if(£ü.£Ê==¨Ò)£Ò(¡)})})}});ª.¢©(¨Ó,¢(){£ ¢Ö=¦Ì;à.ï(¨Ô,¢¢);à.ï(¨Õ,¢£);£ ß=².ß;£ Þ$=(¢§)?¨Ö:¨×;£ Þ=Ü(Þ$);¢ ¢ñ(){if(ß.«.£Î!=§Ú){if(ß.«.£Í==¨Í){ß.¦.£Í=¨Ø+¢ô.¤÷+§®}ß.¦.£Î=§Ú}¢ñ=¢Ø};£ ¹=£Ï(¨Ù);¢ ¢º(£ú){¥ ¢ó(£ú).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦Óg,§ä).¬(¦êg,¨Ú)};¢ ¢£(¡){if(¡.«.£Î!=§Ú)¥;if(!¡.£õ(ß)){¢ñ();¢£[¢£.Ë++]=¡;£Ë(¡);¤ö(¡);£Â(¡)}};¢£.Ë=0;¢ £Â(¡){¹.î=¡.«.£Í.Æ(5,-2);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);£È(¡);¤õ(¡);½.¢Õ(¹)};¢ £Ë(¡){¡.Ì.¢×=¡.«.¢×;if(!ö(¡)){£ £ô=¨Û+Þ$+¨Ü;¡.¦.£ð(¨Ý,£ô)}};Ü(¢º(£Ë));¢ £È(¡){£ £Ê=ö(¡)?¨Ý:¨Þ;¡.¦[£Ê]=£Ç(¡,¡.Ì.¢×)-¡.£É().À-¡.¤ô};Ü(¢º(£È));¢ ö(¡){if(!¡)¥ ë;if(¡.Ì.³==§Ú||¡.«.³==§Ú)¥ Ö;¥ í.£ó(¡.½)};¢ £Ç(¡,³){£ò(³){¢¦ ¨ß:¢¦ §ç:¥ 0;¢¦ §â:¢¦ §é:¥ Þ.Í-¹.¢¼;¢¦ ¨à:¥(Þ.Í-¹.¢¼)/2;£ñ:if(¢Ö.µ(³)){¥ ø((Þ.Í-¹.¢¼)*£Æ(³)/100)}¹.Ì.À=³;¥ ¹.¢¤}};Ü(¢º(£Ç));¢ ¢¢(¡){if(¡.«.³!=§Ú)¥;¢ñ();¢¢[¢¢.Ë++]=¡;¡.Ì.³=§Ú;¡.¦.³=§á;£Á(¡)};¢¢.Ë=0;¢ £Á(¡,Ø){£Å(¡,Ø);¤ò(¡,Ø);if(!Ø||¡.¦.¤ñ){if(ø(¡.«.¢î)==0)¡.¦.¤ð++}};¢ £Å(¡,Ø){if(!Ø&&¢Ö.µ(¡.«.°))¡.¦.ì=¡.«.°;if(¡.¦.ì)¡.¦.°=ø(£Æ(¡.¦.ì)/100*Þ.Í);if(Ø){if(!¡.¦.£Ä)¥}Û{¡.¦.£Ä=¡.«.×!=§Ý&&¡.«.À==§Ý}¡.¦.À=¦ô;¡.¦.¢Ô=¢¹(¡);if(¡.«.¢ï!=§Ý){¡.½.¢»(¹);¹.Ì.À=¡.«.¢ï;¡.¦.¢Ô-=¹.¢¤;¡.½.¢Õ(¹)}if(ö(¡.¢¥))¡.¦.£ï=¡.¦.¢Ô;Û if(!Ø)¡.¦.£ð(¨á,¨â+Þ$+¨ã)};Ü(¢º(£Å).¬(¦Øg,§é).¬(¦Ôg,§å));¢ ¢¹(¡){£ ¢¹=¡.¢¤,£Ã=ë;£ Ç=ö(¡.¢¥)&&¡.¦.£Ä;Ý(¡=¡.¢¥){if(!Ç&&¡.«.³!=¨ä)£Ã=Ö;¢¹+=¡.¢¤*(£Ã?-1:1)}¥ ¢¹};Ü(¢º(¢¹));¢ £ì(){®(£ i=0;i<¢£.Ë;i++)£Â(¢£[i]);®(i=0;i<¢¢.Ë;i++)£Á(¢¢[i],Ö);ÿ=0};£ ÿ;Ó(¢¡,§ã,¢(){if(!ÿ)ÿ=¢Ó(£ì,10)})});¢í=Ö;if(².£À==¦ú)_ê();Û Ó(²,¨å,¢(){if(!¢¸&&².£À==¦ú)¢Ó(_ê,0)})}¢·(¢ë){¢ì();¢¶(¨æ+¢ë.£ë)}£¾{}}();',493,0,/./,String,95,'element`function`var`this`return`runtimeStyle`match`cssText`value`IE7`currentStyle`replace`from`for`length`width`filter`document`position`selector`test`new`Class`push`ie7_tmp`target`x5cs`filtered`parentElement`href`styleSheet`left`path`instance`PseudoElement`attribute`content`slice`fixed`toString`filterArgs`scopeName`count`style`clientWidth`ie7`tagName`Event`x5c`DynamicStyle`addEventHandler`url`type`true`right`recalc`instances`minWidth`else`eval`while`viewport`body`CSSFixes`appVersion`link`layoutParent`fixedWidth`auto`add`RegExp`fixes`styleSheets`load`false`fixWidth`arguments`src`addRecalc`input`AttributeSelector`selectors`subset`recalcs`nextSibling`isFixed`height`parseInt`documentElement`ie7Event`ALL`cssQuery`maxWidth`handler`timer`window`positionFixed`backgroundFixed`offsetLeft`offsetParent`case`quirksMode`x5cw`addModule`prototype`uniqueID`attributeTests`dynamicPseudoClasses`pseudoClasses`dynamicPseudoClass`attach`isHTML`fixRight`token`SIZES`pattern`alert`catch`complete`getScreenLeft`topFunction`appendChild`offsetWidth`HTMLFixes`MATCH`addFix`makePath`focus`compare`x5cd`object`pseudoElement`try`name`visited`getPixelWidth`boxSizing`getFixedWidth`all`elements`isElement`pseudoClass`cacheSelector`modules`script`setTimeout`screenLeft`removeChild`PERCENT`backgroundPositionX`DUMMY`hover`unregister`register`join`className`null`exec`display`classes`parse`getCSSText`getPixelLeft`wider`max`disabled`cssCache`node`Boolean`error`unHide`loaded`bottom`marginLeft`absolute`fixBackground`top`String`location`image`getString`active`PREFIX`escape`attributeSelectors`x2f`parentNode`adjacent`nextElement`ie7_anon`pseudoElements`inherit`encoded`isURL`ignore`HEADER`decode`split`encode`resizeWidth`NUMERIC`rect`min`hasLayout`outerHTML`apply`fixedElement`QUOTED`handlers`pop`strings`string`item`small`getPath`styles`pathname`array`httpRequest`finally`Error`readyState`foregroundPosition`backgroundPosition`nested`autoLeft`positionLeft`parseFloat`getOffsetLeft`setOffsetLeft`getBoundingClientRect`propertyName`backgroundLeft`canHaveChildren`backgroundImage`backgroundAttachment`tmpElement`none`background`fixImg`pngTest`FILTER`simpleSelector`delete`getAttribute`lang`compareTagName`ancestor`createElement`code`PIXEL`resizeRight`getPaddingWidth`getBorderWidth`box`submit`clicked`fix`select`useCache`base`large`inlineStyles`LINKS`description`resize`onresize`scrollLeft`pixelLeft`setExpression`default`switch`callee`expression`contains`Height`Width`Top`Left`leftFunction`img`event`NULL`addFilter`suffix`prefix`scale`png`define`navigator`Microsoft`CHILD`COMPLEX`remove`quote`ESCAPE`Function`break`ie7_`x5cb`class`ms_`previousElement`OBJECT`CONTENT`before`unicode`HEX`addTimer`firstChild`create`clearInterval`inline`ANCHOR`Parser`parser`removeTempElement`HEIGHT`getMarginWidth`AUTO`minHeight`marginRight`UNIT`toUpperCase`charAt`BUTTON`UNSUCCESSFUL`button`abbr`htmlFor`HTML`endTag`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`autoload`mimeType`search`message`onreadystatechange`static`screenTop`autoTop`positionTop`center`clientLeft`setOffsetTop`backgroundTop`protocol`onpropertychange`INPUT`zoom`crop`trans`IE7_PNG_SUFFIX`x00`x_bits`char`x5cnstatic`x_height`x5cn`x_width`javascript`gif`blank`userAgent`bSV1`sizingMethod`AlphaImageLoader`DXImageTransform`progid`toLowerCase`srcElement`onmouseup`activeElement`onblur`onfocus`onmousedown`onmouseout`onmouseover`child`first`children`scriptlet`text`htm`data`after`insertBefore`innerText`setInterval`specificity`x5cu`align`vertical`with`css2`fixHeight`Bottom`Right`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`previousSibling`nodeType`clip`border`padding`unquote`contentEditable`onbeforeunload`detachEvent`import`namespace`concat`Array`constructor`size`font`medium`list`float`relative`sizing`lastIndex`successfully`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`ActiveXObject`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ie7_off`MSIE`ie7_debug`alpha`version`visible`visibility`fromCharCode`¦®`¦­ (\\d\\.\\d)`¦¬`^¤±`\\.¦§$`^[\\w\\.]+[^:]*$`(Ô\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¥ö\\b|\\¥õ\\b|^$`Î-â`(¥ï\\s*:\\s*(À|×))`¢à\\s*:\\s*¥î-£·`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢û\\*[^\\*]*\\*+([^\\¢û][^\\*]*\\*+)*\\¢û)|(\x27[^\x27]*\x27)|("[^"]*")`@(¥ç|¥æ)[^;\\n]+[;\\n]|`\\Ñ:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ©="([^"]*)"`^(£â|¥Ñ|¤Ë)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(£­|¢æ)-(°|÷)\\s*:\\s*\\d`\\b(£­|¢æ)-°\\s*:\\s*\\d`^å|0cm$`^å$`£­`£÷`°`£ù`À`¥Ë`×`>`(\\ba(\\.[\\w-]+)?)$`\\{[^\\}]*\\}`::`([^\\}\\s]*\\,[^\\{]*)(\\{\\d+\\})`\\{(\\d+)\\}`[+>~]`\\Ñ([a-fA-F\\d]+)`^Ô\\(.*\\)$`([^}]*):(¤µ|¥¿)[^{]*\\{([^}]*)\\}`Å\\s*:\\s*([^;]*)(;|$)`([\\¢û()[\\]?{}|*+])`=`\\¥ª\\b`%1`£Ñ(-¢õ)?\\s*:([^(};]*)Ô\\(([^\\)]+)\\)([^;}]*)`¤¢`X`¦±`ª ¦° 0.7.3 (¦¯)`\\n\\n`¦ª`¦¨`¦¦ ¦¥`:â{Î-â:â}:¢È{Î-â:¢È}`*{¦¤:0}`¢Ò=``/`¤¦.¦¢`¥ÿ`£¿ [1]: ¥ü ¥û ê ¥ú `Î-¥ù.js`¢¸`<Ì>`$1`$2`Ì`¢í ¥ó`£¿ [2]: `([^{}]*)\\Ñ{([^}]*[^\\¢¨-])?`gi`£á-¥ñ\\»*:\\»*Å-£á`³\\»*:\\»*¢ð`¥ð`¢à:¤¼;$1`¢à:¤Ò`xx-£¸,x-£¸,£¸,¥í,£è,x-£è,xx-£è`,`xx-£¸`(¥ì(-¥ë)?\\»*:\\»*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\»)`(\\»|$)`:`â`¢È`\\Ñ([^)]*\\Ñ)`Î-â`\x27`\\Ñ:`¥ä`¢Ä`³:¢ð;¥á:0;¢à:¤Ò;¥à:£Ð;¥ß:£¬(0 0 0 0);À:-9999`!`Î-¥Ü`<¤Î:`/>``¤Î`¥Ù://¥Ø.w3.¥×/1999/¥Ö`¥Õ`ð,£å,¥Ô`¤Ì` ¤Ì`¤Ë,ð`¤É`£â`¥Ó`².¢Ì.`.¦.£ã=ë`¥Ò`¥Ð`.¢ç=ë`.©=\x27`Î-£á-¥Ï`\\»*:\\»*\\¢Ã[\\¢¨%]*`Ç`HR`°\\»*:\\»*\\¢Ã\\¢¨*[^%]`å`£­-°`¢æ`¢æ-°`¢ð`×`£í`£ö`÷`£ø`¢ò`¥Ê`¢î`Î-¥È`[^},\\»]*([>+~][^:@,\\»{]+|:(`)|\\Ñ.[\\¢¨-]+\\Ñ.[\\¢¨-.]+|@[@\\¢Ã]+)`g`[^\\»(]+[+~]|@\\¢Ã+|:(â|¢È|`)|\\Ñ.[\\¢¨-.]+`([^}]*):(`)([^{]*)`\\Ñ[([^`=\\Ñ]]+)([`]?=?)([^\\Ñ]]+)?\\Ñ]`{`}`\\»`\\¤¯`¤®`¢Á`.¢ÿ{¥Æ-¥Å:¢ò;¢à:¤¼}`\x27\\¥Ä`0000`¤µ`;`<¢Ä ¤°=¢ÿ ¥¾=\x27`Î-Å.¥½`\x27 °=100% ÷=0 Õ=¥¼/x-¥»>`+`@`¥¹-¥¸`£Ø`^`i`¥·`¥¶`¥µ`¥´`¥³`¥±`id`¡.id.¬(/¤±\\¢Ã+/g,\x27\x27)`¤°`¡.¢Ý.¬(/\\¤¯\\»*¤®\\¢Ã+/g,\x27\x27)`¡.£×(\x27`\x27)`¡`¥ `¢ù`\\Ñ$1`=`==`~=`/(^|\\»)`(\\»|$)/.µ(`|=`/^`(-|$)/.µ(`¢Ù`¢÷`Î-¤£`¥®:¥­.¤¦.¥¬(î=%1,¥«=\x27¤¢\x27)`¥¨.¥§`¥¦:\x27#¤¤ ¥¥ 1\\¥¤#¤¤ ¥£ 1\\¥¢ ¥¡ ¤ÿ[]={0¤þ}\x27`-¤ü.¤£`$`±:`¤û`;¤ú:1;£Ñ`£Ð`£û,ð`¤ù`¢õ`¤ø`î`Î-Ç`³\\»*:\\»*Ç`£Ñ[\\¢¨\\»-]*:[^};]*Ç`ß`ù`Ô(`£û`Y`(ø(¦.¢¤)+².`.£î)||0`¢×`¢¤`À`¤ó`£ï`¦.¢Ô+².`.£î`¤ï`¤î`£¿ [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-standard.js b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-standard.js new file mode 100644 index 0000000..2109905 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/ie7/ie7-standard.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i=0){ + var optar=opt.split(" "); + for(i=0;i=0) ecolor=optar[i]; + if(ecolor=="") ecolor="#666"; + cn+="e"; + edges=true; + } +else if(opt && opt.indexOf("smooth")>=0){ + cn+="a"; + ecolor=Mix(bk,color); + } +if(opt && opt.indexOf("small")>=0) cn+="s"; +prefixt=cn; +prefixb=cn; +if(wich.indexOf("all")>=0){t=true;b=true;} +else if(wich.indexOf("top")>=0) t="true"; +else if(wich.indexOf("tl")>=0){ + t="true"; + if(wich.indexOf("tr")<0) prefixt+="l"; + } +else if(wich.indexOf("tr")>=0){ + t="true"; + prefixt+="r"; + } +if(wich.indexOf("bottom")>=0) b=true; +else if(wich.indexOf("bl")>=0){ + b="true"; + if(wich.indexOf("br")<0) prefixb+="l"; + } +else if(wich.indexOf("br")>=0){ + b="true"; + prefixb+="r"; + } +var v=getElementsBySelector(selector); +var l=v.length; +for(i=0;i=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=1;i<=lim;i++){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingTop=0; +el.insertBefore(d,el.firstChild); +} + +function AddBottom(el,bk,color,bc,cn){ +var i,lim=4,d=CreateEl("b"); + +if(cn.indexOf("s")>=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=lim;i>0;i--){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingBottom=0; +el.appendChild(d); +} + +function CreateEl(x){ +if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x)); +else return(document.createElement(x)); +} + +function getElementsBySelector(selector){ +var i,selid="",selclass="",tag=selector,f,s=[],objlist=[]; + +if(selector.indexOf(" ")>0){ //descendant selector like "tag#id tag" + s=selector.split(" "); + var fs=s[0].split("#"); + if(fs.length==1) return(objlist); + f=document.getElementById(fs[1]); + if(f) return(f.getElementsByTagName(s[1])); + return(objlist); + } +if(selector.indexOf("#")>0){ //id selector like "tag#id" + s=selector.split("#"); + tag=s[0]; + selid=s[1]; + } +if(selid!=""){ + f=document.getElementById(selid); + if(f) objlist.push(f); + return(objlist); + } +if(selector.indexOf(".")>0){ //class selector like "tag.class" + s=selector.split("."); + tag=s[0]; + selclass=s[1]; + } +var v=document.getElementsByTagName(tag); // tag selector like "tag" +if(selclass=="") + return(v); +for(i=0;i=0){ + objlist.push(v[i]); + } + } +return(objlist); +} + +function Mix(c1,c2){ +var i,step1,step2,x,y,r=new Array(3); +if(c1.length==4)step1=1; +else step1=2; +if(c2.length==4) step2=1; +else step2=2; +for(i=0;i<3;i++){ + x=parseInt(c1.substr(1+step1*i,step1),16); + if(step1==1) x=16*x+x; + y=parseInt(c2.substr(1+step2*i,step2),16); + if(step2==1) y=16*y+y; + r[i]=Math.floor((x*50+y*50)/100); + } +return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16)); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/nervecenter/javascript/transmenu-body.php b/src/usr/local/www/themes/nervecenter/javascript/transmenu-body.php new file mode 100644 index 0000000..eea9235 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/transmenu-body.php @@ -0,0 +1,51 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +function nervecenterTransmenuGetBodyJS() { + global $rootmenu; + + if (isset($rootmenu)) { + return $rootmenu->getMenuJScript(); + } else if (empty($rootmenu)) { + return "alert('No rootmenu object found.');"; + } else { + return "alert('No JavaScript attached to rootmenu object.');"; + } +} + +?> diff --git a/src/usr/local/www/themes/nervecenter/javascript/transmenu-head.php b/src/usr/local/www/themes/nervecenter/javascript/transmenu-head.php new file mode 100644 index 0000000..66e1952 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/transmenu-head.php @@ -0,0 +1,85 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +function nervecenterTransmenuGetHeadJS() { + global $g, $rootmenu; + + $transmenu_stub =<<getChildren() as $component) { + $id = "mnua_" . str_replace(" ", "", strtolower($component->getID())); + + $childJScript .=<< diff --git a/src/usr/local/www/themes/nervecenter/javascript/transmenu.org b/src/usr/local/www/themes/nervecenter/javascript/transmenu.org new file mode 100644 index 0000000..6c9e353 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/transmenu.org @@ -0,0 +1,785 @@ +/* ================================================================================================= + * TransMenu + * March, 2003 + * + * Customizable multi-level animated DHTML menus with transparency. + * + * Copyright 2003-2004, Aaron Boodman (www.youngpup.net) + * ================================================================================================= + * "Can I use this?" + * + * Use of this library is governed by the Creative Commons Attribution 2.0 License. You can check it + * out at: http://creativecommons.org/licenses/by/2.0/ + * + * Basically: You may copy, distribute, and eat this code as you wish. But you must give me credit + * for writing it. You may not misrepresent yourself as the author of this code. + * ================================================================================================= + * "It's kinda hard to read, though" + * + * The uncompressed, commented version of this script can be found at: + * http://youngpup.net/projects/transMenus + * ================================================================================================= + * updates: + * 04.19.04 fixed cascade problem with menus nested greater than two levels. + * 12.23.03 added hideCurrent for menu actuators with no menus. renamed to TransMenu. + * 04.18.03 fixed render bug in IE 5.0 Mac by removing that browser from compatibility table ;) + * also made gecko check a little more strict by specifying build no. + * ============================================================================================== */ + + + +//================================================================================================== +// Configuration properties +//================================================================================================== +TransMenu.spacerGif = "themes/nervecenter/javascript/img/x.gif"; // path to a transparent spacer gif +TransMenu.dingbatOn = "themes/nervecenter/javascript/img/submenu-on.gif"; // path to the active sub menu dingbat +TransMenu.dingbatOff = "themes/nervecenter/javascript/img/submenu-off.gif"; // path to the inactive sub menu dingbat +TransMenu.dingbatSize = 14; // size of the dingbat (square shape assumed) +TransMenu.menuPadding = 5; // padding between menu border and items grid +TransMenu.itemPadding = 3; // additional padding around each item +TransMenu.shadowSize = 2; // size of shadow under menu +TransMenu.shadowOffset = 3; // distance shadow should be offset from leading edge +TransMenu.shadowColor = "#FF0000"; // color of shadow (transparency is set in CSS) +TransMenu.shadowPng = "themes/nervecenter/javascript/img/grey-40.png"; // a PNG graphic to serve as the shadow for mac IE5 +TransMenu.backgroundColor = "#990000"; // color of the background (transparency set in CSS) +TransMenu.backgroundPng = "themes/nervecenter/javascript/img/white-90.png"; // a PNG graphic to server as the background for mac IE5 +TransMenu.hideDelay = 1000; // number of milliseconds to wait before hiding a menu +TransMenu.slideTime = 400; // number of milliseconds it takes to open and close a menu + + +//================================================================================================== +// Internal use properties +//================================================================================================== +TransMenu.reference = {topLeft:1,topRight:2,bottomLeft:3,bottomRight:4}; +TransMenu.direction = {down:1,right:2}; +TransMenu.registry = []; +TransMenu._maxZ = 100; + + + +//================================================================================================== +// Static methods +//================================================================================================== +// supporting win ie5+, mac ie5.1+ and gecko >= mozilla 1.0 +TransMenu.isSupported = function() { + var ua = navigator.userAgent.toLowerCase(); + var pf = navigator.platform.toLowerCase(); + var an = navigator.appName; + var r = false; + + if (ua.indexOf("gecko") > -1 && navigator.productSub >= 20020605) r = true; // gecko >= moz 1.0 + else if (an == "Microsoft Internet Explorer") { + if (document.getElementById) { // ie5.1+ mac,win + if (pf.indexOf("mac") == 0) { + r = /msie (\d(.\d*)?)/.test(ua) && Number(RegExp.$1) >= 5.1; + } + else r = true; + } + } + + return r; +} + +// call this in onload once menus have been created +TransMenu.initialize = function() { + for (var i = 0, menu = null; menu = this.registry[i]; i++) { + menu.initialize(); + } +} + +// call this in document body to write out menu html +TransMenu.renderAll = function() { + var aMenuHtml = []; + for (var i = 0, menu = null; menu = this.registry[i]; i++) { + aMenuHtml[i] = menu.toString(); + } + document.write(aMenuHtml.join("")); +} + +//================================================================================================== +// TransMenu constructor (only called internally) +//================================================================================================== +// oActuator : The thing that causes the menu to be shown when it is mousedover. Either a +// reference to an HTML element, or a TransMenuItem from an existing menu. +// iDirection : The direction to slide out. One of TransMenu.direction. +// iLeft : Left pixel offset of menu from actuator +// iTop : Top pixel offset of menu from actuator +// iReferencePoint : Corner of actuator to measure from. One of TransMenu.referencePoint. +// parentMenuSet : Menuset this menu will be added to. +//================================================================================================== +function TransMenu(oActuator, iDirection, iLeft, iTop, iReferencePoint, parentMenuSet) { + // public methods + this.addItem = addItem; + this.addMenu = addMenu; + this.toString = toString; + this.initialize = initialize; + this.isOpen = false; + this.show = show; + this.hide = hide; + this.items = []; + + // events + this.onactivate = new Function(); // when the menu starts to slide open + this.ondeactivate = new Function(); // when the menu finishes sliding closed + this.onmouseover = new Function(); // when the menu has been moused over + this.onqueue = new Function(); // hack .. when the menu sets a timer to be closed a little while in the future + this.ondequeue = new Function(); + + // initialization + this.index = TransMenu.registry.length; + TransMenu.registry[this.index] = this; + + var id = "TransMenu" + this.index; + var contentHeight = null; + var contentWidth = null; + var childMenuSet = null; + var animating = false; + var childMenus = []; + var slideAccel = -1; + var elmCache = null; + var ready = false; + var _this = this; + var a = null; + + var pos = iDirection == TransMenu.direction.down ? "top" : "left"; + var dim = null; + + // private and public method implimentations + function addItem(sText, sUrl) { + var item = new TransMenuItem(sText, sUrl, this); + item._index = this.items.length; + this.items[item._index] = item; + } + + function addMenu(oMenuItem) { + if (!oMenuItem.parentMenu == this) throw new Error("Cannot add a menu here"); + + if (childMenuSet == null) childMenuSet = new TransMenuSet(TransMenu.direction.right, -5, 2, TransMenu.reference.topRight); + + var m = childMenuSet.addMenu(oMenuItem); + + childMenus[oMenuItem._index] = m; + m.onmouseover = child_mouseover; + m.ondeactivate = child_deactivate; + m.onqueue = child_queue; + m.ondequeue = child_dequeue; + + return m; + } + + function initialize() { + initCache(); + initEvents(); + initSize(); + ready = true; + } + + function show() { + //dbg_dump("show"); + if (ready) { + _this.isOpen = true; + animating = true; + setContainerPos(); + elmCache["clip"].style.visibility = "visible"; + elmCache["clip"].style.zIndex = TransMenu._maxZ++; + //dbg_dump("maxZ: " + TransMenu._maxZ); + slideStart(); + _this.onactivate(); + } + } + + function hide() { + if (ready) { + _this.isOpen = false; + animating = true; + + for (var i = 0, item = null; item = elmCache.item[i]; i++) + dehighlight(item); + + if (childMenuSet) childMenuSet.hide(); + + slideStart(); + _this.ondeactivate(); + } + } + + function setContainerPos() { + var sub = oActuator.constructor == TransMenuItem; + var act = sub ? oActuator.parentMenu.elmCache["item"][oActuator._index] : oActuator; + var el = act; + + var x = 0; + var y = 0; + + + var minX = 0; + var maxX = (window.innerWidth ? window.innerWidth : document.body.clientWidth) - parseInt(elmCache["clip"].style.width); + var minY = 0; + var maxY = (window.innerHeight ? window.innerHeight : document.body.clientHeight) - parseInt(elmCache["clip"].style.height); + + // add up all offsets... subtract any scroll offset + while (sub ? el.parentNode.className.indexOf("transMenu") == -1 : el.offsetParent) { + x += el.offsetLeft; + y += el.offsetTop; + + if (el.scrollLeft) x -= el.scrollLeft; + if (el.scrollTop) y -= el.scrollTop; + + el = el.offsetParent; + } + + if (oActuator.constructor == TransMenuItem) { + x += parseInt(el.parentNode.style.left); + y += parseInt(el.parentNode.style.top); + } + + switch (iReferencePoint) { + case TransMenu.reference.topLeft: + break; + case TransMenu.reference.topRight: + x += act.offsetWidth; + break; + case TransMenu.reference.bottomLeft: + y += act.offsetHeight; + break; + case TransMenu.reference.bottomRight: + x += act.offsetWidth; + y += act.offsetHeight; + break; + } + + x += iLeft; + y += iTop; + + x = Math.max(Math.min(x, maxX), minX); + y = Math.max(Math.min(y, maxY), minY); + + elmCache["clip"].style.left = x + "px"; + elmCache["clip"].style.top = y + "px"; + } + + function slideStart() { + var x0 = parseInt(elmCache["content"].style[pos]); + var x1 = _this.isOpen ? 0 : -dim; + + if (a != null) a.stop(); + a = new Accelimation(x0, x1, TransMenu.slideTime, slideAccel); + + a.onframe = slideFrame; + a.onend = slideEnd; + + a.start(); + } + + function slideFrame(x) { + elmCache["content"].style[pos] = x + "px"; + } + + function slideEnd() { + if (!_this.isOpen) elmCache["clip"].style.visibility = "hidden"; + animating = false; + } + + function initSize() { + // everything is based off the size of the items table... + var ow = elmCache["items"].offsetWidth; + var oh = elmCache["items"].offsetHeight; + var ua = navigator.userAgent.toLowerCase(); + + // clipping container should be ow/oh + the size of the shadow + elmCache["clip"].style.width = ow + TransMenu.shadowSize + 2 + "px"; + elmCache["clip"].style.height = oh + TransMenu.shadowSize + 2 + "px"; + + // same with content... + elmCache["content"].style.width = ow + TransMenu.shadowSize + "px"; + elmCache["content"].style.height = oh + TransMenu.shadowSize + "px"; + + contentHeight = oh + TransMenu.shadowSize; + contentWidth = ow + TransMenu.shadowSize; + + dim = iDirection == TransMenu.direction.down ? contentHeight : contentWidth; + + // set initially closed + elmCache["content"].style[pos] = -dim - TransMenu.shadowSize + "px"; + elmCache["clip"].style.visibility = "hidden"; + + // if *not* mac/ie 5 + if (ua.indexOf("mac") == -1 || ua.indexOf("gecko") > -1) { + // set background div to offset size + elmCache["background"].style.width = ow + "px"; + elmCache["background"].style.height = oh + "px"; + elmCache["background"].style.backgroundColor = TransMenu.backgroundColor; + + // shadow left starts at offset left and is offsetHeight pixels high + elmCache["shadowRight"].style.left = ow + "px"; + elmCache["shadowRight"].style.height = oh - (TransMenu.shadowOffset - TransMenu.shadowSize) + "px"; + elmCache["shadowRight"].style.backgroundColor = TransMenu.shadowColor; + + // shadow bottom starts at offset height and is offsetWidth - shadowOffset + // pixels wide (we don't want the bottom and right shadows to overlap or we + // get an extra bright bottom-right corner) + elmCache["shadowBottom"].style.top = oh + "px"; + elmCache["shadowBottom"].style.width = ow - TransMenu.shadowOffset + "px"; + elmCache["shadowBottom"].style.backgroundColor = TransMenu.shadowColor; + } + // mac ie is a little different because we use a PNG for the transparency + else { + // set background div to offset size + elmCache["background"].firstChild.src = TransMenu.backgroundPng; + elmCache["background"].firstChild.width = ow; + elmCache["background"].firstChild.height = oh; + + // shadow left starts at offset left and is offsetHeight pixels high + elmCache["shadowRight"].firstChild.src = TransMenu.shadowPng; + elmCache["shadowRight"].style.left = ow + "px"; + elmCache["shadowRight"].firstChild.width = TransMenu.shadowSize; + elmCache["shadowRight"].firstChild.height = oh - (TransMenu.shadowOffset - TransMenu.shadowSize); + + // shadow bottom starts at offset height and is offsetWidth - shadowOffset + // pixels wide (we don't want the bottom and right shadows to overlap or we + // get an extra bright bottom-right corner) + elmCache["shadowBottom"].firstChild.src = TransMenu.shadowPng; + elmCache["shadowBottom"].style.top = oh + "px"; + elmCache["shadowBottom"].firstChild.height = TransMenu.shadowSize; + elmCache["shadowBottom"].firstChild.width = ow - TransMenu.shadowOffset; + } + } + + function initCache() { + var menu = document.getElementById(id); + var all = menu.all ? menu.all : menu.getElementsByTagName("*"); // IE/win doesn't support * syntax, but does have the document.all thing + + elmCache = {}; + elmCache["clip"] = menu; + elmCache["item"] = []; + + for (var i = 0, elm = null; elm = all[i]; i++) { + switch (elm.className) { + case "items": + case "content": + case "background": + case "shadowRight": + case "shadowBottom": + elmCache[elm.className] = elm; + break; + case "item": + elm._index = elmCache["item"].length; + elmCache["item"][elm._index] = elm; + break; + } + } + + // hack! + _this.elmCache = elmCache; + } + + function initEvents() { + // hook item mouseover + for (var i = 0, item = null; item = elmCache.item[i]; i++) { + item.onmouseover = item_mouseover; + item.onmouseout = item_mouseout; + item.onclick = item_click; + } + + // hook actuation + if (typeof oActuator.tagName != "undefined") { + oActuator.onmouseover = actuator_mouseover; + oActuator.onmouseout = actuator_mouseout; + } + + // hook menu mouseover + elmCache["content"].onmouseover = content_mouseover; + elmCache["content"].onmouseout = content_mouseout; + } + + function highlight(oRow) { + oRow.className = "item hover"; + if (childMenus[oRow._index]) + oRow.lastChild.firstChild.src = TransMenu.dingbatOn; + } + + function dehighlight(oRow) { + oRow.className = "item"; + if (childMenus[oRow._index]) + oRow.lastChild.firstChild.src = TransMenu.dingbatOff; + } + + function item_mouseover() { + if (!animating) { + highlight(this); + + if (childMenus[this._index]) + childMenuSet.showMenu(childMenus[this._index]); + else if (childMenuSet) childMenuSet.hide(); + } + } + + function item_mouseout() { + if (!animating) { + if (childMenus[this._index]) + childMenuSet.hideMenu(childMenus[this._index]); + else // otherwise child_deactivate will do this + dehighlight(this); + } + } + + function item_click() { + if (!animating) { + if (_this.items[this._index].url) + location.href = _this.items[this._index].url; + } + } + + function actuator_mouseover() { + parentMenuSet.showMenu(_this); + } + + function actuator_mouseout() { + parentMenuSet.hideMenu(_this); + } + + function content_mouseover() { + if (!animating) { + parentMenuSet.showMenu(_this); + _this.onmouseover(); + } + } + + function content_mouseout() { + if (!animating) { + parentMenuSet.hideMenu(_this); + } + } + + function child_mouseover() { + if (!animating) { + parentMenuSet.showMenu(_this); + } + } + + function child_deactivate() { + for (var i = 0; i < childMenus.length; i++) { + if (childMenus[i] == this) { + dehighlight(elmCache["item"][i]); + break; + } + } + } + + function child_queue() { + parentMenuSet.hideMenu(_this); + } + + function child_dequeue() { + parentMenuSet.showMenu(_this); + } + + function toString() { + var aHtml = []; + var sClassName = "transMenu" + (oActuator.constructor != TransMenuItem ? " top" : ""); + + for (var i = 0, item = null; item = this.items[i]; i++) { + aHtml[i] = item.toString(childMenus[i]); + } + + return '
                            ' + + '
                            ' + + '' + + aHtml.join('') + + '
                            ' + + '
                            ' + + '
                            ' + + '
                            ' + + '
                            '; + } +} + + +//================================================================================================== +// TransMenuSet +//================================================================================================== +// iDirection : The direction to slide out. One of TransMenu.direction. +// iLeft : Left pixel offset of menus from actuator +// iTop : Top pixel offset of menus from actuator +// iReferencePoint : Corner of actuator to measure from. One of TransMenu.referencePoint. +//================================================================================================== +TransMenuSet.registry = []; + +function TransMenuSet(iDirection, iLeft, iTop, iReferencePoint) { + // public methods + this.addMenu = addMenu; + this.showMenu = showMenu; + this.hideMenu = hideMenu; + this.hide = hide; + this.hideCurrent = hideCurrent; + + // initialization + var menus = []; + var _this = this; + var current = null; + + this.index = TransMenuSet.registry.length; + TransMenuSet.registry[this.index] = this; + + // method implimentations... + function addMenu(oActuator) { + var m = new TransMenu(oActuator, iDirection, iLeft, iTop, iReferencePoint, this); + menus[menus.length] = m; + return m; + } + + function showMenu(oMenu) { + if (oMenu != current) { + // close currently open menu + if (current != null) hide(current); + + // set current menu to this one + current = oMenu; + + // if this menu is closed, open it + oMenu.show(); + } + else { + // hide pending calls to close this menu + cancelHide(oMenu); + } + } + + function hideMenu(oMenu) { + //dbg_dump("hideMenu a " + oMenu.index); + if (current == oMenu && oMenu.isOpen) { + //dbg_dump("hideMenu b " + oMenu.index); + if (!oMenu.hideTimer) scheduleHide(oMenu); + } + } + + function scheduleHide(oMenu) { + //dbg_dump("scheduleHide " + oMenu.index); + oMenu.onqueue(); + oMenu.hideTimer = window.setTimeout("TransMenuSet.registry[" + _this.index + "].hide(TransMenu.registry[" + oMenu.index + "])", TransMenu.hideDelay); + } + + function cancelHide(oMenu) { + //dbg_dump("cancelHide " + oMenu.index); + if (oMenu.hideTimer) { + oMenu.ondequeue(); + window.clearTimeout(oMenu.hideTimer); + oMenu.hideTimer = null; + } + } + + function hide(oMenu) { + if (!oMenu && current) oMenu = current; + + if (oMenu && current == oMenu && oMenu.isOpen) { + hideCurrent(); + } + } + + function hideCurrent() { + if (null != current) { + cancelHide(current); + current.hideTimer = null; + current.hide(); + current = null; + } + } +} + +//================================================================================================== +// TransMenuItem (internal) +// represents an item in a dropdown +//================================================================================================== +// sText : The item display text +// sUrl : URL to load when the item is clicked +// oParent : Menu this item is a part of +//================================================================================================== +function TransMenuItem(sText, sUrl, oParent) { + this.toString = toString; + this.text = sText; + this.url = sUrl; + this.parentMenu = oParent; + + function toString(bDingbat) { + var sDingbat = bDingbat ? TransMenu.dingbatOff : TransMenu.spacerGif; + var iEdgePadding = TransMenu.itemPadding + TransMenu.menuPadding; + var sPaddingLeft = "padding:" + TransMenu.itemPadding + "px; padding-left:" + iEdgePadding + "px;" + var sPaddingRight = "padding:" + TransMenu.itemPadding + "px; padding-right:" + iEdgePadding + "px;" + + return '' + + sText + '' + + ''; + } +} + + + + + + +//===================================================================== +// Accel[erated] [an]imation object +// change a property of an object over time in an accelerated fashion +//===================================================================== +// obj : reference to the object whose property you'd like to animate +// prop : property you would like to change eg: "left" +// to : final value of prop +// time : time the animation should take to run +// zip : optional. specify the zippiness of the acceleration. pick a +// number between -1 and 1 where -1 is full decelerated, 1 is +// full accelerated, and 0 is linear (no acceleration). default +// is 0. +// unit : optional. specify the units for use with prop. default is +// "px". +//===================================================================== +// bezier functions lifted from the lib_animation.js file in the +// 13th Parallel API. www.13thparallel.org +//===================================================================== + +function Accelimation(from, to, time, zip) { + if (typeof zip == "undefined") zip = 0; + if (typeof unit == "undefined") unit = "px"; + + this.x0 = from; + this.x1 = to; + this.dt = time; + this.zip = -zip; + this.unit = unit; + this.timer = null; + this.onend = new Function(); + this.onframe = new Function(); +} + + + +//===================================================================== +// public methods +//===================================================================== + +// after you create an accelimation, you call this to start it-a runnin' +Accelimation.prototype.start = function() { + this.t0 = new Date().getTime(); + this.t1 = this.t0 + this.dt; + var dx = this.x1 - this.x0; + this.c1 = this.x0 + ((1 + this.zip) * dx / 3); + this.c2 = this.x0 + ((2 + this.zip) * dx / 3); + Accelimation._add(this); +} + +// and if you need to stop it early for some reason... +Accelimation.prototype.stop = function() { + Accelimation._remove(this); +} + + + +//===================================================================== +// private methods +//===================================================================== + +// paints one frame. gets called by Accelimation._paintAll. +Accelimation.prototype._paint = function(time) { + if (time < this.t1) { + var elapsed = time - this.t0; + this.onframe(Accelimation._getBezier(elapsed/this.dt,this.x0,this.x1,this.c1,this.c2)); + } + else this._end(); +} + +// ends the animation +Accelimation.prototype._end = function() { + Accelimation._remove(this); + this.onframe(this.x1); + this.onend(); +} + + + + +//===================================================================== +// static methods (all private) +//===================================================================== + +// add a function to the list of ones to call periodically +Accelimation._add = function(o) { + var index = this.instances.length; + this.instances[index] = o; + // if this is the first one, start the engine + if (this.instances.length == 1) { + this.timerID = window.setInterval("Accelimation._paintAll()", this.targetRes); + } +} + +// remove a function from the list +Accelimation._remove = function(o) { + for (var i = 0; i < this.instances.length; i++) { + if (o == this.instances[i]) { + this.instances = this.instances.slice(0,i).concat( this.instances.slice(i+1) ); + break; + } + } + // if that was the last one, stop the engine + if (this.instances.length == 0) { + window.clearInterval(this.timerID); + this.timerID = null; + } +} + +// "engine" - call each function in the list every so often +Accelimation._paintAll = function() { + var now = new Date().getTime(); + for (var i = 0; i < this.instances.length; i++) { + this.instances[i]._paint(now); + } +} + + +// Bezier functions: +Accelimation._B1 = function(t) { return t*t*t } +Accelimation._B2 = function(t) { return 3*t*t*(1-t) } +Accelimation._B3 = function(t) { return 3*t*(1-t)*(1-t) } +Accelimation._B4 = function(t) { return (1-t)*(1-t)*(1-t) } + + +//Finds the coordinates of a point at a certain stage through a bezier curve +Accelimation._getBezier = function(percent,startPos,endPos,control1,control2) { + return endPos * this._B1(percent) + control2 * this._B2(percent) + control1 * this._B3(percent) + startPos * this._B4(percent); +} + + +//===================================================================== +// static properties +//===================================================================== + +Accelimation.instances = []; +Accelimation.targetRes = 10; +Accelimation.timerID = null; + + +//===================================================================== +// IE win memory cleanup +//===================================================================== + +if (window.attachEvent) { + var cearElementProps = [ + 'data', + 'onmouseover', + 'onmouseout', + 'onmousedown', + 'onmouseup', + 'ondblclick', + 'onclick', + 'onselectstart', + 'oncontextmenu' + ]; + + window.attachEvent("onunload", function() { + var el; + for(var d = document.all.length;d--;){ + el = document.all[d]; + for(var c = cearElementProps.length;c--;){ + el[cearElementProps[c]] = null; + } + } + }); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/nervecenter/javascript/transmenuC.js b/src/usr/local/www/themes/nervecenter/javascript/transmenuC.js new file mode 100644 index 0000000..88626c7 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/javascript/transmenuC.js @@ -0,0 +1,86 @@ +/* ================================================================================================= + * TransMenu + * March, 2003 + * Customizable multi-level animated DHTML menus with transparency. + * ================================================================================================= + * "Can I use this?" + * + * Use of this library is governed by the Creative Commons Attribution 2.0 License. You can check it + * out at: http://creativecommons.org/licenses/by/2.0/ + * + * Basically: You may copy, distribute, and eat this code as you wish. But you must give me credit + * for writing it. You may not misrepresent yourself as the author of this code. + * ================================================================================================= + * "It's kinda hard to read, though" + * + * The uncompressed, commented version of this script can be found at: + * http://youngpup.net/projects/transMenus + * ============================================================================================== */ +TransMenu.spacerGif="themes/nervecenter/javascript/img/x.gif";TransMenu.dingbatOn="themes/nervecenter/javascript/img/submenu-on.gif";TransMenu.dingbatOff="themes/nervecenter/javascript/img/submenu-off.gif";TransMenu.dingbatSize=14;TransMenu.menuPadding=5;TransMenu.itemPadding=3;TransMenu.shadowSize=2;TransMenu.shadowOffset=3;TransMenu.shadowColor="#000000";TransMenu.shadowPng="themes/nervecenter/javascript/img/grey-40.png";TransMenu.backgroundColor="#990000";TransMenu.backgroundPng="themes/nervecenter/javascript/img/white-90.png";TransMenu.hideDelay=1000;TransMenu.slideTime=400;TransMenu.reference={topLeft:1,topRight:2,bottomLeft:3,bottomRight:4};TransMenu.direction={down:1,right:2};TransMenu.registry=[];TransMenu._maxZ=100;TransMenu.isSupported=function(){var ua=navigator.userAgent.toLowerCase();var pf=navigator.platform.toLowerCase();var an=navigator.appName;var r=false;if(ua.indexOf("gecko")>-1&&navigator.productSub>=20020605)r=true;else if(an=="Microsoft Internet Explorer"){if(document.getElementById){if(pf.indexOf("mac")==0){r=/msie (\d(.\d*)?)/.test(ua)&&Number(RegExp.$1)>=5.1;} +else r=true;}} +return r;} +TransMenu.initialize=function(){for(var i=0,menu=null;menu=this.registry[i];i++){menu.initialize();}} +TransMenu.renderAll=function(){var aMenuHtml=[];for(var i=0,menu=null;menu=this.registry[i];i++){aMenuHtml[i]=menu.toString();} +document.write(aMenuHtml.join(""));} +function TransMenu(oActuator,iDirection,iLeft,iTop,iReferencePoint,parentMenuSet){this.addItem=addItem;this.addMenu=addMenu;this.toString=toString;this.initialize=initialize;this.isOpen=false;this.show=show;this.hide=hide;this.items=[];this.onactivate=new Function();this.ondeactivate=new Function();this.onmouseover=new Function();this.onqueue=new Function();this.ondequeue=new Function();this.index=TransMenu.registry.length;TransMenu.registry[this.index]=this;var id="TransMenu"+this.index;var contentHeight=null;var contentWidth=null;var childMenuSet=null;var animating=false;var childMenus=[];var slideAccel=-1;var elmCache=null;var ready=false;var _this=this;var a=null;var pos=iDirection==TransMenu.direction.down?"top":"left";var dim=null;function addItem(sText,sUrl){var item=new TransMenuItem(sText,sUrl,this);item._index=this.items.length;this.items[item._index]=item;} +function addMenu(oMenuItem){if(!oMenuItem.parentMenu==this)throw new Error("Cannot add a menu here");if(childMenuSet==null)childMenuSet=new TransMenuSet(TransMenu.direction.right,-5,2,TransMenu.reference.topRight);var m=childMenuSet.addMenu(oMenuItem);childMenus[oMenuItem._index]=m;m.onmouseover=child_mouseover;m.ondeactivate=child_deactivate;m.onqueue=child_queue;m.ondequeue=child_dequeue;return m;} +function initialize(){initCache();initEvents();initSize();ready=true;} +function show(){if(ready){_this.isOpen=true;animating=true;setContainerPos();elmCache["clip"].style.visibility="visible";elmCache["clip"].style.zIndex=TransMenu._maxZ++;slideStart();_this.onactivate();}} +function hide(){if(ready){_this.isOpen=false;animating=true;for(var i=0,item=null;item=elmCache.item[i];i++)dehighlight(item);if(childMenuSet)childMenuSet.hide();slideStart();_this.ondeactivate();}} +function setContainerPos(){var sub=oActuator.constructor==TransMenuItem;var act=sub?oActuator.parentMenu.elmCache["item"][oActuator._index]:oActuator;var el=act;var x=0;var y=0;var minX=0;var maxX=(window.innerWidth?window.innerWidth:document.body.clientWidth)-parseInt(elmCache["clip"].style.width);var minY=0;var maxY=(window.innerHeight?window.innerHeight:document.body.clientHeight)-parseInt(elmCache["clip"].style.height);while(sub?el.parentNode.className.indexOf("transMenu")==-1:el.offsetParent){x+=el.offsetLeft;y+=el.offsetTop;if(el.scrollLeft)x-=el.scrollLeft;if(el.scrollTop)y-=el.scrollTop;el=el.offsetParent;} +if(oActuator.constructor==TransMenuItem){x+=parseInt(el.parentNode.style.left);y+=parseInt(el.parentNode.style.top);} +switch(iReferencePoint){case TransMenu.reference.topLeft:break;case TransMenu.reference.topRight:x+=act.offsetWidth;break;case TransMenu.reference.bottomLeft:y+=act.offsetHeight;break;case TransMenu.reference.bottomRight:x+=act.offsetWidth;y+=act.offsetHeight;break;} +x+=iLeft;y+=iTop;x=Math.max(Math.min(x,maxX),minX);y=Math.max(Math.min(y,maxY),minY);elmCache["clip"].style.left=x+"px";elmCache["clip"].style.top=y+"px";} +function slideStart(){var x0=parseInt(elmCache["content"].style[pos]);var x1=_this.isOpen?0:-dim;if(a!=null)a.stop();a=new Accelimation(x0,x1,TransMenu.slideTime,slideAccel);a.onframe=slideFrame;a.onend=slideEnd;a.start();} +function slideFrame(x){elmCache["content"].style[pos]=x+"px";} +function slideEnd(){if(!_this.isOpen)elmCache["clip"].style.visibility="hidden";animating=false;} +function initSize(){var ow=elmCache["items"].offsetWidth;var oh=elmCache["items"].offsetHeight;var ua=navigator.userAgent.toLowerCase();elmCache["clip"].style.width=ow+TransMenu.shadowSize+2+"px";elmCache["clip"].style.height=oh+TransMenu.shadowSize+2+"px";elmCache["content"].style.width=ow+TransMenu.shadowSize+"px";elmCache["content"].style.height=oh+TransMenu.shadowSize+"px";contentHeight=oh+TransMenu.shadowSize;contentWidth=ow+TransMenu.shadowSize;dim=iDirection==TransMenu.direction.down?contentHeight:contentWidth;elmCache["content"].style[pos]=-dim-TransMenu.shadowSize+"px";elmCache["clip"].style.visibility="hidden";if(ua.indexOf("mac")==-1||ua.indexOf("gecko")>-1){elmCache["background"].style.width=ow+"px";elmCache["background"].style.height=oh+"px";elmCache["background"].style.backgroundColor=TransMenu.backgroundColor;elmCache["shadowRight"].style.left=ow+"px";elmCache["shadowRight"].style.height=oh-(TransMenu.shadowOffset-TransMenu.shadowSize)+"px";elmCache["shadowRight"].style.backgroundColor=TransMenu.shadowColor;elmCache["shadowBottom"].style.top=oh+"px";elmCache["shadowBottom"].style.width=ow-TransMenu.shadowOffset+"px";elmCache["shadowBottom"].style.backgroundColor=TransMenu.shadowColor;} +else{elmCache["background"].firstChild.src=TransMenu.backgroundPng;elmCache["background"].firstChild.width=ow;elmCache["background"].firstChild.height=oh;elmCache["shadowRight"].firstChild.src=TransMenu.shadowPng;elmCache["shadowRight"].style.left=ow+"px";elmCache["shadowRight"].firstChild.width=TransMenu.shadowSize;elmCache["shadowRight"].firstChild.height=oh-(TransMenu.shadowOffset-TransMenu.shadowSize);elmCache["shadowBottom"].firstChild.src=TransMenu.shadowPng;elmCache["shadowBottom"].style.top=oh+"px";elmCache["shadowBottom"].firstChild.height=TransMenu.shadowSize;elmCache["shadowBottom"].firstChild.width=ow-TransMenu.shadowOffset;}} +function initCache(){var menu=document.getElementById(id);var all=menu.all?menu.all:menu.getElementsByTagName("*");elmCache={};elmCache["clip"]=menu;elmCache["item"]=[];for(var i=0,elm=null;elm=all[i];i++){switch(elm.className){case"items":case"content":case"background":case"shadowRight":case"shadowBottom":elmCache[elm.className]=elm;break;case"item":elm._index=elmCache["item"].length;elmCache["item"][elm._index]=elm;break;}} +_this.elmCache=elmCache;} +function initEvents(){for(var i=0,item=null;item=elmCache.item[i];i++){item.onmouseover=item_mouseover;item.onmouseout=item_mouseout;item.onclick=item_click;} +if(typeof oActuator.tagName!="undefined"){oActuator.onmouseover=actuator_mouseover;oActuator.onmouseout=actuator_mouseout;} +elmCache["content"].onmouseover=content_mouseover;elmCache["content"].onmouseout=content_mouseout;} +function highlight(oRow){oRow.className="item hover";if(childMenus[oRow._index])oRow.lastChild.firstChild.src=TransMenu.dingbatOn;} +function dehighlight(oRow){oRow.className="item";if(childMenus[oRow._index])oRow.lastChild.firstChild.src=TransMenu.dingbatOff;} +function item_mouseover(){if(!animating){highlight(this);if(childMenus[this._index])childMenuSet.showMenu(childMenus[this._index]);else if(childMenuSet)childMenuSet.hide();}} +function item_mouseout(){if(!animating){if(childMenus[this._index])childMenuSet.hideMenu(childMenus[this._index]);else dehighlight(this);}} +function item_click(){if(!animating){if(_this.items[this._index].url)location.href=_this.items[this._index].url;}} +function actuator_mouseover(){parentMenuSet.showMenu(_this);} +function actuator_mouseout(){parentMenuSet.hideMenu(_this);} +function content_mouseover(){if(!animating){parentMenuSet.showMenu(_this);_this.onmouseover();}} +function content_mouseout(){if(!animating){parentMenuSet.hideMenu(_this);}} +function child_mouseover(){if(!animating){parentMenuSet.showMenu(_this);}} +function child_deactivate(){for(var i=0;i'+'
                            '+''+aHtml.join('')+'
                            '+'
                            '+'
                            '+'
                            '+'
                            ';}} +TransMenuSet.registry=[];function TransMenuSet(iDirection,iLeft,iTop,iReferencePoint){this.addMenu=addMenu;this.showMenu=showMenu;this.hideMenu=hideMenu;this.hide=hide;this.hideCurrent=hideCurrent;var menus=[];var _this=this;var current=null;this.index=TransMenuSet.registry.length;TransMenuSet.registry[this.index]=this;function addMenu(oActuator){var m=new TransMenu(oActuator,iDirection,iLeft,iTop,iReferencePoint,this);menus[menus.length]=m;return m;} +function showMenu(oMenu){if(oMenu!=current){if(current!=null)hide(current);current=oMenu;oMenu.show();} +else{cancelHide(oMenu);}} +function hideMenu(oMenu){if(current==oMenu&&oMenu.isOpen){if(!oMenu.hideTimer)scheduleHide(oMenu);}} +function scheduleHide(oMenu){oMenu.onqueue();oMenu.hideTimer=window.setTimeout("TransMenuSet.registry["+_this.index+"].hide(TransMenu.registry["+oMenu.index+"])",TransMenu.hideDelay);} +function cancelHide(oMenu){if(oMenu.hideTimer){oMenu.ondequeue();window.clearTimeout(oMenu.hideTimer);oMenu.hideTimer=null;}} +function hide(oMenu){if(!oMenu&¤t)oMenu=current;if(oMenu&¤t==oMenu&&oMenu.isOpen){hideCurrent();}} +function hideCurrent(){if (null != current){cancelHide(current);current.hideTimer=null;current.hide();current=null;}}} +function TransMenuItem(sText,sUrl,oParent){this.toString=toString;this.text=sText;this.url=sUrl;this.parentMenu=oParent;function toString(bDingbat){var sDingbat=bDingbat?TransMenu.dingbatOff:TransMenu.spacerGif;var iEdgePadding=TransMenu.itemPadding+TransMenu.menuPadding;var sPaddingLeft="padding:"+TransMenu.itemPadding+"px; padding-left:"+iEdgePadding+"px;" +var sPaddingRight="padding:"+TransMenu.itemPadding+"px; padding-right:"+iEdgePadding+"px;" +return''+sText+''+'';}} +function Accelimation(from,to,time,zip){if(typeof zip=="undefined")zip=0;if(typeof unit=="undefined")unit="px";this.x0=from;this.x1=to;this.dt=time;this.zip=-zip;this.unit=unit;this.timer=null;this.onend=new Function();this.onframe=new Function();} +Accelimation.prototype.start=function(){this.t0=new Date().getTime();this.t1=this.t0+this.dt;var dx=this.x1-this.x0;this.c1=this.x0+((1+this.zip)*dx/3);this.c2=this.x0+((2+this.zip)*dx/3);Accelimation._add(this);} +Accelimation.prototype.stop=function(){Accelimation._remove(this);} +Accelimation.prototype._paint=function(time){if(time= !,... +# where: forbidden pages are those pages that should *not* use +# the particular JavaScript function within the JS event +# specified below. +# $Id$ +# +onload=tmenuinit(); !wizard.php \ No newline at end of file diff --git a/src/usr/local/www/themes/nervecenter/loader.js b/src/usr/local/www/themes/nervecenter/loader.js new file mode 100644 index 0000000..491e874 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/loader.js @@ -0,0 +1,29 @@ +//'); +} + +document.write(''); + +//]]> diff --git a/src/usr/local/www/themes/nervecenter/login.css b/src/usr/local/www/themes/nervecenter/login.css new file mode 100644 index 0000000..f8abdfc --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/login.css @@ -0,0 +1,1127 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + + +#login { +/* background: #cccccc; */ + background-color: transparent; + border: 0px solid #cccccc; + margin: 5em auto; + padding: 0em; + width: 400px; +/* filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; */ +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; +/* background: #ffffff; */ + margin-top: 0; + display: block; + text-indent: -1000px; + height: 400px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -420px; + left: 70px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + top: -300px; */ +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + left: 10px; + top: -300px; */ +} + +#login #submit { + font-size: 1em; + font-weight: bold; + text-align: center; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -20px; + left: 170px; +} + +/* loginerror box follows */ + +#login #inputerrors { + background-color: transparent; + border: 0px solid #666666; + margin: 5em auto; + vertical-align: middle; + padding: 0em; + width: 330px; + height: 50px; + position: relative; + top: -370px; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/nervecenter/menu.inc b/src/usr/local/www/themes/nervecenter/menu.inc new file mode 100644 index 0000000..a274410 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/menu.inc @@ -0,0 +1,177 @@ + + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +require("menu.inc"); + +define("TMENU_STUB", " + // set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. + // but you can experiment with effect on loadtime. + if (TransMenu.isSupported()) { + + //================================================================================================== + // create a set of dropdowns + //================================================================================================== + // the first param should always be down, as it is here + // + // The second and third param are the top and left offset positions of the menus from their actuators + // respectively. To make a menu appear a little to the left and bottom of an actuator, you could use + // something like -5, 5 + // + // The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner + // of the actuator from which to measure the offset positions above. Here we are saying we want the + // menu to appear directly below the bottom left corner of the actuator + //================================================================================================== + var ms = new TransMenuSet(TransMenu.direction.down, 1, 0, TransMenu.reference.bottomLeft); + + //================================================================================================== + // create a dropdown menu + //================================================================================================== + // the first parameter should be the HTML element which will act actuator for the menu + //================================================================================================== + + @@MENU_DEFINITIONS@@ + + //================================================================================================== + // write drop downs into page + //================================================================================================== + // this method writes all the HTML for the menus into the page with document.write(). It must be + // called within the body of the HTML page. + //================================================================================================== + TransMenu.renderAll(); + } +"); + +class NervecenterMenu extends Menu { + private $menuJScript = "NOT-SET"; + private $menuJScriptEvents = "NOT-SET"; + private $menuID = "NOT-SET"; + + public function __construct($identification = "", $filename = "", Component $c = NULL) { + parent::__construct($identification, $filename, $c); + + $id = "mnua_" . str_replace(" ", "", strtolower($this->getID())); + $this->menuID = $id; + + if ($this->hasParent()) { + $this->menuJScript = "\tvar {$id} = ms.addMenu(document.getElementById('{$id}'));\n"; + } + } // end __construct + + public function getMenuID() { + return $this->menuID; + } + + public function setMenuID($myMenuID) { + $this->menuID = $myMenuID; + } + + public function getMenuJScript() { + $childJScript = ""; + foreach ($this->getChildren() as $component) { + $childJScript .= $component->getMenuJScript(); + } + + if (! $this->hasParent()) { + $this->menuJScript = str_replace("@@MENU_DEFINITIONS@@", $childJScript, TMENU_STUB); + } else { + $this->menuJScript .= "\n$childJScript\n"; + } + + return $this->menuJScript; + } + + public function getMenuJScriptEvents() { + return $this->menuJScriptEvents; + } + + public function __toString() { + if (! $this->hasParent()) { + $menuMarkup =<< + @@CHILD_ELEMENTS@@ + + +EOD; + } else { + $name = gettext($this->getID()); + $id = "mnua_" . str_replace(" ", "", strtolower($this->getID())); + + $menuMarkup =<<{$name} + @@CHILD_ELEMENTS@@ +EOD; + } + + $childMarkup = ""; + foreach ($this->getChildren() as $component) { + $childMarkup .= $component; + } + + $menuMarkup = str_replace("@@CHILD_ELEMENTS@@", $childMarkup, $menuMarkup); + + return $menuMarkup; + } +} + +class NervecenterMenuItem extends MenuItem { + private $menuJScript = "NOT-SET"; + private $menuJScriptEvents = "NOT-SET"; + + public function __construct($identification = "", $filename = "", $href = "", Component $c = NULL) { + parent::__construct($identification, $filename, $href, $c); + + $href = $this->getHref() <> "" ? $this->getHref() : "{$this->getFile()}"; + $name = gettext($this->getID()); + $file = $this->getFile(); + + $this->menuJScript = $this->check_access("{$file}", "\t{$this->getParent()->getMenuID()}.addItem('{$name}', '{$href}');\n"); + } + + public function getMenuJScript() { + return $this->menuJScript; + } + + public function getMenuJScriptEvents() { + return $this->menuJScriptEvents; + } + + public function __toString() { + return ""; + } +} + +?> diff --git a/src/usr/local/www/themes/nervecenter/new_tab_menu.css b/src/usr/local/www/themes/nervecenter/new_tab_menu.css new file mode 100644 index 0000000..04c4cf2 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/new_tab_menu.css @@ -0,0 +1,101 @@ +/* + new_tab_menu.css + part of pfSense + Copyright (C) 2010-2011 Robert Zelaya + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + + Replace your old tab menu with the following code. To add a second tab menu line just cut and paste again. + The following code is dependent on new_tab_menu.css and images/new_tab_menu.png. + + + + + + + +*/ + +.newtabmenu ul, li{border:0; margin:0; padding:0; list-style:none;} + +.newtabmenu li{float:left; margin-right:2px; text-align: center;} +.newtabmenu a:link, .newtabmenu a:visited{ + background:url(images/new_tab_menu.png) right 45px; + color:#ffffff; /* noactive font */ + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + font-weight:bold; + font-size:.9em; + height:20px; + line-height:20px; + text-decoration:none; +} +.newtabmenu a span{ + background:url(images/new_tab_menu.png) left 45px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + height:20px; + margin-right:7px; + padding-left:7px; +} +.newtabmenu a:hover{ + background:url(images/new_tab_menu.png) right 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + color:#ffffff; /* hover over font */ +} +.newtabmenu a:hover span{ + background:url(images/new_tab_menu.png) left 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ +} + +/* -------------------------------- */ +/* ACTIVE ELEMENTS */ +.newtabmenu_active a:link, .newtabmenu_active a:visited, .newtabmenu_active a:visited, .newtabmenu_active a:hover{ + color:#000000; /* active font */ + background:url(images/new_tab_menu.png) right 0 no-repeat; +} +.newtabmenu_active a span, .newtabmenu_active a:hover span{ + background:url(images/new_tab_menu.png) left 0 no-repeat; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/nervecenter/no_big_logo b/src/usr/local/www/themes/nervecenter/no_big_logo new file mode 100644 index 0000000..6e5c70d --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/no_big_logo @@ -0,0 +1 @@ +NO! DONT! \ No newline at end of file diff --git a/src/usr/local/www/themes/nervecenter/rrdcolors.inc.php b/src/usr/local/www/themes/nervecenter/rrdcolors.inc.php new file mode 100644 index 0000000..dcb7a39 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/rrdcolors.inc.php @@ -0,0 +1,89 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This file is included by the RRD graphing page and sets the colors */ + +/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Traffic Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colortrafficdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* Packets Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colorpacketsup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Packets Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colorpacketsdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* 95th Percentile Lines Out, In */ +$colortraffic95 = array('660000', 'FF0000'); + +/* State Table pfrate, pfstates, pfnat, srcip, dstip */ +$colorstates = array('00AA00','990000','0000FF','000000','DD9B00'); + +/* Processor Usage user, nice, system, int, processes */ +$colorprocessor = array('00AA00','990000','0000FF','DD9B00','000000'); + +/* Memory Usage active, inact, free, cache, wire */ +$colormemory = array('00AA00','990000','0000FF','666666','DD9B00'); + +/* MBUF Usage current, cache, total, max */ +$colormbuf = array('0080FF','00E344','FF0000','000000'); + +/* Traffic Shaper Queues q1, q2, q3, q4, q5, q6, q7, q8, q9 */ +$colorqueuesup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +$colorqueuesdropup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +/* Quality Graph Delay >420, 180-420, 60-180, 20-60, <20, Delay Avg */ +$colorqualityrtt = array('990000','a83c3c','b36666','bd9090','cccccc','000000'); +/* Quality Graph Loss */ +$colorqualityloss = 'ee0000'; + +/* Wireless Graph SNR, Rate, Channel*/ +/* Cellular Graph RSSI, */ +$colorwireless = array('333333','a83c3c','999999'); + +/* SPAMD Times min area, avg area, max area, Time line */ +$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); +/* SPAMD Connections max area, min area, min line, max line, avg line */ +$colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600'); + +/* OpenVPN Users Online Users */ +$colorvpnusers = array('990000'); + +/* Captive Portal Total Users Total Users */ +/* Captive Portal Concurrent Concurrent Users */ +$colorcaptiveportalusers = array('990000'); + +?> diff --git a/src/usr/local/www/themes/nervecenter/styles/jquery-ui-1.11.1.css b/src/usr/local/www/themes/nervecenter/styles/jquery-ui-1.11.1.css new file mode 100644 index 0000000..8a8c54f --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/styles/jquery-ui-1.11.1.css @@ -0,0 +1,1226 @@ +/*! jQuery UI - v1.11.1 - 2014-09-22 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2C%20Helvetica%2C%20Arial%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=glass&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=inset_soft&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=glass&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=bbbbbb&fcHover=599fcf&iconColorHover=3383bb&bgColorActive=999999&bgTextureActive=inset_hard&bgImgOpacityActive=75&borderColorActive=999999&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=444444&iconColorHighlight=3383bb&bgColorError=c0402a&bgTextureError=flat&bgImgOpacityError=55&borderColorError=c0402a&fcError=ffffff&iconColorError=fbc856&bgColorOverlay=eeeeee&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0pxdow +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; + background-color: #990000; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #c9c9c9 url("../../../javascript/jquery/images/ui-bg_inset-soft_50_c9c9c9_1x100.png") 50% bottom repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #bbbbbb; + /* background: #dddddd url("../../../javascript/jquery/images/ui-bg_glass_35_dddddd_1x400.png") 50% 50% repeat-x; */ + color: #444444; + font-weight: bold; +} +.ui-widget-header a { + color: #444444; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_glass_60_eeeeee_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #3383bb; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #3383bb; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #bbbbbb; + background: #f8f8f8 url("../../../javascript/jquery/images/ui-bg_glass_100_f8f8f8_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #599fcf; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #599fcf; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #999999; + background: #999999 url("../../../javascript/jquery/images/ui-bg_inset-hard_75_999999_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #ffffff; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_55_eeeeee_40x100.png") 50% 50% repeat-x; + color: #444444; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #444444; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #c0402a; + background: #c0402a url("../../../javascript/jquery/images/ui-bg_flat_55_c0402a_40x100.png") 50% 50% repeat-x; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_70b2e1_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_454545_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_fbc856_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_0_eeeeee_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -4px 0 0 -4px; + padding: 4px; + background: #aaaaaa url("../../../javascript/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 0pxdow; +} diff --git a/src/usr/local/www/themes/nervecenter/styles/menustyles.css b/src/usr/local/www/themes/nervecenter/styles/menustyles.css new file mode 100644 index 0000000..06b3c7a --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/styles/menustyles.css @@ -0,0 +1,44 @@ +#navigation { + /* border:1px solid black; */ + width: 98%; + vertical-align: middle; + height: 16px; + padding-top: 4px; + } + +#menu { + /* background: #990000; */ + /* border-bottom:1px solid white; */ + padding: 0 0 0 0; + width: 98%; + vertical-align: middle; + height: 16px; + } +#menu a { + padding: 2px 28px 4px 28px; + text-decoration: none; + font-weight: bold; + font-size: 1.0em; + color: #FFFFFF; + width: 08%; + height: 16px; + } +#menu a.hover { + background: #AF2020; + } +#menu span { + display: none; + } + +#subnav { + font-size: 10px; + margin-bottom: 2em; + } +#subnav a { + color: #FF0000; /* #FB3B00; */ + margin-right: 1em; + } +#subnav span { + color: silver; + margin-right: 1em; + } diff --git a/src/usr/local/www/themes/nervecenter/styles/transmenu.css b/src/usr/local/www/themes/nervecenter/styles/transmenu.css new file mode 100644 index 0000000..f683574 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/styles/transmenu.css @@ -0,0 +1,75 @@ +/* this is the clipping region for the menu. it's width and height get set by script, depending on the size of the items table */ +.transMenu { + position:absolute; + overflow:hidden; + left:-1000px; + top:-1000px; + } + +/* this is the main container for the menu itself. it's width and height get set by script, depending on the size of the items table */ +.transMenu .content { + position:absolute; + } + +/* this table comprises all menu items. each TR is one item. It is relatively positioned so that the shadow and background transparent divs can be positioned underneath it */ +.transMenu .items { + position:relative; + left:0px; top:0px; + z-index:2; + } + +.transMenu.top .items { + border-top:none; + } + +/* each TR.item is one menu item */ +.transMenu .item { + color: #FFFFFF; /* #336; */ + font-size: 1.1em; + font-weight: normal; + font-family:sans-serif; + text-decoration:none; + /* this is a hack for mac/ie5, whom incorrectly cascades the border properties of the parent table to each row */ + border:none; + cursor:pointer; + cursor:hand; + } + +/* this DIV is the semi-transparent white background of each menu. the -moz-opacity is a proprietary way to get transparency in mozilla, the filter is for IE/windows 5.0+. */ +/* we set the background color in script because ie mac does not use it; that browser only uses a semi-transparent white PNG that the spacer gif inside this DIV is replaced by */ +.transMenu .background { + position:absolute; + left:0px; top:0px; + z-index:1; + -moz-opacity:.8; + filter:alpha(opacity=80); + } + +/* same concept as .background, but this is the sliver of shadow on the right of the menu. It's left, height, and background are set by script. In IE5/mac, it uses a PNG */ +.transMenu .shadowRight { + position:absolute; + z-index:3; + top:3px; width:2px; + -moz-opacity:.4; + filter:alpha(opacity=40); + } + +/* same concept as .background, but this is the sliver of shadow on the bottom of the menu. It's top, width, and background are set by script. In IE5/mac, it uses a PNG */ +.transMenu .shadowBottom { + position:absolute; + z-index:1; + left:3px; height:2px; + -moz-opacity:.4; + filter:alpha(opacity=40); + } + +/* this is the class that is used when the mouse is over an item. script sets the row to this class when required. */ +.transMenu .item.hover { + background:#fdfdfd; + color:black; + } + +/* this is either the dingbat that indicates there is a submenu, or a spacer gif in it's place. We give it extra margin to create some space between the text and the dingbat */ +.transMenu .item img { + margin-left:10px; + } \ No newline at end of file diff --git a/src/usr/local/www/themes/nervecenter/wizard.css b/src/usr/local/www/themes/nervecenter/wizard.css new file mode 100644 index 0000000..a2d31d5 --- /dev/null +++ b/src/usr/local/www/themes/nervecenter/wizard.css @@ -0,0 +1,1060 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.nowrap { white-space: nowrap; } + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + /* background: url('images/background.png') no-repeat; */ + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} diff --git a/src/usr/local/www/themes/pfsense-dropdown/all.css b/src/usr/local/www/themes/pfsense-dropdown/all.css new file mode 100644 index 0000000..3fa0630 --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/all.css @@ -0,0 +1,1028 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; +} + +.nowrap { white-space: nowrap; } + +.addgatewaybox { + background-color: #990000; + border-style: none none none none; + width: 225px; +} + +.infobox { + width:100%; +} + +.infoboxsave { + padding-right: 10px; +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +.inputerrorsleft { + background-color: #990000; + width: 36px; + text-align: center; +} + +.inputerrorsright { + background-color: #FFD9D1; + color: #000000; + font-size: 11px; + padding-left: 8px; + padding-top: 6px; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} + +form input { + font-size: 1.1em; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 220px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 11px; + font-family: "Trebuchet MS", sans-serif; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + background-color: #ffffff; +} + +/* ID Based CSS Definitions */ +#wrapper { + +} + +#header { + height: 70px; + width: 800px; +} +#header-left { + position: relative; + background: url('images/logo.gif') no-repeat; + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; + background-color: #fff; +} +#header-right { + position: relative; + background: url('images/header.gif') no-repeat; + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} + +#header-right .container .left { + position: relative; + top: 32px; + left: 9px; + font-size: 1.8em; +} + +#header-right .container .right { + position: relative; + top: -8px; + left: 195px; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.gif') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; +} + + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: bold; + font: Verdana; + text-align: center; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + + + +#content { + border-top: 1px solid #FFFFFF; + margin-top: 0px; + padding-top: 0px; + width: 800px; +} + +#left { + width: 800px; + height: 25px; + margin-bottom: 5px; +} +#right { + width: 770px; + margin-left: 5px; + margin-right: 5px; + margin-top: 4px; + padding-top: 1px; + padding-bottom: 15px; + padding-left: 10px; + padding-right: 10px; + border-left: 1px solid #000000; + border-right: 1px solid #000000; +} + +#footer { + position: relative; + top: 3px; + padding: 0px; + margin: 6px; + margin-left: 0px; + margin-top: 2px; + width: 800px; + background-color: #990000; + text-align: center; + color: #ffffff; + font-size: 0.75em; + clear: both; + margin-bottom: 20px; + z-index: 0; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + background: url('images/menu.gif') no-repeat; + /* width: 693px; */ + width: 800px; + padding: 0px; + height: 28px; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; + z-index: 10; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + width: 6.2em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; + text-align: center; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: 0px; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + padding: 0em 0 1em 0; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: hand; +} +#navigation ul li:hover { + cursor: hand; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: underline; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #000; + background-color: #000; + color: #FFF; +} +#navigation ul li ul li a.navlnk:hover { + text-decoration: underline; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + + + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #FFFFFF; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listrborder { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-left: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + color: #FFFFFF; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #DDDDDD; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password, #password2 { + font-size: small; + width: 60%; + padding-left: 19px; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #B1B1B1; + padding-right: 6px; + padding-left: 6px; + color: #000000; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} +.widgetconfigdiv{ + background:#BBBBBB; + font-size: 11px; + color: #000000; + padding-right: 5px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +div#log div.log-entry-mini { + clear: both; +} + +div#log div.log-entry-mini span { + padding: 2px 2px 2px 2px; + padding-left: 6px; +} + +div#log span.log-action-mini-header, +div#log span.log-time-mini-header, +div#log span.log-interface-mini-header, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header, +div#log span.log-protocol-mini-header { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 12px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-time-mini, +div#log span.log-interface-mini, +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-protocol-mini { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 11px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-action-mini-header { + width: 6%; +} + +div#log span.log-time-mini, +div#log span.log-time-mini-header { + width: 19%; +} + +div#log span.log-interface-mini, +div#log span.log-interface-mini-header { + width: 8%; +} + +div#log span.log-source-mini, +div#log span.log-source-mini-header { + width: 23%; +} + +div#log span.log-destination-mini, +div#log span.log-destination-mini-header { + width: 31%; +} + +div#log span.log-protocol-mini, +div#log span.log-protocol-mini-header { + width: 8%; + border-right: 1px solid #999; +} + +/* Sortable tables */ +table.sortable thead { + cursor: default; + + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} + +#graph { + position: relative; + z-index: 1; +} + +/*thermal_sensors widget styles*/ + +.thermalSensorRow { width: 100%; border: 0px solid #ddd; padding: 1px; border-radius: 3px; } +.thermalSensorBarShell { position: relative; width: 100%; height: 5px; border: 1px solid lightgray; border-radius: 3px; } +.thermalSensorBar { position: absolute; width: 0%; height: 1px; z-index: 1; border-style: solid; border-radius: 3px; + background-color: LimeGreen; + border-top-width: 2px; border-top-color: Lime; + border-left-width: 0px; + border-right-width: 0px; + border-bottom-width: 2px; border-bottom-color: Green; +} +.thermalSensorTextShell { height: 20px; width: 100%; top: 3px; } +.thermalSensorText { float: left; height: 20px; top: 3px; } +.thermalSensorValue { float: left; height: 20px; top: 3px; font-weight: bold; margin-left: 10px;} + +.thermalSensorWarnThresh { position: absolute; background-color: orange; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } +.thermalSensorCritThresh { position: absolute; background-color: red; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } + +.thermal_sensors_widget_scale000 { position: absolute; height: 5px; width: 1px; left: -1px; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale020 { position: absolute; height: 3px; width: 1px; left: 10%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale010 { position: absolute; height: 3px; width: 1px; left: 20%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale030 { position: absolute; height: 3px; width: 1px; left: 30%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale040 { position: absolute; height: 3px; width: 1px; left: 40%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale050 { position: absolute; height: 3px; width: 1px; left: 50%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale060 { position: absolute; height: 3px; width: 1px; left: 60%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale070 { position: absolute; height: 3px; width: 1px; left: 70%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale080 { position: absolute; height: 3px; width: 1px; left: 80%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale090 { position: absolute; height: 3px; width: 1px; left: 90%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; } + +.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; } + +/* widget textarea styles - full width */ +.textarea_widget { + width: 100%; + resize:vertical; + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* IE 8+ */ +} diff --git a/src/usr/local/www/themes/pfsense-dropdown/apple-touch-icon.png b/src/usr/local/www/themes/pfsense-dropdown/apple-touch-icon.png new file mode 100755 index 0000000..7a4b975 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/apple-touch-icon.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/bottom-loader.js b/src/usr/local/www/themes/pfsense-dropdown/bottom-loader.js new file mode 100644 index 0000000..fad206e --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/bottom-loader.js @@ -0,0 +1,11 @@ +// diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/alert_bgr.gif b/src/usr/local/www/themes/pfsense-dropdown/images/alert_bgr.gif new file mode 100755 index 0000000..2a5c000 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/alert_bgr.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/header-alert.gif b/src/usr/local/www/themes/pfsense-dropdown/images/header-alert.gif new file mode 100755 index 0000000..02eca2b Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/header-alert.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/header.gif b/src/usr/local/www/themes/pfsense-dropdown/images/header.gif new file mode 100755 index 0000000..6f29ec9 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/header.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/help.png b/src/usr/local/www/themes/pfsense-dropdown/images/help.png new file mode 100755 index 0000000..1de05e3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/help.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/favicon.ico b/src/usr/local/www/themes/pfsense-dropdown/images/icons/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/favicon.ico differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_3g.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_3g.gif new file mode 100755 index 0000000..46ccb92 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_3g.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_3g_inactive.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_3g_inactive.gif new file mode 100755 index 0000000..cf983e4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_3g_inactive.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_advanced.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_advanced.gif new file mode 100755 index 0000000..3ede1ff Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_advanced.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_advanced_s.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_advanced_s.gif new file mode 100755 index 0000000..b233549 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_advanced_s.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alert.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alert.gif new file mode 100755 index 0000000..2f69355 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alert.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_host.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_host.gif new file mode 100644 index 0000000..ad43e17 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_host.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_net.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_net.gif new file mode 100644 index 0000000..abd1b8b Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_net.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_port.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_port.gif new file mode 100644 index 0000000..4acf2aa Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_port.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_url.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_url.gif new file mode 100644 index 0000000..660571e Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_url.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_url_reload.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_url_reload.gif new file mode 100644 index 0000000..55c1c4a Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_alias_url_reload.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block.gif new file mode 100755 index 0000000..670c968 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block_add.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block_add.gif new file mode 100755 index 0000000..eb726d6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block_add.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block_d.gif new file mode 100755 index 0000000..e6345fe Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_block_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cablenic.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cablenic.gif new file mode 100755 index 0000000..a071c66 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cablenic.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cal.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cal.gif new file mode 100755 index 0000000..a9c7c87 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cal.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cal_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cal_mo.gif new file mode 100755 index 0000000..1647e2f Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_cal_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_carp.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_carp.gif new file mode 100755 index 0000000..9454a82 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_carp.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_carp_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_carp_d.gif new file mode 100755 index 0000000..2ba8db2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_carp_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_chain.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_chain.png new file mode 100644 index 0000000..12db07a Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_chain.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_check.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_check.gif new file mode 100755 index 0000000..393674d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_check.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_green.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_green.gif new file mode 100755 index 0000000..e171ba8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_green.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_grey.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_grey.gif new file mode 100755 index 0000000..00c865a Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_grey.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_red.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_red.gif new file mode 100755 index 0000000..7b412ee Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_clock_red.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_close.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_close.gif new file mode 100755 index 0000000..e0f86a7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_close.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_configure.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_configure.gif new file mode 100755 index 0000000..7182e0d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_configure.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down.gif new file mode 100755 index 0000000..b71a9c5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down_d.gif new file mode 100755 index 0000000..70a7473 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down_mo.gif new file mode 100755 index 0000000..584587a Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_down_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_e.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_e.gif new file mode 100755 index 0000000..2950800 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_e.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_e_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_e_mo.gif new file mode 100755 index 0000000..9ba5738 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_e_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_error.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_error.gif new file mode 100755 index 0000000..e0fa659 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_error.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_exclam.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_exclam.gif new file mode 100755 index 0000000..36c2ec7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_exclam.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_de.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_de.png new file mode 100644 index 0000000..069cbbe Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_de.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_en.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_en.png new file mode 100644 index 0000000..bd7f9a5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_en.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_es.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_es.png new file mode 100644 index 0000000..434776c Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_es.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_pt_BR.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_pt_BR.png new file mode 100644 index 0000000..f786349 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_flag_pt_BR.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_cert.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_cert.png new file mode 100644 index 0000000..48a34b6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_cert.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_file.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_file.png new file mode 100644 index 0000000..48a9ed2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_file.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_group.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_group.png new file mode 100644 index 0000000..7d929c0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_group.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_host.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_host.png new file mode 100644 index 0000000..867ef2c Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_host.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_imp.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_imp.png new file mode 100644 index 0000000..f667cfc Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_imp.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_mail.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_mail.png new file mode 100644 index 0000000..d2d4548 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_mail.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_pwd.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_pwd.png new file mode 100644 index 0000000..06b53a1 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_pwd.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_search.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_search.png new file mode 100644 index 0000000..33de926 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_search.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_time.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_time.png new file mode 100644 index 0000000..aa8300a Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_time.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_unknown.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_unknown.png new file mode 100644 index 0000000..1857d0e Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_unknown.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_url.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_url.png new file mode 100644 index 0000000..cf56792 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_url.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_user.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_user.png new file mode 100644 index 0000000..e00eebe Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_frmfld_user.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_fw-update.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_fw-update.gif new file mode 100755 index 0000000..52c18ac Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_fw-update.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_help.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_help.gif new file mode 100644 index 0000000..84c84db Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_help.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ifalias.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ifalias.gif new file mode 100644 index 0000000..0c569a7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ifalias.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ifalias_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ifalias_d.gif new file mode 100644 index 0000000..faa84d4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ifalias_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_import_alias.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_import_alias.gif new file mode 100755 index 0000000..d11a5f0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_import_alias.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_in.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_in.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_in_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_in_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_info_pkg.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_info_pkg.gif new file mode 100644 index 0000000..cd3a532 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_info_pkg.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_interface_down.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_interface_down.gif new file mode 100755 index 0000000..0626655 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_interface_down.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_interface_up.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_interface_up.gif new file mode 100755 index 0000000..1449513 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_interface_up.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left.gif new file mode 100755 index 0000000..8effefe Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left_d.gif new file mode 100755 index 0000000..c778014 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left_mo.gif new file mode 100755 index 0000000..84c6fa2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_left_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log.gif new file mode 100755 index 0000000..4a1983a Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_d.gif new file mode 100755 index 0000000..d31bd9b Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_s.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_s.gif new file mode 100755 index 0000000..f9fda33 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_s.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_s_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_s_d.gif new file mode 100755 index 0000000..fb2c05f Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_log_s_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_logs.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_logs.gif new file mode 100644 index 0000000..afe0104 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_logs.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_match.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_match.gif new file mode 100644 index 0000000..215571f Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_match.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_match_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_match_d.gif new file mode 100644 index 0000000..6e4c364 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_match_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_minus.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_minus.gif new file mode 100755 index 0000000..417544f Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_minus.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_open.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_open.gif new file mode 100755 index 0000000..ac3da14 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_open.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_other.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_other.gif new file mode 100755 index 0000000..e6f780f Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_other.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_other_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_other_d.gif new file mode 100755 index 0000000..b08d970 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_other_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_out.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_out.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_out_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_out_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_parp.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_parp.gif new file mode 100755 index 0000000..96acaf3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_parp.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_parp_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_parp_d.gif new file mode 100755 index 0000000..7d7d00e Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_parp_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass.gif new file mode 100755 index 0000000..fe1bb0d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass_add.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass_add.gif new file mode 100755 index 0000000..f7f4c20 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass_add.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass_d.gif new file mode 100755 index 0000000..6adc431 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_pass_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus.gif new file mode 100755 index 0000000..2a94eeb Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_bl.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_bl.gif new file mode 100644 index 0000000..8dcd7c0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_bl.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_bl_p.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_bl_p.gif new file mode 100644 index 0000000..0c79849 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_bl_p.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_d.gif new file mode 100755 index 0000000..ebc7457 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_mo.gif new file mode 100755 index 0000000..1c7ca08 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_p.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_p.gif new file mode 100644 index 0000000..eb41284 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_plus_p.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall.gif new file mode 100755 index 0000000..d78b867 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_d.gif new file mode 100755 index 0000000..13658f7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_mo.gif new file mode 100755 index 0000000..90b576e Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg.gif new file mode 100755 index 0000000..9aebb03 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg_d.gif new file mode 100755 index 0000000..4ab4992 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg_mo.gif new file mode 100755 index 0000000..7025d20 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_pkg_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml.gif new file mode 100755 index 0000000..4542432 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml_d.gif new file mode 100755 index 0000000..8d3a68d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml_mo.gif new file mode 100755 index 0000000..15e0aed Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reinstall_xml_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reject.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reject.gif new file mode 100755 index 0000000..5565cd6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reject.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reject_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reject_d.gif new file mode 100755 index 0000000..6c09fae Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_reject_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_right.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_right.gif new file mode 100755 index 0000000..fdf2d8b Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_right.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_restart.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_restart.gif new file mode 100755 index 0000000..e49fbd7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_restart.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_restart_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_restart_d.gif new file mode 100755 index 0000000..a5d6d7c Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_restart_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_running.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_running.gif new file mode 100644 index 0000000..543fd56 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_running.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_start.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_start.gif new file mode 100755 index 0000000..09bb58f Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_start.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_start_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_start_d.gif new file mode 100755 index 0000000..f58f111 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_start_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_status.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_status.gif new file mode 100644 index 0000000..a93bcfb Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_status.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stop.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stop.gif new file mode 100755 index 0000000..922addc Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stop.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stop_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stop_d.gif new file mode 100755 index 0000000..b4cfdea Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stop_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stopped.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stopped.gif new file mode 100644 index 0000000..f93a25d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_service_stopped.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_restart_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_restart_mo.gif new file mode 100755 index 0000000..a092b40 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_restart_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_start_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_start_mo.gif new file mode 100755 index 0000000..ecdb58f Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_start_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_stop_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_stop_mo.gif new file mode 100755 index 0000000..c00e208 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_services_stop_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-group-grey.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-group-grey.png new file mode 100644 index 0000000..d7b964d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-group-grey.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-group.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-group.png new file mode 100644 index 0000000..1c974f2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-group.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-user-grey.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-user-grey.png new file mode 100644 index 0000000..2f6047d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-user-grey.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-user.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-user.png new file mode 100644 index 0000000..ef82156 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system-user.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system_lock_screen.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system_lock_screen.png new file mode 100644 index 0000000..30f306d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system_lock_screen.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system_logout.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system_logout.png new file mode 100644 index 0000000..9bbb6c7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_system_logout.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_trapped.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_trapped.gif new file mode 100644 index 0000000..ffeb2cd Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_trapped.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_trapped_p.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_trapped_p.gif new file mode 100755 index 0000000..6d46aaf Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_trapped_p.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ts_rule.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ts_rule.gif new file mode 100755 index 0000000..e15ab6c Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ts_rule.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ts_rule_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ts_rule_d.gif new file mode 100755 index 0000000..f776281 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_ts_rule_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up.gif new file mode 100755 index 0000000..883c5a2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up_d.gif new file mode 100755 index 0000000..0ddcce2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up_mo.gif new file mode 100755 index 0000000..9f869a4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_up_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wlan.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wlan.gif new file mode 100755 index 0000000..1f0addc Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wlan.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wlan_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wlan_d.gif new file mode 100755 index 0000000..35bf580 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wlan_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wol_all.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wol_all.gif new file mode 100755 index 0000000..c77a978 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wol_all.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wzd_nsaved.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wzd_nsaved.png new file mode 100644 index 0000000..21cb27d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wzd_nsaved.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wzd_saved.png b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wzd_saved.png new file mode 100644 index 0000000..ab82946 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_wzd_saved.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x.gif new file mode 100755 index 0000000..24e4d49 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_d.gif new file mode 100755 index 0000000..d2bfbc8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_mo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_mo.gif new file mode 100755 index 0000000..da7b57c Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_p.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_p.gif new file mode 100755 index 0000000..8828fa6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/icon_x_p.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/in.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/in.gif new file mode 100644 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/in.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/in_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/in_d.gif new file mode 100644 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/in_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/out.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/out.gif new file mode 100644 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/out.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/icons/out_d.gif b/src/usr/local/www/themes/pfsense-dropdown/images/icons/out_d.gif new file mode 100644 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/icons/out_d.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/log.png b/src/usr/local/www/themes/pfsense-dropdown/images/log.png new file mode 100755 index 0000000..762ba80 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/log.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/logo.gif b/src/usr/local/www/themes/pfsense-dropdown/images/logo.gif new file mode 100755 index 0000000..553cbd5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/logo.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/logobig.jpg b/src/usr/local/www/themes/pfsense-dropdown/images/logobig.jpg new file mode 100755 index 0000000..2ef196d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/logobig.jpg differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/menu.gif b/src/usr/local/www/themes/pfsense-dropdown/images/menu.gif new file mode 100755 index 0000000..7269210 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/menu.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_blue.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_blue.gif new file mode 100755 index 0000000..741186a Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_blue.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_gray.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_gray.gif new file mode 100755 index 0000000..e86e245 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_gray.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_left.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_left.gif new file mode 100755 index 0000000..af751fa Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_left.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_right.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_right.gif new file mode 100755 index 0000000..ff12d9e Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/bar_right.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/button.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/button.gif new file mode 100755 index 0000000..e85dbb3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/button.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_128.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_128.gif new file mode 100755 index 0000000..ea5ae34 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_128.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_152.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_152.gif new file mode 100755 index 0000000..6c7fc03 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_152.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_256.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_256.gif new file mode 100755 index 0000000..3e1c377 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_256.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_64.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_64.gif new file mode 100755 index 0000000..87892bd Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/key_64.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/left_background.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/left_background.gif new file mode 100755 index 0000000..529d827 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/left_background.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/loader.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/loader.gif new file mode 100755 index 0000000..5d10ac3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/loader.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/loader_tab.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/loader_tab.gif new file mode 100755 index 0000000..05bb04c Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/loader_tab.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/logon.png b/src/usr/local/www/themes/pfsense-dropdown/images/misc/logon.png new file mode 100755 index 0000000..baf8a9d Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/logon.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/progress_bar.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/progress_bar.gif new file mode 100755 index 0000000..3b4aa52 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/progress_bar.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/rrd_error.png b/src/usr/local/www/themes/pfsense-dropdown/images/misc/rrd_error.png new file mode 100755 index 0000000..a79ecf3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/rrd_error.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_c.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_c.gif new file mode 100755 index 0000000..317b758 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_c.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_c_black.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_c_black.gif new file mode 100755 index 0000000..309846e Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_c_black.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_o.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_o.gif new file mode 100755 index 0000000..eb95c32 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_o.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_o_black.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_o_black.gif new file mode 100755 index 0000000..f818f3b Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/tri_o_black.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/misc/widget_loader.gif b/src/usr/local/www/themes/pfsense-dropdown/images/misc/widget_loader.gif new file mode 100755 index 0000000..fad101f Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/misc/widget_loader.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/new_tab_menu.png b/src/usr/local/www/themes/pfsense-dropdown/images/new_tab_menu.png new file mode 100755 index 0000000..4bdfcef Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/new_tab_menu.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/status.png b/src/usr/local/www/themes/pfsense-dropdown/images/status.png new file mode 100755 index 0000000..a3e368e Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/status.png differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/transparent.gif b/src/usr/local/www/themes/pfsense-dropdown/images/transparent.gif new file mode 100755 index 0000000..89c5530 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/transparent.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/images/transparent_pixel.gif b/src/usr/local/www/themes/pfsense-dropdown/images/transparent_pixel.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/images/transparent_pixel.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/blank.gif b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/blank.gif new file mode 100755 index 0000000..a4fe2e6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/blank.gif differ diff --git a/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-box-model.js b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-box-model.js new file mode 100644 index 0000000..45543f6 --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-box-model.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-box-model",function(){var NUMERIC="\x5cs*:\x5cs*\x5cd[\x5cw%]*",UNIT=/^\d\w*$/,PERCENT=/^\d+%$/,PIXEL=/^\d+(px)?$/;var MATCH=(appVersion<6)?/\b(min|max)-(width|height)\s*:\s*\d/gi:/\b(min|max)-width\s*:\s*\d/gi;var AUTO=(appVersion<5.5)?/^auto|0cm$/:/^auto$/;var ie7_tmp=tmpElement();push(IE7.recalcs,function removeTempElement(){if(ie7_tmp.parentElement)ie7_tmp.parentElement.removeChild(ie7_tmp)});CSSFixes.addFix(MATCH,function(match){return match.slice(0,3)+match.charAt(4).toUpperCase()+match.slice(5)});var viewport=(quirksMode)?document.body:documentElement;function isFixed(element){return element.style.position=="fixed"||element.currentStyle.position=="fixed"};function layoutParent(element){var layoutParent=element.offsetParent;while(layoutParent&&!hasLayout(layoutParent))layoutParent=layoutParent.offsetParent;if(!layoutParent||isFixed(element))layoutParent=viewport;return layoutParent};function fixWidth(HEIGHT){fixWidth=function(element,value){if(!element.runtimeStyle.fixedWidth&&(!isHTML||element.tagName!="HR")){if(!value)value=element.currentStyle.width;element.runtimeStyle.fixedWidth=(UNIT.test(value))?Math.max(0,getFixedWidth(element,value)):value;element.runtimeStyle.width=element.runtimeStyle.fixedWidth;boxSizing(element)}};if(quirksMode)CSSFixes.addRecalc("width\x5cs*:\x5cs*\x5cd\x5cw*[^%]",fixWidth);var getFixedWidth=(quirksMode)?function(element,value){return getPixelWidth(element,value)+getBorderWidth(element)+getPaddingWidth(element)}:function(element,value){return getPixelWidth(element,value)};function getBorderWidth(element){return element.offsetWidth-element.clientWidth};function getPaddingWidth(element){return getPixelWidth(element,element.currentStyle.paddingLeft)+getPixelWidth(element,element.currentStyle.paddingRight)};function getMarginWidth(element){return((element.currentStyle.marginLeft=="auto")?0:getPixelLeft(element,element.currentStyle.marginLeft))+((element.currentStyle.marginRight=="auto")?0:getPixelLeft(element,element.currentStyle.marginRight))};function minWidth(element){minWidth[minWidth.count++]=element;if(element.currentStyle.minHeight=="auto")element.runtimeStyle.minHeight=0;fixWidth(element);boxSizing(element);resizeWidth(element)};minWidth.count=0;CSSFixes.addRecalc("min-width"+NUMERIC,minWidth);eval(String(minWidth).replace(/min/g,"max"));maxWidth.count=0;CSSFixes.addRecalc("max-width"+NUMERIC,maxWidth);function resizeWidth(element){var rect=element.getBoundingClientRect();var width=rect.right-rect.left;if(element.currentStyle.maxWidth&&width>=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)}); diff --git a/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-core.js b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-core.js new file mode 100644 index 0000000..b11e2b1 --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-core.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-css-strict.js b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-css-strict.js new file mode 100644 index 0000000..4406d7a --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-css-strict.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-strict",function(){if(!modules["ie7-css2"])return;var NONE=[],ID=/#/g,CLASS=/[:@\.]/g,TAG=/^\w|[\s>+~]\w/g;IE7.parser.parse=function(cssText){var DYNAMIC=new RegExp("(.*):("+dynamicPseudoClasses+")(.*)");function addRule(selector,cssText){var match=selector.match(DYNAMIC);if(match)new DynamicRule(selector,match[1],match[2],match[3],cssText);else new Rule(selector,cssText)};cssText=cssText.replace(IE7.PseudoElement.ALL,IE7.PseudoElement.ID);var RULE=/([^\{]+)\{(\d+)\}/g,match;while(match=RULE.exec(cssText)){addRule(match[1],match[2]);if(appVersion<5.5)cssText=cssText.slice(match.lastIndex)}IE7.classes.sort(Rule.compare);return IE7.classes.join("\n")};function Rule(selector,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.Class;this.inherit(selector)};Rule.prototype=new IE7.Class.ancestor;Rule.prototype.toString=function(){return "."+this.name+"{"+this.cssText+"}"};Rule.score=function(selector){return(selector.match(ID)||NONE).length*10000+(selector.match(CLASS)||NONE).length*100+(selector.match(TAG)||NONE).length};Rule.compare=function(rule1,rule2){return rule1.specificity-rule2.specificity};function DynamicRule(selector,attach,dynamicPseudoClass,target,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.DynamicStyle;this.inherit(selector,attach,dynamicPseudoClass,target)};DynamicRule.prototype=new IE7.DynamicStyle.ancestor;DynamicRule.prototype.toString=Rule.prototype.toString}); diff --git a/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-css2.js b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-css2.js new file mode 100644 index 0000000..7121c8e --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-css2.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i"){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!ù.´)Ó £(){ÿ{ù.´=ª;¢ ¢Æ=ª.¢´=Ó ¤×;£ ¢©(){if(«.¢Ù)«.¢Ù.Í.¤Ö=¤þ};ª.Õ=£(){¤ ¤ÿ};¢ â=(¤Ù.±(¢î.£Ë))?£(£Ì){ù.â(´+¥¡+£Ì)}:¢Æ;¢ Å=¤Ñ.Å.¬(¤Ú)[1];if(¤Û.±(¢î.£Ë)||Å<5||!¤Ü.±(«.Ù.ü))¤ ¢©();¢ è=¢£(«.¤Í!=¥¢);¢ ë=(¤Ë «.£Ê==¥£)?!¤Ýi.±(¢î.¢Ç):¢£(«.£Ê!=¥¤);¢ ¢í=¥¥;¢ ¢ë=¢í;if(!ë)¢ë+=¥¦;¢ ¢¹;¢ Ù=«.Ù;¢ ó={};ª.¢´=£(£È,ô,£É){if(!ó)¤;if(¢«)¢¬(¥§+¢Î(ô));if(£É){ô();ô=¢Æ}ó[£È]=ô};¢ £Ç=¤Þ;£ ¢È(²,¹){if(£Ç.±(²))²=(¹||¥¨)+²;¤ ²};£ ¢Ä(²,¹){²=¢È(²,¹);¤ ².»(0,².£Ã(¥©)+1)};¢ ¹=¢Ä(«.£Æ[«.£Æ.­-1].¤Å);¢ ¢Ê=Ó ¤Ä(¥ª);£ ã(²,¹){ÿ{²=¢È(²,¹);¢Ê.¤Á(¥«,²,Þ);¢Ê.¤¿();¤ ¢Ê.¤¾}õ(¢à){â(¥¬+²);¤ ¥¨}};¢ ·=£(¢É,¢À){¤ ¢É.·(¢À)};¢ ¢½=£(¢É){¤ ¢É.¢½()};if(Å<5.5)¢¬(ã(¥­,¹));if(«.¢Í==¥®||!ë)«.¤¹();Ö «.¤¸(¥¯);ª.¶=«.É[«.É.­-1];ª.¶.§=¢í;ª.¶.Æ=×;¢ §={};£ £¿(¶,¹){¢ ¢§=¢È(¶.²,¹);if(§[¢§])¤ ¥¨;§[¢§]=(¶.ý)?¥¨:£Å(¢Ã(¶,¹),¢Ä(¶.²,¹));¤ §[¢§]};¢ ¢Ã=£(¶){¤ ¶.§};¢ £Ä=¤ßgi;£ £Å(§,¢Ç){¤ §.³(£Ä,¥°+¢Ç.»(0,¢Ç.£Ã(¥©)+1)+¥±)};ª.Ë=[];ª.£¾=¢Æ;¢ ä=Þ;£ _ã(){ÿ{ä=×;¢ £Á=¤ài;¢ É=«.É;¢ ¢ì=[];¢ ¢Å=«.£µ(¥²);¯(¢ i=¢Å.­-1;i>=0;i--){·(¢ì,¤á.±(¢Å[i].£Â)?¥¨:¢Å[i].£Â)}£ ¢Ã(¶,¹){¢ §=¥¨;if(£Á.±(¶.¤µ)){¯(¢ i=0;i<¶.£À.­;i++){§+=¢¡.¤´(¶.£À[i],¢Ä(¶.²,¹))}§+=((¶.²)?£¿(¶,¹):¢½(¢ì))}¤ §};´.§=¥¨;¯(i=0;i<É.­;i++)´.§+=¢Ã(É[i],¥¨);´.§=£´(´.§);¯(i in ó)ó[i]();£¦ ó;if(¢¹)¢¹.¢·();Ñ.¢·();´.£¾();´.¶.§=¢ë+£³(´.§);¯(i=0;i<É.­;i++){if(!É[i].ý&&!É[i].Æ)É[i].§=¥¨}´.¢Â();â(¥³)}õ(¢¨){â(¥´+¢¨.¢ï)}¢Ë{¢©()}};ª.¢Â=£(){Ñ.¢Â();¯(¢ i=0;i<ª.Ë.­;i++)ª.Ë[i]()};¢ Ñ=Ó £(){¢ Ç=[];ª.û=£(){·(Ç,¢¡)};¢ Ë=[];ª.Ú=£(á,¢Þ){¢ £½=Ó ¢æ(¥µ+á,¥¶);¢ §=´.§;á=[];Ê(¬=£½.¤²(§)){·(á,¬[1]);if(Å<5.5)§=§.»(¬.¤±)}if(á.­){á=á.Õ();·(Ë,¢¡)}};ª.¢·=£(){¯(¢ i=0;i<Ç.­;i++){´.§=´.§.³(Ç[i][0],Ç[i][1])}ª.Ú(¥·,é);ª.Ú(¥¸,£(¡){if(¡.¢².©.Ü==¥¹)é(¡.¢²)})};ª.¢Â=£(){¯(¢ i=0;i<Ë.­;i++){¢ î=¢¶(Ë[i][0]);¯(¢ j=0;j<î.­;j++)Ë[i][1](î[j])}};ª.û(¤âgi,¥º);if(Å<6)ª.û(¤ãgi,¥»);if(è){¢ à=¥¼.¢ç(¥½);¯(¢ i=0;i<à.­;i++)à[à[i]]=à[i-1]||¥¾;£ ³($,$1,$2,$3){¤ $1+à[$3]};ª.û(Ó ¢æ(¥¿+à.¢å(¥À)+¥Á,¥¶),³)}};¢ £¹=¤ä;¢ £¸=¤åg;¢ £·=¤æ;¢ £¼=¤çg;¢ £»=¥Â;¢ þ={};£ ¢¶(µ,¦){¢ ¢è=!¦;¢ ¢é=(¦)?(¦.¤§==¤¦)?¦:[¦]:[«];¢ ñ=µ.³(£¼,£»).¢ç(¥½);¢ ¬=[];¯(¢ i=0;i<ñ.­;i++){µ=£º(ñ[i]);if(µ.»(0,3).¢å(¥¨)==¥Ã){µ=µ.»(2);¦=£¶(¢é,µ[1])}Ö ¦=¢é;¢ j=0,ß,®,Á,ò=¥¨;Ê(j<µ.­){ß=µ[j++];®=µ[j++];ò+=ß+®;Á=¥¨;if(µ[j]==¥Ä){Ê(µ[j++]!=¥Á)Á+=µ[j];Á=Á.»(0,-1);ò+=¥Ä+Á+¥Á}¦=(¢è&&þ[ò])?þ[ò]:¢ß(¦,ß,®,Á);if(¢è)þ[ò]=¦}¬=¬.¤¥(¦)}¤ ¬};£ £º(µ){if(£¹.±(µ))µ=¥Å+µ;¤ µ.¬(£¸)};£ ¢ß(¦,ß,®,Á){¢ À=¥¨;if(£·.±(®)){®=®.¢ç(¥À);À=®[0];®=®[1]}¢ ¸=[];if(ñ[ß])ñ[ß](¸,¦,®,À||Á);¤ ¸};£ £¶(¦,id){¢ ¸=[],i,j;¯(i=0;i<¦.­;i++){¢ ¬=¦[i].ì.¢À(id);if(¬){if(¬.­==¤¤)·(¸,¬);Ö ¯(j=0;j<¬.­;j++)·(¸,¬[j])}}¤ ¸};¢ ñ={¥Å:£(¸,¦,®,À){¯(¢ i=0;i<¦.­;i++){¢ ¢¦=(®==¥Æ&&¦[i].ì)?¦[i].ì:¦[i].£µ(®);¯(¢ j=0;j<¢¦.­;j++){if(ï(¢¦[j])&&(!À||¢¦[j].À==À))·(¸,¢¦[j])}}},¥Ç:£(¸,¦,®){¯(¢ i=0;i<¦.­;i++)if(¦[i].id==®)·(¸,¦[i])},¥È:£(¸,¦,®){®=Ó ¢æ(¥É+®+¥Ê);¯(¢ i=0;i<¦.­;i++)if(®.±(¦[i].¤£))·(¸,¦[i])},¥Ë:£(¸,¦,®,Á){®=¢ä[®];if(®)¯(¢ i=0;i<¦.­;i++)if(®(¦[i],Á))·(¸,¦[i])}};¢ ¤¢=¥¨;¢ ¢ä={Õ:£(){¢ Õ=[];¯(¢ ð in ª){if(ð!=¥Ì&&ð!=¥Í){if(ª[ð].­>1)ð+=¥Î;·(Õ,ð)}}¤ Õ.¢å(¥À)},¥Ì:£(¡){¤ ¢£(¡.©[¥Ï]==¥Ì)},¥Í:£(¡){¤ ¢£(¡.©[¥Ï]==¥Í)}};¢ ¤¡={Õ:¢ä.Õ};£ £ÿ(¡,º,À){if(À&&¡.À!=À)¤ Þ;¤(º==¥Æ)?ï(¡):(ë)?(¡.º==º.¢ý()):(¡.º==º)};¢ ¢¾=[];£ £þ(¢¿){¤ ¢».±(¢¿)?¢¾[¢¿.»(1,-1)]:¢¿};¢ £´=£(§){¤ §.³(¤èg,£(¬){¤(¬.¢þ(0)==¥©)?¥¨:¥Ð+(·(¢¾,¬.»(1,-1))-1)+¥Ð}).³(¤ég,¥¨).³(¤êg,¥À).³(¤ëg,¥°)};£ £³(§){¤ §.³(¤æg,¥Ñ).³(¤ìg,£(¬,£²){¤ ¢¾[£²]})};¢ ¢¼=[];£ ö(¡,Ý,Ô){¡.£±(Ý,Ô);·(¢¼,¢¡)};£ £°(¡,Ý,Ô){ÿ{¡.£û(Ý,Ô)}õ(¢à){}};ù.£±(¥Ò,£(){Ê(¢¼.­){¢ Ô=¢½(¢¼);£°(Ô[0],Ô[1],Ô[2])}});¢ ¢³=(Å<6)?£(¡){¤ ¡.Ä}:£(¡){¤ ¡.©.¢³};£ é(¡){if(!¢³(¡)){¡.£ù=Þ;£¯(£«(¡))}};£ £¯(¡){Ê(¡){¡.°.£®=¡.©.£®;¡=¢â(¡)}};¢ ¢»=¤í;£ £ø(¥){¤(¢».±(¥))?¥:¥Ð+¥+¥Ð};£ £÷(¥){¤(¢».±(¥))?¥.»(1,-1):¥};£ £¡(º){¢ ¡=«.£ª(º||¥Ó);¡.Í.§=¥Ô;¤ ¡};£ ï(¢¢){¤ ¢£(¢¢&&¢¢.£ñ==1&&¢¢.º!=¥Õ&&!¢¢.£ð)};£ £ï(¡){Ê(¡&&(¡=¡.£î)&&!ï(¡))£¬;¤ ¡};£ ¢â(¡){Ê(¡&&(¡=¡.Ì)&&!ï(¡))£¬;¤ ¡};£ £«(¡){¡=¡.£í;¤(ï(¡))?¡:¢â(¡)};¢ ¢«=Þ;´.¢´(¥Ö,£(){if(ë)¢¹=Ó £(){¢ Ç=[];£ ¢Þ(¡){¢ ¢¸=«.£ª(¥×+¡.¢µ.»(1));if(¡.¢µ.»(-2)!=¥Ø){¢ £©=¥Ù+¡.º+¥Ú,Ì;Ê((Ì=¡.Ì)&&Ì.¢µ!=£©){¡.¢á.¢Ú(Ì);¢¸.¢Ï(Ì)}if(Ì)¡.¢á.¢Ú(Ì)}¡.¢á.£ë(¢¸,¡);¤ ¢¸};ª.í=£(){·(Ç,¢¡)};ª.¢·=£(){ÿ{if(Å>5)«.£ê.í(¥Û,¥Ü)}õ(¢à){}¢Ë{¯(¢ i=0;i<Ç.­;i++){¢ î=¢¶(Ç[i][0]);¯(¢ j=0;j<î.­;j++)Ç[i][1](î[j])}}};ª.í(¥Ý,£(¡){if(!¡.£§){¢ Ò=¢¶(¥Þ,¡)[0];if(Ò){if(!Ò.id)Ò.id=Ò.ü;¡.£§=Ò.id}}});ª.í(¥ß,£(¡){¢Þ(¡);£¦ þ[¥à]});ª.í(¥á,£(¡){if(¡.º==¥â){¢ ¬=¡.¢µ.¬(¤îi);¡.°.¥=(¬)?¬[1]:¥¨}if(¡.Ý==¥ã){ö(¡,¥ä,£(){¡.°.¢Ý=×;¢ª(¥å+¡.ü+¥æ,1)})}});ª.í(¥ç,£(¡){¢ ££=¤ï;ö(¡,¥è,£(){¯(¢ i=0;i<¡.­;i++){if(££.±(¡[i].Ý)&&!¡[i].ý&&!¡[i].°.¢Ý){¡[i].ý=×;¢ª(¥å+¡[i].ü+¥é,1)}Ö if(¡[i].º==¥â&&¡[i].Ý==¥ã){¢ª(¥å+¡[i].ü+¥ê+¡[i].¥+¥Ð,1);¡[i].¥=¡[i].°.¥}}})})}},×);´.¢´(¥ë,£(){¢ ¢¯=¥ì,¢û=¤ð,¢ñ=¤ñ,¢Ð=¤ò;¢ ¢ÿ=(Å<6)?¤ógi:¤ôgi;¢ ¢ö=(Å<5.5)?¤õ:¤ö;¢ Ã=£¡();·(´.Ë,£ ¢ò(){if(Ã.Î)Ã.Î.¢Ú(Ã)});Ñ.û(¢ÿ,£(¬){¤ ¬.»(0,3)+¬.¢þ(4).¢ý()+¬.»(5)});¢ ¢ü=(è)?«.¢Ù:Ù;£ ¢Ó(¡){¤ ¡.Í.Ü==¥í||¡.©.Ü==¥í};£ ¾(¡){¢ ¾=¡.¢²;Ê(¾&&!¢³(¾))¾=¾.¢²;if(!¾||¢Ó(¡))¾=¢ü;¤ ¾};£ å(¢ó){å=£(¡,¥){if(!¡.°.¿&&(!ë||¡.º!=¥î)){if(!¥)¥=¡.©.¨;¡.°.¿=(¢û.±(¥))?£Þ.ú(0,ê(¡,¥)):¥;¡.°.¨=¡.°.¿;é(¡)}};if(è)Ñ.Ú(¥ï,å);¢ ê=(è)?£(¡,¥){¤ ç(¡,¥)+¢Õ(¡)+¢Ô(¡)}:£(¡,¥){¤ ç(¡,¥)};£ ¢Õ(¡){¤ ¡.¢Ñ-¡.Ä};£ ¢Ô(¡){¤ ç(¡,¡.©.£Ý)+ç(¡,¡.©.£Ü)};£ ¢ô(¡){¤((¡.©.¢ù==¥ð)?0:÷(¡,¡.©.¢ù))+((¡.©.¢ø==¥ð)?0:÷(¡,¡.©.¢ø))};£ ¼(¡){¼[¼.Ï++]=¡;if(¡.©.¢÷==¥ð)¡.°.¢÷=0;å(¡);é(¡);¢®(¡)};¼.Ï=0;Ñ.Ú(¥ñ+¢¯,¼);¢¬(¢Î(¼).³(¤÷g,¥ò));Ð.Ï=0;Ñ.Ú(¥ó+¢¯,Ð);£ ¢®(¡){¢ ¢°=¡.¢õ();¢ ¨=¢°.æ-¢°.Â;if(¡.©.Ð&&¨>=ê(¡,¡.©.Ð))¡.°.¨=ê(¡,¡.©.Ð);Ö if(¡.©.¼&&¨<=ê(¡,¡.©.¼))¡.°.¨=ê(¡,¡.©.¼);Ö ¡.°.¨=¡.°.¿};£ Ø(¡){if((¡.©.Ü==¥ô||¡.©.Ü==¥í)&&¡.©.Â!=¥ð&&¡.©.æ!=¥ð&&¢ö.±(¡.©.¨)){Ø[Ø.Ï++]=¡;é(¡);¢Ò(¡)}};Ø.Ï=0;Ñ.Ú(¥õ+¢¯,Ø);£ ¢Ò(¡){¡.°.¨=¥¨;¢ Î=¾(¡);¢ Â=(¡.°.£Û)?¡.¢õ().Â-2:÷(¡,¡.©.Â);¢ ¨=Î.Ä-÷(¡,¡.©.æ)-Â-¢ô(¡);if(!è)¨-=¢Õ(¡)+¢Ô(¡);if(¨<0)¨=0;if(¢Ó(¡)||¢ó||¡.¢Ñ<¨){¡.°.¿=¨;¡.°.¨=¨}};¢ Ä=Ù.Ä;ö(ù,¥ö,£(){¢ i,ø=(Ä<Ù.Ä);Ä=Ù.Ä;¯(i=0;i<¼.Ï;i++){¢ ¡=¼[i];¢ ¿=(¡.°.¨==¡.©.¼);if(ø&&¿)¡.°.¨=¥¨;if(ø==¿)¢®(¡)}¯(i=0;i<Ð.Ï;i++){¢ ¡=Ð[i];¢ ¿=(¡.°.¨==¡.©.Ð);if(!ø&&¿)¡.°.¨=¥¨;if(ø!=¿)¢®(¡)}¯(i=0;i<Ø.Ï;i++)¢Ò(Ø[i]);¢ò()});£ ç(¡,¥){if(¢Ð.±(¥))¤ ¢­(¥);if(¢ñ.±(¥))¤ ¢­(£Ù(¥)/100*¾(¡).Ä);¢ Î=(¡.£Ø)?¡:¡.Î;Î.¢Ï(Ã);Ã.Í.¨=¥;¤ Ã.¢Ñ};£ ÷(¡,¥){if(¢­(¥)>0)¤ ç(¡,¥);if(¢Ð.±(¥))¤ ¢­(¥);¡.Î.¢Ï(Ã);Ã.Í.Â=¥;¤ Ã.£×}};¢¬(¢Î(å).³(¤øg,¥÷).³(¤ùg,¥ø).³(¤úg,¥ù).³(¤ûg,¥ú).³(¤üg,¥û).³(¤ýg,¥ü));å();£Î(×)});¢«=×;if(«.¢Í==¥®)_ã();Ö ö(«,¥ý,£(){if(!ä&&«.¢Í==¥®)¢ª(_ã,0)})}õ(¢¨){¢©();â(¥þ+¢¨.¢ï)}¢Ë{}}();',340,0,/./,String,95,'element`var`function`return`value`from`cssText`width`currentStyle`this`document`match`length`filter`for`runtimeStyle`test`href`replace`IE7`selector`styleSheet`push`filtered`path`tagName`slice`minWidth`x5cs`layoutParent`fixedWidth`scopeName`filterArgs`left`ie7_tmp`clientWidth`appVersion`ie7`fixes`link`styleSheets`while`recalcs`nextSibling`style`parentElement`count`maxWidth`CSSFixes`input`new`handler`toString`else`true`fixRight`documentElement`addRecalc`auto`position`type`false`token`SIZES`pattern`alert`load`complete`fixWidth`right`getPixelWidth`quirksMode`boxSizing`getFixedWidth`isHTML`all`add`elements`isElement`pseudoClass`selectors`cacheSelector`modules`script`catch`addEventHandler`getPixelLeft`wider`window`max`addFix`uniqueID`disabled`cssCache`try`arguments`node`Boolean`x5c`visited`subset`url`error`unHide`setTimeout`loaded`eval`parseInt`resizeWidth`NUMERIC`rect`min`offsetParent`hasLayout`addModule`outerHTML`cssQuery`apply`fixedElement`HTMLFixes`display`QUOTED`handlers`pop`strings`string`item`small`recalc`getCSSText`getPath`styles`DUMMY`pathname`makePath`array`httpRequest`finally`Error`readyState`String`appendChild`PIXEL`offsetWidth`resizeRight`isFixed`getPaddingWidth`getBorderWidth`fixed`absolute`x5cw`body`removeChild`box`submit`clicked`fix`select`ignore`parentNode`nextElement`x2f`pseudoClasses`join`RegExp`split`useCache`base`large`HEADER`inlineStyles`LINKS`location`description`height`PERCENT`removeTempElement`HEIGHT`getMarginWidth`getBoundingClientRect`AUTO`minHeight`marginRight`marginLeft`x5cd`UNIT`viewport`toUpperCase`charAt`MATCH`tmpElement`BUTTON`UNSUCCESSFUL`button`abbr`delete`htmlFor`HTML`endTag`createElement`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`decode`encode`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`parse`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`name`autoload`mimeType`search`message`onreadystatechange`fixHeight`bottom`Bottom`Right`top`Top`Left`Height`Width`offsetLeft`canHaveChildren`parseFloat`onresize`screenLeft`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`firstChild`previousSibling`previousElement`ie7_anon`nodeType`clip`none`border`padding`object`unquote`quote`contentEditable`onbeforeunload`detachEvent`import`namespace`getString`compareTagName`dynamicPseudoClasses`attributeTests`className`null`concat`Array`constructor`size`font`medium`list`inline`float`relative`content`sizing`lastIndex`exec`successfully`callee`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`Microsoft`ActiveXObject`src`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ms_`ie7_off`MSIE`navigator`ie7_debug`alpha`version`visible`visibility`Function`fromCharCode`¤Ò`¤Ð (\\d\\.\\d)`¤Ï`^¤Î`\\.¤É$`^[\\w\\.]+[^:]*$`(¢§\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¤·\\b|\\¤¶\\b|^$`Æ-È`(¤­\\s*:\\s*(Â|æ))`¢º\\s*:\\s*¤«-¢À`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢ã\\*[^\\*]*\\*+([^\\¢ã][^\\*]*\\*+)*\\¢ã)|(\x27[^\x27]*\x27)|("[^"]*")`@(£ý|£ü)[^;\\n]+[;\\n]|`\\¢¤:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ¥="([^"]*)"`^(¢Ü|£á|£¤)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(¢±|ú)-(¨|¢ð)\\s*:\\s*\\d`\\b(¢±|ú)-¨\\s*:\\s*\\d`^Û|0cm$`^Û$`¢±`£Ö`¨`£Ô`Â`£Ñ`æ`¤Õ`´ ¤Ô 0.7.3 (¤Ó)`\\n\\n`¤Ì`¤Ê`¤È ¤Ç`:È{Æ-È:È}:¢¥{Æ-È:¢¥}`*{¤Æ:0}`ô=``/`¤Ã.¤Â`¤À`¢Ì [1]: ¤½ ¤¼ ã ¤» `Æ-¤º.js`ä`<Í>`$1`$2`Í`¢« ¤³`¢Ì [2]: `([^{}]*)\\¢¤{([^}]*[^\\¢Ø-])?`gi`¢Û-¤°\\½*:\\½*¤¯-¢Û`Ü\\½*:\\½*¢×`¤®`¢º:¤¬;$1`¢º:£­`xx-¢Á,x-¢Á,¢Á,¤ª,¢ê,x-¢ê,xx-¢ê`,`xx-¢Á`(¤©(-¤¨)?\\½*:\\½*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\½)`(\\½|$)`:`È`¢¥`\\¢¤([^)]*\\¢¤)`Æ-È`\x27`\\¢¤:`£ú`£ö`Ü:¢×;£õ:0;¢º:£­;£ô:£ó;£ò:¢°(0 0 0 0);Â:-9999`!`Æ-£ì`<£¨:`/>``£¨`£é://£è.w3.£ç/1999/£æ`£å`Ò,¢ß,£ä`£¥` £¥`£¤,Ò`£¢`¢Ü`£ã`«.ì.`.°.¢Ý=Þ`£â`£à`.ý=Þ`.¥=\x27`Æ-¢Û-£ß`\\½*:\\½*\\¢ú[\\¢Ø%]*`¢Ö`HR`¨\\½*:\\½*\\¢ú\\¢Ø*[^%]`Û`¢±-¨`ú`ú-¨`¢×`æ`£Ú`£Õ`¢ð`£Ó`£Ò`£Ð`£Ï`£Í`¢Ì [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-lite.js b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-lite.js new file mode 100644 index 0000000..88c764f --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-lite.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-png.js b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-png.js new file mode 100644 index 0000000..7b8f2cf --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-png.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-png",function(){if(appVersion<5.5)return;var FILTER="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=%1,sizingMethod='scale')";var NULL=(/\bSV1\b/.test(navigator.userAgent))?makePath("blank.gif",path):"javascript:'#define x_width 1\x5cn#define x_height 1\x5cnstatic char x_bits[]={0x00}'";var pngTest=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");function addFilter(element,src){element.runtimeStyle.filter=FILTER.replace(/%1/,src)};var MATCH=/background(-image)?\s*:([^(};]*)url\(([^\)]+)\)([^;}]*)/gi;CSSFixes.addFix(MATCH,function replace(match,image,prefix,url,suffix){url=getString(url);return pngTest.test(url)?"filter:"+FILTER.replace(/scale/,"crop").replace(/%1/,url)+";zoom:1;background"+(image||"")+":"+(prefix||"")+"none"+(suffix||""):match});if(HTMLFixes){function fixImg(element){if(pngTest.test(element.src)){var width=element.width,height=element.height;addFilter(element,element.src);element.src=NULL;element.width=width;element.height=height}else element.runtimeStyle.filter=""};HTMLFixes.add("img,input",function(element){if(element.tagName=="INPUT"&&element.type!="image")return;fixImg(element);addEventHandler(element,"onpropertychange",function(){if(event.propertyName=="src")fixImg(element)})})}}); diff --git a/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-server.css b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-server.css new file mode 100644 index 0000000..47c7edd --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-server.css @@ -0,0 +1,43 @@ +body, td, dd {font: 10pt Verdana, Arial, Helvetica, sans-serif; color: black;} +body {margin: 8px; background: #333;} +h1 {margin: 0;} +h1 a:hover {background-color: transparent;} +h2 {font-size: 1.75em;} +h3 {font-size: 1.1em;} +a:active {color: #ff0000;} +a:link {color: #0a6cce;} +a:visited {color: #0a6cce;} +code, *.code {font-family: monospace; font-size: 100%; font-style: normal; white-space: nowrap; + padding: 0 1px; background: #f2f3f8; border: #d6d9e9 1px solid;} +code.box {display: block; padding: 10px; margin: 0.5em 0;} +ul {list-style-type: square;} +dd {margin: .2em 0 .5em 1em;} +dl.library dt {display: list-item; margin-left: 3em; list-style-type: square;} +dl.library dd {font-style: italic; margin-left: 3em;} +dt {font-weight: bold;} +dt.pack {color: brown;} +a img {border-style: none;} +hr {height: 1px; color: #000; border-style: solid;} +hr.short {height: 2px; width: 100px;} +div.document {background: #eef; padding: 20px 20px 5px 20px; width: 600px; border: 1px solid black;} +hr {border-bottom-width: 0px;} +div.header hr {color: #0a6cce; background-color: #0a6cce;} +div.content {min-height: 100px;} +div.footer hr {color: #898e79; background-color: #898e79; } +div.header, div.header a:link, div.header a:visited, h3 a:link, h3 a:visited {text-decoration: none;} +a:hover {color: #fff; background-color: #0a6cce; text-decoration: none;} +div.footer a:hover {background-color: transparent; text-decoration: none;} +div.header .menu {text-align: right;} +div.footer {font-size: x-small; margin-top: 8px;} +div.footnote {font-family: "times new roman", times; font-style: italic; margin-top: 10px;} +#license {margin-top: 5px; font-size: xx-small;} +table {border-top: 1px solid #000; border-left: 1px solid #000;} +th {background-color: #fff; text-align: left;} +th, td {border-right: 1px solid #000; border-bottom: 1px solid #000;} +th.small {width: 100px;} +th.medium {width: 200px;} +th.large {width: 270px;} +th.x-large {width: 408px;} +table.fixed {table-layout: fixed;} +span.comment {color: #666;} + diff --git a/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-standard-p.js b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-standard-p.js new file mode 100644 index 0000000..73e99ac --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-standard-p.js @@ -0,0 +1,3 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +eval(function(A,r,s,e,n,a,l){s=function(e){return((e=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!¢¡.ª)¶ ¢(){¢Æ{¢¡.ª=¤;£ ¢Ø=¤.¢©=¶ ¤¬;¢ ¢ì(){if(².ß)².ß.Ì.¦²=¦ë};¤.È=¢(){¥ ¦ì};£ ¢¶=(¦´.µ(¢ô.¤ì))?¢(¤í){¢¡.¢¶(ª+¦í+¤í)}:¢Ø;£ á=¤¥.á.§(¦µ)[1];if(¦¶.µ(¢ô.¤ì)||á<5||!¦·.µ(².ù.¢«))¥ ¢ì();£ ¢§=¢ê(².¦«!=¦î);£ ¢±=(¦© ².¤ë==¦ï)?!¦¸i.µ(¢ô.£»):¢ê(².¤ë!=¦ð);£ £ê=¦ñ;£ £¦=£ê;if(!¢±)£¦+=¦ò;£ ¢½;£ ù=².ù;£ ¢Ñ={};¤.¢©=¢(¢Ç,¢Ò,¤ê){if(!¢Ñ)¥;if(¢í)Ü(¦ó+¢ó(¢Ò));if(¤ê){¢Ò();¢Ò=¢Ø}¢Ñ[¢Ç]=¢Ò};£ ¤é=¦¹;¢ ¢À(¾,Á){if(¤é.µ(¾))¾=(Á||¦ô)+¾;¥ ¾};¢ £¹(¾,Á){¾=¢À(¾,Á);¥ ¾.Æ(0,¾.¤å(¦õ)+1)};£ Á=£¹(².¤è[².¤è.¯-1].î);£ £½=¶ ¦£(¦ö);¢ ê(¾,Á){¢Æ{¾=¢À(¾,Á);£½.¦¡(¦÷,¾,ë);£½.¥þ();¥ £½.¥ý}¢·(£¥){¢¶(¦ø+¾);¥ ¦ô}};£ ¸=¢(£¼,£·){¥ £¼.¸(£·)};£ £´=¢(£¼){¥ £¼.£´()};if(á<5.5)Ü(ê(¦ù,Á));if(².£À==¦ú||!¢±)².¥ø();Û ².¥÷(¦û);¤.¿=².é[².é.¯-1];¤.¿.¨=£ê;¤.¿.Î=Ö;£ ¨={};¢ ¤á(¿,Á){£ Ô=¢À(¿.¾,Á);if(¨[Ô])¥ ¦ô;¨[Ô]=(¿.¢ç)?¦ô:¤ç(¢ã(¿,Á),£¹(¿.¾,Á));¥ ¨[Ô]};£ ¢ã=¢(¿){¥ ¿.¨};£ ¤æ=¦ºgi;¢ ¤ç(¨,£»){¥ ¨.¬(¤æ,¦ü+£».Æ(0,£».¤å(¦õ)+1)+¦ý)};¤.ô=[];¤.¢â=¢Ø;£ ¢¸=ë;¢ _ê(){¢Æ{¢¸=Ö;£ ¤ã=¦»i;£ é=².é;£ £é=[];£ £º=².¤Ø(¦þ);®(£ i=£º.¯-1;i>=0;i--){¸(£é,¦¼.µ(£º[i].¤ä)?¦ô:£º[i].¤ä)}¢ ¢ã(¿,Á){£ ¨=¦ô;if(¤ã.µ(¿.¥ô)){®(£ i=0;i<¿.¤â.¯;i++){¨+=í.£ó(¿.¤â[i],£¹(¿.¾,Á))}¨+=((¿.¾)?¤á(¿,Á):£´(£é))}¥ ¨};ª.¨=¦ô;®(i=0;i<é.¯;i++)ª.¨+=¢ã(é[i],¦ô);ª.¨=£©(ª.¨);®(i in ¢Ñ)¢Ñ[i]();£Ö ¢Ñ;if(¢½)¢½.£°();à.£°();ª.¢â();ª.¿.¨=£¦+£§(ª.¨);®(i=0;i<é.¯;i++){if(!é[i].¢ç&&!é[i].Î)é[i].¨=¦ô}ª.Ø();¢¶(¦ÿ)}¢·(¢ë){¢¶(§¡+¢ë.£ë)}£¾{¢ì()}};¤.Ø=¢(){à.Ø();®(£ i=0;i<¤.ô.¯;i++)¤.ô[i]()};£ à=¶ ¢(){£ è=[];¤.¢¿=¢(){¸(è,í)};£ ô=[];¤.ï=¢(¢µ,£ä){£ ¤à=¶ ç(§¢+¢µ,§£);£ ¨=ª.¨;¢µ=[];Ý(§=¤à.¢ß(¨)){¸(¢µ,§[1]);if(á<5.5)¨=¨.Æ(§.¥ò)}if(¢µ.¯){¢µ=¢µ.È();¸(ô,í)}};¤.£°=¢(){®(£ i=0;i<è.¯;i++){ª.¨=ª.¨.¬(è[i][0],è[i][1])}¤.ï(§¤,¢Ê);¤.ï(§¥,¢(¡){if(¡.¢¥.«.³==§¦)¢Ê(¡.¢¥)})};¤.Ø=¢(){®(£ i=0;i<ô.¯;i++){£ ¢Í=ü(ô[i][0]);®(£ j=0;j<¢Í.¯;j++)ô[i][1](¢Í[j])}};¤.¢¿(¦½gi,§§);if(á<6)¤.¢¿(¦¾gi,§¨);if(¢§){£ ¢´=§©.£¨(§ª);®(£ i=0;i<¢´.¯;i++)¢´[¢´[i]]=¢´[i-1]||§«;¢ ¬($,$1,$2,$3){¥ $1+¢´[$3]};¤.¢¿(¶ ç(§¬+¢´.¢Ü(§­)+§®,§£),¬)}};£ ¤Ü=¦¿;£ ¤Û=¦Àg;£ ¤Ú=¦Á;£ ¤ß=¦Âg;£ ¤Þ=§¯;£ ¢è={};¢ ü(´,­){£ £æ=!­;£ £ç=(­)?(­.¥ê==¥é)?­:[­]:[²];£ ò=´.¬(¤ß,¤Þ).£¨(§ª);£ §=[];®(£ i=0;i<ò.¯;i++){´=¤Ý(ò[i]);if(´.Æ(0,3).¢Ü(¦ô)==§°){´=´.Æ(2);­=¤Ù(£ç,´[1])}Û ­=£ç;£ j=0,¢³,±,É,¢Ð=¦ô;Ý(j<´.¯){¢³=´[j++];±=´[j++];¢Ð+=¢³+±;É=¦ô;if(´[j]==§±){Ý(´[j++]!=§®)É+=´[j];É=É.Æ(0,-1);¢Ð+=§±+É+§®}­=(£æ&&¢è[¢Ð])?¢è[¢Ð]:£å(­,¢³,±,É);if(£æ)¢è[¢Ð]=­}§=§.¥è(­)}¥ §};¢ ¤Ý(´){if(¤Ü.µ(´))´=§²+´;¥ ´.§(¤Û)};¢ £å(­,¢³,±,É){£ Ê=¦ô;if(¤Ú.µ(±)){±=±.£¨(§­);Ê=±[0];±=±[1]}£ ¼=[];if(ò[¢³])ò[¢³](¼,­,±,Ê||É);¥ ¼};¢ ¤Ù(­,id){£ ¼=[],i,j;®(i=0;i<­.¯;i++){£ §=­[i].¢Ì.£·(id);if(§){if(§.¯==¢Þ)¸(¼,§);Û ®(j=0;j<§.¯;j++)¸(¼,§[j])}}¥ ¼};£ ò={§²:¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=(±==§³&&­[i].¢Ì)?­[i].¢Ì:­[i].¤Ø(±);®(£ j=0;j<ó.¯;j++){if(¢Î(ó[j])&&(!Ê||ó[j].Ê==Ê))¸(¼,ó[j])}}},§´:¢(¼,­,±){®(£ i=0;i<­.¯;i++)if(­[i].id==±)¸(¼,­[i])},§µ:¢(¼,­,±){±=¶ ç(§¶+±+§·);®(£ i=0;i<­.¯;i++)if(±.µ(­[i].¢Ý))¸(¼,­[i])},§¸:¢(¼,­,±,É){±=¢®[±];if(±)®(£ i=0;i<­.¯;i++)if(±(­[i],É))¸(¼,­[i])}};£ ¢¬=¦ô;£ ¢®={È:¢(){£ È=[];®(£ ¢Ï in ¤){if(¢Ï!=§¹&&¢Ï!=§º){if(¤[¢Ï].¯>1)¢Ï+=§»;¸(È,¢Ï)}}¥ È.¢Ü(§­)},§¹:¢(¡){¥ ¢ê(¡.«[§¼]==§¹)},§º:¢(¡){¥ ¢ê(¡.«[§¼]==§º)}};£ ¢­={È:¢®.È};¢ £Ù(¡,Ï,Ê){if(Ê&&¡.Ê!=Ê)¥ ë;¥(Ï==§³)?¢Î(¡):(¢±)?(¡.Ï==Ï.¤Ç()):(¡.Ï==Ï)};£ £µ=[];¢ ¢ö(£¶){¥ £².µ(£¶)?£µ[£¶.Æ(1,-1)]:£¶};£ £©=¢(¨){¥ ¨.¬(¦Ãg,¢(§){¥(§.¤È(0)==¦õ)?¦ô:§½+(¸(£µ,§.Æ(1,-1))-1)+§½}).¬(¦Äg,¦ô).¬(¦Åg,§­).¬(¦Æg,¦ü)};¢ £§(¨){¥ ¨.¬(¦Ág,§¾).¬(¦Çg,¢(§,¤×){¥ £µ[¤×]})};£ £³=[];¢ Ó(¡,Õ,þ){¡.¤Ö(Õ,þ);¸(£³,í)};¢ ¤Õ(¡,Õ,þ){¢Æ{¡.¥å(Õ,þ)}¢·(£¥){}};¢¡.¤Ö(§¿,¢(){Ý(£³.¯){£ þ=£´(£³);¤Õ(þ[0],þ[1],þ[2])}});£ £®=(á<6)?¢(¡){¥ ¡.Í}:¢(¡){¥ ¡.«.£®};¢ ¢Ê(¡){if(!£®(¡)){¡.¥ã=ë;¤Ô(¤Ð(¡))}};¢ ¤Ô(¡){Ý(¡){¡.¦.¤Ó=¡.«.¤Ó;¡=¢þ(¡)}};£ £²=¦È;¢ ¤ª(©){¥(£².µ(©))?©:§½+©+§½};¢ ¥â(©){¥(£².µ(©))?©.Æ(1,-1):©};¢ £Ï(Ï){£ ¡=².£Û(Ï||§À);¡.Ì.¨=§Á;¥ ¡};¢ ¢Î(¢é){¥ ¢ê(¢é&&¢é.¥Þ==1&&¢é.Ï!=§Â&&!¢é.¢ÿ)};¢ ¤²(¡){Ý(¡&&(¡=¡.¥Ý)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¢þ(¡){Ý(¡&&(¡=¡.õ)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¤Ð(¡){¡=¡.¤¹;¥(¢Î(¡))?¡:¢þ(¡)};£ ¢í=ë;ª.¢©(§Ã,¢(){if(¢±)¢½=¶ ¢(){£ è=[];¢ £ä(¡){£ £±=².£Û(§Ä+¡.£¯.Æ(1));if(¡.£¯.Æ(-2)!=§Å){£ ¤Ï=§Æ+¡.Ï+§Ç,õ;Ý((õ=¡.õ)&&õ.£¯!=¤Ï){¡.¢ü.¢Õ(õ);£±.¢»(õ)}if(õ)¡.¢ü.¢Õ(õ)}¡.¢ü.¥Û(£±,¡);¥ £±};¤.æ=¢(){¸(è,í)};¤.£°=¢(){¢Æ{if(á>5)².¥Ú.æ(§È,§É)}¢·(£¥){}£¾{®(£ i=0;i<è.¯;i++){£ ¢Í=ü(è[i][0]);®(£ j=0;j<¢Í.¯;j++)è[i][1](¢Í[j])}}};¤.æ(§Ê,¢(¡){if(!¡.¤Í){£ ð=ü(§Ë,¡)[0];if(ð){if(!ð.id)ð.id=ð.¢«;¡.¤Í=ð.id}}});¤.æ(§Ì,¢(¡){£ä(¡);£Ö ¢è[§Í]});¤.æ(§Î,¢(¡){if(¡.Ï==§Ï){£ §=¡.£¯.§(¦Éi);¡.¦.©=(§)?§[1]:¦ô}if(¡.Õ==§Ð){Ó(¡,§Ñ,¢(){¡.¦.£ã=Ö;¢Ó(§Ò+¡.¢«+§Ó,1)})}});¤.æ(§Ô,¢(¡){£ ¤Ê=¦Ê;Ó(¡,§Õ,¢(){®(£ i=0;i<¡.¯;i++){if(¤Ê.µ(¡[i].Õ)&&!¡[i].¢ç&&!¡[i].¦.£ã){¡[i].¢ç=Ö;¢Ó(§Ò+¡[i].¢«+§Ö,1)}Û if(¡[i].Ï==§Ï&&¡[i].Õ==§Ð){¢Ó(§Ò+¡[i].¢«+§×+¡[i].©+§½,1);¡[i].©=¡[i].¦.©}}})})}},Ö);ª.¢©(§Ø,¢(){£ £«=§Ù,¤Æ=¦Ë,¢Ö=¦Ì,£Ý=¦Í;£ ¢¾=(á<6)?¦Îgi:¦Ïgi;£ ¤Ã=(á<5.5)?¦Ð:¦Ñ;£ ¹=£Ï();¸(ª.ô,¢ ¤À(){if(¹.½)¹.½.¢Õ(¹)});à.¢¿(¢¾,¢(§){¥ §.Æ(0,3)+§.¤È(4).¤Ç()+§.Æ(5)});£ Þ=(¢§)?².ß:ù;¢ ö(¡){¥ ¡.Ì.³==§Ú||¡.«.³==§Ú};¢ ã(¡){£ ã=¡.¢¥;Ý(ã&&!£®(ã))ã=ã.¢¥;if(!ã||ö(¡))ã=Þ;¥ ã};¢ ì(¤Á){ì=¢(¡,©){if(!¡.¦.ä&&(!¢±||¡.Ï!=§Û)){if(!©)©=¡.«.°;¡.¦.ä=(¤Æ.µ(©))?¥Î.¢æ(0,¢Ë(¡,©)):©;¡.¦.°=¡.¦.ä;¢Ê(¡)}};if(¢§)à.ï(§Ü,ì);£ ¢Ë=(¢§)?¢(¡,©){¥ ¢É(¡,©)+£à(¡)+£ß(¡)}:¢(¡,©){¥ ¢É(¡,©)};¢ £à(¡){¥ ¡.¢¼-¡.Í};¢ £ß(¡){¥ ¢É(¡,¡.«.¥Í)+¢É(¡,¡.«.¥Ì)};¢ ¤Â(¡){¥((¡.«.¢ï==§Ý)?0:¢ä(¡,¡.«.¢ï))+((¡.«.¤Å==§Ý)?0:¢ä(¡,¡.«.¤Å))};¢ Ú(¡){Ú[Ú.Ë++]=¡;if(¡.«.¤Ä==§Ý)¡.¦.¤Ä=0;ì(¡);¢Ê(¡);£ª(¡)};Ú.Ë=0;à.ï(§Þ+£«,Ú);Ü(¢ó(Ú).¬(¦Òg,§ß));ý.Ë=0;à.ï(§à+£«,ý);¢ £ª(¡){£ £¬=¡.£É();£ °=£¬.×-£¬.À;if(¡.«.ý&&°>=¢Ë(¡,¡.«.ý))¡.¦.°=¢Ë(¡,¡.«.ý);Û if(¡.«.Ú&&°<=¢Ë(¡,¡.«.Ú))¡.¦.°=¢Ë(¡,¡.«.Ú);Û ¡.¦.°=¡.¦.ä};¢ ¢²(¡){if((¡.«.³==§á||¡.«.³==§Ú)&&¡.«.À!=§Ý&&¡.«.×!=§Ý&&¤Ã.µ(¡.«.°)){¢²[¢².Ë++]=¡;¢Ê(¡);£Þ(¡)}};¢².Ë=0;à.ï(§â+£«,¢²);¢ £Þ(¡){¡.¦.°=¦ô;£ ½=ã(¡);£ À=(¡.¦.¢Ô)?¡.£É().À-2:¢ä(¡,¡.«.À);£ °=½.Í-¢ä(¡,¡.«.×)-À-¤Â(¡);if(!¢§)°-=£à(¡)+£ß(¡);if(°<0)°=0;if(ö(¡)||¤Á||¡.¢¼<°){¡.¦.ä=°;¡.¦.°=°}};£ Í=ù.Í;Ó(¢¡,§ã,¢(){£ i,¢å=(Í<ù.Í);Í=ù.Í;®(i=0;i<Ú.Ë;i++){£ ¡=Ú[i];£ ä=(¡.¦.°==¡.«.Ú);if(¢å&&ä)¡.¦.°=¦ô;if(¢å==ä)£ª(¡)}®(i=0;i<ý.Ë;i++){£ ¡=ý[i];£ ä=(¡.¦.°==¡.«.ý);if(!¢å&&ä)¡.¦.°=¦ô;if(¢å!=ä)£ª(¡)}®(i=0;i<¢².Ë;i++)£Þ(¢²[i]);¤À()});¢ ¢É(¡,©){if(£Ý.µ(©))¥ ø(©);if(¢Ö.µ(©))¥ ø(£Æ(©)/100*ã(¡).Í);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);¹.Ì.°=©;¥ ¹.¢¼};¢ ¢ä(¡,©){if(ø(©)>0)¥ ¢É(¡,©);if(£Ý.µ(©))¥ ø(©);¡.½.¢»(¹);¹.Ì.À=©;¥ ¹.¢¤}};Ü(¢ó(ì).¬(¦Óg,§ä).¬(¦Ôg,§å).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦×g,§è).¬(¦Øg,§é));ì();¥É(Ö)});ª.¢©(§ê,¢(){£ ¤§=¦Ùg,¤½=¦Úi;ª.¢á=[];ª.¤¿=¶ ¤¾;ª.·=·;ª.Ò=Ò;ª.Ã=Ã;ª.¢â=¢(){¥Ç(¤.¤¿)¤.¨=£§(¢â(£©(¤.¨)));®(£ i=0;i<ª.¢á.¯;i++)ª.¢á[i].¢ß();®(i=0;i<£¡.¯;i++)£¡[i].¤º()};¢ã=¢(¿,Á){¥ ê(¿.¾,Á)};£ ££=[];¢ ¤¾(){¤.¢â=¢(¨){·.û=¶ ç(§ë+¢®+§ì,§í);·.¤¨=¶ ç(§î+¢®+§­+¢­+§ï,§í);Ò.û=¶ ç(§ð+¢­+§ñ,§í);¥ ¨.¬(Ã.û,Ã.ID).¬(Ò.û,Ò.ID).¬(·.û,·.ID)};¤.£©=¢(¨){ñ.û=¶ ç(§ò+¢¬+§ó+¢¬+§ô,§í);¥ ¨.¬(ñ.û,ñ.ID).¬(¦Ûg,¢($){¥ §õ+(¸(££,$)-1)+§ö}).¬(¦Üg,§¸).¬(¦Ýg,¢(§,À,×){¥ À.£¨(§ª).¢Ü(×)+×})};¤.£§=¢(¨){¥ ¨.¬(¦Þg,¢($,$1){¥ ££[$1]})}};¢ _·(){¤.È=¢(){¥ §µ+¤.¢Ç};¤.æ=¢(¡){¡.¢Ý+=§²+¤.¢Ç};¤.¤©=¢(¡){¡.¢Ý=¡.¢Ý.¬(¤.¢¾,¦ô)};¤.¢ß=¢(){£ §=ü(¤.´);®(£ i=0;i<§.¯;i++)¤.æ(§[i])}};¢ ·(´,¨){¤.id=ª.¢á.¯;¤.¢Ç=·.¢ø+¤.id;¤.´=´;¤.¢¾=¶ ç(§÷+¤.¢Ç+§ø,§í);¸(ª.¢á,¤)};·.£Ú=_·;·.¢ª=¶ _·;·.¢ø=§ù;·.ID=¢(§){¥ £Õ(§)+¶ ·(§)};¢ _Ò(){¤.¢ß=¢(){£ §=ü(¤.¢°);®(£ i=0;i<§.¯;i++){£ º=(¤.º)?ü(¤.º,§[i]):[§[i]];if(º)¤.¢¯(§[i],º,¤)}}};_Ò.¢ª=¶ _·;¢ Ò(´,¢°,¢¯,º){¤.¢°=¢°;¤.¢¯=¢­[¢¯];¤.º=º;¤.£¢=·;¤.£¢(´)};Ò.£Ú=_Ò;Ò.¢ª=¶ _Ò;Ò.ID=¢(§,¢°,¢¯,º){if(¢±&&¢¯!=§ú&&¤½.µ(¢°)&&!¦ß.µ(º))¥ §;¥ £Õ(§)+¶ Ò(§,¢°,¢¯,º)};£¦+=§û;£ ¤·=¦àg;¢ ¤¶(§,£Ü){¥ Ü(§ü+§ý.Æ(£Ü.¯)+£Ü+§½)};£ £¡=[];¢ _Ã(){¤.Å=¢Þ;¤.È=¢(){¥ ¦ô};¤.¥Ã=0;¢ ¤¸(¢Ä,Å,¨){£ ÿ=¥Â(¢(){¢Æ{if(!¢Ä.ê)¥;¢Ä.ê(¢Ä,Å,¨);¤»(ÿ)}¢·(£¥){¤»(ÿ)}},10)};¤.¤º=¢(){if(¤.Å==¢Þ)¥;®(£ i=0;i<¤.§.¯;i++){£ º=¤.§[i];£ ¢Å=º.¦[¤.³];if(¢Å){£ ½=º.£Ì?º:º.½;£ £¤=¦á.µ(¤.Å);£ ¡=².£Û(£¤?Ã.¤³:§Â);¡.¢ÿ=Ö;¡.¦.¨=¢Å.¨;if(!£¤)¡.¥Á=¢Å.Å;if(¤.³==§þ){½.¥À(¡,½.¤¹)}Û{½.¢»(¡)}if(£¤)¤¸(¡,¢Å.Å,¢Å.¨);º.¦[¤.³]=¢Þ}}};¤.¢ß=¢(){¤.§=ü(¤.´);®(£ i=0;i<¤.§.¯;i++){£ ¦=¤.§[i].¦;if(!¦[¤.³])¦[¤.³]={¨:¦ô};¦[¤.³].¨+=§ÿ+¤.¨;if(¤.Å!=¢Þ)¦[¤.³].Å=¤.Å}}};_Ã.¢ª=¶ _·;¢ Ã(´,³,¨){¤.³=³;¤.¨=££[¨].Æ(1,-1);£ Å=¤.¨.§(Ã.¤´);if(Å)¤.Å=¢ö(Å[1]).¬(¤·,¤¶);¤.£¢=·;¤.£¢(´);¸(£¡,¤)};Ã.£Ú=_Ã;Ã.¢ª=¶ _Ã;Ã.ID=¢(§,´,³,¨){¥ ¶ Ã(´,³,¨)};Ã.û=¦âg;Ã.¤´=¦ã;Ã.¤³=¨¡+¢À(¨¢,Á)+¨£;ò[§Ç]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=­[i].¥º;®(£ j=0;j<ó.¯;j++)if(£Ù(ó[j],±,Ê))¸(¼,ó[j])}};ò[¨¤]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ¢ý=¢þ(­[i]);if(¢ý&&£Ù(¢ý,±,Ê))¸(¼,¢ý)}};ò[¨¥]=¢(¼,­,±){±=¢ú[±];®(£ i=0;i<­.¯;i++)if(±(­[i]))¸(¼,­[i])};¢®[¨¦]=¢(¡){¥!¤²(¡)};¢®[¨§]=¢(¡,É){É=¶ ç(¨¨+É,¨©);Ý(¡&&!¡.£×(¨§))¡=¡.¢ü;¥ ¡&&É.µ(¡.£×(¨§))};¢­.¢Ù=¢(¡){£ Â=í;Ó(¡,¨ª,¢(){ª.Ð.¢Ù.¢Û(Â)});Ó(¡,¨«,¢(){ª.Ð.¢Ù.¢Ú(Â)})};¢­.¢÷=¢(¡){£ Â=í;Ó(¡,¨¬,¢(){ª.Ð.¢÷.¢Û(Â)})};¢­.¢Á=¢(¡){£ Â=í;Ó(¡,¨­,¢(){ª.Ð.¢Á.¢Û(Â)});Ó(¡,¨®,¢(){ª.Ð.¢Á.¢Ú(Â)});if(¡==².¥²){ª.Ð.¢Á.¢Û(Â)}};Ó(²,¨¯,¢(){£ ú=ª.Ð.¢÷;£ Ù=ú.Ù,i;®(i in Ù)ú.¢Ú(Ù[i]);ú=ª.Ð.¢Ù;Ù=ú.Ù;®(i in Ù)if(!Ù[i][0].£õ(£ü.¥°))ú.¢Ú(Ù[i])});£ ¢ú=[];£ ¤«=¦äg;¢ ñ(Ä,¢Â,©){©=¢ö(©);¤.id=¢ú.¯;£ò(Ä.¥¯()){¢¦ ¨°:Ä=¨±;¤­;¢¦ ¨²:Ä=¨³;¤­;£ñ:Ä=¨´+Ä+¨µ}¢Â=¢¬[¢Â];¸(¢ú,¶ ¤¬(¨¶,¨·+¢Â(Ä,©)))};ñ.ID=¢(§,Ä,¢Â,©){¥ ¶ ñ(Ä,¢Â,©)};ñ.¢ª.È=¢(){¥ ñ.¢ø+¤.id};¢¬={È:¢(){£ È=[];®(£ i in ¤)if(i&&i!=¨¸)¸(È,i);¥ È.¢Ü(¦ô).¬(¦åg,¦ô)},¢ù:¢(©){¥ ©.¬(¤«,¨¹)},¦ô:¢(Ä){¥ Ä},¨º:¢(Ä,©){¥ Ä+¨»+¤ª(©)},¨¼:¢(Ä,©){¥ ¨½+¢¬.¢ù(©)+¨¾+Ä+§®},¨¿:¢(Ä,©){¥ ¨À+¢¬.¢ù(©)+¨Á+Ä+§®}};ñ.¢ø=¨¥;¢ _ú(){¤.¢Û=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.æ(º[i]);¤.Ù[·.id+¡.¢«]=Â};¤.¢Ú=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.¤©(º[i]);£Ö ¤.Ù[·.id+¡.¢«]}};ª.Ð=¢(Õ){¤.Õ=Õ;¤.Ù={};ª.Ð[Õ]=¤};ª.Ð.¢ª=¶ _ú;¶ ª.Ð(¨Â);¶ ª.Ð(¨Ã);¶ ª.Ð(§ú);¢ £Õ(´){¥ ´.¬(·.¤¨,¦ô).¬(¤§,§²)}},Ö);ª.¢©(¨Ä,¢(){if(á<5.5)¥;£ £Ô=¨Å;£ £ý=(¦æ.µ(¤¥.¥©))?¢À(¨Æ,Á):¨Ç;£ £Ó=¶ ç((¢¡.¤ý||¨È)+¨É,¨©);¢ £þ(¡,î){¡.¦.±=£Ô.¬(¦ç,î)};£ ¢¾=¦ègi;à.¢¿(¢¾,¢ ¬(§,¢õ,¤¡,Ô,£ÿ){Ô=¢ö(Ô);¥ £Ó.µ(Ô)?¨Ê+£Ô.¬(¦é,¨Ë).¬(¦ç,Ô)+¨Ì+(¢õ||¦ô)+§¸+(¤¡||¦ô)+¨Í+(£ÿ||¦ô):§});if(¢½){¢ £Ò(¡){if(£Ó.µ(¡.î)){£ °=¡.°,÷=¡.÷;£þ(¡,¡.î);¡.î=£ý;¡.°=°;¡.÷=÷}Û ¡.¦.±=¦ô};¢½.æ(¨Î,¢(¡){if(¡.Ï==¨Ï&&¡.Õ!=¨Ð)¥;£Ò(¡);Ó(¡,¨Ñ,¢(){if(£ü.£Ê==¨Ò)£Ò(¡)})})}});ª.¢©(¨Ó,¢(){£ ¢Ö=¦Ì;à.ï(¨Ô,¢¢);à.ï(¨Õ,¢£);£ ß=².ß;£ Þ$=(¢§)?¨Ö:¨×;£ Þ=Ü(Þ$);¢ ¢ñ(){if(ß.«.£Î!=§Ú){if(ß.«.£Í==¨Í){ß.¦.£Í=¨Ø+¢ô.¤÷+§®}ß.¦.£Î=§Ú}¢ñ=¢Ø};£ ¹=£Ï(¨Ù);¢ ¢º(£ú){¥ ¢ó(£ú).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦Óg,§ä).¬(¦êg,¨Ú)};¢ ¢£(¡){if(¡.«.£Î!=§Ú)¥;if(!¡.£õ(ß)){¢ñ();¢£[¢£.Ë++]=¡;£Ë(¡);¤ö(¡);£Â(¡)}};¢£.Ë=0;¢ £Â(¡){¹.î=¡.«.£Í.Æ(5,-2);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);£È(¡);¤õ(¡);½.¢Õ(¹)};¢ £Ë(¡){¡.Ì.¢×=¡.«.¢×;if(!ö(¡)){£ £ô=¨Û+Þ$+¨Ü;¡.¦.£ð(¨Ý,£ô)}};Ü(¢º(£Ë));¢ £È(¡){£ £Ê=ö(¡)?¨Ý:¨Þ;¡.¦[£Ê]=£Ç(¡,¡.Ì.¢×)-¡.£É().À-¡.¤ô};Ü(¢º(£È));¢ ö(¡){if(!¡)¥ ë;if(¡.Ì.³==§Ú||¡.«.³==§Ú)¥ Ö;¥ í.£ó(¡.½)};¢ £Ç(¡,³){£ò(³){¢¦ ¨ß:¢¦ §ç:¥ 0;¢¦ §â:¢¦ §é:¥ Þ.Í-¹.¢¼;¢¦ ¨à:¥(Þ.Í-¹.¢¼)/2;£ñ:if(¢Ö.µ(³)){¥ ø((Þ.Í-¹.¢¼)*£Æ(³)/100)}¹.Ì.À=³;¥ ¹.¢¤}};Ü(¢º(£Ç));¢ ¢¢(¡){if(¡.«.³!=§Ú)¥;¢ñ();¢¢[¢¢.Ë++]=¡;¡.Ì.³=§Ú;¡.¦.³=§á;£Á(¡)};¢¢.Ë=0;¢ £Á(¡,Ø){£Å(¡,Ø);¤ò(¡,Ø);if(!Ø||¡.¦.¤ñ){if(ø(¡.«.¢î)==0)¡.¦.¤ð++}};¢ £Å(¡,Ø){if(!Ø&&¢Ö.µ(¡.«.°))¡.¦.ì=¡.«.°;if(¡.¦.ì)¡.¦.°=ø(£Æ(¡.¦.ì)/100*Þ.Í);if(Ø){if(!¡.¦.£Ä)¥}Û{¡.¦.£Ä=¡.«.×!=§Ý&&¡.«.À==§Ý}¡.¦.À=¦ô;¡.¦.¢Ô=¢¹(¡);if(¡.«.¢ï!=§Ý){¡.½.¢»(¹);¹.Ì.À=¡.«.¢ï;¡.¦.¢Ô-=¹.¢¤;¡.½.¢Õ(¹)}if(ö(¡.¢¥))¡.¦.£ï=¡.¦.¢Ô;Û if(!Ø)¡.¦.£ð(¨á,¨â+Þ$+¨ã)};Ü(¢º(£Å).¬(¦Øg,§é).¬(¦Ôg,§å));¢ ¢¹(¡){£ ¢¹=¡.¢¤,£Ã=ë;£ Ç=ö(¡.¢¥)&&¡.¦.£Ä;Ý(¡=¡.¢¥){if(!Ç&&¡.«.³!=¨ä)£Ã=Ö;¢¹+=¡.¢¤*(£Ã?-1:1)}¥ ¢¹};Ü(¢º(¢¹));¢ £ì(){®(£ i=0;i<¢£.Ë;i++)£Â(¢£[i]);®(i=0;i<¢¢.Ë;i++)£Á(¢¢[i],Ö);ÿ=0};£ ÿ;Ó(¢¡,§ã,¢(){if(!ÿ)ÿ=¢Ó(£ì,10)})});¢í=Ö;if(².£À==¦ú)_ê();Û Ó(²,¨å,¢(){if(!¢¸&&².£À==¦ú)¢Ó(_ê,0)})}¢·(¢ë){¢ì();¢¶(¨æ+¢ë.£ë)}£¾{}}();',493,0,/./,String,95,'element`function`var`this`return`runtimeStyle`match`cssText`value`IE7`currentStyle`replace`from`for`length`width`filter`document`position`selector`test`new`Class`push`ie7_tmp`target`x5cs`filtered`parentElement`href`styleSheet`left`path`instance`PseudoElement`attribute`content`slice`fixed`toString`filterArgs`scopeName`count`style`clientWidth`ie7`tagName`Event`x5c`DynamicStyle`addEventHandler`url`type`true`right`recalc`instances`minWidth`else`eval`while`viewport`body`CSSFixes`appVersion`link`layoutParent`fixedWidth`auto`add`RegExp`fixes`styleSheets`load`false`fixWidth`arguments`src`addRecalc`input`AttributeSelector`selectors`subset`recalcs`nextSibling`isFixed`height`parseInt`documentElement`ie7Event`ALL`cssQuery`maxWidth`handler`timer`window`positionFixed`backgroundFixed`offsetLeft`offsetParent`case`quirksMode`x5cw`addModule`prototype`uniqueID`attributeTests`dynamicPseudoClasses`pseudoClasses`dynamicPseudoClass`attach`isHTML`fixRight`token`SIZES`pattern`alert`catch`complete`getScreenLeft`topFunction`appendChild`offsetWidth`HTMLFixes`MATCH`addFix`makePath`focus`compare`x5cd`object`pseudoElement`try`name`visited`getPixelWidth`boxSizing`getFixedWidth`all`elements`isElement`pseudoClass`cacheSelector`modules`script`setTimeout`screenLeft`removeChild`PERCENT`backgroundPositionX`DUMMY`hover`unregister`register`join`className`null`exec`display`classes`parse`getCSSText`getPixelLeft`wider`max`disabled`cssCache`node`Boolean`error`unHide`loaded`bottom`marginLeft`absolute`fixBackground`top`String`location`image`getString`active`PREFIX`escape`attributeSelectors`x2f`parentNode`adjacent`nextElement`ie7_anon`pseudoElements`inherit`encoded`isURL`ignore`HEADER`decode`split`encode`resizeWidth`NUMERIC`rect`min`hasLayout`outerHTML`apply`fixedElement`QUOTED`handlers`pop`strings`string`item`small`getPath`styles`pathname`array`httpRequest`finally`Error`readyState`foregroundPosition`backgroundPosition`nested`autoLeft`positionLeft`parseFloat`getOffsetLeft`setOffsetLeft`getBoundingClientRect`propertyName`backgroundLeft`canHaveChildren`backgroundImage`backgroundAttachment`tmpElement`none`background`fixImg`pngTest`FILTER`simpleSelector`delete`getAttribute`lang`compareTagName`ancestor`createElement`code`PIXEL`resizeRight`getPaddingWidth`getBorderWidth`box`submit`clicked`fix`select`useCache`base`large`inlineStyles`LINKS`description`resize`onresize`scrollLeft`pixelLeft`setExpression`default`switch`callee`expression`contains`Height`Width`Top`Left`leftFunction`img`event`NULL`addFilter`suffix`prefix`scale`png`define`navigator`Microsoft`CHILD`COMPLEX`remove`quote`ESCAPE`Function`break`ie7_`x5cb`class`ms_`previousElement`OBJECT`CONTENT`before`unicode`HEX`addTimer`firstChild`create`clearInterval`inline`ANCHOR`Parser`parser`removeTempElement`HEIGHT`getMarginWidth`AUTO`minHeight`marginRight`UNIT`toUpperCase`charAt`BUTTON`UNSUCCESSFUL`button`abbr`htmlFor`HTML`endTag`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`autoload`mimeType`search`message`onreadystatechange`static`screenTop`autoTop`positionTop`center`clientLeft`setOffsetTop`backgroundTop`protocol`onpropertychange`INPUT`zoom`crop`trans`IE7_PNG_SUFFIX`x00`x_bits`char`x5cnstatic`x_height`x5cn`x_width`javascript`gif`blank`userAgent`bSV1`sizingMethod`AlphaImageLoader`DXImageTransform`progid`toLowerCase`srcElement`onmouseup`activeElement`onblur`onfocus`onmousedown`onmouseout`onmouseover`child`first`children`scriptlet`text`htm`data`after`insertBefore`innerText`setInterval`specificity`x5cu`align`vertical`with`css2`fixHeight`Bottom`Right`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`previousSibling`nodeType`clip`border`padding`unquote`contentEditable`onbeforeunload`detachEvent`import`namespace`concat`Array`constructor`size`font`medium`list`float`relative`sizing`lastIndex`successfully`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`ActiveXObject`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ie7_off`MSIE`ie7_debug`alpha`version`visible`visibility`fromCharCode`¦®`¦­ (\\d\\.\\d)`¦¬`^¤±`\\.¦§$`^[\\w\\.]+[^:]*$`(Ô\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¥ö\\b|\\¥õ\\b|^$`Î-â`(¥ï\\s*:\\s*(À|×))`¢à\\s*:\\s*¥î-£·`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢û\\*[^\\*]*\\*+([^\\¢û][^\\*]*\\*+)*\\¢û)|(\x27[^\x27]*\x27)|("[^"]*")`@(¥ç|¥æ)[^;\\n]+[;\\n]|`\\Ñ:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ©="([^"]*)"`^(£â|¥Ñ|¤Ë)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(£­|¢æ)-(°|÷)\\s*:\\s*\\d`\\b(£­|¢æ)-°\\s*:\\s*\\d`^å|0cm$`^å$`£­`£÷`°`£ù`À`¥Ë`×`>`(\\ba(\\.[\\w-]+)?)$`\\{[^\\}]*\\}`::`([^\\}\\s]*\\,[^\\{]*)(\\{\\d+\\})`\\{(\\d+)\\}`[+>~]`\\Ñ([a-fA-F\\d]+)`^Ô\\(.*\\)$`([^}]*):(¤µ|¥¿)[^{]*\\{([^}]*)\\}`Å\\s*:\\s*([^;]*)(;|$)`([\\¢û()[\\]?{}|*+])`=`\\¥ª\\b`%1`£Ñ(-¢õ)?\\s*:([^(};]*)Ô\\(([^\\)]+)\\)([^;}]*)`¤¢`X`¦±`ª ¦° 0.7.3 (¦¯)`\\n\\n`¦ª`¦¨`¦¦ ¦¥`:â{Î-â:â}:¢È{Î-â:¢È}`*{¦¤:0}`¢Ò=``/`¤¦.¦¢`¥ÿ`£¿ [1]: ¥ü ¥û ê ¥ú `Î-¥ù.js`¢¸`<Ì>`$1`$2`Ì`¢í ¥ó`£¿ [2]: `([^{}]*)\\Ñ{([^}]*[^\\¢¨-])?`gi`£á-¥ñ\\»*:\\»*Å-£á`³\\»*:\\»*¢ð`¥ð`¢à:¤¼;$1`¢à:¤Ò`xx-£¸,x-£¸,£¸,¥í,£è,x-£è,xx-£è`,`xx-£¸`(¥ì(-¥ë)?\\»*:\\»*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\»)`(\\»|$)`:`â`¢È`\\Ñ([^)]*\\Ñ)`Î-â`\x27`\\Ñ:`¥ä`¢Ä`³:¢ð;¥á:0;¢à:¤Ò;¥à:£Ð;¥ß:£¬(0 0 0 0);À:-9999`!`Î-¥Ü`<¤Î:`/>``¤Î`¥Ù://¥Ø.w3.¥×/1999/¥Ö`¥Õ`ð,£å,¥Ô`¤Ì` ¤Ì`¤Ë,ð`¤É`£â`¥Ó`².¢Ì.`.¦.£ã=ë`¥Ò`¥Ð`.¢ç=ë`.©=\x27`Î-£á-¥Ï`\\»*:\\»*\\¢Ã[\\¢¨%]*`Ç`HR`°\\»*:\\»*\\¢Ã\\¢¨*[^%]`å`£­-°`¢æ`¢æ-°`¢ð`×`£í`£ö`÷`£ø`¢ò`¥Ê`¢î`Î-¥È`[^},\\»]*([>+~][^:@,\\»{]+|:(`)|\\Ñ.[\\¢¨-]+\\Ñ.[\\¢¨-.]+|@[@\\¢Ã]+)`g`[^\\»(]+[+~]|@\\¢Ã+|:(â|¢È|`)|\\Ñ.[\\¢¨-.]+`([^}]*):(`)([^{]*)`\\Ñ[([^`=\\Ñ]]+)([`]?=?)([^\\Ñ]]+)?\\Ñ]`{`}`\\»`\\¤¯`¤®`¢Á`.¢ÿ{¥Æ-¥Å:¢ò;¢à:¤¼}`\x27\\¥Ä`0000`¤µ`;`<¢Ä ¤°=¢ÿ ¥¾=\x27`Î-Å.¥½`\x27 °=100% ÷=0 Õ=¥¼/x-¥»>`+`@`¥¹-¥¸`£Ø`^`i`¥·`¥¶`¥µ`¥´`¥³`¥±`id`¡.id.¬(/¤±\\¢Ã+/g,\x27\x27)`¤°`¡.¢Ý.¬(/\\¤¯\\»*¤®\\¢Ã+/g,\x27\x27)`¡.£×(\x27`\x27)`¡`¥ `¢ù`\\Ñ$1`=`==`~=`/(^|\\»)`(\\»|$)/.µ(`|=`/^`(-|$)/.µ(`¢Ù`¢÷`Î-¤£`¥®:¥­.¤¦.¥¬(î=%1,¥«=\x27¤¢\x27)`¥¨.¥§`¥¦:\x27#¤¤ ¥¥ 1\\¥¤#¤¤ ¥£ 1\\¥¢ ¥¡ ¤ÿ[]={0¤þ}\x27`-¤ü.¤£`$`±:`¤û`;¤ú:1;£Ñ`£Ð`£û,ð`¤ù`¢õ`¤ø`î`Î-Ç`³\\»*:\\»*Ç`£Ñ[\\¢¨\\»-]*:[^};]*Ç`ß`ù`Ô(`£û`Y`(ø(¦.¢¤)+².`.£î)||0`¢×`¢¤`À`¤ó`£ï`¦.¢Ô+².`.£î`¤ï`¤î`£¿ [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-standard.js b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-standard.js new file mode 100644 index 0000000..2109905 --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/javascript/ie7/ie7-standard.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i=0){ + var optar=opt.split(" "); + for(i=0;i=0) ecolor=optar[i]; + if(ecolor=="") ecolor="#666"; + cn+="e"; + edges=true; + } +else if(opt && opt.indexOf("smooth")>=0){ + cn+="a"; + ecolor=Mix(bk,color); + } +if(opt && opt.indexOf("small")>=0) cn+="s"; +prefixt=cn; +prefixb=cn; +if(wich.indexOf("all")>=0){t=true;b=true;} +else if(wich.indexOf("top")>=0) t="true"; +else if(wich.indexOf("tl")>=0){ + t="true"; + if(wich.indexOf("tr")<0) prefixt+="l"; + } +else if(wich.indexOf("tr")>=0){ + t="true"; + prefixt+="r"; + } +if(wich.indexOf("bottom")>=0) b=true; +else if(wich.indexOf("bl")>=0){ + b="true"; + if(wich.indexOf("br")<0) prefixb+="l"; + } +else if(wich.indexOf("br")>=0){ + b="true"; + prefixb+="r"; + } +var v=getElementsBySelector(selector); +var l=v.length; +for(i=0;i=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=1;i<=lim;i++){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingTop=0; +el.insertBefore(d,el.firstChild); +} + +function AddBottom(el,bk,color,bc,cn){ +var i,lim=4,d=CreateEl("b"); + +if(cn.indexOf("s")>=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=lim;i>0;i--){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingBottom=0; +el.appendChild(d); +} + +function CreateEl(x){ +if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x)); +else return(document.createElement(x)); +} + +function getElementsBySelector(selector){ +var i,selid="",selclass="",tag=selector,f,s=[],objlist=[]; + +if(selector.indexOf(" ")>0){ //descendant selector like "tag#id tag" + s=selector.split(" "); + var fs=s[0].split("#"); + if(fs.length==1) return(objlist); + f=document.getElementById(fs[1]); + if(f) return(f.getElementsByTagName(s[1])); + return(objlist); + } +if(selector.indexOf("#")>0){ //id selector like "tag#id" + s=selector.split("#"); + tag=s[0]; + selid=s[1]; + } +if(selid!=""){ + f=document.getElementById(selid); + if(f) objlist.push(f); + return(objlist); + } +if(selector.indexOf(".")>0){ //class selector like "tag.class" + s=selector.split("."); + tag=s[0]; + selclass=s[1]; + } +var v=document.getElementsByTagName(tag); // tag selector like "tag" +if(selclass=="") + return(v); +for(i=0;i=0){ + objlist.push(v[i]); + } + } +return(objlist); +} + +function Mix(c1,c2){ +var i,step1,step2,x,y,r=new Array(3); +if(c1.length==4)step1=1; +else step1=2; +if(c2.length==4) step2=1; +else step2=2; +for(i=0;i<3;i++){ + x=parseInt(c1.substr(1+step1*i,step1),16); + if(step1==1) x=16*x+x; + y=parseInt(c2.substr(1+step2*i,step2),16); + if(step2==1) y=16*y+y; + r[i]=Math.floor((x*50+y*50)/100); + } +return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16)); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense-dropdown/loader.js b/src/usr/local/www/themes/pfsense-dropdown/loader.js new file mode 100644 index 0000000..e8612db --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/loader.js @@ -0,0 +1,29 @@ +//'); +} + +document.write(''); + +//]]> diff --git a/src/usr/local/www/themes/pfsense-dropdown/login.css b/src/usr/local/www/themes/pfsense-dropdown/login.css new file mode 100644 index 0000000..f8abdfc --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/login.css @@ -0,0 +1,1127 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + + +#login { +/* background: #cccccc; */ + background-color: transparent; + border: 0px solid #cccccc; + margin: 5em auto; + padding: 0em; + width: 400px; +/* filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; */ +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; +/* background: #ffffff; */ + margin-top: 0; + display: block; + text-indent: -1000px; + height: 400px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -420px; + left: 70px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + top: -300px; */ +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + left: 10px; + top: -300px; */ +} + +#login #submit { + font-size: 1em; + font-weight: bold; + text-align: center; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -20px; + left: 170px; +} + +/* loginerror box follows */ + +#login #inputerrors { + background-color: transparent; + border: 0px solid #666666; + margin: 5em auto; + vertical-align: middle; + padding: 0em; + width: 330px; + height: 50px; + position: relative; + top: -370px; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense-dropdown/new_tab_menu.css b/src/usr/local/www/themes/pfsense-dropdown/new_tab_menu.css new file mode 100644 index 0000000..04c4cf2 --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/new_tab_menu.css @@ -0,0 +1,101 @@ +/* + new_tab_menu.css + part of pfSense + Copyright (C) 2010-2011 Robert Zelaya + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + + Replace your old tab menu with the following code. To add a second tab menu line just cut and paste again. + The following code is dependent on new_tab_menu.css and images/new_tab_menu.png. + + + + + + + +*/ + +.newtabmenu ul, li{border:0; margin:0; padding:0; list-style:none;} + +.newtabmenu li{float:left; margin-right:2px; text-align: center;} +.newtabmenu a:link, .newtabmenu a:visited{ + background:url(images/new_tab_menu.png) right 45px; + color:#ffffff; /* noactive font */ + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + font-weight:bold; + font-size:.9em; + height:20px; + line-height:20px; + text-decoration:none; +} +.newtabmenu a span{ + background:url(images/new_tab_menu.png) left 45px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + height:20px; + margin-right:7px; + padding-left:7px; +} +.newtabmenu a:hover{ + background:url(images/new_tab_menu.png) right 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + color:#ffffff; /* hover over font */ +} +.newtabmenu a:hover span{ + background:url(images/new_tab_menu.png) left 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ +} + +/* -------------------------------- */ +/* ACTIVE ELEMENTS */ +.newtabmenu_active a:link, .newtabmenu_active a:visited, .newtabmenu_active a:visited, .newtabmenu_active a:hover{ + color:#000000; /* active font */ + background:url(images/new_tab_menu.png) right 0 no-repeat; +} +.newtabmenu_active a span, .newtabmenu_active a:hover span{ + background:url(images/new_tab_menu.png) left 0 no-repeat; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense-dropdown/rrdcolors.inc.php b/src/usr/local/www/themes/pfsense-dropdown/rrdcolors.inc.php new file mode 100644 index 0000000..dcb7a39 --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/rrdcolors.inc.php @@ -0,0 +1,89 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This file is included by the RRD graphing page and sets the colors */ + +/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Traffic Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colortrafficdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* Packets Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colorpacketsup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Packets Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colorpacketsdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* 95th Percentile Lines Out, In */ +$colortraffic95 = array('660000', 'FF0000'); + +/* State Table pfrate, pfstates, pfnat, srcip, dstip */ +$colorstates = array('00AA00','990000','0000FF','000000','DD9B00'); + +/* Processor Usage user, nice, system, int, processes */ +$colorprocessor = array('00AA00','990000','0000FF','DD9B00','000000'); + +/* Memory Usage active, inact, free, cache, wire */ +$colormemory = array('00AA00','990000','0000FF','666666','DD9B00'); + +/* MBUF Usage current, cache, total, max */ +$colormbuf = array('0080FF','00E344','FF0000','000000'); + +/* Traffic Shaper Queues q1, q2, q3, q4, q5, q6, q7, q8, q9 */ +$colorqueuesup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +$colorqueuesdropup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +/* Quality Graph Delay >420, 180-420, 60-180, 20-60, <20, Delay Avg */ +$colorqualityrtt = array('990000','a83c3c','b36666','bd9090','cccccc','000000'); +/* Quality Graph Loss */ +$colorqualityloss = 'ee0000'; + +/* Wireless Graph SNR, Rate, Channel*/ +/* Cellular Graph RSSI, */ +$colorwireless = array('333333','a83c3c','999999'); + +/* SPAMD Times min area, avg area, max area, Time line */ +$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); +/* SPAMD Connections max area, min area, min line, max line, avg line */ +$colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600'); + +/* OpenVPN Users Online Users */ +$colorvpnusers = array('990000'); + +/* Captive Portal Total Users Total Users */ +/* Captive Portal Concurrent Concurrent Users */ +$colorcaptiveportalusers = array('990000'); + +?> diff --git a/src/usr/local/www/themes/pfsense-dropdown/styles/jquery-ui-1.11.1.css b/src/usr/local/www/themes/pfsense-dropdown/styles/jquery-ui-1.11.1.css new file mode 100644 index 0000000..8a8c54f --- /dev/null +++ b/src/usr/local/www/themes/pfsense-dropdown/styles/jquery-ui-1.11.1.css @@ -0,0 +1,1226 @@ +/*! jQuery UI - v1.11.1 - 2014-09-22 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2C%20Helvetica%2C%20Arial%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=glass&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=inset_soft&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=glass&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=bbbbbb&fcHover=599fcf&iconColorHover=3383bb&bgColorActive=999999&bgTextureActive=inset_hard&bgImgOpacityActive=75&borderColorActive=999999&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=444444&iconColorHighlight=3383bb&bgColorError=c0402a&bgTextureError=flat&bgImgOpacityError=55&borderColorError=c0402a&fcError=ffffff&iconColorError=fbc856&bgColorOverlay=eeeeee&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0pxdow +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; + background-color: #990000; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #c9c9c9 url("../../../javascript/jquery/images/ui-bg_inset-soft_50_c9c9c9_1x100.png") 50% bottom repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #bbbbbb; + /* background: #dddddd url("../../../javascript/jquery/images/ui-bg_glass_35_dddddd_1x400.png") 50% 50% repeat-x; */ + color: #444444; + font-weight: bold; +} +.ui-widget-header a { + color: #444444; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_glass_60_eeeeee_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #3383bb; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #3383bb; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #bbbbbb; + background: #f8f8f8 url("../../../javascript/jquery/images/ui-bg_glass_100_f8f8f8_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #599fcf; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #599fcf; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #999999; + background: #999999 url("../../../javascript/jquery/images/ui-bg_inset-hard_75_999999_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #ffffff; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_55_eeeeee_40x100.png") 50% 50% repeat-x; + color: #444444; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #444444; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #c0402a; + background: #c0402a url("../../../javascript/jquery/images/ui-bg_flat_55_c0402a_40x100.png") 50% 50% repeat-x; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_70b2e1_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_454545_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_fbc856_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_0_eeeeee_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -4px 0 0 -4px; + padding: 4px; + background: #aaaaaa url("../../../javascript/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 0pxdow; +} diff --git a/src/usr/local/www/themes/pfsense/all.css b/src/usr/local/www/themes/pfsense/all.css new file mode 100644 index 0000000..372c4b2 --- /dev/null +++ b/src/usr/local/www/themes/pfsense/all.css @@ -0,0 +1,1036 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; +} + +.nowrap { white-space: nowrap; } + +.addgatewaybox { + background-color: #990000; + border-style: none none none none; + width: 225px; +} + +.infobox { + width:100%; +} + +.infoboxsave { + padding-right: 10px; +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +.inputerrorsleft { + background-color: #990000; + width: 36px; + text-align: center; +} + +.inputerrorsright { + background-color: #FFD9D1; + color: #000000; + font-size: 11px; + padding-left: 8px; + padding-top: 6px; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} + +form input { + font-size: 1.1em; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 11px; + font-family: "Trebuchet MS", sans-serif; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + background-color: #ffffff; +} + +/* ID Based CSS Definitions */ + +#notices { + width: 795px; + background-color: #E1E4B8; + border: 1px solid #000000; + padding: 0px; + margin-bottom: 5px; +} +#notices ul { + margin: 0px; + padding: 5px; + padding-top: 3px; + list-style: none; +} + +#header { + height: 70px; + width: 900px; +} +#header-left { + position: relative; + background: url('images/logo.gif') no-repeat; + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; + background-color: #fff; +} +#header-right { + position: relative; + background: url('images/header.gif') no-repeat; + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} + +#header-right .container .left { + position: relative; + top: 32px; + left: 9px; + font-size: 1.8em; +} + +#header-right .container .right { + position: relative; + float: right; + top: -9px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.gif') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: bold; + font: Verdana; + text-align: center; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + + + + +#content { + border-top: 1px solid #FFFFFF; + margin-top: 0px; + padding-top: 0px; + width: 900px; +} + +#footer { + position: relative; + top: 10px; + padding: 0px; + margin: 6px; + width: 900px; + background-color: #990000; + text-align: center; + color: #ffffff; + font-size: 0.75em; + clear: both; + margin-bottom: 20px; +} +#footer p { + padding: 0px; + margin: 0px; +} + +#left { + width: 150px; + float: left; +} +#right { + /*margin-left: 171px;*/ + margin-left: 170px; + margin-top: 5px; + width: 720px; +} + + + +#navigation { + position: relative; + background-color: #000000; + top: 0px; + left: 5px; + width: 157px; + padding-top: 6px; + margin-left: 1px; + color: #fff; + padding-bottom: 6px; + padding-right: 0px; +} + +#navigation ul { + margin: 0px; + padding: 0px; + width: 100%; +} + +#navigation ul li { + display: block; + padding-left: 10px; +} + +#navigation ul li div { + margin-top: 2px; +} + +#navigation ul li div { + font-weight: bold; +} + +#navigation ul li div .small, +#navigation ul li div .small:hover { + font-weight: normal; + font-size: 0.79em; +} + +#navigation ul li a { + padding-left: 0.5em; + padding-right: 0.5em; + padding-top: 0.2em; + padding-bottom: 0.2em; + height: 1.2em; + line-height: 1.2em; + color: #fff; + text-decoration: none; + width: 61px; + font-size: 0.9em; + text-align: center; +} + +#navigation ul li a:hover { + color: #fff; + text-decoration: underline; + font-size: 0.9em; +} + + + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #FFFFFF; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listrborder { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-left: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + color: #FFFFFF; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #DDDDDD; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #B1B1B1; + padding-right: 6px; + padding-left: 6px; + color: #000000; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} +.widgetconfigdiv{ + background:#BBBBBB; + font-size: 11px; + color: #000000; + padding-right: 5px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +div#log div.log-entry-mini { + clear: both; +} + +div#log div.log-entry-mini span { + padding: 2px 2px 2px 2px; + padding-left: 6px; +} + +div#log span.log-action-mini-header, +div#log span.log-time-mini-header, +div#log span.log-interface-mini-header, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header, +div#log span.log-protocol-mini-header { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 12px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-time-mini, +div#log span.log-interface-mini, +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-protocol-mini { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 11px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-action-mini-header { + width: 6%; +} + +div#log span.log-time-mini, +div#log span.log-time-mini-header { + width: 19%; +} + +div#log span.log-interface-mini, +div#log span.log-interface-mini-header { + width: 8%; +} + +div#log span.log-source-mini, +div#log span.log-source-mini-header { + width: 23%; +} + +div#log span.log-destination-mini, +div#log span.log-destination-mini-header { + width: 31%; +} + +div#log span.log-protocol-mini, +div#log span.log-protocol-mini-header { + width: 8%; + border-right: 1px solid #999; +} + +/* loginscreen items follow */ + +#login { +/* background: #cccccc; */ + background-color: #ffffff; + border-left: 4px dotted #990000; +/* border: 0px solid #990000; */ + margin: 5em auto; + padding: 0em; +/* width: 300px; */ + width: 300px; + height: 300px; +/* filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; */ +} + +#login h1 { + background: url(images/logo.gif) no-repeat top left; +/* background: #ffffff; */ + margin-top: 0; + display: block; + text-indent: -1000px; + height: 300px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -420px; +/* left: 70px; */ +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + top: -300px; */ +} + +#login #username, #password, #password2 { + font-size: small; + width: 60%; + padding-left: 19px; + padding: 3px; + margin: 0em; + + +/* text-indent: 10px; + position: relative; + left: 10px; + top: -300px; */ +} + +#login #submit { + font-size: 1em; + font-weight: bold; + text-align: center; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -20px; + left: 120px; +} + +/* loginerror box follows */ + +#login #inputerrors { + background-color: transparent; + border: 0px solid #666666; + margin: 5em auto; + vertical-align: middle; + padding: 0em; + width: 300px; + height: 50px; + position: relative; + left: 0px; + top: -117px; +} + +/* Sortable tables */ +table.sortable thead { + cursor: default; + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} + +#graph { + position: relative; + z-index: 1; +} + +/*thermal_sensors widget styles*/ + +.thermalSensorRow { width: 100%; border: 0px solid #ddd; padding: 1px; border-radius: 3px; } +.thermalSensorBarShell { position: relative; width: 100%; height: 5px; border: 1px solid lightgray; border-radius: 3px; } +.thermalSensorBar { position: absolute; width: 0%; height: 1px; z-index: 1; border-style: solid; border-radius: 3px; + background-color: LimeGreen; + border-top-width: 2px; border-top-color: Lime; + border-left-width: 0px; + border-right-width: 0px; + border-bottom-width: 2px; border-bottom-color: Green; +} +.thermalSensorTextShell { height: 20px; width: 100%; top: 3px; } +.thermalSensorText { float: left; height: 20px; top: 3px; } +.thermalSensorValue { float: left; height: 20px; top: 3px; font-weight: bold; margin-left: 10px;} + +.thermalSensorWarnThresh { position: absolute; background-color: orange; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } +.thermalSensorCritThresh { position: absolute; background-color: red; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } + +.thermal_sensors_widget_scale000 { position: absolute; height: 5px; width: 1px; left: -1px; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale020 { position: absolute; height: 3px; width: 1px; left: 10%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale010 { position: absolute; height: 3px; width: 1px; left: 20%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale030 { position: absolute; height: 3px; width: 1px; left: 30%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale040 { position: absolute; height: 3px; width: 1px; left: 40%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale050 { position: absolute; height: 3px; width: 1px; left: 50%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale060 { position: absolute; height: 3px; width: 1px; left: 60%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale070 { position: absolute; height: 3px; width: 1px; left: 70%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale080 { position: absolute; height: 3px; width: 1px; left: 80%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale090 { position: absolute; height: 3px; width: 1px; left: 90%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; } + +.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; } + +/* widget textarea styles - full width */ +.textarea_widget { + width: 100%; + resize:vertical; + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* IE 8+ */ +} diff --git a/src/usr/local/www/themes/pfsense/apple-touch-icon.png b/src/usr/local/www/themes/pfsense/apple-touch-icon.png new file mode 100755 index 0000000..7a4b975 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/apple-touch-icon.png differ diff --git a/src/usr/local/www/themes/pfsense/bottom-loader.js b/src/usr/local/www/themes/pfsense/bottom-loader.js new file mode 100644 index 0000000..8251766 --- /dev/null +++ b/src/usr/local/www/themes/pfsense/bottom-loader.js @@ -0,0 +1,12 @@ +// diff --git a/src/usr/local/www/themes/pfsense/images/alert_bgr.gif b/src/usr/local/www/themes/pfsense/images/alert_bgr.gif new file mode 100755 index 0000000..2a5c000 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/alert_bgr.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/header-alert.gif b/src/usr/local/www/themes/pfsense/images/header-alert.gif new file mode 100755 index 0000000..02eca2b Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/header-alert.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/header.gif b/src/usr/local/www/themes/pfsense/images/header.gif new file mode 100755 index 0000000..01cfcef Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/header.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/help.png b/src/usr/local/www/themes/pfsense/images/help.png new file mode 100755 index 0000000..1de05e3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/help.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/favicon.ico b/src/usr/local/www/themes/pfsense/images/icons/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/favicon.ico differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_3g.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_3g.gif new file mode 100755 index 0000000..46ccb92 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_3g.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_3g_inactive.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_3g_inactive.gif new file mode 100755 index 0000000..cf983e4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_3g_inactive.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_advanced.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_advanced.gif new file mode 100755 index 0000000..3ede1ff Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_advanced.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_advanced_s.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_advanced_s.gif new file mode 100755 index 0000000..b233549 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_advanced_s.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_alert.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_alert.gif new file mode 100755 index 0000000..2f69355 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_alert.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_alias_host.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_alias_host.gif new file mode 100644 index 0000000..ad43e17 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_alias_host.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_alias_net.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_alias_net.gif new file mode 100644 index 0000000..abd1b8b Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_alias_net.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_alias_port.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_alias_port.gif new file mode 100644 index 0000000..4acf2aa Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_alias_port.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_alias_url.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_alias_url.gif new file mode 100644 index 0000000..660571e Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_alias_url.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_alias_url_reload.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_alias_url_reload.gif new file mode 100644 index 0000000..55c1c4a Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_alias_url_reload.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_block.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_block.gif new file mode 100755 index 0000000..670c968 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_block.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_block_add.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_block_add.gif new file mode 100755 index 0000000..eb726d6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_block_add.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_block_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_block_d.gif new file mode 100755 index 0000000..e6345fe Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_block_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_cablenic.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_cablenic.gif new file mode 100755 index 0000000..a071c66 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_cablenic.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_cal.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_cal.gif new file mode 100755 index 0000000..a9c7c87 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_cal.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_cal_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_cal_mo.gif new file mode 100755 index 0000000..1647e2f Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_cal_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_carp.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_carp.gif new file mode 100755 index 0000000..9454a82 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_carp.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_carp_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_carp_d.gif new file mode 100755 index 0000000..2ba8db2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_carp_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_chain.png b/src/usr/local/www/themes/pfsense/images/icons/icon_chain.png new file mode 100644 index 0000000..12db07a Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_chain.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_check.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_check.gif new file mode 100755 index 0000000..393674d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_check.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_clock_green.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_clock_green.gif new file mode 100755 index 0000000..e171ba8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_clock_green.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_clock_grey.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_clock_grey.gif new file mode 100755 index 0000000..00c865a Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_clock_grey.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_clock_red.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_clock_red.gif new file mode 100755 index 0000000..7b412ee Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_clock_red.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_close.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_close.gif new file mode 100755 index 0000000..e0f86a7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_close.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_configure.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_configure.gif new file mode 100755 index 0000000..7182e0d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_configure.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_down.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_down.gif new file mode 100755 index 0000000..b71a9c5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_down.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_down_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_down_d.gif new file mode 100755 index 0000000..70a7473 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_down_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_down_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_down_mo.gif new file mode 100755 index 0000000..584587a Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_down_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_e.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_e.gif new file mode 100755 index 0000000..2950800 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_e.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_e_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_e_mo.gif new file mode 100755 index 0000000..9ba5738 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_e_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_error.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_error.gif new file mode 100755 index 0000000..e0fa659 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_error.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_exclam.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_exclam.gif new file mode 100755 index 0000000..36c2ec7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_exclam.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_flag_de.png b/src/usr/local/www/themes/pfsense/images/icons/icon_flag_de.png new file mode 100644 index 0000000..069cbbe Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_flag_de.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_flag_en.png b/src/usr/local/www/themes/pfsense/images/icons/icon_flag_en.png new file mode 100644 index 0000000..bd7f9a5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_flag_en.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_flag_es.png b/src/usr/local/www/themes/pfsense/images/icons/icon_flag_es.png new file mode 100644 index 0000000..434776c Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_flag_es.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_flag_pt_BR.png b/src/usr/local/www/themes/pfsense/images/icons/icon_flag_pt_BR.png new file mode 100644 index 0000000..f786349 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_flag_pt_BR.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_cert.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_cert.png new file mode 100644 index 0000000..48a34b6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_cert.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_file.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_file.png new file mode 100644 index 0000000..48a9ed2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_file.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_group.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_group.png new file mode 100644 index 0000000..7d929c0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_group.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_host.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_host.png new file mode 100644 index 0000000..867ef2c Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_host.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_imp.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_imp.png new file mode 100644 index 0000000..f667cfc Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_imp.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_mail.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_mail.png new file mode 100644 index 0000000..d2d4548 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_mail.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_pwd.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_pwd.png new file mode 100644 index 0000000..06b53a1 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_pwd.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_search.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_search.png new file mode 100644 index 0000000..33de926 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_search.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_time.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_time.png new file mode 100644 index 0000000..aa8300a Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_time.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_unknown.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_unknown.png new file mode 100644 index 0000000..1857d0e Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_unknown.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_url.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_url.png new file mode 100644 index 0000000..cf56792 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_url.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_user.png b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_user.png new file mode 100644 index 0000000..e00eebe Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_frmfld_user.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_fw-update.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_fw-update.gif new file mode 100755 index 0000000..52c18ac Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_fw-update.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_help.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_help.gif new file mode 100644 index 0000000..84c84db Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_help.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_ifalias.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_ifalias.gif new file mode 100644 index 0000000..0c569a7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_ifalias.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_ifalias_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_ifalias_d.gif new file mode 100644 index 0000000..faa84d4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_ifalias_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_import_alias.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_import_alias.gif new file mode 100755 index 0000000..d11a5f0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_import_alias.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_in.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_in.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_in_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_in_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_info_pkg.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_info_pkg.gif new file mode 100755 index 0000000..cd3a532 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_info_pkg.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_interface_down.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_interface_down.gif new file mode 100755 index 0000000..0626655 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_interface_down.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_interface_up.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_interface_up.gif new file mode 100755 index 0000000..1449513 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_interface_up.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_left.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_left.gif new file mode 100755 index 0000000..8effefe Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_left.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_left_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_left_d.gif new file mode 100755 index 0000000..c778014 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_left_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_left_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_left_mo.gif new file mode 100755 index 0000000..84c6fa2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_left_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_log.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_log.gif new file mode 100755 index 0000000..4a1983a Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_log.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_log_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_log_d.gif new file mode 100755 index 0000000..d31bd9b Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_log_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_log_s.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_log_s.gif new file mode 100755 index 0000000..f9fda33 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_log_s.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_log_s_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_log_s_d.gif new file mode 100755 index 0000000..fb2c05f Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_log_s_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_logs.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_logs.gif new file mode 100644 index 0000000..afe0104 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_logs.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_match.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_match.gif new file mode 100644 index 0000000..215571f Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_match.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_match_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_match_d.gif new file mode 100644 index 0000000..6e4c364 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_match_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_minus.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_minus.gif new file mode 100755 index 0000000..417544f Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_minus.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_open.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_open.gif new file mode 100755 index 0000000..ac3da14 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_open.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_other.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_other.gif new file mode 100755 index 0000000..e6f780f Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_other.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_other_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_other_d.gif new file mode 100755 index 0000000..b08d970 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_other_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_out.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_out.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_out_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_out_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_parp.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_parp.gif new file mode 100755 index 0000000..96acaf3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_parp.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_parp_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_parp_d.gif new file mode 100755 index 0000000..7d7d00e Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_parp_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_pass.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_pass.gif new file mode 100755 index 0000000..fe1bb0d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_pass.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_pass_add.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_pass_add.gif new file mode 100755 index 0000000..f7f4c20 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_pass_add.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_pass_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_pass_d.gif new file mode 100755 index 0000000..6adc431 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_pass_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_plus.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_plus.gif new file mode 100755 index 0000000..2a94eeb Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_plus.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_plus_bl.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_plus_bl.gif new file mode 100644 index 0000000..8dcd7c0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_plus_bl.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_plus_bl_p.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_plus_bl_p.gif new file mode 100644 index 0000000..0c79849 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_plus_bl_p.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_plus_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_plus_d.gif new file mode 100755 index 0000000..ebc7457 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_plus_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_plus_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_plus_mo.gif new file mode 100755 index 0000000..1c7ca08 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_plus_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_plus_p.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_plus_p.gif new file mode 100644 index 0000000..eb41284 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_plus_p.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall.gif new file mode 100755 index 0000000..d78b867 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_d.gif new file mode 100755 index 0000000..13658f7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_mo.gif new file mode 100755 index 0000000..90b576e Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg.gif new file mode 100755 index 0000000..9aebb03 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg_d.gif new file mode 100755 index 0000000..4ab4992 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg_mo.gif new file mode 100755 index 0000000..7025d20 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_pkg_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml.gif new file mode 100755 index 0000000..4542432 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml_d.gif new file mode 100755 index 0000000..8d3a68d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml_mo.gif new file mode 100755 index 0000000..15e0aed Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reinstall_xml_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reject.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reject.gif new file mode 100755 index 0000000..5565cd6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reject.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_reject_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_reject_d.gif new file mode 100755 index 0000000..6c09fae Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_reject_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_right.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_right.gif new file mode 100755 index 0000000..fdf2d8b Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_right.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_service_restart.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_service_restart.gif new file mode 100755 index 0000000..e49fbd7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_service_restart.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_service_restart_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_service_restart_d.gif new file mode 100755 index 0000000..a5d6d7c Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_service_restart_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_service_running.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_service_running.gif new file mode 100644 index 0000000..543fd56 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_service_running.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_service_start.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_service_start.gif new file mode 100755 index 0000000..09bb58f Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_service_start.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_service_start_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_service_start_d.gif new file mode 100755 index 0000000..f58f111 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_service_start_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_service_status.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_service_status.gif new file mode 100644 index 0000000..a93bcfb Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_service_status.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_service_stop.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_service_stop.gif new file mode 100755 index 0000000..922addc Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_service_stop.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_service_stop_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_service_stop_d.gif new file mode 100755 index 0000000..b4cfdea Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_service_stop_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_service_stopped.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_service_stopped.gif new file mode 100644 index 0000000..f93a25d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_service_stopped.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_services_restart_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_services_restart_mo.gif new file mode 100755 index 0000000..a092b40 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_services_restart_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_services_start_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_services_start_mo.gif new file mode 100755 index 0000000..ecdb58f Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_services_start_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_services_stop_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_services_stop_mo.gif new file mode 100755 index 0000000..c00e208 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_services_stop_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_system-group-grey.png b/src/usr/local/www/themes/pfsense/images/icons/icon_system-group-grey.png new file mode 100644 index 0000000..d7b964d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_system-group-grey.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_system-group.png b/src/usr/local/www/themes/pfsense/images/icons/icon_system-group.png new file mode 100644 index 0000000..1c974f2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_system-group.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_system-user-grey.png b/src/usr/local/www/themes/pfsense/images/icons/icon_system-user-grey.png new file mode 100644 index 0000000..2f6047d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_system-user-grey.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_system-user.png b/src/usr/local/www/themes/pfsense/images/icons/icon_system-user.png new file mode 100644 index 0000000..ef82156 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_system-user.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_system_lock_screen.png b/src/usr/local/www/themes/pfsense/images/icons/icon_system_lock_screen.png new file mode 100644 index 0000000..30f306d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_system_lock_screen.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_system_logout.png b/src/usr/local/www/themes/pfsense/images/icons/icon_system_logout.png new file mode 100644 index 0000000..9bbb6c7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_system_logout.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_trapped.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_trapped.gif new file mode 100644 index 0000000..ffeb2cd Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_trapped.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_trapped_p.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_trapped_p.gif new file mode 100755 index 0000000..6d46aaf Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_trapped_p.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_ts_rule.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_ts_rule.gif new file mode 100755 index 0000000..e15ab6c Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_ts_rule.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_ts_rule_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_ts_rule_d.gif new file mode 100755 index 0000000..f776281 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_ts_rule_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_up.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_up.gif new file mode 100755 index 0000000..883c5a2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_up.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_up_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_up_d.gif new file mode 100755 index 0000000..0ddcce2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_up_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_up_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_up_mo.gif new file mode 100755 index 0000000..9f869a4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_up_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_wlan.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_wlan.gif new file mode 100755 index 0000000..1f0addc Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_wlan.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_wlan_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_wlan_d.gif new file mode 100755 index 0000000..35bf580 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_wlan_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_wol_all.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_wol_all.gif new file mode 100755 index 0000000..2d22182 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_wol_all.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_wzd_nsaved.png b/src/usr/local/www/themes/pfsense/images/icons/icon_wzd_nsaved.png new file mode 100644 index 0000000..21cb27d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_wzd_nsaved.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_wzd_saved.png b/src/usr/local/www/themes/pfsense/images/icons/icon_wzd_saved.png new file mode 100644 index 0000000..ab82946 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_wzd_saved.png differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_x.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_x.gif new file mode 100755 index 0000000..24e4d49 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_x.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_x_d.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_x_d.gif new file mode 100755 index 0000000..d2bfbc8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_x_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_x_mo.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_x_mo.gif new file mode 100755 index 0000000..da7b57c Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_x_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/icon_x_p.gif b/src/usr/local/www/themes/pfsense/images/icons/icon_x_p.gif new file mode 100755 index 0000000..8828fa6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/icon_x_p.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/in.gif b/src/usr/local/www/themes/pfsense/images/icons/in.gif new file mode 100644 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/in.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/in_d.gif b/src/usr/local/www/themes/pfsense/images/icons/in_d.gif new file mode 100644 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/in_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/out.gif b/src/usr/local/www/themes/pfsense/images/icons/out.gif new file mode 100644 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/out.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/icons/out_d.gif b/src/usr/local/www/themes/pfsense/images/icons/out_d.gif new file mode 100644 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/icons/out_d.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/log.png b/src/usr/local/www/themes/pfsense/images/log.png new file mode 100755 index 0000000..762ba80 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/log.png differ diff --git a/src/usr/local/www/themes/pfsense/images/logo.gif b/src/usr/local/www/themes/pfsense/images/logo.gif new file mode 100755 index 0000000..553cbd5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/logo.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/logobig.jpg b/src/usr/local/www/themes/pfsense/images/logobig.jpg new file mode 100755 index 0000000..2ef196d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/logobig.jpg differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/bar_blue.gif b/src/usr/local/www/themes/pfsense/images/misc/bar_blue.gif new file mode 100755 index 0000000..741186a Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/bar_blue.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/bar_gray.gif b/src/usr/local/www/themes/pfsense/images/misc/bar_gray.gif new file mode 100755 index 0000000..e86e245 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/bar_gray.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/bar_left.gif b/src/usr/local/www/themes/pfsense/images/misc/bar_left.gif new file mode 100755 index 0000000..af751fa Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/bar_left.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/bar_right.gif b/src/usr/local/www/themes/pfsense/images/misc/bar_right.gif new file mode 100755 index 0000000..ff12d9e Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/bar_right.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/button.gif b/src/usr/local/www/themes/pfsense/images/misc/button.gif new file mode 100755 index 0000000..e85dbb3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/button.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/key_128.gif b/src/usr/local/www/themes/pfsense/images/misc/key_128.gif new file mode 100755 index 0000000..ea5ae34 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/key_128.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/key_152.gif b/src/usr/local/www/themes/pfsense/images/misc/key_152.gif new file mode 100755 index 0000000..6c7fc03 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/key_152.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/key_256.gif b/src/usr/local/www/themes/pfsense/images/misc/key_256.gif new file mode 100755 index 0000000..3e1c377 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/key_256.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/key_64.gif b/src/usr/local/www/themes/pfsense/images/misc/key_64.gif new file mode 100755 index 0000000..87892bd Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/key_64.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/left_background.gif b/src/usr/local/www/themes/pfsense/images/misc/left_background.gif new file mode 100755 index 0000000..529d827 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/left_background.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/loader.gif b/src/usr/local/www/themes/pfsense/images/misc/loader.gif new file mode 100755 index 0000000..5d10ac3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/loader.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/loader_tab.gif b/src/usr/local/www/themes/pfsense/images/misc/loader_tab.gif new file mode 100755 index 0000000..05bb04c Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/loader_tab.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/logon.png b/src/usr/local/www/themes/pfsense/images/misc/logon.png new file mode 100755 index 0000000..baf8a9d Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/logon.png differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/progress_bar.gif b/src/usr/local/www/themes/pfsense/images/misc/progress_bar.gif new file mode 100755 index 0000000..3b4aa52 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/progress_bar.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/rrd_error.png b/src/usr/local/www/themes/pfsense/images/misc/rrd_error.png new file mode 100755 index 0000000..a79ecf3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/rrd_error.png differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/tri_c.gif b/src/usr/local/www/themes/pfsense/images/misc/tri_c.gif new file mode 100755 index 0000000..317b758 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/tri_c.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/tri_c_black.gif b/src/usr/local/www/themes/pfsense/images/misc/tri_c_black.gif new file mode 100755 index 0000000..309846e Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/tri_c_black.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/tri_o.gif b/src/usr/local/www/themes/pfsense/images/misc/tri_o.gif new file mode 100755 index 0000000..eb95c32 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/tri_o.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/tri_o_black.gif b/src/usr/local/www/themes/pfsense/images/misc/tri_o_black.gif new file mode 100755 index 0000000..f818f3b Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/tri_o_black.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/misc/widget_loader.gif b/src/usr/local/www/themes/pfsense/images/misc/widget_loader.gif new file mode 100755 index 0000000..fad101f Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/misc/widget_loader.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/new_tab_menu.png b/src/usr/local/www/themes/pfsense/images/new_tab_menu.png new file mode 100755 index 0000000..4bdfcef Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/new_tab_menu.png differ diff --git a/src/usr/local/www/themes/pfsense/images/status.png b/src/usr/local/www/themes/pfsense/images/status.png new file mode 100755 index 0000000..a3e368e Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/status.png differ diff --git a/src/usr/local/www/themes/pfsense/images/transparent.gif b/src/usr/local/www/themes/pfsense/images/transparent.gif new file mode 100755 index 0000000..89c5530 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/transparent.gif differ diff --git a/src/usr/local/www/themes/pfsense/images/transparent_pixel.gif b/src/usr/local/www/themes/pfsense/images/transparent_pixel.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense/images/transparent_pixel.gif differ diff --git a/src/usr/local/www/themes/pfsense/javascript/niftyjsCode.js b/src/usr/local/www/themes/pfsense/javascript/niftyjsCode.js new file mode 100644 index 0000000..75ef8b0 --- /dev/null +++ b/src/usr/local/www/themes/pfsense/javascript/niftyjsCode.js @@ -0,0 +1,174 @@ +function NiftyCheck(){ +if(!document.getElementById || !document.createElement) + return(false); +isXHTML=/html\:/.test(document.getElementsByTagName('body')[0].nodeName); +if(Array.prototype.push==null){Array.prototype.push=function(){ + this[this.length]=arguments[0]; return(this.length);};} +return(true); +} + +function Rounded(selector,wich,bk,color,opt){ +var i,prefixt,prefixb,cn="r",ecolor="",edges=false,eclass="",b=false,t=false; + +if(color=="transparent"){ + cn=cn+"x"; + ecolor=bk; + bk="transparent"; + } +else if(opt && opt.indexOf("border")>=0){ + var optar=opt.split(" "); + for(i=0;i=0) ecolor=optar[i]; + if(ecolor=="") ecolor="#666"; + cn+="e"; + edges=true; + } +else if(opt && opt.indexOf("smooth")>=0){ + cn+="a"; + ecolor=Mix(bk,color); + } +if(opt && opt.indexOf("small")>=0) cn+="s"; +prefixt=cn; +prefixb=cn; +if(wich.indexOf("all")>=0){t=true;b=true;} +else if(wich.indexOf("top")>=0) t="true"; +else if(wich.indexOf("tl")>=0){ + t="true"; + if(wich.indexOf("tr")<0) prefixt+="l"; + } +else if(wich.indexOf("tr")>=0){ + t="true"; + prefixt+="r"; + } +if(wich.indexOf("bottom")>=0) b=true; +else if(wich.indexOf("bl")>=0){ + b="true"; + if(wich.indexOf("br")<0) prefixb+="l"; + } +else if(wich.indexOf("br")>=0){ + b="true"; + prefixb+="r"; + } +var v=getElementsBySelector(selector); +var l=v.length; +for(i=0;i=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=1;i<=lim;i++){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingTop=0; +el.insertBefore(d,el.firstChild); +} + +function AddBottom(el,bk,color,bc,cn){ +var i,lim=4,d=CreateEl("b"); + +if(cn.indexOf("s")>=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=lim;i>0;i--){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingBottom=0; +el.appendChild(d); +} + +function CreateEl(x){ +if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x)); +else return(document.createElement(x)); +} + +function getElementsBySelector(selector){ +var i,selid="",selclass="",tag=selector,f,s=[],objlist=[]; + +if(selector.indexOf(" ")>0){ //descendant selector like "tag#id tag" + s=selector.split(" "); + var fs=s[0].split("#"); + if(fs.length==1) return(objlist); + f=document.getElementById(fs[1]); + if(f) return(f.getElementsByTagName(s[1])); + return(objlist); + } +if(selector.indexOf("#")>0){ //id selector like "tag#id" + s=selector.split("#"); + tag=s[0]; + selid=s[1]; + } +if(selid!=""){ + f=document.getElementById(selid); + if(f) objlist.push(f); + return(objlist); + } +if(selector.indexOf(".")>0){ //class selector like "tag.class" + s=selector.split("."); + tag=s[0]; + selclass=s[1]; + } +var v=document.getElementsByTagName(tag); // tag selector like "tag" +if(selclass=="") + return(v); +for(i=0;i=0){ + objlist.push(v[i]); + } + } +return(objlist); +} + +function Mix(c1,c2){ +var i,step1,step2,x,y,r=new Array(3); +if(c1.length==4)step1=1; +else step1=2; +if(c2.length==4) step2=1; +else step2=2; +for(i=0;i<3;i++){ + x=parseInt(c1.substr(1+step1*i,step1),16); + if(step1==1) x=16*x+x; + y=parseInt(c2.substr(1+step2*i,step2),16); + if(step2==1) y=16*y+y; + r[i]=Math.floor((x*50+y*50)/100); + } +return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16)); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense/loader.js b/src/usr/local/www/themes/pfsense/loader.js new file mode 100644 index 0000000..2fc9b78 --- /dev/null +++ b/src/usr/local/www/themes/pfsense/loader.js @@ -0,0 +1,30 @@ +//'); +} + +document.write(''); + +//]]> diff --git a/src/usr/local/www/themes/pfsense/login.css b/src/usr/local/www/themes/pfsense/login.css new file mode 100644 index 0000000..f8abdfc --- /dev/null +++ b/src/usr/local/www/themes/pfsense/login.css @@ -0,0 +1,1127 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + + +#login { +/* background: #cccccc; */ + background-color: transparent; + border: 0px solid #cccccc; + margin: 5em auto; + padding: 0em; + width: 400px; +/* filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; */ +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; +/* background: #ffffff; */ + margin-top: 0; + display: block; + text-indent: -1000px; + height: 400px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -420px; + left: 70px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + top: -300px; */ +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + left: 10px; + top: -300px; */ +} + +#login #submit { + font-size: 1em; + font-weight: bold; + text-align: center; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -20px; + left: 170px; +} + +/* loginerror box follows */ + +#login #inputerrors { + background-color: transparent; + border: 0px solid #666666; + margin: 5em auto; + vertical-align: middle; + padding: 0em; + width: 330px; + height: 50px; + position: relative; + top: -370px; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense/new_tab_menu.css b/src/usr/local/www/themes/pfsense/new_tab_menu.css new file mode 100644 index 0000000..04c4cf2 --- /dev/null +++ b/src/usr/local/www/themes/pfsense/new_tab_menu.css @@ -0,0 +1,101 @@ +/* + new_tab_menu.css + part of pfSense + Copyright (C) 2010-2011 Robert Zelaya + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + + Replace your old tab menu with the following code. To add a second tab menu line just cut and paste again. + The following code is dependent on new_tab_menu.css and images/new_tab_menu.png. + + + + + + + +*/ + +.newtabmenu ul, li{border:0; margin:0; padding:0; list-style:none;} + +.newtabmenu li{float:left; margin-right:2px; text-align: center;} +.newtabmenu a:link, .newtabmenu a:visited{ + background:url(images/new_tab_menu.png) right 45px; + color:#ffffff; /* noactive font */ + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + font-weight:bold; + font-size:.9em; + height:20px; + line-height:20px; + text-decoration:none; +} +.newtabmenu a span{ + background:url(images/new_tab_menu.png) left 45px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + height:20px; + margin-right:7px; + padding-left:7px; +} +.newtabmenu a:hover{ + background:url(images/new_tab_menu.png) right 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + color:#ffffff; /* hover over font */ +} +.newtabmenu a:hover span{ + background:url(images/new_tab_menu.png) left 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ +} + +/* -------------------------------- */ +/* ACTIVE ELEMENTS */ +.newtabmenu_active a:link, .newtabmenu_active a:visited, .newtabmenu_active a:visited, .newtabmenu_active a:hover{ + color:#000000; /* active font */ + background:url(images/new_tab_menu.png) right 0 no-repeat; +} +.newtabmenu_active a span, .newtabmenu_active a:hover span{ + background:url(images/new_tab_menu.png) left 0 no-repeat; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense/rrdcolors.inc.php b/src/usr/local/www/themes/pfsense/rrdcolors.inc.php new file mode 100644 index 0000000..dcb7a39 --- /dev/null +++ b/src/usr/local/www/themes/pfsense/rrdcolors.inc.php @@ -0,0 +1,89 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This file is included by the RRD graphing page and sets the colors */ + +/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Traffic Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colortrafficdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* Packets Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colorpacketsup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Packets Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colorpacketsdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* 95th Percentile Lines Out, In */ +$colortraffic95 = array('660000', 'FF0000'); + +/* State Table pfrate, pfstates, pfnat, srcip, dstip */ +$colorstates = array('00AA00','990000','0000FF','000000','DD9B00'); + +/* Processor Usage user, nice, system, int, processes */ +$colorprocessor = array('00AA00','990000','0000FF','DD9B00','000000'); + +/* Memory Usage active, inact, free, cache, wire */ +$colormemory = array('00AA00','990000','0000FF','666666','DD9B00'); + +/* MBUF Usage current, cache, total, max */ +$colormbuf = array('0080FF','00E344','FF0000','000000'); + +/* Traffic Shaper Queues q1, q2, q3, q4, q5, q6, q7, q8, q9 */ +$colorqueuesup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +$colorqueuesdropup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +/* Quality Graph Delay >420, 180-420, 60-180, 20-60, <20, Delay Avg */ +$colorqualityrtt = array('990000','a83c3c','b36666','bd9090','cccccc','000000'); +/* Quality Graph Loss */ +$colorqualityloss = 'ee0000'; + +/* Wireless Graph SNR, Rate, Channel*/ +/* Cellular Graph RSSI, */ +$colorwireless = array('333333','a83c3c','999999'); + +/* SPAMD Times min area, avg area, max area, Time line */ +$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); +/* SPAMD Connections max area, min area, min line, max line, avg line */ +$colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600'); + +/* OpenVPN Users Online Users */ +$colorvpnusers = array('990000'); + +/* Captive Portal Total Users Total Users */ +/* Captive Portal Concurrent Concurrent Users */ +$colorcaptiveportalusers = array('990000'); + +?> diff --git a/src/usr/local/www/themes/pfsense/styles/jquery-ui-1.11.1.css b/src/usr/local/www/themes/pfsense/styles/jquery-ui-1.11.1.css new file mode 100644 index 0000000..8a8c54f --- /dev/null +++ b/src/usr/local/www/themes/pfsense/styles/jquery-ui-1.11.1.css @@ -0,0 +1,1226 @@ +/*! jQuery UI - v1.11.1 - 2014-09-22 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2C%20Helvetica%2C%20Arial%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=glass&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=inset_soft&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=glass&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=bbbbbb&fcHover=599fcf&iconColorHover=3383bb&bgColorActive=999999&bgTextureActive=inset_hard&bgImgOpacityActive=75&borderColorActive=999999&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=444444&iconColorHighlight=3383bb&bgColorError=c0402a&bgTextureError=flat&bgImgOpacityError=55&borderColorError=c0402a&fcError=ffffff&iconColorError=fbc856&bgColorOverlay=eeeeee&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0pxdow +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; + background-color: #990000; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #c9c9c9 url("../../../javascript/jquery/images/ui-bg_inset-soft_50_c9c9c9_1x100.png") 50% bottom repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #bbbbbb; + /* background: #dddddd url("../../../javascript/jquery/images/ui-bg_glass_35_dddddd_1x400.png") 50% 50% repeat-x; */ + color: #444444; + font-weight: bold; +} +.ui-widget-header a { + color: #444444; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_glass_60_eeeeee_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #3383bb; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #3383bb; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #bbbbbb; + background: #f8f8f8 url("../../../javascript/jquery/images/ui-bg_glass_100_f8f8f8_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #599fcf; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #599fcf; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #999999; + background: #999999 url("../../../javascript/jquery/images/ui-bg_inset-hard_75_999999_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #ffffff; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_55_eeeeee_40x100.png") 50% 50% repeat-x; + color: #444444; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #444444; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #c0402a; + background: #c0402a url("../../../javascript/jquery/images/ui-bg_flat_55_c0402a_40x100.png") 50% 50% repeat-x; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_70b2e1_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_454545_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_fbc856_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_0_eeeeee_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -4px 0 0 -4px; + padding: 4px; + background: #aaaaaa url("../../../javascript/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 0pxdow; +} diff --git a/src/usr/local/www/themes/pfsense_ng/all.css b/src/usr/local/www/themes/pfsense_ng/all.css new file mode 100644 index 0000000..39beb77 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/all.css @@ -0,0 +1,1414 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, sans-serif; + font-size: 0.9em; + +} + +.nowrap { white-space: nowrap; } + +.addgatewaybox { + background-color: #990000; + border-style: none none none none; + width: 225px; +} + +.infobox { + width:100%; +} + +.infoboxsave { + padding-right: 10px; +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +.inputerrorsleft { + background-color: #990000; + width: 36px; +} + +.inputerrorsright { + background-color: #FFD9D1; + color: #000000; + font-size: 11px; + padding-left: 8px; + padding-top: 6px; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 220px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 11px; + font-family: "Trebuchet MS", sans-serif; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + align: left; + background: url('images/background.jpg') no-repeat; + background-position : left 0px; + background-attachment: fixed; + background-color: #7f7f7f; +} +a:link { + color: #550000; +} + +a:visited { + color: #550000; +} + +a:active { + color: #550000; +} + +a:hover { + color: #550000; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* style of disabled formelements */ +#wrap div {margin:1em 0} +[disabled] { + color:#666666; + background:#eeeeee; +} + +/* ID Based CSS Definitions */ +/* margin: 0px auto makes the content centered, margin 0px 0px makes it aligned to the left */ +#wrapper { + width: 810px; + margin: 0px 0px; +/* left: 0px; */ +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 40px; + width: 810px; + position: fixed; + left: 0; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 40px; + width: 80px; + left: 0px; + top:0px; + float: left; +} +#header-left #status-link { + position: relative; + top: 0px; + left: 0px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 30px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +/* for forcing an alert run the following command from diagnostics>command, php command: +file_notice("blah", "blah blah...testing my new theme..."); +*/ + +#header-right .container .right #alerts { + position: fixed; + background: url('images/alert_bgr.png') no-repeat; + height: 40px; + width: 400px; + top: 0px; + left: 810px; + z-index: 2; + padding-top: 1px; + padding-left: 10px; + margin: 0px; +} + +#header-right .container .right #hostname { + position: fixed; + background: url('images/hostname.png') no-repeat; + height: 40px; + width: 400px; + z-index: 1; + padding-right: 5px; + margin: 0px; + top: 0px; + left: 810px; + font-size: 12px; + color: #000000; + font-weight: bold; + padding-left: 40px; + padding-top: 2px; + text-align: left; +} + + + + +table#marquee { + position: relative; + top: -4px; + left: 15px; + border: 0; + padding: 0; + margin: 0; + width: 350px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { +/* font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; */ + font-size: 12px; + font-weight: normal; + font-style: italic; + color: #000000; + padding-left: 30px; + padding-top: 2px; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 330px; + height: 16px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + +#content { + position: relative; + top: 0px; + left: 75px; + margin-top: 0px; + margin-left: 0px; + padding-top: 50px; + padding-left: 20px; + width: 840px; + background-color: #ffffff; + background: url('images/horizontal.png') repeat-y; +} + + +/* try to abuse left as a fadeout at the end of the page */ +#left { + width: 810px; + height: 1px; +} + +#right { + position: relative; + top: -10px; + left: 0px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 20px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 90px; + min-height: 400px; + +} + +#footer { + position: relative; +/* margin-bottom: 5px; */ + background: url('images/footer.png') no-repeat; +/* top: -100px; */ + bottom: 0px; + left: 75px; +/* width: 1210px; */ + width: 840px; + height: 60px; + color: #000000; + text-align: center; + font-size: 0.9em; + padding-top: 10px; + padding-left: 10px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; + +} + +/* Style the List */ +#navigation { + position: fixed; + top: 0px; + left: 100px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; + margin-left: 10px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + padding-right: 20px; + top: 0px; +} + +/* Text mainmenubar */ +#navigation ul li div { + background-image: url(images/mainmenu-right.gif); + background-position: 2% 50%; + background-repeat: no-repeat; + padding-top:0px; + font-size: 12px; + font-weight: normal; + color: #ffffff; + text-align: left; + padding-left: 13px; + height: 13px; +} + +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + font-weight: normal; + margin-top: 1px; + padding-top: 5px; + background: #850000; + border: 0px; + /* transparent */ + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=95); + -moz-opacity: 0.95; + -khtml-opacity: 0.95; + opacity: 0.95; + /* borders */ + border-bottom-right-radius: 0px; + border-bottom-left-radius: 6px; + border-top-left-radius: 6px; + border-top-right-radius: 6px; + /* Mozilla */ + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-topleft: 6px; + /* WebKit */ + -webkit-border-bottom-right-radius: 0px; + -webkit-border-bottom-left-radius: 6px; + -webkit-border-top-right-radius: 6px; + -webkit-border-top-left-radius: 6px; + /* Shadow Effect */ + box-shadow: 5px 5px 10px #000000; + -webkit-box-shadow: 5px 5px 10px #000000; + -moz-box-shadow: 5px 5px 10px #000000; + /* Vertical menu max size */ + /* max-height: 259px; / + /* Horizontal menu max size */ + max-width: 128px; + overflow-x: hidden; + overflow-y: auto; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; + background-image: url(images/mainmenu-down.gif); + background-position: 5% 50%; + background-repeat: no-repeat; +} + +#navigation ul li { + background-color: transparent; + color: #000000; +} +/* dropdownmenu */ +#navigation ul li ul li { + border: 0px solid #850000; + width: 128px; + height: 1.6em; + line-height: 1.6em; + background-color: #850000; + /* borders */ + border-bottom-right-radius: 0px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + /* Mozilla */ + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-topleft: 3px; + /* WebKit */ + -webkit-border-bottom-right-radius: 0px; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-right-radius: 3px; + -webkit-border-top-left-radius: 3px; +} +/* last element in dropdown menu*/ +#navigation ul li ul li:last-child { + margin-bottom: 5px; +} +#navigation ul li ul li:hover { + margin-left: 5px; + background-color: #666666; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=95); + -moz-opacity: 0.95; + -khtml-opacity: 0.95; + opacity: 0.95; +} + +/* textcolor in dropdownmenu */ +#navigation li li a { + display: block; + padding-left: 8px; + padding-right: 8px; + color: #ffffff; + font-size: 11px; + font-weight: normal; + text-align: left; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { +} +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; + background-color: transparent; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listrborder { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-left: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + color: #FFFFFF; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} + +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #DDDDDD; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + +/* style of disabled formelements */ +[disabled] { + color:#666666; + background:#eeeeee; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 6px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; + +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password, #password2 { + font-size: small; + width: 60%; + padding-left: 19px; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #B1B1B1; + padding-right: 6px; + padding-left: 6px; + color: #000000; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} +.widgetconfigdiv{ + background:#BBBBBB; + font-size: 11px; + color: #000000; + padding-right: 5px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +div#log div.log-entry-mini { + clear: both; +} + +div#log div.log-entry-mini span { + padding: 2px 2px 2px 2px; + padding-left: 6px; +} + +div#log span.log-action-mini-header, +div#log span.log-time-mini-header, +div#log span.log-interface-mini-header, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header, +div#log span.log-protocol-mini-header { + float: left; + text-align: left; + background-color: #B1B1B1; + font-size: 12px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-time-mini, +div#log span.log-interface-mini, +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-protocol-mini { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 11px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-action-mini-header { + width: 6%; +} + +div#log span.log-time-mini, +div#log span.log-time-mini-header { + width: 19%; +} + +div#log span.log-interface-mini, +div#log span.log-interface-mini-header { + width: 8%; +} + +div#log span.log-source-mini, +div#log span.log-source-mini-header { + width: 23%; +} + +div#log span.log-destination-mini, +div#log span.log-destination-mini-header { + width: 31%; +} + +div#log span.log-protocol-mini, +div#log span.log-protocol-mini-header { + width: 8%; + border-right: 1px solid #999; +} + +/* Sortable tables */ +table.sortable thead { + cursor: default; + /* background-color: #EEEEEE; this causing light gray rectangles to the right of many tables in gui */ + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} + +/*thermal_sensors widget styles*/ + +.thermalSensorRow { width: 100%; border: 0px solid #ddd; padding: 1px; border-radius: 3px; } +.thermalSensorBarShell { position: relative; width: 100%; height: 5px; border: 1px solid lightgray; border-radius: 3px; } +.thermalSensorBar { position: absolute; width: 0%; height: 1px; z-index: 1; border-style: solid; border-radius: 3px; + background-color: LimeGreen; + border-top-width: 2px; border-top-color: Lime; + border-left-width: 0px; + border-right-width: 0px; + border-bottom-width: 2px; border-bottom-color: Green; +} +.thermalSensorTextShell { height: 20px; width: 100%; top: 3px; } +.thermalSensorText { float: left; height: 20px; top: 3px; } +.thermalSensorValue { float: left; height: 20px; top: 3px; font-weight: bold; margin-left: 10px;} + +.thermalSensorWarnThresh { position: absolute; background-color: orange; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } +.thermalSensorCritThresh { position: absolute; background-color: red; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } + +.thermal_sensors_widget_scale000 { position: absolute; height: 5px; width: 1px; left: -1px; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale020 { position: absolute; height: 3px; width: 1px; left: 10%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale010 { position: absolute; height: 3px; width: 1px; left: 20%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale030 { position: absolute; height: 3px; width: 1px; left: 30%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale040 { position: absolute; height: 3px; width: 1px; left: 40%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale050 { position: absolute; height: 3px; width: 1px; left: 50%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale060 { position: absolute; height: 3px; width: 1px; left: 60%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale070 { position: absolute; height: 3px; width: 1px; left: 70%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale080 { position: absolute; height: 3px; width: 1px; left: 80%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale090 { position: absolute; height: 3px; width: 1px; left: 90%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; } + +.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; } + +/* widget textarea styles - full width */ +.textarea_widget { + width: 100%; + resize:vertical; + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* IE 8+ */ +} diff --git a/src/usr/local/www/themes/pfsense_ng/apple-touch-icon.png b/src/usr/local/www/themes/pfsense_ng/apple-touch-icon.png new file mode 100755 index 0000000..7a4b975 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/apple-touch-icon.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/bottom-loader.js b/src/usr/local/www/themes/pfsense_ng/bottom-loader.js new file mode 100644 index 0000000..a21f775 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/bottom-loader.js @@ -0,0 +1,10 @@ +// diff --git a/src/usr/local/www/themes/pfsense_ng/favicon.ico b/src/usr/local/www/themes/pfsense_ng/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/favicon.ico differ diff --git a/src/usr/local/www/themes/pfsense_ng/graphlink.css b/src/usr/local/www/themes/pfsense_ng/graphlink.css new file mode 100644 index 0000000..521059e --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/graphlink.css @@ -0,0 +1,43 @@ +/******************************************************************************* + $Id: graphlink.css,v 1.2.2.1 2007/01/17 18:43:30 sullrich Exp $ + + This file is part of the GraphLink software. + GraphLink is distributed under the MIT License. + Copyright (C) 2005-2006 Max Khitrov +*******************************************************************************/ + +/** + * Defines the background image used for the graph, as well as the actual data + * locations. + * Use padding-left and padding-top to align the data area correctly with your + * background image. + * Width and height should same as the dimensions of the image, minus the + * padding values in both directions. + */ +div.GraphLink { + width: 212px; + height: 60px; + padding-left: 38px; + padding-top: 10px; + background-image: url(/themes/nervecenter/images/misc/graph.png); + overflow: hidden; +} + +/** + * Defines the data display area. Modify to fit your background image. + */ +div.GraphLinkData { + width: 200px; + height: 50px; + overflow: hidden; +} + +/** + * Defines the look of one bar. Nothing to change here other than the color. + */ +span.GraphLinkBar { + background-color: #990000; + height: 100%; + float: left; + overflow: hidden; +} diff --git a/src/usr/local/www/themes/pfsense_ng/images/alert_bgr.png b/src/usr/local/www/themes/pfsense_ng/images/alert_bgr.png new file mode 100755 index 0000000..5a8ac81 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/alert_bgr.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/alerter.png b/src/usr/local/www/themes/pfsense_ng/images/alerter.png new file mode 100755 index 0000000..e026bfe Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/alerter.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/background.jpg b/src/usr/local/www/themes/pfsense_ng/images/background.jpg new file mode 100755 index 0000000..ebdff47 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/background.jpg differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/footer.png b/src/usr/local/www/themes/pfsense_ng/images/footer.png new file mode 100755 index 0000000..b10002b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/footer.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/header.png b/src/usr/local/www/themes/pfsense_ng/images/header.png new file mode 100755 index 0000000..6f8128c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/header.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/help.png b/src/usr/local/www/themes/pfsense_ng/images/help.png new file mode 100755 index 0000000..1de05e3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/help.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/horizontal.png b/src/usr/local/www/themes/pfsense_ng/images/horizontal.png new file mode 100755 index 0000000..f098bb3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/horizontal.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/hostname.png b/src/usr/local/www/themes/pfsense_ng/images/hostname.png new file mode 100755 index 0000000..cd79f5c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/hostname.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/favicon.ico b/src/usr/local/www/themes/pfsense_ng/images/icons/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/favicon.ico differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_3g.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_3g.gif new file mode 100755 index 0000000..46ccb92 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_3g.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_3g_inactive.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_3g_inactive.gif new file mode 100755 index 0000000..cf983e4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_3g_inactive.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_advanced.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_advanced.gif new file mode 100755 index 0000000..3ede1ff Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_advanced.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_advanced_s.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_advanced_s.gif new file mode 100755 index 0000000..b233549 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_advanced_s.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alert.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alert.gif new file mode 100755 index 0000000..7646941 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alert.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_host.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_host.gif new file mode 100755 index 0000000..ad43e17 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_host.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_net.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_net.gif new file mode 100755 index 0000000..abd1b8b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_net.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_port.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_port.gif new file mode 100755 index 0000000..4acf2aa Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_port.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_url.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_url.gif new file mode 100755 index 0000000..660571e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_url.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_url_reload.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_url_reload.gif new file mode 100755 index 0000000..55c1c4a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_alias_url_reload.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_block.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_block.gif new file mode 100755 index 0000000..670c968 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_block.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_block_add.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_block_add.gif new file mode 100755 index 0000000..eb726d6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_block_add.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_block_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_block_d.gif new file mode 100755 index 0000000..e6345fe Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_block_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_cablenic.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_cablenic.gif new file mode 100755 index 0000000..a071c66 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_cablenic.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_cal.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_cal.gif new file mode 100755 index 0000000..a9c7c87 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_cal.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_cal_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_cal_mo.gif new file mode 100755 index 0000000..1647e2f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_cal_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_carp.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_carp.gif new file mode 100755 index 0000000..9454a82 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_carp.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_carp_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_carp_d.gif new file mode 100755 index 0000000..2ba8db2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_carp_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_chain.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_chain.png new file mode 100755 index 0000000..12db07a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_chain.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_check.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_check.gif new file mode 100755 index 0000000..393674d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_check.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_green.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_green.gif new file mode 100755 index 0000000..e171ba8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_green.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_grey.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_grey.gif new file mode 100755 index 0000000..00c865a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_grey.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_red.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_red.gif new file mode 100755 index 0000000..7b412ee Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_clock_red.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_close.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_close.gif new file mode 100755 index 0000000..e0f86a7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_close.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_configure.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_configure.gif new file mode 100755 index 0000000..7182e0d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_configure.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_down.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_down.gif new file mode 100755 index 0000000..b71a9c5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_down.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_down_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_down_d.gif new file mode 100755 index 0000000..70a7473 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_down_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_down_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_down_mo.gif new file mode 100755 index 0000000..584587a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_down_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_e.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_e.gif new file mode 100755 index 0000000..2950800 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_e.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_e_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_e_mo.gif new file mode 100755 index 0000000..9ba5738 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_e_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_error.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_error.gif new file mode 100755 index 0000000..e0fa659 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_error.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_exclam.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_exclam.gif new file mode 100755 index 0000000..36c2ec7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_exclam.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_de.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_de.png new file mode 100755 index 0000000..069cbbe Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_de.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_en.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_en.png new file mode 100755 index 0000000..bd7f9a5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_en.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_es.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_es.png new file mode 100755 index 0000000..434776c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_es.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_pt_BR.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_pt_BR.png new file mode 100755 index 0000000..f786349 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_flag_pt_BR.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_cert.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_cert.png new file mode 100755 index 0000000..48a34b6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_cert.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_file.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_file.png new file mode 100755 index 0000000..48a9ed2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_file.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_group.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_group.png new file mode 100755 index 0000000..7d929c0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_group.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_host.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_host.png new file mode 100755 index 0000000..867ef2c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_host.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_imp.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_imp.png new file mode 100755 index 0000000..f667cfc Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_imp.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_mail.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_mail.png new file mode 100755 index 0000000..d2d4548 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_mail.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_pwd.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_pwd.png new file mode 100755 index 0000000..06b53a1 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_pwd.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_search.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_search.png new file mode 100755 index 0000000..33de926 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_search.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_time.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_time.png new file mode 100755 index 0000000..aa8300a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_time.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_unknown.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_unknown.png new file mode 100755 index 0000000..1857d0e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_unknown.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_url.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_url.png new file mode 100755 index 0000000..cf56792 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_url.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_user.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_user.png new file mode 100755 index 0000000..e00eebe Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_frmfld_user.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_fw-update.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_fw-update.gif new file mode 100755 index 0000000..52c18ac Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_fw-update.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_help.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_help.gif new file mode 100644 index 0000000..84c84db Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_help.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ifalias.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ifalias.gif new file mode 100755 index 0000000..0c569a7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ifalias.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ifalias_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ifalias_d.gif new file mode 100755 index 0000000..faa84d4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ifalias_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_import_alias.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_import_alias.gif new file mode 100755 index 0000000..d11a5f0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_import_alias.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_in.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_in.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_in_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_in_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_info_pkg.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_info_pkg.gif new file mode 100755 index 0000000..cd3a532 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_info_pkg.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_interface_down.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_interface_down.gif new file mode 100755 index 0000000..0626655 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_interface_down.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_interface_up.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_interface_up.gif new file mode 100755 index 0000000..1449513 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_interface_up.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_left.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_left.gif new file mode 100755 index 0000000..8effefe Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_left.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_left_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_left_d.gif new file mode 100755 index 0000000..c778014 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_left_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_left_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_left_mo.gif new file mode 100755 index 0000000..84c6fa2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_left_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log.gif new file mode 100755 index 0000000..4a1983a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_d.gif new file mode 100755 index 0000000..d31bd9b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_s.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_s.gif new file mode 100755 index 0000000..f9fda33 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_s.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_s_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_s_d.gif new file mode 100755 index 0000000..fb2c05f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_log_s_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_logs.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_logs.gif new file mode 100644 index 0000000..afe0104 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_logs.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_match.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_match.gif new file mode 100644 index 0000000..215571f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_match.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_match_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_match_d.gif new file mode 100644 index 0000000..6e4c364 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_match_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_minus.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_minus.gif new file mode 100755 index 0000000..417544f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_minus.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_open.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_open.gif new file mode 100755 index 0000000..ac3da14 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_open.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_other.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_other.gif new file mode 100755 index 0000000..e6f780f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_other.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_other_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_other_d.gif new file mode 100755 index 0000000..b08d970 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_other_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_out.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_out.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_out_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_out_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_parp.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_parp.gif new file mode 100755 index 0000000..96acaf3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_parp.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_parp_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_parp_d.gif new file mode 100755 index 0000000..7d7d00e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_parp_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass.gif new file mode 100755 index 0000000..fe1bb0d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass_add.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass_add.gif new file mode 100755 index 0000000..f7f4c20 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass_add.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass_d.gif new file mode 100755 index 0000000..6adc431 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_pass_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus.gif new file mode 100755 index 0000000..2a94eeb Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_bl.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_bl.gif new file mode 100755 index 0000000..8dcd7c0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_bl.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_bl_p.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_bl_p.gif new file mode 100755 index 0000000..0c79849 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_bl_p.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_d.gif new file mode 100755 index 0000000..ebc7457 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_mo.gif new file mode 100755 index 0000000..1c7ca08 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_p.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_p.gif new file mode 100755 index 0000000..eb41284 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_plus_p.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall.gif new file mode 100755 index 0000000..d78b867 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_d.gif new file mode 100755 index 0000000..13658f7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_mo.gif new file mode 100755 index 0000000..90b576e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg.gif new file mode 100755 index 0000000..9aebb03 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg_d.gif new file mode 100755 index 0000000..4ab4992 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg_mo.gif new file mode 100755 index 0000000..7025d20 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_pkg_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml.gif new file mode 100755 index 0000000..4542432 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml_d.gif new file mode 100755 index 0000000..8d3a68d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml_mo.gif new file mode 100755 index 0000000..15e0aed Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reinstall_xml_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reject.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reject.gif new file mode 100755 index 0000000..5565cd6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reject.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reject_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reject_d.gif new file mode 100755 index 0000000..6c09fae Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_reject_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_right.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_right.gif new file mode 100755 index 0000000..fdf2d8b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_right.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_restart.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_restart.gif new file mode 100755 index 0000000..e49fbd7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_restart.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_restart_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_restart_d.gif new file mode 100755 index 0000000..a5d6d7c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_restart_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_running.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_running.gif new file mode 100644 index 0000000..543fd56 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_running.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_start.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_start.gif new file mode 100755 index 0000000..09bb58f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_start.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_start_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_start_d.gif new file mode 100755 index 0000000..f58f111 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_start_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_status.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_status.gif new file mode 100644 index 0000000..a93bcfb Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_status.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stop.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stop.gif new file mode 100755 index 0000000..922addc Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stop.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stop_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stop_d.gif new file mode 100755 index 0000000..b4cfdea Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stop_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stopped.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stopped.gif new file mode 100644 index 0000000..f93a25d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_service_stopped.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_restart_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_restart_mo.gif new file mode 100755 index 0000000..a092b40 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_restart_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_start_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_start_mo.gif new file mode 100755 index 0000000..ecdb58f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_start_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_stop_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_stop_mo.gif new file mode 100755 index 0000000..c00e208 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_services_stop_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-group-grey.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-group-grey.png new file mode 100755 index 0000000..d7b964d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-group-grey.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-group.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-group.png new file mode 100755 index 0000000..1c974f2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-group.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-user-grey.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-user-grey.png new file mode 100755 index 0000000..2f6047d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-user-grey.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-user.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-user.png new file mode 100755 index 0000000..ef82156 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system-user.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system_lock_screen.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system_lock_screen.png new file mode 100755 index 0000000..30f306d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system_lock_screen.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system_logout.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system_logout.png new file mode 100755 index 0000000..9bbb6c7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_system_logout.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_trapped.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_trapped.gif new file mode 100755 index 0000000..ffeb2cd Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_trapped.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_trapped_p.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_trapped_p.gif new file mode 100755 index 0000000..6d46aaf Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_trapped_p.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ts_rule.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ts_rule.gif new file mode 100755 index 0000000..e15ab6c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ts_rule.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ts_rule_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ts_rule_d.gif new file mode 100755 index 0000000..f776281 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_ts_rule_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_up.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_up.gif new file mode 100755 index 0000000..883c5a2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_up.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_up_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_up_d.gif new file mode 100755 index 0000000..0ddcce2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_up_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_up_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_up_mo.gif new file mode 100755 index 0000000..9f869a4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_up_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wlan.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wlan.gif new file mode 100755 index 0000000..1f0addc Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wlan.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wlan_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wlan_d.gif new file mode 100755 index 0000000..35bf580 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wlan_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wol_all.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wol_all.gif new file mode 100755 index 0000000..2d22182 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wol_all.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wzd_nsaved.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wzd_nsaved.png new file mode 100755 index 0000000..21cb27d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wzd_nsaved.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wzd_saved.png b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wzd_saved.png new file mode 100755 index 0000000..ab82946 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_wzd_saved.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x.gif new file mode 100755 index 0000000..24e4d49 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_d.gif new file mode 100755 index 0000000..d2bfbc8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_mo.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_mo.gif new file mode 100755 index 0000000..da7b57c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_p.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_p.gif new file mode 100755 index 0000000..8828fa6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/icon_x_p.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/in.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/in.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/in_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/in_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/out.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/out.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/icons/out_d.gif b/src/usr/local/www/themes/pfsense_ng/images/icons/out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/icons/out_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/log.png b/src/usr/local/www/themes/pfsense_ng/images/log.png new file mode 100755 index 0000000..762ba80 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/log.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/logo.gif b/src/usr/local/www/themes/pfsense_ng/images/logo.gif new file mode 100755 index 0000000..e5da95c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/logo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/logobig.jpg b/src/usr/local/www/themes/pfsense_ng/images/logobig.jpg new file mode 100755 index 0000000..2ef196d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/logobig.jpg differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/mainmenu-down.gif b/src/usr/local/www/themes/pfsense_ng/images/mainmenu-down.gif new file mode 100755 index 0000000..e59432a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/mainmenu-down.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/mainmenu-right.gif b/src/usr/local/www/themes/pfsense_ng/images/mainmenu-right.gif new file mode 100755 index 0000000..14298a1 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/mainmenu-right.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/mainmenuitem.gif b/src/usr/local/www/themes/pfsense_ng/images/mainmenuitem.gif new file mode 100755 index 0000000..6e97478 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/mainmenuitem.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/menu-dot.gif b/src/usr/local/www/themes/pfsense_ng/images/menu-dot.gif new file mode 100755 index 0000000..c76609b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/menu-dot.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/menu_footer.gif b/src/usr/local/www/themes/pfsense_ng/images/menu_footer.gif new file mode 100755 index 0000000..d06faa4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/menu_footer.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/menu_right.gif b/src/usr/local/www/themes/pfsense_ng/images/menu_right.gif new file mode 100755 index 0000000..881327c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/menu_right.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/menubgr.png b/src/usr/local/www/themes/pfsense_ng/images/menubgr.png new file mode 100755 index 0000000..45e0ec7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/menubgr.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/menubgr_footer.png b/src/usr/local/www/themes/pfsense_ng/images/menubgr_footer.png new file mode 100755 index 0000000..fdff49f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/menubgr_footer.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/menubgr_highlight.png b/src/usr/local/www/themes/pfsense_ng/images/menubgr_highlight.png new file mode 100755 index 0000000..05f4832 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/menubgr_highlight.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/bar_blue.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/bar_blue.gif new file mode 100755 index 0000000..741186a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/bar_blue.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/bar_gray.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/bar_gray.gif new file mode 100755 index 0000000..e86e245 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/bar_gray.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/bar_left.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/bar_left.gif new file mode 100755 index 0000000..af751fa Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/bar_left.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/bar_right.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/bar_right.gif new file mode 100755 index 0000000..ff12d9e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/bar_right.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/bullet_toggle_minus.png b/src/usr/local/www/themes/pfsense_ng/images/misc/bullet_toggle_minus.png new file mode 100755 index 0000000..37db2fd Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/bullet_toggle_minus.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/bullet_toggle_plus.png b/src/usr/local/www/themes/pfsense_ng/images/misc/bullet_toggle_plus.png new file mode 100755 index 0000000..fba7af9 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/bullet_toggle_plus.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/button.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/button.gif new file mode 100755 index 0000000..e85dbb3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/button.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/graph.png b/src/usr/local/www/themes/pfsense_ng/images/misc/graph.png new file mode 100755 index 0000000..507ec75 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/graph.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/key_128.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/key_128.gif new file mode 100755 index 0000000..ea5ae34 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/key_128.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/key_152.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/key_152.gif new file mode 100755 index 0000000..6c7fc03 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/key_152.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/key_256.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/key_256.gif new file mode 100755 index 0000000..3e1c377 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/key_256.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/key_64.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/key_64.gif new file mode 100755 index 0000000..87892bd Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/key_64.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/left_background.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/left_background.gif new file mode 100755 index 0000000..529d827 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/left_background.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/loader.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/loader.gif new file mode 100755 index 0000000..5d10ac3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/loader.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/loader_all.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/loader_all.gif new file mode 100755 index 0000000..cb6bc0c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/loader_all.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/loader_filter.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/loader_filter.gif new file mode 100755 index 0000000..b838b17 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/loader_filter.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/loader_tab.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/loader_tab.gif new file mode 100755 index 0000000..05bb04c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/loader_tab.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/logon.png b/src/usr/local/www/themes/pfsense_ng/images/misc/logon.png new file mode 100755 index 0000000..98aa37a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/logon.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/progress_bar.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/progress_bar.gif new file mode 100755 index 0000000..3b4aa52 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/progress_bar.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/rrd_error.png b/src/usr/local/www/themes/pfsense_ng/images/misc/rrd_error.png new file mode 100755 index 0000000..a79ecf3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/rrd_error.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/status_alerter.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/status_alerter.gif new file mode 100755 index 0000000..7ff1e95 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/status_alerter.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/status_carpmaster.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/status_carpmaster.gif new file mode 100755 index 0000000..2c32908 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/status_carpmaster.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/status_left.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/status_left.gif new file mode 100755 index 0000000..b5a2930 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/status_left.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/status_page_loading.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/status_page_loading.gif new file mode 100755 index 0000000..067ef18 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/status_page_loading.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/status_reload_all.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/status_reload_all.gif new file mode 100755 index 0000000..72de6bd Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/status_reload_all.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/status_reload_filter.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/status_reload_filter.gif new file mode 100755 index 0000000..d72761a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/status_reload_filter.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/status_right.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/status_right.gif new file mode 100755 index 0000000..bf66fdb Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/status_right.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/tri_c.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/tri_c.gif new file mode 100755 index 0000000..317b758 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/tri_c.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/tri_c_black.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/tri_c_black.gif new file mode 100755 index 0000000..309846e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/tri_c_black.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/tri_o.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/tri_o.gif new file mode 100755 index 0000000..eb95c32 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/tri_o.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/tri_o_black.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/tri_o_black.gif new file mode 100755 index 0000000..f818f3b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/tri_o_black.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/misc/widget_loader.gif b/src/usr/local/www/themes/pfsense_ng/images/misc/widget_loader.gif new file mode 100755 index 0000000..ca35e2a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/misc/widget_loader.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/new_tab_menu.png b/src/usr/local/www/themes/pfsense_ng/images/new_tab_menu.png new file mode 100755 index 0000000..4bdfcef Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/new_tab_menu.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/status.png b/src/usr/local/www/themes/pfsense_ng/images/status.png new file mode 100755 index 0000000..a3e368e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/status.png differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/transparent.gif b/src/usr/local/www/themes/pfsense_ng/images/transparent.gif new file mode 100755 index 0000000..89c5530 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/transparent.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/images/transparent_pixel.gif b/src/usr/local/www/themes/pfsense_ng/images/transparent_pixel.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/images/transparent_pixel.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/ie7/blank.gif b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/blank.gif new file mode 100755 index 0000000..a4fe2e6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/blank.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-box-model.js b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-box-model.js new file mode 100644 index 0000000..45543f6 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-box-model.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-box-model",function(){var NUMERIC="\x5cs*:\x5cs*\x5cd[\x5cw%]*",UNIT=/^\d\w*$/,PERCENT=/^\d+%$/,PIXEL=/^\d+(px)?$/;var MATCH=(appVersion<6)?/\b(min|max)-(width|height)\s*:\s*\d/gi:/\b(min|max)-width\s*:\s*\d/gi;var AUTO=(appVersion<5.5)?/^auto|0cm$/:/^auto$/;var ie7_tmp=tmpElement();push(IE7.recalcs,function removeTempElement(){if(ie7_tmp.parentElement)ie7_tmp.parentElement.removeChild(ie7_tmp)});CSSFixes.addFix(MATCH,function(match){return match.slice(0,3)+match.charAt(4).toUpperCase()+match.slice(5)});var viewport=(quirksMode)?document.body:documentElement;function isFixed(element){return element.style.position=="fixed"||element.currentStyle.position=="fixed"};function layoutParent(element){var layoutParent=element.offsetParent;while(layoutParent&&!hasLayout(layoutParent))layoutParent=layoutParent.offsetParent;if(!layoutParent||isFixed(element))layoutParent=viewport;return layoutParent};function fixWidth(HEIGHT){fixWidth=function(element,value){if(!element.runtimeStyle.fixedWidth&&(!isHTML||element.tagName!="HR")){if(!value)value=element.currentStyle.width;element.runtimeStyle.fixedWidth=(UNIT.test(value))?Math.max(0,getFixedWidth(element,value)):value;element.runtimeStyle.width=element.runtimeStyle.fixedWidth;boxSizing(element)}};if(quirksMode)CSSFixes.addRecalc("width\x5cs*:\x5cs*\x5cd\x5cw*[^%]",fixWidth);var getFixedWidth=(quirksMode)?function(element,value){return getPixelWidth(element,value)+getBorderWidth(element)+getPaddingWidth(element)}:function(element,value){return getPixelWidth(element,value)};function getBorderWidth(element){return element.offsetWidth-element.clientWidth};function getPaddingWidth(element){return getPixelWidth(element,element.currentStyle.paddingLeft)+getPixelWidth(element,element.currentStyle.paddingRight)};function getMarginWidth(element){return((element.currentStyle.marginLeft=="auto")?0:getPixelLeft(element,element.currentStyle.marginLeft))+((element.currentStyle.marginRight=="auto")?0:getPixelLeft(element,element.currentStyle.marginRight))};function minWidth(element){minWidth[minWidth.count++]=element;if(element.currentStyle.minHeight=="auto")element.runtimeStyle.minHeight=0;fixWidth(element);boxSizing(element);resizeWidth(element)};minWidth.count=0;CSSFixes.addRecalc("min-width"+NUMERIC,minWidth);eval(String(minWidth).replace(/min/g,"max"));maxWidth.count=0;CSSFixes.addRecalc("max-width"+NUMERIC,maxWidth);function resizeWidth(element){var rect=element.getBoundingClientRect();var width=rect.right-rect.left;if(element.currentStyle.maxWidth&&width>=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)}); diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-core.js b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-core.js new file mode 100644 index 0000000..b11e2b1 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-core.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-css-strict.js b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-css-strict.js new file mode 100644 index 0000000..4406d7a --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-css-strict.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-strict",function(){if(!modules["ie7-css2"])return;var NONE=[],ID=/#/g,CLASS=/[:@\.]/g,TAG=/^\w|[\s>+~]\w/g;IE7.parser.parse=function(cssText){var DYNAMIC=new RegExp("(.*):("+dynamicPseudoClasses+")(.*)");function addRule(selector,cssText){var match=selector.match(DYNAMIC);if(match)new DynamicRule(selector,match[1],match[2],match[3],cssText);else new Rule(selector,cssText)};cssText=cssText.replace(IE7.PseudoElement.ALL,IE7.PseudoElement.ID);var RULE=/([^\{]+)\{(\d+)\}/g,match;while(match=RULE.exec(cssText)){addRule(match[1],match[2]);if(appVersion<5.5)cssText=cssText.slice(match.lastIndex)}IE7.classes.sort(Rule.compare);return IE7.classes.join("\n")};function Rule(selector,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.Class;this.inherit(selector)};Rule.prototype=new IE7.Class.ancestor;Rule.prototype.toString=function(){return "."+this.name+"{"+this.cssText+"}"};Rule.score=function(selector){return(selector.match(ID)||NONE).length*10000+(selector.match(CLASS)||NONE).length*100+(selector.match(TAG)||NONE).length};Rule.compare=function(rule1,rule2){return rule1.specificity-rule2.specificity};function DynamicRule(selector,attach,dynamicPseudoClass,target,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.DynamicStyle;this.inherit(selector,attach,dynamicPseudoClass,target)};DynamicRule.prototype=new IE7.DynamicStyle.ancestor;DynamicRule.prototype.toString=Rule.prototype.toString}); diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-css2.js b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-css2.js new file mode 100644 index 0000000..7121c8e --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-css2.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i"){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!ù.´)Ó £(){ÿ{ù.´=ª;¢ ¢Æ=ª.¢´=Ó ¤×;£ ¢©(){if(«.¢Ù)«.¢Ù.Í.¤Ö=¤þ};ª.Õ=£(){¤ ¤ÿ};¢ â=(¤Ù.±(¢î.£Ë))?£(£Ì){ù.â(´+¥¡+£Ì)}:¢Æ;¢ Å=¤Ñ.Å.¬(¤Ú)[1];if(¤Û.±(¢î.£Ë)||Å<5||!¤Ü.±(«.Ù.ü))¤ ¢©();¢ è=¢£(«.¤Í!=¥¢);¢ ë=(¤Ë «.£Ê==¥£)?!¤Ýi.±(¢î.¢Ç):¢£(«.£Ê!=¥¤);¢ ¢í=¥¥;¢ ¢ë=¢í;if(!ë)¢ë+=¥¦;¢ ¢¹;¢ Ù=«.Ù;¢ ó={};ª.¢´=£(£È,ô,£É){if(!ó)¤;if(¢«)¢¬(¥§+¢Î(ô));if(£É){ô();ô=¢Æ}ó[£È]=ô};¢ £Ç=¤Þ;£ ¢È(²,¹){if(£Ç.±(²))²=(¹||¥¨)+²;¤ ²};£ ¢Ä(²,¹){²=¢È(²,¹);¤ ².»(0,².£Ã(¥©)+1)};¢ ¹=¢Ä(«.£Æ[«.£Æ.­-1].¤Å);¢ ¢Ê=Ó ¤Ä(¥ª);£ ã(²,¹){ÿ{²=¢È(²,¹);¢Ê.¤Á(¥«,²,Þ);¢Ê.¤¿();¤ ¢Ê.¤¾}õ(¢à){â(¥¬+²);¤ ¥¨}};¢ ·=£(¢É,¢À){¤ ¢É.·(¢À)};¢ ¢½=£(¢É){¤ ¢É.¢½()};if(Å<5.5)¢¬(ã(¥­,¹));if(«.¢Í==¥®||!ë)«.¤¹();Ö «.¤¸(¥¯);ª.¶=«.É[«.É.­-1];ª.¶.§=¢í;ª.¶.Æ=×;¢ §={};£ £¿(¶,¹){¢ ¢§=¢È(¶.²,¹);if(§[¢§])¤ ¥¨;§[¢§]=(¶.ý)?¥¨:£Å(¢Ã(¶,¹),¢Ä(¶.²,¹));¤ §[¢§]};¢ ¢Ã=£(¶){¤ ¶.§};¢ £Ä=¤ßgi;£ £Å(§,¢Ç){¤ §.³(£Ä,¥°+¢Ç.»(0,¢Ç.£Ã(¥©)+1)+¥±)};ª.Ë=[];ª.£¾=¢Æ;¢ ä=Þ;£ _ã(){ÿ{ä=×;¢ £Á=¤ài;¢ É=«.É;¢ ¢ì=[];¢ ¢Å=«.£µ(¥²);¯(¢ i=¢Å.­-1;i>=0;i--){·(¢ì,¤á.±(¢Å[i].£Â)?¥¨:¢Å[i].£Â)}£ ¢Ã(¶,¹){¢ §=¥¨;if(£Á.±(¶.¤µ)){¯(¢ i=0;i<¶.£À.­;i++){§+=¢¡.¤´(¶.£À[i],¢Ä(¶.²,¹))}§+=((¶.²)?£¿(¶,¹):¢½(¢ì))}¤ §};´.§=¥¨;¯(i=0;i<É.­;i++)´.§+=¢Ã(É[i],¥¨);´.§=£´(´.§);¯(i in ó)ó[i]();£¦ ó;if(¢¹)¢¹.¢·();Ñ.¢·();´.£¾();´.¶.§=¢ë+£³(´.§);¯(i=0;i<É.­;i++){if(!É[i].ý&&!É[i].Æ)É[i].§=¥¨}´.¢Â();â(¥³)}õ(¢¨){â(¥´+¢¨.¢ï)}¢Ë{¢©()}};ª.¢Â=£(){Ñ.¢Â();¯(¢ i=0;i<ª.Ë.­;i++)ª.Ë[i]()};¢ Ñ=Ó £(){¢ Ç=[];ª.û=£(){·(Ç,¢¡)};¢ Ë=[];ª.Ú=£(á,¢Þ){¢ £½=Ó ¢æ(¥µ+á,¥¶);¢ §=´.§;á=[];Ê(¬=£½.¤²(§)){·(á,¬[1]);if(Å<5.5)§=§.»(¬.¤±)}if(á.­){á=á.Õ();·(Ë,¢¡)}};ª.¢·=£(){¯(¢ i=0;i<Ç.­;i++){´.§=´.§.³(Ç[i][0],Ç[i][1])}ª.Ú(¥·,é);ª.Ú(¥¸,£(¡){if(¡.¢².©.Ü==¥¹)é(¡.¢²)})};ª.¢Â=£(){¯(¢ i=0;i<Ë.­;i++){¢ î=¢¶(Ë[i][0]);¯(¢ j=0;j<î.­;j++)Ë[i][1](î[j])}};ª.û(¤âgi,¥º);if(Å<6)ª.û(¤ãgi,¥»);if(è){¢ à=¥¼.¢ç(¥½);¯(¢ i=0;i<à.­;i++)à[à[i]]=à[i-1]||¥¾;£ ³($,$1,$2,$3){¤ $1+à[$3]};ª.û(Ó ¢æ(¥¿+à.¢å(¥À)+¥Á,¥¶),³)}};¢ £¹=¤ä;¢ £¸=¤åg;¢ £·=¤æ;¢ £¼=¤çg;¢ £»=¥Â;¢ þ={};£ ¢¶(µ,¦){¢ ¢è=!¦;¢ ¢é=(¦)?(¦.¤§==¤¦)?¦:[¦]:[«];¢ ñ=µ.³(£¼,£»).¢ç(¥½);¢ ¬=[];¯(¢ i=0;i<ñ.­;i++){µ=£º(ñ[i]);if(µ.»(0,3).¢å(¥¨)==¥Ã){µ=µ.»(2);¦=£¶(¢é,µ[1])}Ö ¦=¢é;¢ j=0,ß,®,Á,ò=¥¨;Ê(j<µ.­){ß=µ[j++];®=µ[j++];ò+=ß+®;Á=¥¨;if(µ[j]==¥Ä){Ê(µ[j++]!=¥Á)Á+=µ[j];Á=Á.»(0,-1);ò+=¥Ä+Á+¥Á}¦=(¢è&&þ[ò])?þ[ò]:¢ß(¦,ß,®,Á);if(¢è)þ[ò]=¦}¬=¬.¤¥(¦)}¤ ¬};£ £º(µ){if(£¹.±(µ))µ=¥Å+µ;¤ µ.¬(£¸)};£ ¢ß(¦,ß,®,Á){¢ À=¥¨;if(£·.±(®)){®=®.¢ç(¥À);À=®[0];®=®[1]}¢ ¸=[];if(ñ[ß])ñ[ß](¸,¦,®,À||Á);¤ ¸};£ £¶(¦,id){¢ ¸=[],i,j;¯(i=0;i<¦.­;i++){¢ ¬=¦[i].ì.¢À(id);if(¬){if(¬.­==¤¤)·(¸,¬);Ö ¯(j=0;j<¬.­;j++)·(¸,¬[j])}}¤ ¸};¢ ñ={¥Å:£(¸,¦,®,À){¯(¢ i=0;i<¦.­;i++){¢ ¢¦=(®==¥Æ&&¦[i].ì)?¦[i].ì:¦[i].£µ(®);¯(¢ j=0;j<¢¦.­;j++){if(ï(¢¦[j])&&(!À||¢¦[j].À==À))·(¸,¢¦[j])}}},¥Ç:£(¸,¦,®){¯(¢ i=0;i<¦.­;i++)if(¦[i].id==®)·(¸,¦[i])},¥È:£(¸,¦,®){®=Ó ¢æ(¥É+®+¥Ê);¯(¢ i=0;i<¦.­;i++)if(®.±(¦[i].¤£))·(¸,¦[i])},¥Ë:£(¸,¦,®,Á){®=¢ä[®];if(®)¯(¢ i=0;i<¦.­;i++)if(®(¦[i],Á))·(¸,¦[i])}};¢ ¤¢=¥¨;¢ ¢ä={Õ:£(){¢ Õ=[];¯(¢ ð in ª){if(ð!=¥Ì&&ð!=¥Í){if(ª[ð].­>1)ð+=¥Î;·(Õ,ð)}}¤ Õ.¢å(¥À)},¥Ì:£(¡){¤ ¢£(¡.©[¥Ï]==¥Ì)},¥Í:£(¡){¤ ¢£(¡.©[¥Ï]==¥Í)}};¢ ¤¡={Õ:¢ä.Õ};£ £ÿ(¡,º,À){if(À&&¡.À!=À)¤ Þ;¤(º==¥Æ)?ï(¡):(ë)?(¡.º==º.¢ý()):(¡.º==º)};¢ ¢¾=[];£ £þ(¢¿){¤ ¢».±(¢¿)?¢¾[¢¿.»(1,-1)]:¢¿};¢ £´=£(§){¤ §.³(¤èg,£(¬){¤(¬.¢þ(0)==¥©)?¥¨:¥Ð+(·(¢¾,¬.»(1,-1))-1)+¥Ð}).³(¤ég,¥¨).³(¤êg,¥À).³(¤ëg,¥°)};£ £³(§){¤ §.³(¤æg,¥Ñ).³(¤ìg,£(¬,£²){¤ ¢¾[£²]})};¢ ¢¼=[];£ ö(¡,Ý,Ô){¡.£±(Ý,Ô);·(¢¼,¢¡)};£ £°(¡,Ý,Ô){ÿ{¡.£û(Ý,Ô)}õ(¢à){}};ù.£±(¥Ò,£(){Ê(¢¼.­){¢ Ô=¢½(¢¼);£°(Ô[0],Ô[1],Ô[2])}});¢ ¢³=(Å<6)?£(¡){¤ ¡.Ä}:£(¡){¤ ¡.©.¢³};£ é(¡){if(!¢³(¡)){¡.£ù=Þ;£¯(£«(¡))}};£ £¯(¡){Ê(¡){¡.°.£®=¡.©.£®;¡=¢â(¡)}};¢ ¢»=¤í;£ £ø(¥){¤(¢».±(¥))?¥:¥Ð+¥+¥Ð};£ £÷(¥){¤(¢».±(¥))?¥.»(1,-1):¥};£ £¡(º){¢ ¡=«.£ª(º||¥Ó);¡.Í.§=¥Ô;¤ ¡};£ ï(¢¢){¤ ¢£(¢¢&&¢¢.£ñ==1&&¢¢.º!=¥Õ&&!¢¢.£ð)};£ £ï(¡){Ê(¡&&(¡=¡.£î)&&!ï(¡))£¬;¤ ¡};£ ¢â(¡){Ê(¡&&(¡=¡.Ì)&&!ï(¡))£¬;¤ ¡};£ £«(¡){¡=¡.£í;¤(ï(¡))?¡:¢â(¡)};¢ ¢«=Þ;´.¢´(¥Ö,£(){if(ë)¢¹=Ó £(){¢ Ç=[];£ ¢Þ(¡){¢ ¢¸=«.£ª(¥×+¡.¢µ.»(1));if(¡.¢µ.»(-2)!=¥Ø){¢ £©=¥Ù+¡.º+¥Ú,Ì;Ê((Ì=¡.Ì)&&Ì.¢µ!=£©){¡.¢á.¢Ú(Ì);¢¸.¢Ï(Ì)}if(Ì)¡.¢á.¢Ú(Ì)}¡.¢á.£ë(¢¸,¡);¤ ¢¸};ª.í=£(){·(Ç,¢¡)};ª.¢·=£(){ÿ{if(Å>5)«.£ê.í(¥Û,¥Ü)}õ(¢à){}¢Ë{¯(¢ i=0;i<Ç.­;i++){¢ î=¢¶(Ç[i][0]);¯(¢ j=0;j<î.­;j++)Ç[i][1](î[j])}}};ª.í(¥Ý,£(¡){if(!¡.£§){¢ Ò=¢¶(¥Þ,¡)[0];if(Ò){if(!Ò.id)Ò.id=Ò.ü;¡.£§=Ò.id}}});ª.í(¥ß,£(¡){¢Þ(¡);£¦ þ[¥à]});ª.í(¥á,£(¡){if(¡.º==¥â){¢ ¬=¡.¢µ.¬(¤îi);¡.°.¥=(¬)?¬[1]:¥¨}if(¡.Ý==¥ã){ö(¡,¥ä,£(){¡.°.¢Ý=×;¢ª(¥å+¡.ü+¥æ,1)})}});ª.í(¥ç,£(¡){¢ ££=¤ï;ö(¡,¥è,£(){¯(¢ i=0;i<¡.­;i++){if(££.±(¡[i].Ý)&&!¡[i].ý&&!¡[i].°.¢Ý){¡[i].ý=×;¢ª(¥å+¡[i].ü+¥é,1)}Ö if(¡[i].º==¥â&&¡[i].Ý==¥ã){¢ª(¥å+¡[i].ü+¥ê+¡[i].¥+¥Ð,1);¡[i].¥=¡[i].°.¥}}})})}},×);´.¢´(¥ë,£(){¢ ¢¯=¥ì,¢û=¤ð,¢ñ=¤ñ,¢Ð=¤ò;¢ ¢ÿ=(Å<6)?¤ógi:¤ôgi;¢ ¢ö=(Å<5.5)?¤õ:¤ö;¢ Ã=£¡();·(´.Ë,£ ¢ò(){if(Ã.Î)Ã.Î.¢Ú(Ã)});Ñ.û(¢ÿ,£(¬){¤ ¬.»(0,3)+¬.¢þ(4).¢ý()+¬.»(5)});¢ ¢ü=(è)?«.¢Ù:Ù;£ ¢Ó(¡){¤ ¡.Í.Ü==¥í||¡.©.Ü==¥í};£ ¾(¡){¢ ¾=¡.¢²;Ê(¾&&!¢³(¾))¾=¾.¢²;if(!¾||¢Ó(¡))¾=¢ü;¤ ¾};£ å(¢ó){å=£(¡,¥){if(!¡.°.¿&&(!ë||¡.º!=¥î)){if(!¥)¥=¡.©.¨;¡.°.¿=(¢û.±(¥))?£Þ.ú(0,ê(¡,¥)):¥;¡.°.¨=¡.°.¿;é(¡)}};if(è)Ñ.Ú(¥ï,å);¢ ê=(è)?£(¡,¥){¤ ç(¡,¥)+¢Õ(¡)+¢Ô(¡)}:£(¡,¥){¤ ç(¡,¥)};£ ¢Õ(¡){¤ ¡.¢Ñ-¡.Ä};£ ¢Ô(¡){¤ ç(¡,¡.©.£Ý)+ç(¡,¡.©.£Ü)};£ ¢ô(¡){¤((¡.©.¢ù==¥ð)?0:÷(¡,¡.©.¢ù))+((¡.©.¢ø==¥ð)?0:÷(¡,¡.©.¢ø))};£ ¼(¡){¼[¼.Ï++]=¡;if(¡.©.¢÷==¥ð)¡.°.¢÷=0;å(¡);é(¡);¢®(¡)};¼.Ï=0;Ñ.Ú(¥ñ+¢¯,¼);¢¬(¢Î(¼).³(¤÷g,¥ò));Ð.Ï=0;Ñ.Ú(¥ó+¢¯,Ð);£ ¢®(¡){¢ ¢°=¡.¢õ();¢ ¨=¢°.æ-¢°.Â;if(¡.©.Ð&&¨>=ê(¡,¡.©.Ð))¡.°.¨=ê(¡,¡.©.Ð);Ö if(¡.©.¼&&¨<=ê(¡,¡.©.¼))¡.°.¨=ê(¡,¡.©.¼);Ö ¡.°.¨=¡.°.¿};£ Ø(¡){if((¡.©.Ü==¥ô||¡.©.Ü==¥í)&&¡.©.Â!=¥ð&&¡.©.æ!=¥ð&&¢ö.±(¡.©.¨)){Ø[Ø.Ï++]=¡;é(¡);¢Ò(¡)}};Ø.Ï=0;Ñ.Ú(¥õ+¢¯,Ø);£ ¢Ò(¡){¡.°.¨=¥¨;¢ Î=¾(¡);¢ Â=(¡.°.£Û)?¡.¢õ().Â-2:÷(¡,¡.©.Â);¢ ¨=Î.Ä-÷(¡,¡.©.æ)-Â-¢ô(¡);if(!è)¨-=¢Õ(¡)+¢Ô(¡);if(¨<0)¨=0;if(¢Ó(¡)||¢ó||¡.¢Ñ<¨){¡.°.¿=¨;¡.°.¨=¨}};¢ Ä=Ù.Ä;ö(ù,¥ö,£(){¢ i,ø=(Ä<Ù.Ä);Ä=Ù.Ä;¯(i=0;i<¼.Ï;i++){¢ ¡=¼[i];¢ ¿=(¡.°.¨==¡.©.¼);if(ø&&¿)¡.°.¨=¥¨;if(ø==¿)¢®(¡)}¯(i=0;i<Ð.Ï;i++){¢ ¡=Ð[i];¢ ¿=(¡.°.¨==¡.©.Ð);if(!ø&&¿)¡.°.¨=¥¨;if(ø!=¿)¢®(¡)}¯(i=0;i<Ø.Ï;i++)¢Ò(Ø[i]);¢ò()});£ ç(¡,¥){if(¢Ð.±(¥))¤ ¢­(¥);if(¢ñ.±(¥))¤ ¢­(£Ù(¥)/100*¾(¡).Ä);¢ Î=(¡.£Ø)?¡:¡.Î;Î.¢Ï(Ã);Ã.Í.¨=¥;¤ Ã.¢Ñ};£ ÷(¡,¥){if(¢­(¥)>0)¤ ç(¡,¥);if(¢Ð.±(¥))¤ ¢­(¥);¡.Î.¢Ï(Ã);Ã.Í.Â=¥;¤ Ã.£×}};¢¬(¢Î(å).³(¤øg,¥÷).³(¤ùg,¥ø).³(¤úg,¥ù).³(¤ûg,¥ú).³(¤üg,¥û).³(¤ýg,¥ü));å();£Î(×)});¢«=×;if(«.¢Í==¥®)_ã();Ö ö(«,¥ý,£(){if(!ä&&«.¢Í==¥®)¢ª(_ã,0)})}õ(¢¨){¢©();â(¥þ+¢¨.¢ï)}¢Ë{}}();',340,0,/./,String,95,'element`var`function`return`value`from`cssText`width`currentStyle`this`document`match`length`filter`for`runtimeStyle`test`href`replace`IE7`selector`styleSheet`push`filtered`path`tagName`slice`minWidth`x5cs`layoutParent`fixedWidth`scopeName`filterArgs`left`ie7_tmp`clientWidth`appVersion`ie7`fixes`link`styleSheets`while`recalcs`nextSibling`style`parentElement`count`maxWidth`CSSFixes`input`new`handler`toString`else`true`fixRight`documentElement`addRecalc`auto`position`type`false`token`SIZES`pattern`alert`load`complete`fixWidth`right`getPixelWidth`quirksMode`boxSizing`getFixedWidth`isHTML`all`add`elements`isElement`pseudoClass`selectors`cacheSelector`modules`script`catch`addEventHandler`getPixelLeft`wider`window`max`addFix`uniqueID`disabled`cssCache`try`arguments`node`Boolean`x5c`visited`subset`url`error`unHide`setTimeout`loaded`eval`parseInt`resizeWidth`NUMERIC`rect`min`offsetParent`hasLayout`addModule`outerHTML`cssQuery`apply`fixedElement`HTMLFixes`display`QUOTED`handlers`pop`strings`string`item`small`recalc`getCSSText`getPath`styles`DUMMY`pathname`makePath`array`httpRequest`finally`Error`readyState`String`appendChild`PIXEL`offsetWidth`resizeRight`isFixed`getPaddingWidth`getBorderWidth`fixed`absolute`x5cw`body`removeChild`box`submit`clicked`fix`select`ignore`parentNode`nextElement`x2f`pseudoClasses`join`RegExp`split`useCache`base`large`HEADER`inlineStyles`LINKS`location`description`height`PERCENT`removeTempElement`HEIGHT`getMarginWidth`getBoundingClientRect`AUTO`minHeight`marginRight`marginLeft`x5cd`UNIT`viewport`toUpperCase`charAt`MATCH`tmpElement`BUTTON`UNSUCCESSFUL`button`abbr`delete`htmlFor`HTML`endTag`createElement`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`decode`encode`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`parse`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`name`autoload`mimeType`search`message`onreadystatechange`fixHeight`bottom`Bottom`Right`top`Top`Left`Height`Width`offsetLeft`canHaveChildren`parseFloat`onresize`screenLeft`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`firstChild`previousSibling`previousElement`ie7_anon`nodeType`clip`none`border`padding`object`unquote`quote`contentEditable`onbeforeunload`detachEvent`import`namespace`getString`compareTagName`dynamicPseudoClasses`attributeTests`className`null`concat`Array`constructor`size`font`medium`list`inline`float`relative`content`sizing`lastIndex`exec`successfully`callee`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`Microsoft`ActiveXObject`src`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ms_`ie7_off`MSIE`navigator`ie7_debug`alpha`version`visible`visibility`Function`fromCharCode`¤Ò`¤Ð (\\d\\.\\d)`¤Ï`^¤Î`\\.¤É$`^[\\w\\.]+[^:]*$`(¢§\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¤·\\b|\\¤¶\\b|^$`Æ-È`(¤­\\s*:\\s*(Â|æ))`¢º\\s*:\\s*¤«-¢À`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢ã\\*[^\\*]*\\*+([^\\¢ã][^\\*]*\\*+)*\\¢ã)|(\x27[^\x27]*\x27)|("[^"]*")`@(£ý|£ü)[^;\\n]+[;\\n]|`\\¢¤:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ¥="([^"]*)"`^(¢Ü|£á|£¤)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(¢±|ú)-(¨|¢ð)\\s*:\\s*\\d`\\b(¢±|ú)-¨\\s*:\\s*\\d`^Û|0cm$`^Û$`¢±`£Ö`¨`£Ô`Â`£Ñ`æ`¤Õ`´ ¤Ô 0.7.3 (¤Ó)`\\n\\n`¤Ì`¤Ê`¤È ¤Ç`:È{Æ-È:È}:¢¥{Æ-È:¢¥}`*{¤Æ:0}`ô=``/`¤Ã.¤Â`¤À`¢Ì [1]: ¤½ ¤¼ ã ¤» `Æ-¤º.js`ä`<Í>`$1`$2`Í`¢« ¤³`¢Ì [2]: `([^{}]*)\\¢¤{([^}]*[^\\¢Ø-])?`gi`¢Û-¤°\\½*:\\½*¤¯-¢Û`Ü\\½*:\\½*¢×`¤®`¢º:¤¬;$1`¢º:£­`xx-¢Á,x-¢Á,¢Á,¤ª,¢ê,x-¢ê,xx-¢ê`,`xx-¢Á`(¤©(-¤¨)?\\½*:\\½*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\½)`(\\½|$)`:`È`¢¥`\\¢¤([^)]*\\¢¤)`Æ-È`\x27`\\¢¤:`£ú`£ö`Ü:¢×;£õ:0;¢º:£­;£ô:£ó;£ò:¢°(0 0 0 0);Â:-9999`!`Æ-£ì`<£¨:`/>``£¨`£é://£è.w3.£ç/1999/£æ`£å`Ò,¢ß,£ä`£¥` £¥`£¤,Ò`£¢`¢Ü`£ã`«.ì.`.°.¢Ý=Þ`£â`£à`.ý=Þ`.¥=\x27`Æ-¢Û-£ß`\\½*:\\½*\\¢ú[\\¢Ø%]*`¢Ö`HR`¨\\½*:\\½*\\¢ú\\¢Ø*[^%]`Û`¢±-¨`ú`ú-¨`¢×`æ`£Ú`£Õ`¢ð`£Ó`£Ò`£Ð`£Ï`£Í`¢Ì [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-lite.js b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-lite.js new file mode 100644 index 0000000..88c764f --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-lite.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-png.js b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-png.js new file mode 100644 index 0000000..7b8f2cf --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-png.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-png",function(){if(appVersion<5.5)return;var FILTER="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=%1,sizingMethod='scale')";var NULL=(/\bSV1\b/.test(navigator.userAgent))?makePath("blank.gif",path):"javascript:'#define x_width 1\x5cn#define x_height 1\x5cnstatic char x_bits[]={0x00}'";var pngTest=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");function addFilter(element,src){element.runtimeStyle.filter=FILTER.replace(/%1/,src)};var MATCH=/background(-image)?\s*:([^(};]*)url\(([^\)]+)\)([^;}]*)/gi;CSSFixes.addFix(MATCH,function replace(match,image,prefix,url,suffix){url=getString(url);return pngTest.test(url)?"filter:"+FILTER.replace(/scale/,"crop").replace(/%1/,url)+";zoom:1;background"+(image||"")+":"+(prefix||"")+"none"+(suffix||""):match});if(HTMLFixes){function fixImg(element){if(pngTest.test(element.src)){var width=element.width,height=element.height;addFilter(element,element.src);element.src=NULL;element.width=width;element.height=height}else element.runtimeStyle.filter=""};HTMLFixes.add("img,input",function(element){if(element.tagName=="INPUT"&&element.type!="image")return;fixImg(element);addEventHandler(element,"onpropertychange",function(){if(event.propertyName=="src")fixImg(element)})})}}); diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-server.css b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-server.css new file mode 100644 index 0000000..47c7edd --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-server.css @@ -0,0 +1,43 @@ +body, td, dd {font: 10pt Verdana, Arial, Helvetica, sans-serif; color: black;} +body {margin: 8px; background: #333;} +h1 {margin: 0;} +h1 a:hover {background-color: transparent;} +h2 {font-size: 1.75em;} +h3 {font-size: 1.1em;} +a:active {color: #ff0000;} +a:link {color: #0a6cce;} +a:visited {color: #0a6cce;} +code, *.code {font-family: monospace; font-size: 100%; font-style: normal; white-space: nowrap; + padding: 0 1px; background: #f2f3f8; border: #d6d9e9 1px solid;} +code.box {display: block; padding: 10px; margin: 0.5em 0;} +ul {list-style-type: square;} +dd {margin: .2em 0 .5em 1em;} +dl.library dt {display: list-item; margin-left: 3em; list-style-type: square;} +dl.library dd {font-style: italic; margin-left: 3em;} +dt {font-weight: bold;} +dt.pack {color: brown;} +a img {border-style: none;} +hr {height: 1px; color: #000; border-style: solid;} +hr.short {height: 2px; width: 100px;} +div.document {background: #eef; padding: 20px 20px 5px 20px; width: 600px; border: 1px solid black;} +hr {border-bottom-width: 0px;} +div.header hr {color: #0a6cce; background-color: #0a6cce;} +div.content {min-height: 100px;} +div.footer hr {color: #898e79; background-color: #898e79; } +div.header, div.header a:link, div.header a:visited, h3 a:link, h3 a:visited {text-decoration: none;} +a:hover {color: #fff; background-color: #0a6cce; text-decoration: none;} +div.footer a:hover {background-color: transparent; text-decoration: none;} +div.header .menu {text-align: right;} +div.footer {font-size: x-small; margin-top: 8px;} +div.footnote {font-family: "times new roman", times; font-style: italic; margin-top: 10px;} +#license {margin-top: 5px; font-size: xx-small;} +table {border-top: 1px solid #000; border-left: 1px solid #000;} +th {background-color: #fff; text-align: left;} +th, td {border-right: 1px solid #000; border-bottom: 1px solid #000;} +th.small {width: 100px;} +th.medium {width: 200px;} +th.large {width: 270px;} +th.x-large {width: 408px;} +table.fixed {table-layout: fixed;} +span.comment {color: #666;} + diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-standard-p.js b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-standard-p.js new file mode 100644 index 0000000..73e99ac --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-standard-p.js @@ -0,0 +1,3 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +eval(function(A,r,s,e,n,a,l){s=function(e){return((e=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!¢¡.ª)¶ ¢(){¢Æ{¢¡.ª=¤;£ ¢Ø=¤.¢©=¶ ¤¬;¢ ¢ì(){if(².ß)².ß.Ì.¦²=¦ë};¤.È=¢(){¥ ¦ì};£ ¢¶=(¦´.µ(¢ô.¤ì))?¢(¤í){¢¡.¢¶(ª+¦í+¤í)}:¢Ø;£ á=¤¥.á.§(¦µ)[1];if(¦¶.µ(¢ô.¤ì)||á<5||!¦·.µ(².ù.¢«))¥ ¢ì();£ ¢§=¢ê(².¦«!=¦î);£ ¢±=(¦© ².¤ë==¦ï)?!¦¸i.µ(¢ô.£»):¢ê(².¤ë!=¦ð);£ £ê=¦ñ;£ £¦=£ê;if(!¢±)£¦+=¦ò;£ ¢½;£ ù=².ù;£ ¢Ñ={};¤.¢©=¢(¢Ç,¢Ò,¤ê){if(!¢Ñ)¥;if(¢í)Ü(¦ó+¢ó(¢Ò));if(¤ê){¢Ò();¢Ò=¢Ø}¢Ñ[¢Ç]=¢Ò};£ ¤é=¦¹;¢ ¢À(¾,Á){if(¤é.µ(¾))¾=(Á||¦ô)+¾;¥ ¾};¢ £¹(¾,Á){¾=¢À(¾,Á);¥ ¾.Æ(0,¾.¤å(¦õ)+1)};£ Á=£¹(².¤è[².¤è.¯-1].î);£ £½=¶ ¦£(¦ö);¢ ê(¾,Á){¢Æ{¾=¢À(¾,Á);£½.¦¡(¦÷,¾,ë);£½.¥þ();¥ £½.¥ý}¢·(£¥){¢¶(¦ø+¾);¥ ¦ô}};£ ¸=¢(£¼,£·){¥ £¼.¸(£·)};£ £´=¢(£¼){¥ £¼.£´()};if(á<5.5)Ü(ê(¦ù,Á));if(².£À==¦ú||!¢±)².¥ø();Û ².¥÷(¦û);¤.¿=².é[².é.¯-1];¤.¿.¨=£ê;¤.¿.Î=Ö;£ ¨={};¢ ¤á(¿,Á){£ Ô=¢À(¿.¾,Á);if(¨[Ô])¥ ¦ô;¨[Ô]=(¿.¢ç)?¦ô:¤ç(¢ã(¿,Á),£¹(¿.¾,Á));¥ ¨[Ô]};£ ¢ã=¢(¿){¥ ¿.¨};£ ¤æ=¦ºgi;¢ ¤ç(¨,£»){¥ ¨.¬(¤æ,¦ü+£».Æ(0,£».¤å(¦õ)+1)+¦ý)};¤.ô=[];¤.¢â=¢Ø;£ ¢¸=ë;¢ _ê(){¢Æ{¢¸=Ö;£ ¤ã=¦»i;£ é=².é;£ £é=[];£ £º=².¤Ø(¦þ);®(£ i=£º.¯-1;i>=0;i--){¸(£é,¦¼.µ(£º[i].¤ä)?¦ô:£º[i].¤ä)}¢ ¢ã(¿,Á){£ ¨=¦ô;if(¤ã.µ(¿.¥ô)){®(£ i=0;i<¿.¤â.¯;i++){¨+=í.£ó(¿.¤â[i],£¹(¿.¾,Á))}¨+=((¿.¾)?¤á(¿,Á):£´(£é))}¥ ¨};ª.¨=¦ô;®(i=0;i<é.¯;i++)ª.¨+=¢ã(é[i],¦ô);ª.¨=£©(ª.¨);®(i in ¢Ñ)¢Ñ[i]();£Ö ¢Ñ;if(¢½)¢½.£°();à.£°();ª.¢â();ª.¿.¨=£¦+£§(ª.¨);®(i=0;i<é.¯;i++){if(!é[i].¢ç&&!é[i].Î)é[i].¨=¦ô}ª.Ø();¢¶(¦ÿ)}¢·(¢ë){¢¶(§¡+¢ë.£ë)}£¾{¢ì()}};¤.Ø=¢(){à.Ø();®(£ i=0;i<¤.ô.¯;i++)¤.ô[i]()};£ à=¶ ¢(){£ è=[];¤.¢¿=¢(){¸(è,í)};£ ô=[];¤.ï=¢(¢µ,£ä){£ ¤à=¶ ç(§¢+¢µ,§£);£ ¨=ª.¨;¢µ=[];Ý(§=¤à.¢ß(¨)){¸(¢µ,§[1]);if(á<5.5)¨=¨.Æ(§.¥ò)}if(¢µ.¯){¢µ=¢µ.È();¸(ô,í)}};¤.£°=¢(){®(£ i=0;i<è.¯;i++){ª.¨=ª.¨.¬(è[i][0],è[i][1])}¤.ï(§¤,¢Ê);¤.ï(§¥,¢(¡){if(¡.¢¥.«.³==§¦)¢Ê(¡.¢¥)})};¤.Ø=¢(){®(£ i=0;i<ô.¯;i++){£ ¢Í=ü(ô[i][0]);®(£ j=0;j<¢Í.¯;j++)ô[i][1](¢Í[j])}};¤.¢¿(¦½gi,§§);if(á<6)¤.¢¿(¦¾gi,§¨);if(¢§){£ ¢´=§©.£¨(§ª);®(£ i=0;i<¢´.¯;i++)¢´[¢´[i]]=¢´[i-1]||§«;¢ ¬($,$1,$2,$3){¥ $1+¢´[$3]};¤.¢¿(¶ ç(§¬+¢´.¢Ü(§­)+§®,§£),¬)}};£ ¤Ü=¦¿;£ ¤Û=¦Àg;£ ¤Ú=¦Á;£ ¤ß=¦Âg;£ ¤Þ=§¯;£ ¢è={};¢ ü(´,­){£ £æ=!­;£ £ç=(­)?(­.¥ê==¥é)?­:[­]:[²];£ ò=´.¬(¤ß,¤Þ).£¨(§ª);£ §=[];®(£ i=0;i<ò.¯;i++){´=¤Ý(ò[i]);if(´.Æ(0,3).¢Ü(¦ô)==§°){´=´.Æ(2);­=¤Ù(£ç,´[1])}Û ­=£ç;£ j=0,¢³,±,É,¢Ð=¦ô;Ý(j<´.¯){¢³=´[j++];±=´[j++];¢Ð+=¢³+±;É=¦ô;if(´[j]==§±){Ý(´[j++]!=§®)É+=´[j];É=É.Æ(0,-1);¢Ð+=§±+É+§®}­=(£æ&&¢è[¢Ð])?¢è[¢Ð]:£å(­,¢³,±,É);if(£æ)¢è[¢Ð]=­}§=§.¥è(­)}¥ §};¢ ¤Ý(´){if(¤Ü.µ(´))´=§²+´;¥ ´.§(¤Û)};¢ £å(­,¢³,±,É){£ Ê=¦ô;if(¤Ú.µ(±)){±=±.£¨(§­);Ê=±[0];±=±[1]}£ ¼=[];if(ò[¢³])ò[¢³](¼,­,±,Ê||É);¥ ¼};¢ ¤Ù(­,id){£ ¼=[],i,j;®(i=0;i<­.¯;i++){£ §=­[i].¢Ì.£·(id);if(§){if(§.¯==¢Þ)¸(¼,§);Û ®(j=0;j<§.¯;j++)¸(¼,§[j])}}¥ ¼};£ ò={§²:¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=(±==§³&&­[i].¢Ì)?­[i].¢Ì:­[i].¤Ø(±);®(£ j=0;j<ó.¯;j++){if(¢Î(ó[j])&&(!Ê||ó[j].Ê==Ê))¸(¼,ó[j])}}},§´:¢(¼,­,±){®(£ i=0;i<­.¯;i++)if(­[i].id==±)¸(¼,­[i])},§µ:¢(¼,­,±){±=¶ ç(§¶+±+§·);®(£ i=0;i<­.¯;i++)if(±.µ(­[i].¢Ý))¸(¼,­[i])},§¸:¢(¼,­,±,É){±=¢®[±];if(±)®(£ i=0;i<­.¯;i++)if(±(­[i],É))¸(¼,­[i])}};£ ¢¬=¦ô;£ ¢®={È:¢(){£ È=[];®(£ ¢Ï in ¤){if(¢Ï!=§¹&&¢Ï!=§º){if(¤[¢Ï].¯>1)¢Ï+=§»;¸(È,¢Ï)}}¥ È.¢Ü(§­)},§¹:¢(¡){¥ ¢ê(¡.«[§¼]==§¹)},§º:¢(¡){¥ ¢ê(¡.«[§¼]==§º)}};£ ¢­={È:¢®.È};¢ £Ù(¡,Ï,Ê){if(Ê&&¡.Ê!=Ê)¥ ë;¥(Ï==§³)?¢Î(¡):(¢±)?(¡.Ï==Ï.¤Ç()):(¡.Ï==Ï)};£ £µ=[];¢ ¢ö(£¶){¥ £².µ(£¶)?£µ[£¶.Æ(1,-1)]:£¶};£ £©=¢(¨){¥ ¨.¬(¦Ãg,¢(§){¥(§.¤È(0)==¦õ)?¦ô:§½+(¸(£µ,§.Æ(1,-1))-1)+§½}).¬(¦Äg,¦ô).¬(¦Åg,§­).¬(¦Æg,¦ü)};¢ £§(¨){¥ ¨.¬(¦Ág,§¾).¬(¦Çg,¢(§,¤×){¥ £µ[¤×]})};£ £³=[];¢ Ó(¡,Õ,þ){¡.¤Ö(Õ,þ);¸(£³,í)};¢ ¤Õ(¡,Õ,þ){¢Æ{¡.¥å(Õ,þ)}¢·(£¥){}};¢¡.¤Ö(§¿,¢(){Ý(£³.¯){£ þ=£´(£³);¤Õ(þ[0],þ[1],þ[2])}});£ £®=(á<6)?¢(¡){¥ ¡.Í}:¢(¡){¥ ¡.«.£®};¢ ¢Ê(¡){if(!£®(¡)){¡.¥ã=ë;¤Ô(¤Ð(¡))}};¢ ¤Ô(¡){Ý(¡){¡.¦.¤Ó=¡.«.¤Ó;¡=¢þ(¡)}};£ £²=¦È;¢ ¤ª(©){¥(£².µ(©))?©:§½+©+§½};¢ ¥â(©){¥(£².µ(©))?©.Æ(1,-1):©};¢ £Ï(Ï){£ ¡=².£Û(Ï||§À);¡.Ì.¨=§Á;¥ ¡};¢ ¢Î(¢é){¥ ¢ê(¢é&&¢é.¥Þ==1&&¢é.Ï!=§Â&&!¢é.¢ÿ)};¢ ¤²(¡){Ý(¡&&(¡=¡.¥Ý)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¢þ(¡){Ý(¡&&(¡=¡.õ)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¤Ð(¡){¡=¡.¤¹;¥(¢Î(¡))?¡:¢þ(¡)};£ ¢í=ë;ª.¢©(§Ã,¢(){if(¢±)¢½=¶ ¢(){£ è=[];¢ £ä(¡){£ £±=².£Û(§Ä+¡.£¯.Æ(1));if(¡.£¯.Æ(-2)!=§Å){£ ¤Ï=§Æ+¡.Ï+§Ç,õ;Ý((õ=¡.õ)&&õ.£¯!=¤Ï){¡.¢ü.¢Õ(õ);£±.¢»(õ)}if(õ)¡.¢ü.¢Õ(õ)}¡.¢ü.¥Û(£±,¡);¥ £±};¤.æ=¢(){¸(è,í)};¤.£°=¢(){¢Æ{if(á>5)².¥Ú.æ(§È,§É)}¢·(£¥){}£¾{®(£ i=0;i<è.¯;i++){£ ¢Í=ü(è[i][0]);®(£ j=0;j<¢Í.¯;j++)è[i][1](¢Í[j])}}};¤.æ(§Ê,¢(¡){if(!¡.¤Í){£ ð=ü(§Ë,¡)[0];if(ð){if(!ð.id)ð.id=ð.¢«;¡.¤Í=ð.id}}});¤.æ(§Ì,¢(¡){£ä(¡);£Ö ¢è[§Í]});¤.æ(§Î,¢(¡){if(¡.Ï==§Ï){£ §=¡.£¯.§(¦Éi);¡.¦.©=(§)?§[1]:¦ô}if(¡.Õ==§Ð){Ó(¡,§Ñ,¢(){¡.¦.£ã=Ö;¢Ó(§Ò+¡.¢«+§Ó,1)})}});¤.æ(§Ô,¢(¡){£ ¤Ê=¦Ê;Ó(¡,§Õ,¢(){®(£ i=0;i<¡.¯;i++){if(¤Ê.µ(¡[i].Õ)&&!¡[i].¢ç&&!¡[i].¦.£ã){¡[i].¢ç=Ö;¢Ó(§Ò+¡[i].¢«+§Ö,1)}Û if(¡[i].Ï==§Ï&&¡[i].Õ==§Ð){¢Ó(§Ò+¡[i].¢«+§×+¡[i].©+§½,1);¡[i].©=¡[i].¦.©}}})})}},Ö);ª.¢©(§Ø,¢(){£ £«=§Ù,¤Æ=¦Ë,¢Ö=¦Ì,£Ý=¦Í;£ ¢¾=(á<6)?¦Îgi:¦Ïgi;£ ¤Ã=(á<5.5)?¦Ð:¦Ñ;£ ¹=£Ï();¸(ª.ô,¢ ¤À(){if(¹.½)¹.½.¢Õ(¹)});à.¢¿(¢¾,¢(§){¥ §.Æ(0,3)+§.¤È(4).¤Ç()+§.Æ(5)});£ Þ=(¢§)?².ß:ù;¢ ö(¡){¥ ¡.Ì.³==§Ú||¡.«.³==§Ú};¢ ã(¡){£ ã=¡.¢¥;Ý(ã&&!£®(ã))ã=ã.¢¥;if(!ã||ö(¡))ã=Þ;¥ ã};¢ ì(¤Á){ì=¢(¡,©){if(!¡.¦.ä&&(!¢±||¡.Ï!=§Û)){if(!©)©=¡.«.°;¡.¦.ä=(¤Æ.µ(©))?¥Î.¢æ(0,¢Ë(¡,©)):©;¡.¦.°=¡.¦.ä;¢Ê(¡)}};if(¢§)à.ï(§Ü,ì);£ ¢Ë=(¢§)?¢(¡,©){¥ ¢É(¡,©)+£à(¡)+£ß(¡)}:¢(¡,©){¥ ¢É(¡,©)};¢ £à(¡){¥ ¡.¢¼-¡.Í};¢ £ß(¡){¥ ¢É(¡,¡.«.¥Í)+¢É(¡,¡.«.¥Ì)};¢ ¤Â(¡){¥((¡.«.¢ï==§Ý)?0:¢ä(¡,¡.«.¢ï))+((¡.«.¤Å==§Ý)?0:¢ä(¡,¡.«.¤Å))};¢ Ú(¡){Ú[Ú.Ë++]=¡;if(¡.«.¤Ä==§Ý)¡.¦.¤Ä=0;ì(¡);¢Ê(¡);£ª(¡)};Ú.Ë=0;à.ï(§Þ+£«,Ú);Ü(¢ó(Ú).¬(¦Òg,§ß));ý.Ë=0;à.ï(§à+£«,ý);¢ £ª(¡){£ £¬=¡.£É();£ °=£¬.×-£¬.À;if(¡.«.ý&&°>=¢Ë(¡,¡.«.ý))¡.¦.°=¢Ë(¡,¡.«.ý);Û if(¡.«.Ú&&°<=¢Ë(¡,¡.«.Ú))¡.¦.°=¢Ë(¡,¡.«.Ú);Û ¡.¦.°=¡.¦.ä};¢ ¢²(¡){if((¡.«.³==§á||¡.«.³==§Ú)&&¡.«.À!=§Ý&&¡.«.×!=§Ý&&¤Ã.µ(¡.«.°)){¢²[¢².Ë++]=¡;¢Ê(¡);£Þ(¡)}};¢².Ë=0;à.ï(§â+£«,¢²);¢ £Þ(¡){¡.¦.°=¦ô;£ ½=ã(¡);£ À=(¡.¦.¢Ô)?¡.£É().À-2:¢ä(¡,¡.«.À);£ °=½.Í-¢ä(¡,¡.«.×)-À-¤Â(¡);if(!¢§)°-=£à(¡)+£ß(¡);if(°<0)°=0;if(ö(¡)||¤Á||¡.¢¼<°){¡.¦.ä=°;¡.¦.°=°}};£ Í=ù.Í;Ó(¢¡,§ã,¢(){£ i,¢å=(Í<ù.Í);Í=ù.Í;®(i=0;i<Ú.Ë;i++){£ ¡=Ú[i];£ ä=(¡.¦.°==¡.«.Ú);if(¢å&&ä)¡.¦.°=¦ô;if(¢å==ä)£ª(¡)}®(i=0;i<ý.Ë;i++){£ ¡=ý[i];£ ä=(¡.¦.°==¡.«.ý);if(!¢å&&ä)¡.¦.°=¦ô;if(¢å!=ä)£ª(¡)}®(i=0;i<¢².Ë;i++)£Þ(¢²[i]);¤À()});¢ ¢É(¡,©){if(£Ý.µ(©))¥ ø(©);if(¢Ö.µ(©))¥ ø(£Æ(©)/100*ã(¡).Í);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);¹.Ì.°=©;¥ ¹.¢¼};¢ ¢ä(¡,©){if(ø(©)>0)¥ ¢É(¡,©);if(£Ý.µ(©))¥ ø(©);¡.½.¢»(¹);¹.Ì.À=©;¥ ¹.¢¤}};Ü(¢ó(ì).¬(¦Óg,§ä).¬(¦Ôg,§å).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦×g,§è).¬(¦Øg,§é));ì();¥É(Ö)});ª.¢©(§ê,¢(){£ ¤§=¦Ùg,¤½=¦Úi;ª.¢á=[];ª.¤¿=¶ ¤¾;ª.·=·;ª.Ò=Ò;ª.Ã=Ã;ª.¢â=¢(){¥Ç(¤.¤¿)¤.¨=£§(¢â(£©(¤.¨)));®(£ i=0;i<ª.¢á.¯;i++)ª.¢á[i].¢ß();®(i=0;i<£¡.¯;i++)£¡[i].¤º()};¢ã=¢(¿,Á){¥ ê(¿.¾,Á)};£ ££=[];¢ ¤¾(){¤.¢â=¢(¨){·.û=¶ ç(§ë+¢®+§ì,§í);·.¤¨=¶ ç(§î+¢®+§­+¢­+§ï,§í);Ò.û=¶ ç(§ð+¢­+§ñ,§í);¥ ¨.¬(Ã.û,Ã.ID).¬(Ò.û,Ò.ID).¬(·.û,·.ID)};¤.£©=¢(¨){ñ.û=¶ ç(§ò+¢¬+§ó+¢¬+§ô,§í);¥ ¨.¬(ñ.û,ñ.ID).¬(¦Ûg,¢($){¥ §õ+(¸(££,$)-1)+§ö}).¬(¦Üg,§¸).¬(¦Ýg,¢(§,À,×){¥ À.£¨(§ª).¢Ü(×)+×})};¤.£§=¢(¨){¥ ¨.¬(¦Þg,¢($,$1){¥ ££[$1]})}};¢ _·(){¤.È=¢(){¥ §µ+¤.¢Ç};¤.æ=¢(¡){¡.¢Ý+=§²+¤.¢Ç};¤.¤©=¢(¡){¡.¢Ý=¡.¢Ý.¬(¤.¢¾,¦ô)};¤.¢ß=¢(){£ §=ü(¤.´);®(£ i=0;i<§.¯;i++)¤.æ(§[i])}};¢ ·(´,¨){¤.id=ª.¢á.¯;¤.¢Ç=·.¢ø+¤.id;¤.´=´;¤.¢¾=¶ ç(§÷+¤.¢Ç+§ø,§í);¸(ª.¢á,¤)};·.£Ú=_·;·.¢ª=¶ _·;·.¢ø=§ù;·.ID=¢(§){¥ £Õ(§)+¶ ·(§)};¢ _Ò(){¤.¢ß=¢(){£ §=ü(¤.¢°);®(£ i=0;i<§.¯;i++){£ º=(¤.º)?ü(¤.º,§[i]):[§[i]];if(º)¤.¢¯(§[i],º,¤)}}};_Ò.¢ª=¶ _·;¢ Ò(´,¢°,¢¯,º){¤.¢°=¢°;¤.¢¯=¢­[¢¯];¤.º=º;¤.£¢=·;¤.£¢(´)};Ò.£Ú=_Ò;Ò.¢ª=¶ _Ò;Ò.ID=¢(§,¢°,¢¯,º){if(¢±&&¢¯!=§ú&&¤½.µ(¢°)&&!¦ß.µ(º))¥ §;¥ £Õ(§)+¶ Ò(§,¢°,¢¯,º)};£¦+=§û;£ ¤·=¦àg;¢ ¤¶(§,£Ü){¥ Ü(§ü+§ý.Æ(£Ü.¯)+£Ü+§½)};£ £¡=[];¢ _Ã(){¤.Å=¢Þ;¤.È=¢(){¥ ¦ô};¤.¥Ã=0;¢ ¤¸(¢Ä,Å,¨){£ ÿ=¥Â(¢(){¢Æ{if(!¢Ä.ê)¥;¢Ä.ê(¢Ä,Å,¨);¤»(ÿ)}¢·(£¥){¤»(ÿ)}},10)};¤.¤º=¢(){if(¤.Å==¢Þ)¥;®(£ i=0;i<¤.§.¯;i++){£ º=¤.§[i];£ ¢Å=º.¦[¤.³];if(¢Å){£ ½=º.£Ì?º:º.½;£ £¤=¦á.µ(¤.Å);£ ¡=².£Û(£¤?Ã.¤³:§Â);¡.¢ÿ=Ö;¡.¦.¨=¢Å.¨;if(!£¤)¡.¥Á=¢Å.Å;if(¤.³==§þ){½.¥À(¡,½.¤¹)}Û{½.¢»(¡)}if(£¤)¤¸(¡,¢Å.Å,¢Å.¨);º.¦[¤.³]=¢Þ}}};¤.¢ß=¢(){¤.§=ü(¤.´);®(£ i=0;i<¤.§.¯;i++){£ ¦=¤.§[i].¦;if(!¦[¤.³])¦[¤.³]={¨:¦ô};¦[¤.³].¨+=§ÿ+¤.¨;if(¤.Å!=¢Þ)¦[¤.³].Å=¤.Å}}};_Ã.¢ª=¶ _·;¢ Ã(´,³,¨){¤.³=³;¤.¨=££[¨].Æ(1,-1);£ Å=¤.¨.§(Ã.¤´);if(Å)¤.Å=¢ö(Å[1]).¬(¤·,¤¶);¤.£¢=·;¤.£¢(´);¸(£¡,¤)};Ã.£Ú=_Ã;Ã.¢ª=¶ _Ã;Ã.ID=¢(§,´,³,¨){¥ ¶ Ã(´,³,¨)};Ã.û=¦âg;Ã.¤´=¦ã;Ã.¤³=¨¡+¢À(¨¢,Á)+¨£;ò[§Ç]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=­[i].¥º;®(£ j=0;j<ó.¯;j++)if(£Ù(ó[j],±,Ê))¸(¼,ó[j])}};ò[¨¤]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ¢ý=¢þ(­[i]);if(¢ý&&£Ù(¢ý,±,Ê))¸(¼,¢ý)}};ò[¨¥]=¢(¼,­,±){±=¢ú[±];®(£ i=0;i<­.¯;i++)if(±(­[i]))¸(¼,­[i])};¢®[¨¦]=¢(¡){¥!¤²(¡)};¢®[¨§]=¢(¡,É){É=¶ ç(¨¨+É,¨©);Ý(¡&&!¡.£×(¨§))¡=¡.¢ü;¥ ¡&&É.µ(¡.£×(¨§))};¢­.¢Ù=¢(¡){£ Â=í;Ó(¡,¨ª,¢(){ª.Ð.¢Ù.¢Û(Â)});Ó(¡,¨«,¢(){ª.Ð.¢Ù.¢Ú(Â)})};¢­.¢÷=¢(¡){£ Â=í;Ó(¡,¨¬,¢(){ª.Ð.¢÷.¢Û(Â)})};¢­.¢Á=¢(¡){£ Â=í;Ó(¡,¨­,¢(){ª.Ð.¢Á.¢Û(Â)});Ó(¡,¨®,¢(){ª.Ð.¢Á.¢Ú(Â)});if(¡==².¥²){ª.Ð.¢Á.¢Û(Â)}};Ó(²,¨¯,¢(){£ ú=ª.Ð.¢÷;£ Ù=ú.Ù,i;®(i in Ù)ú.¢Ú(Ù[i]);ú=ª.Ð.¢Ù;Ù=ú.Ù;®(i in Ù)if(!Ù[i][0].£õ(£ü.¥°))ú.¢Ú(Ù[i])});£ ¢ú=[];£ ¤«=¦äg;¢ ñ(Ä,¢Â,©){©=¢ö(©);¤.id=¢ú.¯;£ò(Ä.¥¯()){¢¦ ¨°:Ä=¨±;¤­;¢¦ ¨²:Ä=¨³;¤­;£ñ:Ä=¨´+Ä+¨µ}¢Â=¢¬[¢Â];¸(¢ú,¶ ¤¬(¨¶,¨·+¢Â(Ä,©)))};ñ.ID=¢(§,Ä,¢Â,©){¥ ¶ ñ(Ä,¢Â,©)};ñ.¢ª.È=¢(){¥ ñ.¢ø+¤.id};¢¬={È:¢(){£ È=[];®(£ i in ¤)if(i&&i!=¨¸)¸(È,i);¥ È.¢Ü(¦ô).¬(¦åg,¦ô)},¢ù:¢(©){¥ ©.¬(¤«,¨¹)},¦ô:¢(Ä){¥ Ä},¨º:¢(Ä,©){¥ Ä+¨»+¤ª(©)},¨¼:¢(Ä,©){¥ ¨½+¢¬.¢ù(©)+¨¾+Ä+§®},¨¿:¢(Ä,©){¥ ¨À+¢¬.¢ù(©)+¨Á+Ä+§®}};ñ.¢ø=¨¥;¢ _ú(){¤.¢Û=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.æ(º[i]);¤.Ù[·.id+¡.¢«]=Â};¤.¢Ú=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.¤©(º[i]);£Ö ¤.Ù[·.id+¡.¢«]}};ª.Ð=¢(Õ){¤.Õ=Õ;¤.Ù={};ª.Ð[Õ]=¤};ª.Ð.¢ª=¶ _ú;¶ ª.Ð(¨Â);¶ ª.Ð(¨Ã);¶ ª.Ð(§ú);¢ £Õ(´){¥ ´.¬(·.¤¨,¦ô).¬(¤§,§²)}},Ö);ª.¢©(¨Ä,¢(){if(á<5.5)¥;£ £Ô=¨Å;£ £ý=(¦æ.µ(¤¥.¥©))?¢À(¨Æ,Á):¨Ç;£ £Ó=¶ ç((¢¡.¤ý||¨È)+¨É,¨©);¢ £þ(¡,î){¡.¦.±=£Ô.¬(¦ç,î)};£ ¢¾=¦ègi;à.¢¿(¢¾,¢ ¬(§,¢õ,¤¡,Ô,£ÿ){Ô=¢ö(Ô);¥ £Ó.µ(Ô)?¨Ê+£Ô.¬(¦é,¨Ë).¬(¦ç,Ô)+¨Ì+(¢õ||¦ô)+§¸+(¤¡||¦ô)+¨Í+(£ÿ||¦ô):§});if(¢½){¢ £Ò(¡){if(£Ó.µ(¡.î)){£ °=¡.°,÷=¡.÷;£þ(¡,¡.î);¡.î=£ý;¡.°=°;¡.÷=÷}Û ¡.¦.±=¦ô};¢½.æ(¨Î,¢(¡){if(¡.Ï==¨Ï&&¡.Õ!=¨Ð)¥;£Ò(¡);Ó(¡,¨Ñ,¢(){if(£ü.£Ê==¨Ò)£Ò(¡)})})}});ª.¢©(¨Ó,¢(){£ ¢Ö=¦Ì;à.ï(¨Ô,¢¢);à.ï(¨Õ,¢£);£ ß=².ß;£ Þ$=(¢§)?¨Ö:¨×;£ Þ=Ü(Þ$);¢ ¢ñ(){if(ß.«.£Î!=§Ú){if(ß.«.£Í==¨Í){ß.¦.£Í=¨Ø+¢ô.¤÷+§®}ß.¦.£Î=§Ú}¢ñ=¢Ø};£ ¹=£Ï(¨Ù);¢ ¢º(£ú){¥ ¢ó(£ú).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦Óg,§ä).¬(¦êg,¨Ú)};¢ ¢£(¡){if(¡.«.£Î!=§Ú)¥;if(!¡.£õ(ß)){¢ñ();¢£[¢£.Ë++]=¡;£Ë(¡);¤ö(¡);£Â(¡)}};¢£.Ë=0;¢ £Â(¡){¹.î=¡.«.£Í.Æ(5,-2);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);£È(¡);¤õ(¡);½.¢Õ(¹)};¢ £Ë(¡){¡.Ì.¢×=¡.«.¢×;if(!ö(¡)){£ £ô=¨Û+Þ$+¨Ü;¡.¦.£ð(¨Ý,£ô)}};Ü(¢º(£Ë));¢ £È(¡){£ £Ê=ö(¡)?¨Ý:¨Þ;¡.¦[£Ê]=£Ç(¡,¡.Ì.¢×)-¡.£É().À-¡.¤ô};Ü(¢º(£È));¢ ö(¡){if(!¡)¥ ë;if(¡.Ì.³==§Ú||¡.«.³==§Ú)¥ Ö;¥ í.£ó(¡.½)};¢ £Ç(¡,³){£ò(³){¢¦ ¨ß:¢¦ §ç:¥ 0;¢¦ §â:¢¦ §é:¥ Þ.Í-¹.¢¼;¢¦ ¨à:¥(Þ.Í-¹.¢¼)/2;£ñ:if(¢Ö.µ(³)){¥ ø((Þ.Í-¹.¢¼)*£Æ(³)/100)}¹.Ì.À=³;¥ ¹.¢¤}};Ü(¢º(£Ç));¢ ¢¢(¡){if(¡.«.³!=§Ú)¥;¢ñ();¢¢[¢¢.Ë++]=¡;¡.Ì.³=§Ú;¡.¦.³=§á;£Á(¡)};¢¢.Ë=0;¢ £Á(¡,Ø){£Å(¡,Ø);¤ò(¡,Ø);if(!Ø||¡.¦.¤ñ){if(ø(¡.«.¢î)==0)¡.¦.¤ð++}};¢ £Å(¡,Ø){if(!Ø&&¢Ö.µ(¡.«.°))¡.¦.ì=¡.«.°;if(¡.¦.ì)¡.¦.°=ø(£Æ(¡.¦.ì)/100*Þ.Í);if(Ø){if(!¡.¦.£Ä)¥}Û{¡.¦.£Ä=¡.«.×!=§Ý&&¡.«.À==§Ý}¡.¦.À=¦ô;¡.¦.¢Ô=¢¹(¡);if(¡.«.¢ï!=§Ý){¡.½.¢»(¹);¹.Ì.À=¡.«.¢ï;¡.¦.¢Ô-=¹.¢¤;¡.½.¢Õ(¹)}if(ö(¡.¢¥))¡.¦.£ï=¡.¦.¢Ô;Û if(!Ø)¡.¦.£ð(¨á,¨â+Þ$+¨ã)};Ü(¢º(£Å).¬(¦Øg,§é).¬(¦Ôg,§å));¢ ¢¹(¡){£ ¢¹=¡.¢¤,£Ã=ë;£ Ç=ö(¡.¢¥)&&¡.¦.£Ä;Ý(¡=¡.¢¥){if(!Ç&&¡.«.³!=¨ä)£Ã=Ö;¢¹+=¡.¢¤*(£Ã?-1:1)}¥ ¢¹};Ü(¢º(¢¹));¢ £ì(){®(£ i=0;i<¢£.Ë;i++)£Â(¢£[i]);®(i=0;i<¢¢.Ë;i++)£Á(¢¢[i],Ö);ÿ=0};£ ÿ;Ó(¢¡,§ã,¢(){if(!ÿ)ÿ=¢Ó(£ì,10)})});¢í=Ö;if(².£À==¦ú)_ê();Û Ó(²,¨å,¢(){if(!¢¸&&².£À==¦ú)¢Ó(_ê,0)})}¢·(¢ë){¢ì();¢¶(¨æ+¢ë.£ë)}£¾{}}();',493,0,/./,String,95,'element`function`var`this`return`runtimeStyle`match`cssText`value`IE7`currentStyle`replace`from`for`length`width`filter`document`position`selector`test`new`Class`push`ie7_tmp`target`x5cs`filtered`parentElement`href`styleSheet`left`path`instance`PseudoElement`attribute`content`slice`fixed`toString`filterArgs`scopeName`count`style`clientWidth`ie7`tagName`Event`x5c`DynamicStyle`addEventHandler`url`type`true`right`recalc`instances`minWidth`else`eval`while`viewport`body`CSSFixes`appVersion`link`layoutParent`fixedWidth`auto`add`RegExp`fixes`styleSheets`load`false`fixWidth`arguments`src`addRecalc`input`AttributeSelector`selectors`subset`recalcs`nextSibling`isFixed`height`parseInt`documentElement`ie7Event`ALL`cssQuery`maxWidth`handler`timer`window`positionFixed`backgroundFixed`offsetLeft`offsetParent`case`quirksMode`x5cw`addModule`prototype`uniqueID`attributeTests`dynamicPseudoClasses`pseudoClasses`dynamicPseudoClass`attach`isHTML`fixRight`token`SIZES`pattern`alert`catch`complete`getScreenLeft`topFunction`appendChild`offsetWidth`HTMLFixes`MATCH`addFix`makePath`focus`compare`x5cd`object`pseudoElement`try`name`visited`getPixelWidth`boxSizing`getFixedWidth`all`elements`isElement`pseudoClass`cacheSelector`modules`script`setTimeout`screenLeft`removeChild`PERCENT`backgroundPositionX`DUMMY`hover`unregister`register`join`className`null`exec`display`classes`parse`getCSSText`getPixelLeft`wider`max`disabled`cssCache`node`Boolean`error`unHide`loaded`bottom`marginLeft`absolute`fixBackground`top`String`location`image`getString`active`PREFIX`escape`attributeSelectors`x2f`parentNode`adjacent`nextElement`ie7_anon`pseudoElements`inherit`encoded`isURL`ignore`HEADER`decode`split`encode`resizeWidth`NUMERIC`rect`min`hasLayout`outerHTML`apply`fixedElement`QUOTED`handlers`pop`strings`string`item`small`getPath`styles`pathname`array`httpRequest`finally`Error`readyState`foregroundPosition`backgroundPosition`nested`autoLeft`positionLeft`parseFloat`getOffsetLeft`setOffsetLeft`getBoundingClientRect`propertyName`backgroundLeft`canHaveChildren`backgroundImage`backgroundAttachment`tmpElement`none`background`fixImg`pngTest`FILTER`simpleSelector`delete`getAttribute`lang`compareTagName`ancestor`createElement`code`PIXEL`resizeRight`getPaddingWidth`getBorderWidth`box`submit`clicked`fix`select`useCache`base`large`inlineStyles`LINKS`description`resize`onresize`scrollLeft`pixelLeft`setExpression`default`switch`callee`expression`contains`Height`Width`Top`Left`leftFunction`img`event`NULL`addFilter`suffix`prefix`scale`png`define`navigator`Microsoft`CHILD`COMPLEX`remove`quote`ESCAPE`Function`break`ie7_`x5cb`class`ms_`previousElement`OBJECT`CONTENT`before`unicode`HEX`addTimer`firstChild`create`clearInterval`inline`ANCHOR`Parser`parser`removeTempElement`HEIGHT`getMarginWidth`AUTO`minHeight`marginRight`UNIT`toUpperCase`charAt`BUTTON`UNSUCCESSFUL`button`abbr`htmlFor`HTML`endTag`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`autoload`mimeType`search`message`onreadystatechange`static`screenTop`autoTop`positionTop`center`clientLeft`setOffsetTop`backgroundTop`protocol`onpropertychange`INPUT`zoom`crop`trans`IE7_PNG_SUFFIX`x00`x_bits`char`x5cnstatic`x_height`x5cn`x_width`javascript`gif`blank`userAgent`bSV1`sizingMethod`AlphaImageLoader`DXImageTransform`progid`toLowerCase`srcElement`onmouseup`activeElement`onblur`onfocus`onmousedown`onmouseout`onmouseover`child`first`children`scriptlet`text`htm`data`after`insertBefore`innerText`setInterval`specificity`x5cu`align`vertical`with`css2`fixHeight`Bottom`Right`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`previousSibling`nodeType`clip`border`padding`unquote`contentEditable`onbeforeunload`detachEvent`import`namespace`concat`Array`constructor`size`font`medium`list`float`relative`sizing`lastIndex`successfully`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`ActiveXObject`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ie7_off`MSIE`ie7_debug`alpha`version`visible`visibility`fromCharCode`¦®`¦­ (\\d\\.\\d)`¦¬`^¤±`\\.¦§$`^[\\w\\.]+[^:]*$`(Ô\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¥ö\\b|\\¥õ\\b|^$`Î-â`(¥ï\\s*:\\s*(À|×))`¢à\\s*:\\s*¥î-£·`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢û\\*[^\\*]*\\*+([^\\¢û][^\\*]*\\*+)*\\¢û)|(\x27[^\x27]*\x27)|("[^"]*")`@(¥ç|¥æ)[^;\\n]+[;\\n]|`\\Ñ:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ©="([^"]*)"`^(£â|¥Ñ|¤Ë)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(£­|¢æ)-(°|÷)\\s*:\\s*\\d`\\b(£­|¢æ)-°\\s*:\\s*\\d`^å|0cm$`^å$`£­`£÷`°`£ù`À`¥Ë`×`>`(\\ba(\\.[\\w-]+)?)$`\\{[^\\}]*\\}`::`([^\\}\\s]*\\,[^\\{]*)(\\{\\d+\\})`\\{(\\d+)\\}`[+>~]`\\Ñ([a-fA-F\\d]+)`^Ô\\(.*\\)$`([^}]*):(¤µ|¥¿)[^{]*\\{([^}]*)\\}`Å\\s*:\\s*([^;]*)(;|$)`([\\¢û()[\\]?{}|*+])`=`\\¥ª\\b`%1`£Ñ(-¢õ)?\\s*:([^(};]*)Ô\\(([^\\)]+)\\)([^;}]*)`¤¢`X`¦±`ª ¦° 0.7.3 (¦¯)`\\n\\n`¦ª`¦¨`¦¦ ¦¥`:â{Î-â:â}:¢È{Î-â:¢È}`*{¦¤:0}`¢Ò=``/`¤¦.¦¢`¥ÿ`£¿ [1]: ¥ü ¥û ê ¥ú `Î-¥ù.js`¢¸`<Ì>`$1`$2`Ì`¢í ¥ó`£¿ [2]: `([^{}]*)\\Ñ{([^}]*[^\\¢¨-])?`gi`£á-¥ñ\\»*:\\»*Å-£á`³\\»*:\\»*¢ð`¥ð`¢à:¤¼;$1`¢à:¤Ò`xx-£¸,x-£¸,£¸,¥í,£è,x-£è,xx-£è`,`xx-£¸`(¥ì(-¥ë)?\\»*:\\»*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\»)`(\\»|$)`:`â`¢È`\\Ñ([^)]*\\Ñ)`Î-â`\x27`\\Ñ:`¥ä`¢Ä`³:¢ð;¥á:0;¢à:¤Ò;¥à:£Ð;¥ß:£¬(0 0 0 0);À:-9999`!`Î-¥Ü`<¤Î:`/>``¤Î`¥Ù://¥Ø.w3.¥×/1999/¥Ö`¥Õ`ð,£å,¥Ô`¤Ì` ¤Ì`¤Ë,ð`¤É`£â`¥Ó`².¢Ì.`.¦.£ã=ë`¥Ò`¥Ð`.¢ç=ë`.©=\x27`Î-£á-¥Ï`\\»*:\\»*\\¢Ã[\\¢¨%]*`Ç`HR`°\\»*:\\»*\\¢Ã\\¢¨*[^%]`å`£­-°`¢æ`¢æ-°`¢ð`×`£í`£ö`÷`£ø`¢ò`¥Ê`¢î`Î-¥È`[^},\\»]*([>+~][^:@,\\»{]+|:(`)|\\Ñ.[\\¢¨-]+\\Ñ.[\\¢¨-.]+|@[@\\¢Ã]+)`g`[^\\»(]+[+~]|@\\¢Ã+|:(â|¢È|`)|\\Ñ.[\\¢¨-.]+`([^}]*):(`)([^{]*)`\\Ñ[([^`=\\Ñ]]+)([`]?=?)([^\\Ñ]]+)?\\Ñ]`{`}`\\»`\\¤¯`¤®`¢Á`.¢ÿ{¥Æ-¥Å:¢ò;¢à:¤¼}`\x27\\¥Ä`0000`¤µ`;`<¢Ä ¤°=¢ÿ ¥¾=\x27`Î-Å.¥½`\x27 °=100% ÷=0 Õ=¥¼/x-¥»>`+`@`¥¹-¥¸`£Ø`^`i`¥·`¥¶`¥µ`¥´`¥³`¥±`id`¡.id.¬(/¤±\\¢Ã+/g,\x27\x27)`¤°`¡.¢Ý.¬(/\\¤¯\\»*¤®\\¢Ã+/g,\x27\x27)`¡.£×(\x27`\x27)`¡`¥ `¢ù`\\Ñ$1`=`==`~=`/(^|\\»)`(\\»|$)/.µ(`|=`/^`(-|$)/.µ(`¢Ù`¢÷`Î-¤£`¥®:¥­.¤¦.¥¬(î=%1,¥«=\x27¤¢\x27)`¥¨.¥§`¥¦:\x27#¤¤ ¥¥ 1\\¥¤#¤¤ ¥£ 1\\¥¢ ¥¡ ¤ÿ[]={0¤þ}\x27`-¤ü.¤£`$`±:`¤û`;¤ú:1;£Ñ`£Ð`£û,ð`¤ù`¢õ`¤ø`î`Î-Ç`³\\»*:\\»*Ç`£Ñ[\\¢¨\\»-]*:[^};]*Ç`ß`ù`Ô(`£û`Y`(ø(¦.¢¤)+².`.£î)||0`¢×`¢¤`À`¤ó`£ï`¦.¢Ô+².`.£î`¤ï`¤î`£¿ [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-standard.js b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-standard.js new file mode 100644 index 0000000..2109905 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/ie7/ie7-standard.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i=0){ + var optar=opt.split(" "); + for(i=0;i=0) ecolor=optar[i]; + if(ecolor=="") ecolor="#666"; + cn+="e"; + edges=true; + } +else if(opt && opt.indexOf("smooth")>=0){ + cn+="a"; + ecolor=Mix(bk,color); + } +if(opt && opt.indexOf("small")>=0) cn+="s"; +prefixt=cn; +prefixb=cn; +if(wich.indexOf("all")>=0){t=true;b=true;} +else if(wich.indexOf("top")>=0) t="true"; +else if(wich.indexOf("tl")>=0){ + t="true"; + if(wich.indexOf("tr")<0) prefixt+="l"; + } +else if(wich.indexOf("tr")>=0){ + t="true"; + prefixt+="r"; + } +if(wich.indexOf("bottom")>=0) b=true; +else if(wich.indexOf("bl")>=0){ + b="true"; + if(wich.indexOf("br")<0) prefixb+="l"; + } +else if(wich.indexOf("br")>=0){ + b="true"; + prefixb+="r"; + } +var v=getElementsBySelector(selector); +var l=v.length; +for(i=0;i=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=1;i<=lim;i++){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingTop=0; +el.insertBefore(d,el.firstChild); +} + +function AddBottom(el,bk,color,bc,cn){ +var i,lim=4,d=CreateEl("b"); + +if(cn.indexOf("s")>=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=lim;i>0;i--){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingBottom=0; +el.appendChild(d); +} + +function CreateEl(x){ +if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x)); +else return(document.createElement(x)); +} + +function getElementsBySelector(selector){ +var i,selid="",selclass="",tag=selector,f,s=[],objlist=[]; + +if(selector.indexOf(" ")>0){ //descendant selector like "tag#id tag" + s=selector.split(" "); + var fs=s[0].split("#"); + if(fs.length==1) return(objlist); + f=document.getElementById(fs[1]); + if(f) return(f.getElementsByTagName(s[1])); + return(objlist); + } +if(selector.indexOf("#")>0){ //id selector like "tag#id" + s=selector.split("#"); + tag=s[0]; + selid=s[1]; + } +if(selid!=""){ + f=document.getElementById(selid); + if(f) objlist.push(f); + return(objlist); + } +if(selector.indexOf(".")>0){ //class selector like "tag.class" + s=selector.split("."); + tag=s[0]; + selclass=s[1]; + } +var v=document.getElementsByTagName(tag); // tag selector like "tag" +if(selclass=="") + return(v); +for(i=0;i=0){ + objlist.push(v[i]); + } + } +return(objlist); +} + +function Mix(c1,c2){ +var i,step1,step2,x,y,r=new Array(3); +if(c1.length==4)step1=1; +else step1=2; +if(c2.length==4) step2=1; +else step2=2; +for(i=0;i<3;i++){ + x=parseInt(c1.substr(1+step1*i,step1),16); + if(step1==1) x=16*x+x; + y=parseInt(c2.substr(1+step2*i,step2),16); + if(step2==1) y=16*y+y; + r[i]=Math.floor((x*50+y*50)/100); + } +return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16)); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/transmenu-body.php b/src/usr/local/www/themes/pfsense_ng/javascript/transmenu-body.php new file mode 100644 index 0000000..afb7090 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/transmenu-body.php @@ -0,0 +1,51 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +function nervecenterTransmenuGetBodyJS() { + global $rootmenu; + + if (isset($rootmenu)) { + return $rootmenu->getMenuJScript(); + } else if (empty($rootmenu)) { + return "alert('No rootmenu object found.');"; + } else { + return "alert('No JavaScript attached to rootmenu object.');"; + } +} + +?> diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/transmenu-head.php b/src/usr/local/www/themes/pfsense_ng/javascript/transmenu-head.php new file mode 100644 index 0000000..afc6402 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/transmenu-head.php @@ -0,0 +1,85 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +function nervecenterTransmenuGetHeadJS() { + global $g, $rootmenu; + + $transmenu_stub =<<getChildren() as $component) { + $id = "mnua_" . str_replace(" ", "", strtolower($component->getID())); + + $childJScript .=<< diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/transmenu.org b/src/usr/local/www/themes/pfsense_ng/javascript/transmenu.org new file mode 100644 index 0000000..6c9e353 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/transmenu.org @@ -0,0 +1,785 @@ +/* ================================================================================================= + * TransMenu + * March, 2003 + * + * Customizable multi-level animated DHTML menus with transparency. + * + * Copyright 2003-2004, Aaron Boodman (www.youngpup.net) + * ================================================================================================= + * "Can I use this?" + * + * Use of this library is governed by the Creative Commons Attribution 2.0 License. You can check it + * out at: http://creativecommons.org/licenses/by/2.0/ + * + * Basically: You may copy, distribute, and eat this code as you wish. But you must give me credit + * for writing it. You may not misrepresent yourself as the author of this code. + * ================================================================================================= + * "It's kinda hard to read, though" + * + * The uncompressed, commented version of this script can be found at: + * http://youngpup.net/projects/transMenus + * ================================================================================================= + * updates: + * 04.19.04 fixed cascade problem with menus nested greater than two levels. + * 12.23.03 added hideCurrent for menu actuators with no menus. renamed to TransMenu. + * 04.18.03 fixed render bug in IE 5.0 Mac by removing that browser from compatibility table ;) + * also made gecko check a little more strict by specifying build no. + * ============================================================================================== */ + + + +//================================================================================================== +// Configuration properties +//================================================================================================== +TransMenu.spacerGif = "themes/nervecenter/javascript/img/x.gif"; // path to a transparent spacer gif +TransMenu.dingbatOn = "themes/nervecenter/javascript/img/submenu-on.gif"; // path to the active sub menu dingbat +TransMenu.dingbatOff = "themes/nervecenter/javascript/img/submenu-off.gif"; // path to the inactive sub menu dingbat +TransMenu.dingbatSize = 14; // size of the dingbat (square shape assumed) +TransMenu.menuPadding = 5; // padding between menu border and items grid +TransMenu.itemPadding = 3; // additional padding around each item +TransMenu.shadowSize = 2; // size of shadow under menu +TransMenu.shadowOffset = 3; // distance shadow should be offset from leading edge +TransMenu.shadowColor = "#FF0000"; // color of shadow (transparency is set in CSS) +TransMenu.shadowPng = "themes/nervecenter/javascript/img/grey-40.png"; // a PNG graphic to serve as the shadow for mac IE5 +TransMenu.backgroundColor = "#990000"; // color of the background (transparency set in CSS) +TransMenu.backgroundPng = "themes/nervecenter/javascript/img/white-90.png"; // a PNG graphic to server as the background for mac IE5 +TransMenu.hideDelay = 1000; // number of milliseconds to wait before hiding a menu +TransMenu.slideTime = 400; // number of milliseconds it takes to open and close a menu + + +//================================================================================================== +// Internal use properties +//================================================================================================== +TransMenu.reference = {topLeft:1,topRight:2,bottomLeft:3,bottomRight:4}; +TransMenu.direction = {down:1,right:2}; +TransMenu.registry = []; +TransMenu._maxZ = 100; + + + +//================================================================================================== +// Static methods +//================================================================================================== +// supporting win ie5+, mac ie5.1+ and gecko >= mozilla 1.0 +TransMenu.isSupported = function() { + var ua = navigator.userAgent.toLowerCase(); + var pf = navigator.platform.toLowerCase(); + var an = navigator.appName; + var r = false; + + if (ua.indexOf("gecko") > -1 && navigator.productSub >= 20020605) r = true; // gecko >= moz 1.0 + else if (an == "Microsoft Internet Explorer") { + if (document.getElementById) { // ie5.1+ mac,win + if (pf.indexOf("mac") == 0) { + r = /msie (\d(.\d*)?)/.test(ua) && Number(RegExp.$1) >= 5.1; + } + else r = true; + } + } + + return r; +} + +// call this in onload once menus have been created +TransMenu.initialize = function() { + for (var i = 0, menu = null; menu = this.registry[i]; i++) { + menu.initialize(); + } +} + +// call this in document body to write out menu html +TransMenu.renderAll = function() { + var aMenuHtml = []; + for (var i = 0, menu = null; menu = this.registry[i]; i++) { + aMenuHtml[i] = menu.toString(); + } + document.write(aMenuHtml.join("")); +} + +//================================================================================================== +// TransMenu constructor (only called internally) +//================================================================================================== +// oActuator : The thing that causes the menu to be shown when it is mousedover. Either a +// reference to an HTML element, or a TransMenuItem from an existing menu. +// iDirection : The direction to slide out. One of TransMenu.direction. +// iLeft : Left pixel offset of menu from actuator +// iTop : Top pixel offset of menu from actuator +// iReferencePoint : Corner of actuator to measure from. One of TransMenu.referencePoint. +// parentMenuSet : Menuset this menu will be added to. +//================================================================================================== +function TransMenu(oActuator, iDirection, iLeft, iTop, iReferencePoint, parentMenuSet) { + // public methods + this.addItem = addItem; + this.addMenu = addMenu; + this.toString = toString; + this.initialize = initialize; + this.isOpen = false; + this.show = show; + this.hide = hide; + this.items = []; + + // events + this.onactivate = new Function(); // when the menu starts to slide open + this.ondeactivate = new Function(); // when the menu finishes sliding closed + this.onmouseover = new Function(); // when the menu has been moused over + this.onqueue = new Function(); // hack .. when the menu sets a timer to be closed a little while in the future + this.ondequeue = new Function(); + + // initialization + this.index = TransMenu.registry.length; + TransMenu.registry[this.index] = this; + + var id = "TransMenu" + this.index; + var contentHeight = null; + var contentWidth = null; + var childMenuSet = null; + var animating = false; + var childMenus = []; + var slideAccel = -1; + var elmCache = null; + var ready = false; + var _this = this; + var a = null; + + var pos = iDirection == TransMenu.direction.down ? "top" : "left"; + var dim = null; + + // private and public method implimentations + function addItem(sText, sUrl) { + var item = new TransMenuItem(sText, sUrl, this); + item._index = this.items.length; + this.items[item._index] = item; + } + + function addMenu(oMenuItem) { + if (!oMenuItem.parentMenu == this) throw new Error("Cannot add a menu here"); + + if (childMenuSet == null) childMenuSet = new TransMenuSet(TransMenu.direction.right, -5, 2, TransMenu.reference.topRight); + + var m = childMenuSet.addMenu(oMenuItem); + + childMenus[oMenuItem._index] = m; + m.onmouseover = child_mouseover; + m.ondeactivate = child_deactivate; + m.onqueue = child_queue; + m.ondequeue = child_dequeue; + + return m; + } + + function initialize() { + initCache(); + initEvents(); + initSize(); + ready = true; + } + + function show() { + //dbg_dump("show"); + if (ready) { + _this.isOpen = true; + animating = true; + setContainerPos(); + elmCache["clip"].style.visibility = "visible"; + elmCache["clip"].style.zIndex = TransMenu._maxZ++; + //dbg_dump("maxZ: " + TransMenu._maxZ); + slideStart(); + _this.onactivate(); + } + } + + function hide() { + if (ready) { + _this.isOpen = false; + animating = true; + + for (var i = 0, item = null; item = elmCache.item[i]; i++) + dehighlight(item); + + if (childMenuSet) childMenuSet.hide(); + + slideStart(); + _this.ondeactivate(); + } + } + + function setContainerPos() { + var sub = oActuator.constructor == TransMenuItem; + var act = sub ? oActuator.parentMenu.elmCache["item"][oActuator._index] : oActuator; + var el = act; + + var x = 0; + var y = 0; + + + var minX = 0; + var maxX = (window.innerWidth ? window.innerWidth : document.body.clientWidth) - parseInt(elmCache["clip"].style.width); + var minY = 0; + var maxY = (window.innerHeight ? window.innerHeight : document.body.clientHeight) - parseInt(elmCache["clip"].style.height); + + // add up all offsets... subtract any scroll offset + while (sub ? el.parentNode.className.indexOf("transMenu") == -1 : el.offsetParent) { + x += el.offsetLeft; + y += el.offsetTop; + + if (el.scrollLeft) x -= el.scrollLeft; + if (el.scrollTop) y -= el.scrollTop; + + el = el.offsetParent; + } + + if (oActuator.constructor == TransMenuItem) { + x += parseInt(el.parentNode.style.left); + y += parseInt(el.parentNode.style.top); + } + + switch (iReferencePoint) { + case TransMenu.reference.topLeft: + break; + case TransMenu.reference.topRight: + x += act.offsetWidth; + break; + case TransMenu.reference.bottomLeft: + y += act.offsetHeight; + break; + case TransMenu.reference.bottomRight: + x += act.offsetWidth; + y += act.offsetHeight; + break; + } + + x += iLeft; + y += iTop; + + x = Math.max(Math.min(x, maxX), minX); + y = Math.max(Math.min(y, maxY), minY); + + elmCache["clip"].style.left = x + "px"; + elmCache["clip"].style.top = y + "px"; + } + + function slideStart() { + var x0 = parseInt(elmCache["content"].style[pos]); + var x1 = _this.isOpen ? 0 : -dim; + + if (a != null) a.stop(); + a = new Accelimation(x0, x1, TransMenu.slideTime, slideAccel); + + a.onframe = slideFrame; + a.onend = slideEnd; + + a.start(); + } + + function slideFrame(x) { + elmCache["content"].style[pos] = x + "px"; + } + + function slideEnd() { + if (!_this.isOpen) elmCache["clip"].style.visibility = "hidden"; + animating = false; + } + + function initSize() { + // everything is based off the size of the items table... + var ow = elmCache["items"].offsetWidth; + var oh = elmCache["items"].offsetHeight; + var ua = navigator.userAgent.toLowerCase(); + + // clipping container should be ow/oh + the size of the shadow + elmCache["clip"].style.width = ow + TransMenu.shadowSize + 2 + "px"; + elmCache["clip"].style.height = oh + TransMenu.shadowSize + 2 + "px"; + + // same with content... + elmCache["content"].style.width = ow + TransMenu.shadowSize + "px"; + elmCache["content"].style.height = oh + TransMenu.shadowSize + "px"; + + contentHeight = oh + TransMenu.shadowSize; + contentWidth = ow + TransMenu.shadowSize; + + dim = iDirection == TransMenu.direction.down ? contentHeight : contentWidth; + + // set initially closed + elmCache["content"].style[pos] = -dim - TransMenu.shadowSize + "px"; + elmCache["clip"].style.visibility = "hidden"; + + // if *not* mac/ie 5 + if (ua.indexOf("mac") == -1 || ua.indexOf("gecko") > -1) { + // set background div to offset size + elmCache["background"].style.width = ow + "px"; + elmCache["background"].style.height = oh + "px"; + elmCache["background"].style.backgroundColor = TransMenu.backgroundColor; + + // shadow left starts at offset left and is offsetHeight pixels high + elmCache["shadowRight"].style.left = ow + "px"; + elmCache["shadowRight"].style.height = oh - (TransMenu.shadowOffset - TransMenu.shadowSize) + "px"; + elmCache["shadowRight"].style.backgroundColor = TransMenu.shadowColor; + + // shadow bottom starts at offset height and is offsetWidth - shadowOffset + // pixels wide (we don't want the bottom and right shadows to overlap or we + // get an extra bright bottom-right corner) + elmCache["shadowBottom"].style.top = oh + "px"; + elmCache["shadowBottom"].style.width = ow - TransMenu.shadowOffset + "px"; + elmCache["shadowBottom"].style.backgroundColor = TransMenu.shadowColor; + } + // mac ie is a little different because we use a PNG for the transparency + else { + // set background div to offset size + elmCache["background"].firstChild.src = TransMenu.backgroundPng; + elmCache["background"].firstChild.width = ow; + elmCache["background"].firstChild.height = oh; + + // shadow left starts at offset left and is offsetHeight pixels high + elmCache["shadowRight"].firstChild.src = TransMenu.shadowPng; + elmCache["shadowRight"].style.left = ow + "px"; + elmCache["shadowRight"].firstChild.width = TransMenu.shadowSize; + elmCache["shadowRight"].firstChild.height = oh - (TransMenu.shadowOffset - TransMenu.shadowSize); + + // shadow bottom starts at offset height and is offsetWidth - shadowOffset + // pixels wide (we don't want the bottom and right shadows to overlap or we + // get an extra bright bottom-right corner) + elmCache["shadowBottom"].firstChild.src = TransMenu.shadowPng; + elmCache["shadowBottom"].style.top = oh + "px"; + elmCache["shadowBottom"].firstChild.height = TransMenu.shadowSize; + elmCache["shadowBottom"].firstChild.width = ow - TransMenu.shadowOffset; + } + } + + function initCache() { + var menu = document.getElementById(id); + var all = menu.all ? menu.all : menu.getElementsByTagName("*"); // IE/win doesn't support * syntax, but does have the document.all thing + + elmCache = {}; + elmCache["clip"] = menu; + elmCache["item"] = []; + + for (var i = 0, elm = null; elm = all[i]; i++) { + switch (elm.className) { + case "items": + case "content": + case "background": + case "shadowRight": + case "shadowBottom": + elmCache[elm.className] = elm; + break; + case "item": + elm._index = elmCache["item"].length; + elmCache["item"][elm._index] = elm; + break; + } + } + + // hack! + _this.elmCache = elmCache; + } + + function initEvents() { + // hook item mouseover + for (var i = 0, item = null; item = elmCache.item[i]; i++) { + item.onmouseover = item_mouseover; + item.onmouseout = item_mouseout; + item.onclick = item_click; + } + + // hook actuation + if (typeof oActuator.tagName != "undefined") { + oActuator.onmouseover = actuator_mouseover; + oActuator.onmouseout = actuator_mouseout; + } + + // hook menu mouseover + elmCache["content"].onmouseover = content_mouseover; + elmCache["content"].onmouseout = content_mouseout; + } + + function highlight(oRow) { + oRow.className = "item hover"; + if (childMenus[oRow._index]) + oRow.lastChild.firstChild.src = TransMenu.dingbatOn; + } + + function dehighlight(oRow) { + oRow.className = "item"; + if (childMenus[oRow._index]) + oRow.lastChild.firstChild.src = TransMenu.dingbatOff; + } + + function item_mouseover() { + if (!animating) { + highlight(this); + + if (childMenus[this._index]) + childMenuSet.showMenu(childMenus[this._index]); + else if (childMenuSet) childMenuSet.hide(); + } + } + + function item_mouseout() { + if (!animating) { + if (childMenus[this._index]) + childMenuSet.hideMenu(childMenus[this._index]); + else // otherwise child_deactivate will do this + dehighlight(this); + } + } + + function item_click() { + if (!animating) { + if (_this.items[this._index].url) + location.href = _this.items[this._index].url; + } + } + + function actuator_mouseover() { + parentMenuSet.showMenu(_this); + } + + function actuator_mouseout() { + parentMenuSet.hideMenu(_this); + } + + function content_mouseover() { + if (!animating) { + parentMenuSet.showMenu(_this); + _this.onmouseover(); + } + } + + function content_mouseout() { + if (!animating) { + parentMenuSet.hideMenu(_this); + } + } + + function child_mouseover() { + if (!animating) { + parentMenuSet.showMenu(_this); + } + } + + function child_deactivate() { + for (var i = 0; i < childMenus.length; i++) { + if (childMenus[i] == this) { + dehighlight(elmCache["item"][i]); + break; + } + } + } + + function child_queue() { + parentMenuSet.hideMenu(_this); + } + + function child_dequeue() { + parentMenuSet.showMenu(_this); + } + + function toString() { + var aHtml = []; + var sClassName = "transMenu" + (oActuator.constructor != TransMenuItem ? " top" : ""); + + for (var i = 0, item = null; item = this.items[i]; i++) { + aHtml[i] = item.toString(childMenus[i]); + } + + return '
                            ' + + '
                            ' + + '' + + aHtml.join('') + + '
                            ' + + '
                            ' + + '
                            ' + + '
                            ' + + '
                            '; + } +} + + +//================================================================================================== +// TransMenuSet +//================================================================================================== +// iDirection : The direction to slide out. One of TransMenu.direction. +// iLeft : Left pixel offset of menus from actuator +// iTop : Top pixel offset of menus from actuator +// iReferencePoint : Corner of actuator to measure from. One of TransMenu.referencePoint. +//================================================================================================== +TransMenuSet.registry = []; + +function TransMenuSet(iDirection, iLeft, iTop, iReferencePoint) { + // public methods + this.addMenu = addMenu; + this.showMenu = showMenu; + this.hideMenu = hideMenu; + this.hide = hide; + this.hideCurrent = hideCurrent; + + // initialization + var menus = []; + var _this = this; + var current = null; + + this.index = TransMenuSet.registry.length; + TransMenuSet.registry[this.index] = this; + + // method implimentations... + function addMenu(oActuator) { + var m = new TransMenu(oActuator, iDirection, iLeft, iTop, iReferencePoint, this); + menus[menus.length] = m; + return m; + } + + function showMenu(oMenu) { + if (oMenu != current) { + // close currently open menu + if (current != null) hide(current); + + // set current menu to this one + current = oMenu; + + // if this menu is closed, open it + oMenu.show(); + } + else { + // hide pending calls to close this menu + cancelHide(oMenu); + } + } + + function hideMenu(oMenu) { + //dbg_dump("hideMenu a " + oMenu.index); + if (current == oMenu && oMenu.isOpen) { + //dbg_dump("hideMenu b " + oMenu.index); + if (!oMenu.hideTimer) scheduleHide(oMenu); + } + } + + function scheduleHide(oMenu) { + //dbg_dump("scheduleHide " + oMenu.index); + oMenu.onqueue(); + oMenu.hideTimer = window.setTimeout("TransMenuSet.registry[" + _this.index + "].hide(TransMenu.registry[" + oMenu.index + "])", TransMenu.hideDelay); + } + + function cancelHide(oMenu) { + //dbg_dump("cancelHide " + oMenu.index); + if (oMenu.hideTimer) { + oMenu.ondequeue(); + window.clearTimeout(oMenu.hideTimer); + oMenu.hideTimer = null; + } + } + + function hide(oMenu) { + if (!oMenu && current) oMenu = current; + + if (oMenu && current == oMenu && oMenu.isOpen) { + hideCurrent(); + } + } + + function hideCurrent() { + if (null != current) { + cancelHide(current); + current.hideTimer = null; + current.hide(); + current = null; + } + } +} + +//================================================================================================== +// TransMenuItem (internal) +// represents an item in a dropdown +//================================================================================================== +// sText : The item display text +// sUrl : URL to load when the item is clicked +// oParent : Menu this item is a part of +//================================================================================================== +function TransMenuItem(sText, sUrl, oParent) { + this.toString = toString; + this.text = sText; + this.url = sUrl; + this.parentMenu = oParent; + + function toString(bDingbat) { + var sDingbat = bDingbat ? TransMenu.dingbatOff : TransMenu.spacerGif; + var iEdgePadding = TransMenu.itemPadding + TransMenu.menuPadding; + var sPaddingLeft = "padding:" + TransMenu.itemPadding + "px; padding-left:" + iEdgePadding + "px;" + var sPaddingRight = "padding:" + TransMenu.itemPadding + "px; padding-right:" + iEdgePadding + "px;" + + return '' + + sText + '' + + ''; + } +} + + + + + + +//===================================================================== +// Accel[erated] [an]imation object +// change a property of an object over time in an accelerated fashion +//===================================================================== +// obj : reference to the object whose property you'd like to animate +// prop : property you would like to change eg: "left" +// to : final value of prop +// time : time the animation should take to run +// zip : optional. specify the zippiness of the acceleration. pick a +// number between -1 and 1 where -1 is full decelerated, 1 is +// full accelerated, and 0 is linear (no acceleration). default +// is 0. +// unit : optional. specify the units for use with prop. default is +// "px". +//===================================================================== +// bezier functions lifted from the lib_animation.js file in the +// 13th Parallel API. www.13thparallel.org +//===================================================================== + +function Accelimation(from, to, time, zip) { + if (typeof zip == "undefined") zip = 0; + if (typeof unit == "undefined") unit = "px"; + + this.x0 = from; + this.x1 = to; + this.dt = time; + this.zip = -zip; + this.unit = unit; + this.timer = null; + this.onend = new Function(); + this.onframe = new Function(); +} + + + +//===================================================================== +// public methods +//===================================================================== + +// after you create an accelimation, you call this to start it-a runnin' +Accelimation.prototype.start = function() { + this.t0 = new Date().getTime(); + this.t1 = this.t0 + this.dt; + var dx = this.x1 - this.x0; + this.c1 = this.x0 + ((1 + this.zip) * dx / 3); + this.c2 = this.x0 + ((2 + this.zip) * dx / 3); + Accelimation._add(this); +} + +// and if you need to stop it early for some reason... +Accelimation.prototype.stop = function() { + Accelimation._remove(this); +} + + + +//===================================================================== +// private methods +//===================================================================== + +// paints one frame. gets called by Accelimation._paintAll. +Accelimation.prototype._paint = function(time) { + if (time < this.t1) { + var elapsed = time - this.t0; + this.onframe(Accelimation._getBezier(elapsed/this.dt,this.x0,this.x1,this.c1,this.c2)); + } + else this._end(); +} + +// ends the animation +Accelimation.prototype._end = function() { + Accelimation._remove(this); + this.onframe(this.x1); + this.onend(); +} + + + + +//===================================================================== +// static methods (all private) +//===================================================================== + +// add a function to the list of ones to call periodically +Accelimation._add = function(o) { + var index = this.instances.length; + this.instances[index] = o; + // if this is the first one, start the engine + if (this.instances.length == 1) { + this.timerID = window.setInterval("Accelimation._paintAll()", this.targetRes); + } +} + +// remove a function from the list +Accelimation._remove = function(o) { + for (var i = 0; i < this.instances.length; i++) { + if (o == this.instances[i]) { + this.instances = this.instances.slice(0,i).concat( this.instances.slice(i+1) ); + break; + } + } + // if that was the last one, stop the engine + if (this.instances.length == 0) { + window.clearInterval(this.timerID); + this.timerID = null; + } +} + +// "engine" - call each function in the list every so often +Accelimation._paintAll = function() { + var now = new Date().getTime(); + for (var i = 0; i < this.instances.length; i++) { + this.instances[i]._paint(now); + } +} + + +// Bezier functions: +Accelimation._B1 = function(t) { return t*t*t } +Accelimation._B2 = function(t) { return 3*t*t*(1-t) } +Accelimation._B3 = function(t) { return 3*t*(1-t)*(1-t) } +Accelimation._B4 = function(t) { return (1-t)*(1-t)*(1-t) } + + +//Finds the coordinates of a point at a certain stage through a bezier curve +Accelimation._getBezier = function(percent,startPos,endPos,control1,control2) { + return endPos * this._B1(percent) + control2 * this._B2(percent) + control1 * this._B3(percent) + startPos * this._B4(percent); +} + + +//===================================================================== +// static properties +//===================================================================== + +Accelimation.instances = []; +Accelimation.targetRes = 10; +Accelimation.timerID = null; + + +//===================================================================== +// IE win memory cleanup +//===================================================================== + +if (window.attachEvent) { + var cearElementProps = [ + 'data', + 'onmouseover', + 'onmouseout', + 'onmousedown', + 'onmouseup', + 'ondblclick', + 'onclick', + 'onselectstart', + 'oncontextmenu' + ]; + + window.attachEvent("onunload", function() { + var el; + for(var d = document.all.length;d--;){ + el = document.all[d]; + for(var c = cearElementProps.length;c--;){ + el[cearElementProps[c]] = null; + } + } + }); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng/javascript/transmenuC.js b/src/usr/local/www/themes/pfsense_ng/javascript/transmenuC.js new file mode 100644 index 0000000..88626c7 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/javascript/transmenuC.js @@ -0,0 +1,86 @@ +/* ================================================================================================= + * TransMenu + * March, 2003 + * Customizable multi-level animated DHTML menus with transparency. + * ================================================================================================= + * "Can I use this?" + * + * Use of this library is governed by the Creative Commons Attribution 2.0 License. You can check it + * out at: http://creativecommons.org/licenses/by/2.0/ + * + * Basically: You may copy, distribute, and eat this code as you wish. But you must give me credit + * for writing it. You may not misrepresent yourself as the author of this code. + * ================================================================================================= + * "It's kinda hard to read, though" + * + * The uncompressed, commented version of this script can be found at: + * http://youngpup.net/projects/transMenus + * ============================================================================================== */ +TransMenu.spacerGif="themes/nervecenter/javascript/img/x.gif";TransMenu.dingbatOn="themes/nervecenter/javascript/img/submenu-on.gif";TransMenu.dingbatOff="themes/nervecenter/javascript/img/submenu-off.gif";TransMenu.dingbatSize=14;TransMenu.menuPadding=5;TransMenu.itemPadding=3;TransMenu.shadowSize=2;TransMenu.shadowOffset=3;TransMenu.shadowColor="#000000";TransMenu.shadowPng="themes/nervecenter/javascript/img/grey-40.png";TransMenu.backgroundColor="#990000";TransMenu.backgroundPng="themes/nervecenter/javascript/img/white-90.png";TransMenu.hideDelay=1000;TransMenu.slideTime=400;TransMenu.reference={topLeft:1,topRight:2,bottomLeft:3,bottomRight:4};TransMenu.direction={down:1,right:2};TransMenu.registry=[];TransMenu._maxZ=100;TransMenu.isSupported=function(){var ua=navigator.userAgent.toLowerCase();var pf=navigator.platform.toLowerCase();var an=navigator.appName;var r=false;if(ua.indexOf("gecko")>-1&&navigator.productSub>=20020605)r=true;else if(an=="Microsoft Internet Explorer"){if(document.getElementById){if(pf.indexOf("mac")==0){r=/msie (\d(.\d*)?)/.test(ua)&&Number(RegExp.$1)>=5.1;} +else r=true;}} +return r;} +TransMenu.initialize=function(){for(var i=0,menu=null;menu=this.registry[i];i++){menu.initialize();}} +TransMenu.renderAll=function(){var aMenuHtml=[];for(var i=0,menu=null;menu=this.registry[i];i++){aMenuHtml[i]=menu.toString();} +document.write(aMenuHtml.join(""));} +function TransMenu(oActuator,iDirection,iLeft,iTop,iReferencePoint,parentMenuSet){this.addItem=addItem;this.addMenu=addMenu;this.toString=toString;this.initialize=initialize;this.isOpen=false;this.show=show;this.hide=hide;this.items=[];this.onactivate=new Function();this.ondeactivate=new Function();this.onmouseover=new Function();this.onqueue=new Function();this.ondequeue=new Function();this.index=TransMenu.registry.length;TransMenu.registry[this.index]=this;var id="TransMenu"+this.index;var contentHeight=null;var contentWidth=null;var childMenuSet=null;var animating=false;var childMenus=[];var slideAccel=-1;var elmCache=null;var ready=false;var _this=this;var a=null;var pos=iDirection==TransMenu.direction.down?"top":"left";var dim=null;function addItem(sText,sUrl){var item=new TransMenuItem(sText,sUrl,this);item._index=this.items.length;this.items[item._index]=item;} +function addMenu(oMenuItem){if(!oMenuItem.parentMenu==this)throw new Error("Cannot add a menu here");if(childMenuSet==null)childMenuSet=new TransMenuSet(TransMenu.direction.right,-5,2,TransMenu.reference.topRight);var m=childMenuSet.addMenu(oMenuItem);childMenus[oMenuItem._index]=m;m.onmouseover=child_mouseover;m.ondeactivate=child_deactivate;m.onqueue=child_queue;m.ondequeue=child_dequeue;return m;} +function initialize(){initCache();initEvents();initSize();ready=true;} +function show(){if(ready){_this.isOpen=true;animating=true;setContainerPos();elmCache["clip"].style.visibility="visible";elmCache["clip"].style.zIndex=TransMenu._maxZ++;slideStart();_this.onactivate();}} +function hide(){if(ready){_this.isOpen=false;animating=true;for(var i=0,item=null;item=elmCache.item[i];i++)dehighlight(item);if(childMenuSet)childMenuSet.hide();slideStart();_this.ondeactivate();}} +function setContainerPos(){var sub=oActuator.constructor==TransMenuItem;var act=sub?oActuator.parentMenu.elmCache["item"][oActuator._index]:oActuator;var el=act;var x=0;var y=0;var minX=0;var maxX=(window.innerWidth?window.innerWidth:document.body.clientWidth)-parseInt(elmCache["clip"].style.width);var minY=0;var maxY=(window.innerHeight?window.innerHeight:document.body.clientHeight)-parseInt(elmCache["clip"].style.height);while(sub?el.parentNode.className.indexOf("transMenu")==-1:el.offsetParent){x+=el.offsetLeft;y+=el.offsetTop;if(el.scrollLeft)x-=el.scrollLeft;if(el.scrollTop)y-=el.scrollTop;el=el.offsetParent;} +if(oActuator.constructor==TransMenuItem){x+=parseInt(el.parentNode.style.left);y+=parseInt(el.parentNode.style.top);} +switch(iReferencePoint){case TransMenu.reference.topLeft:break;case TransMenu.reference.topRight:x+=act.offsetWidth;break;case TransMenu.reference.bottomLeft:y+=act.offsetHeight;break;case TransMenu.reference.bottomRight:x+=act.offsetWidth;y+=act.offsetHeight;break;} +x+=iLeft;y+=iTop;x=Math.max(Math.min(x,maxX),minX);y=Math.max(Math.min(y,maxY),minY);elmCache["clip"].style.left=x+"px";elmCache["clip"].style.top=y+"px";} +function slideStart(){var x0=parseInt(elmCache["content"].style[pos]);var x1=_this.isOpen?0:-dim;if(a!=null)a.stop();a=new Accelimation(x0,x1,TransMenu.slideTime,slideAccel);a.onframe=slideFrame;a.onend=slideEnd;a.start();} +function slideFrame(x){elmCache["content"].style[pos]=x+"px";} +function slideEnd(){if(!_this.isOpen)elmCache["clip"].style.visibility="hidden";animating=false;} +function initSize(){var ow=elmCache["items"].offsetWidth;var oh=elmCache["items"].offsetHeight;var ua=navigator.userAgent.toLowerCase();elmCache["clip"].style.width=ow+TransMenu.shadowSize+2+"px";elmCache["clip"].style.height=oh+TransMenu.shadowSize+2+"px";elmCache["content"].style.width=ow+TransMenu.shadowSize+"px";elmCache["content"].style.height=oh+TransMenu.shadowSize+"px";contentHeight=oh+TransMenu.shadowSize;contentWidth=ow+TransMenu.shadowSize;dim=iDirection==TransMenu.direction.down?contentHeight:contentWidth;elmCache["content"].style[pos]=-dim-TransMenu.shadowSize+"px";elmCache["clip"].style.visibility="hidden";if(ua.indexOf("mac")==-1||ua.indexOf("gecko")>-1){elmCache["background"].style.width=ow+"px";elmCache["background"].style.height=oh+"px";elmCache["background"].style.backgroundColor=TransMenu.backgroundColor;elmCache["shadowRight"].style.left=ow+"px";elmCache["shadowRight"].style.height=oh-(TransMenu.shadowOffset-TransMenu.shadowSize)+"px";elmCache["shadowRight"].style.backgroundColor=TransMenu.shadowColor;elmCache["shadowBottom"].style.top=oh+"px";elmCache["shadowBottom"].style.width=ow-TransMenu.shadowOffset+"px";elmCache["shadowBottom"].style.backgroundColor=TransMenu.shadowColor;} +else{elmCache["background"].firstChild.src=TransMenu.backgroundPng;elmCache["background"].firstChild.width=ow;elmCache["background"].firstChild.height=oh;elmCache["shadowRight"].firstChild.src=TransMenu.shadowPng;elmCache["shadowRight"].style.left=ow+"px";elmCache["shadowRight"].firstChild.width=TransMenu.shadowSize;elmCache["shadowRight"].firstChild.height=oh-(TransMenu.shadowOffset-TransMenu.shadowSize);elmCache["shadowBottom"].firstChild.src=TransMenu.shadowPng;elmCache["shadowBottom"].style.top=oh+"px";elmCache["shadowBottom"].firstChild.height=TransMenu.shadowSize;elmCache["shadowBottom"].firstChild.width=ow-TransMenu.shadowOffset;}} +function initCache(){var menu=document.getElementById(id);var all=menu.all?menu.all:menu.getElementsByTagName("*");elmCache={};elmCache["clip"]=menu;elmCache["item"]=[];for(var i=0,elm=null;elm=all[i];i++){switch(elm.className){case"items":case"content":case"background":case"shadowRight":case"shadowBottom":elmCache[elm.className]=elm;break;case"item":elm._index=elmCache["item"].length;elmCache["item"][elm._index]=elm;break;}} +_this.elmCache=elmCache;} +function initEvents(){for(var i=0,item=null;item=elmCache.item[i];i++){item.onmouseover=item_mouseover;item.onmouseout=item_mouseout;item.onclick=item_click;} +if(typeof oActuator.tagName!="undefined"){oActuator.onmouseover=actuator_mouseover;oActuator.onmouseout=actuator_mouseout;} +elmCache["content"].onmouseover=content_mouseover;elmCache["content"].onmouseout=content_mouseout;} +function highlight(oRow){oRow.className="item hover";if(childMenus[oRow._index])oRow.lastChild.firstChild.src=TransMenu.dingbatOn;} +function dehighlight(oRow){oRow.className="item";if(childMenus[oRow._index])oRow.lastChild.firstChild.src=TransMenu.dingbatOff;} +function item_mouseover(){if(!animating){highlight(this);if(childMenus[this._index])childMenuSet.showMenu(childMenus[this._index]);else if(childMenuSet)childMenuSet.hide();}} +function item_mouseout(){if(!animating){if(childMenus[this._index])childMenuSet.hideMenu(childMenus[this._index]);else dehighlight(this);}} +function item_click(){if(!animating){if(_this.items[this._index].url)location.href=_this.items[this._index].url;}} +function actuator_mouseover(){parentMenuSet.showMenu(_this);} +function actuator_mouseout(){parentMenuSet.hideMenu(_this);} +function content_mouseover(){if(!animating){parentMenuSet.showMenu(_this);_this.onmouseover();}} +function content_mouseout(){if(!animating){parentMenuSet.hideMenu(_this);}} +function child_mouseover(){if(!animating){parentMenuSet.showMenu(_this);}} +function child_deactivate(){for(var i=0;i'+'
                            '+''+aHtml.join('')+'
                            '+'
                            '+'
                            '+'
                            '+'
                            ';}} +TransMenuSet.registry=[];function TransMenuSet(iDirection,iLeft,iTop,iReferencePoint){this.addMenu=addMenu;this.showMenu=showMenu;this.hideMenu=hideMenu;this.hide=hide;this.hideCurrent=hideCurrent;var menus=[];var _this=this;var current=null;this.index=TransMenuSet.registry.length;TransMenuSet.registry[this.index]=this;function addMenu(oActuator){var m=new TransMenu(oActuator,iDirection,iLeft,iTop,iReferencePoint,this);menus[menus.length]=m;return m;} +function showMenu(oMenu){if(oMenu!=current){if(current!=null)hide(current);current=oMenu;oMenu.show();} +else{cancelHide(oMenu);}} +function hideMenu(oMenu){if(current==oMenu&&oMenu.isOpen){if(!oMenu.hideTimer)scheduleHide(oMenu);}} +function scheduleHide(oMenu){oMenu.onqueue();oMenu.hideTimer=window.setTimeout("TransMenuSet.registry["+_this.index+"].hide(TransMenu.registry["+oMenu.index+"])",TransMenu.hideDelay);} +function cancelHide(oMenu){if(oMenu.hideTimer){oMenu.ondequeue();window.clearTimeout(oMenu.hideTimer);oMenu.hideTimer=null;}} +function hide(oMenu){if(!oMenu&¤t)oMenu=current;if(oMenu&¤t==oMenu&&oMenu.isOpen){hideCurrent();}} +function hideCurrent(){if (null != current){cancelHide(current);current.hideTimer=null;current.hide();current=null;}}} +function TransMenuItem(sText,sUrl,oParent){this.toString=toString;this.text=sText;this.url=sUrl;this.parentMenu=oParent;function toString(bDingbat){var sDingbat=bDingbat?TransMenu.dingbatOff:TransMenu.spacerGif;var iEdgePadding=TransMenu.itemPadding+TransMenu.menuPadding;var sPaddingLeft="padding:"+TransMenu.itemPadding+"px; padding-left:"+iEdgePadding+"px;" +var sPaddingRight="padding:"+TransMenu.itemPadding+"px; padding-right:"+iEdgePadding+"px;" +return''+sText+''+'';}} +function Accelimation(from,to,time,zip){if(typeof zip=="undefined")zip=0;if(typeof unit=="undefined")unit="px";this.x0=from;this.x1=to;this.dt=time;this.zip=-zip;this.unit=unit;this.timer=null;this.onend=new Function();this.onframe=new Function();} +Accelimation.prototype.start=function(){this.t0=new Date().getTime();this.t1=this.t0+this.dt;var dx=this.x1-this.x0;this.c1=this.x0+((1+this.zip)*dx/3);this.c2=this.x0+((2+this.zip)*dx/3);Accelimation._add(this);} +Accelimation.prototype.stop=function(){Accelimation._remove(this);} +Accelimation.prototype._paint=function(time){if(time= !,... +# where: forbidden pages are those pages that should *not* use +# the particular JavaScript function within the JS event +# specified below. +# $Id: body.def,v 1.2.2.1 2007/01/17 18:43:52 sullrich Exp $ +# +onload=tmenuinit(); !wizard.php \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng/loader.js b/src/usr/local/www/themes/pfsense_ng/loader.js new file mode 100644 index 0000000..ee215f3 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/loader.js @@ -0,0 +1,36 @@ +//'); +} + +document.write(''); + +// jQuery function to define dropdown menu size +jQuery(document).ready(function () { + var hwindow = ''; + hwindow = (jQuery(window).height()-35); + // Force the size dropdown menu + jQuery('#navigation ul li ul').css('max-height', hwindow); +}); +//]]> diff --git a/src/usr/local/www/themes/pfsense_ng/login.css b/src/usr/local/www/themes/pfsense_ng/login.css new file mode 100644 index 0000000..f8abdfc --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/login.css @@ -0,0 +1,1127 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + + +#login { +/* background: #cccccc; */ + background-color: transparent; + border: 0px solid #cccccc; + margin: 5em auto; + padding: 0em; + width: 400px; +/* filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; */ +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; +/* background: #ffffff; */ + margin-top: 0; + display: block; + text-indent: -1000px; + height: 400px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -420px; + left: 70px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + top: -300px; */ +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + left: 10px; + top: -300px; */ +} + +#login #submit { + font-size: 1em; + font-weight: bold; + text-align: center; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -20px; + left: 170px; +} + +/* loginerror box follows */ + +#login #inputerrors { + background-color: transparent; + border: 0px solid #666666; + margin: 5em auto; + vertical-align: middle; + padding: 0em; + width: 330px; + height: 50px; + position: relative; + top: -370px; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng/menu.inc b/src/usr/local/www/themes/pfsense_ng/menu.inc new file mode 100644 index 0000000..d703daf --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/menu.inc @@ -0,0 +1,177 @@ + + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +require("menu.inc"); + +define("TMENU_STUB", " + // set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. + // but you can experiment with effect on loadtime. + if (TransMenu.isSupported()) { + + //================================================================================================== + // create a set of dropdowns + //================================================================================================== + // the first param should always be down, as it is here + // + // The second and third param are the top and left offset positions of the menus from their actuators + // respectively. To make a menu appear a little to the left and bottom of an actuator, you could use + // something like -5, 5 + // + // The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner + // of the actuator from which to measure the offset positions above. Here we are saying we want the + // menu to appear directly below the bottom left corner of the actuator + //================================================================================================== + var ms = new TransMenuSet(TransMenu.direction.down, 1, 0, TransMenu.reference.bottomLeft); + + //================================================================================================== + // create a dropdown menu + //================================================================================================== + // the first parameter should be the HTML element which will act actuator for the menu + //================================================================================================== + + @@MENU_DEFINITIONS@@ + + //================================================================================================== + // write drop downs into page + //================================================================================================== + // this method writes all the HTML for the menus into the page with document.write(). It must be + // called within the body of the HTML page. + //================================================================================================== + TransMenu.renderAll(); + } +"); + +class NervecenterMenu extends Menu { + private $menuJScript = "NOT-SET"; + private $menuJScriptEvents = "NOT-SET"; + private $menuID = "NOT-SET"; + + public function __construct($identification = "", $filename = "", Component $c = NULL) { + parent::__construct($identification, $filename, $c); + + $id = "mnua_" . str_replace(" ", "", strtolower($this->getID())); + $this->menuID = $id; + + if ($this->hasParent()) { + $this->menuJScript = "\tvar {$id} = ms.addMenu(document.getElementById('{$id}'));\n"; + } + } // end __construct + + public function getMenuID() { + return $this->menuID; + } + + public function setMenuID($myMenuID) { + $this->menuID = $myMenuID; + } + + public function getMenuJScript() { + $childJScript = ""; + foreach ($this->getChildren() as $component) { + $childJScript .= $component->getMenuJScript(); + } + + if (! $this->hasParent()) { + $this->menuJScript = str_replace("@@MENU_DEFINITIONS@@", $childJScript, TMENU_STUB); + } else { + $this->menuJScript .= "\n$childJScript\n"; + } + + return $this->menuJScript; + } + + public function getMenuJScriptEvents() { + return $this->menuJScriptEvents; + } + + public function __toString() { + if (! $this->hasParent()) { + $menuMarkup =<< + @@CHILD_ELEMENTS@@ + + +EOD; + } else { + $name = gettext($this->getID()); + $id = "mnua_" . str_replace(" ", "", strtolower($this->getID())); + + $menuMarkup =<<{$name} + @@CHILD_ELEMENTS@@ +EOD; + } + + $childMarkup = ""; + foreach ($this->getChildren() as $component) { + $childMarkup .= $component; + } + + $menuMarkup = str_replace("@@CHILD_ELEMENTS@@", $childMarkup, $menuMarkup); + + return $menuMarkup; + } +} + +class NervecenterMenuItem extends MenuItem { + private $menuJScript = "NOT-SET"; + private $menuJScriptEvents = "NOT-SET"; + + public function __construct($identification = "", $filename = "", $href = "", Component $c = NULL) { + parent::__construct($identification, $filename, $href, $c); + + $href = $this->getHref() <> "" ? $this->getHref() : "{$this->getFile()}"; + $name = gettext($this->getID()); + $file = $this->getFile(); + + $this->menuJScript = $this->check_access("{$file}", "\t{$this->getParent()->getMenuID()}.addItem('{$name}', '{$href}');\n"); + } + + public function getMenuJScript() { + return $this->menuJScript; + } + + public function getMenuJScriptEvents() { + return $this->menuJScriptEvents; + } + + public function __toString() { + return ""; + } +} + +?> diff --git a/src/usr/local/www/themes/pfsense_ng/new_tab_menu.css b/src/usr/local/www/themes/pfsense_ng/new_tab_menu.css new file mode 100644 index 0000000..04c4cf2 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/new_tab_menu.css @@ -0,0 +1,101 @@ +/* + new_tab_menu.css + part of pfSense + Copyright (C) 2010-2011 Robert Zelaya + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + + Replace your old tab menu with the following code. To add a second tab menu line just cut and paste again. + The following code is dependent on new_tab_menu.css and images/new_tab_menu.png. + + + + + + + +*/ + +.newtabmenu ul, li{border:0; margin:0; padding:0; list-style:none;} + +.newtabmenu li{float:left; margin-right:2px; text-align: center;} +.newtabmenu a:link, .newtabmenu a:visited{ + background:url(images/new_tab_menu.png) right 45px; + color:#ffffff; /* noactive font */ + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + font-weight:bold; + font-size:.9em; + height:20px; + line-height:20px; + text-decoration:none; +} +.newtabmenu a span{ + background:url(images/new_tab_menu.png) left 45px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + height:20px; + margin-right:7px; + padding-left:7px; +} +.newtabmenu a:hover{ + background:url(images/new_tab_menu.png) right 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + color:#ffffff; /* hover over font */ +} +.newtabmenu a:hover span{ + background:url(images/new_tab_menu.png) left 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ +} + +/* -------------------------------- */ +/* ACTIVE ELEMENTS */ +.newtabmenu_active a:link, .newtabmenu_active a:visited, .newtabmenu_active a:visited, .newtabmenu_active a:hover{ + color:#000000; /* active font */ + background:url(images/new_tab_menu.png) right 0 no-repeat; +} +.newtabmenu_active a span, .newtabmenu_active a:hover span{ + background:url(images/new_tab_menu.png) left 0 no-repeat; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng/no_big_logo b/src/usr/local/www/themes/pfsense_ng/no_big_logo new file mode 100644 index 0000000..6e5c70d --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/no_big_logo @@ -0,0 +1 @@ +NO! DONT! \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng/rrdcolors.inc.php b/src/usr/local/www/themes/pfsense_ng/rrdcolors.inc.php new file mode 100644 index 0000000..dcb7a39 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/rrdcolors.inc.php @@ -0,0 +1,89 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This file is included by the RRD graphing page and sets the colors */ + +/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Traffic Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colortrafficdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* Packets Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colorpacketsup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Packets Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colorpacketsdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* 95th Percentile Lines Out, In */ +$colortraffic95 = array('660000', 'FF0000'); + +/* State Table pfrate, pfstates, pfnat, srcip, dstip */ +$colorstates = array('00AA00','990000','0000FF','000000','DD9B00'); + +/* Processor Usage user, nice, system, int, processes */ +$colorprocessor = array('00AA00','990000','0000FF','DD9B00','000000'); + +/* Memory Usage active, inact, free, cache, wire */ +$colormemory = array('00AA00','990000','0000FF','666666','DD9B00'); + +/* MBUF Usage current, cache, total, max */ +$colormbuf = array('0080FF','00E344','FF0000','000000'); + +/* Traffic Shaper Queues q1, q2, q3, q4, q5, q6, q7, q8, q9 */ +$colorqueuesup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +$colorqueuesdropup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +/* Quality Graph Delay >420, 180-420, 60-180, 20-60, <20, Delay Avg */ +$colorqualityrtt = array('990000','a83c3c','b36666','bd9090','cccccc','000000'); +/* Quality Graph Loss */ +$colorqualityloss = 'ee0000'; + +/* Wireless Graph SNR, Rate, Channel*/ +/* Cellular Graph RSSI, */ +$colorwireless = array('333333','a83c3c','999999'); + +/* SPAMD Times min area, avg area, max area, Time line */ +$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); +/* SPAMD Connections max area, min area, min line, max line, avg line */ +$colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600'); + +/* OpenVPN Users Online Users */ +$colorvpnusers = array('990000'); + +/* Captive Portal Total Users Total Users */ +/* Captive Portal Concurrent Concurrent Users */ +$colorcaptiveportalusers = array('990000'); + +?> diff --git a/src/usr/local/www/themes/pfsense_ng/styles/jquery-ui-1.11.1.css b/src/usr/local/www/themes/pfsense_ng/styles/jquery-ui-1.11.1.css new file mode 100644 index 0000000..8a8c54f --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/styles/jquery-ui-1.11.1.css @@ -0,0 +1,1226 @@ +/*! jQuery UI - v1.11.1 - 2014-09-22 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2C%20Helvetica%2C%20Arial%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=glass&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=inset_soft&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=glass&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=bbbbbb&fcHover=599fcf&iconColorHover=3383bb&bgColorActive=999999&bgTextureActive=inset_hard&bgImgOpacityActive=75&borderColorActive=999999&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=444444&iconColorHighlight=3383bb&bgColorError=c0402a&bgTextureError=flat&bgImgOpacityError=55&borderColorError=c0402a&fcError=ffffff&iconColorError=fbc856&bgColorOverlay=eeeeee&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0pxdow +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; + background-color: #990000; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #c9c9c9 url("../../../javascript/jquery/images/ui-bg_inset-soft_50_c9c9c9_1x100.png") 50% bottom repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #bbbbbb; + /* background: #dddddd url("../../../javascript/jquery/images/ui-bg_glass_35_dddddd_1x400.png") 50% 50% repeat-x; */ + color: #444444; + font-weight: bold; +} +.ui-widget-header a { + color: #444444; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_glass_60_eeeeee_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #3383bb; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #3383bb; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #bbbbbb; + background: #f8f8f8 url("../../../javascript/jquery/images/ui-bg_glass_100_f8f8f8_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #599fcf; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #599fcf; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #999999; + background: #999999 url("../../../javascript/jquery/images/ui-bg_inset-hard_75_999999_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #ffffff; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_55_eeeeee_40x100.png") 50% 50% repeat-x; + color: #444444; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #444444; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #c0402a; + background: #c0402a url("../../../javascript/jquery/images/ui-bg_flat_55_c0402a_40x100.png") 50% 50% repeat-x; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_70b2e1_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_454545_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_fbc856_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_0_eeeeee_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -4px 0 0 -4px; + padding: 4px; + background: #aaaaaa url("../../../javascript/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 0pxdow; +} diff --git a/src/usr/local/www/themes/pfsense_ng/styles/menustyles.css b/src/usr/local/www/themes/pfsense_ng/styles/menustyles.css new file mode 100644 index 0000000..06b3c7a --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/styles/menustyles.css @@ -0,0 +1,44 @@ +#navigation { + /* border:1px solid black; */ + width: 98%; + vertical-align: middle; + height: 16px; + padding-top: 4px; + } + +#menu { + /* background: #990000; */ + /* border-bottom:1px solid white; */ + padding: 0 0 0 0; + width: 98%; + vertical-align: middle; + height: 16px; + } +#menu a { + padding: 2px 28px 4px 28px; + text-decoration: none; + font-weight: bold; + font-size: 1.0em; + color: #FFFFFF; + width: 08%; + height: 16px; + } +#menu a.hover { + background: #AF2020; + } +#menu span { + display: none; + } + +#subnav { + font-size: 10px; + margin-bottom: 2em; + } +#subnav a { + color: #FF0000; /* #FB3B00; */ + margin-right: 1em; + } +#subnav span { + color: silver; + margin-right: 1em; + } diff --git a/src/usr/local/www/themes/pfsense_ng/styles/transmenu.css b/src/usr/local/www/themes/pfsense_ng/styles/transmenu.css new file mode 100644 index 0000000..f683574 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/styles/transmenu.css @@ -0,0 +1,75 @@ +/* this is the clipping region for the menu. it's width and height get set by script, depending on the size of the items table */ +.transMenu { + position:absolute; + overflow:hidden; + left:-1000px; + top:-1000px; + } + +/* this is the main container for the menu itself. it's width and height get set by script, depending on the size of the items table */ +.transMenu .content { + position:absolute; + } + +/* this table comprises all menu items. each TR is one item. It is relatively positioned so that the shadow and background transparent divs can be positioned underneath it */ +.transMenu .items { + position:relative; + left:0px; top:0px; + z-index:2; + } + +.transMenu.top .items { + border-top:none; + } + +/* each TR.item is one menu item */ +.transMenu .item { + color: #FFFFFF; /* #336; */ + font-size: 1.1em; + font-weight: normal; + font-family:sans-serif; + text-decoration:none; + /* this is a hack for mac/ie5, whom incorrectly cascades the border properties of the parent table to each row */ + border:none; + cursor:pointer; + cursor:hand; + } + +/* this DIV is the semi-transparent white background of each menu. the -moz-opacity is a proprietary way to get transparency in mozilla, the filter is for IE/windows 5.0+. */ +/* we set the background color in script because ie mac does not use it; that browser only uses a semi-transparent white PNG that the spacer gif inside this DIV is replaced by */ +.transMenu .background { + position:absolute; + left:0px; top:0px; + z-index:1; + -moz-opacity:.8; + filter:alpha(opacity=80); + } + +/* same concept as .background, but this is the sliver of shadow on the right of the menu. It's left, height, and background are set by script. In IE5/mac, it uses a PNG */ +.transMenu .shadowRight { + position:absolute; + z-index:3; + top:3px; width:2px; + -moz-opacity:.4; + filter:alpha(opacity=40); + } + +/* same concept as .background, but this is the sliver of shadow on the bottom of the menu. It's top, width, and background are set by script. In IE5/mac, it uses a PNG */ +.transMenu .shadowBottom { + position:absolute; + z-index:1; + left:3px; height:2px; + -moz-opacity:.4; + filter:alpha(opacity=40); + } + +/* this is the class that is used when the mouse is over an item. script sets the row to this class when required. */ +.transMenu .item.hover { + background:#fdfdfd; + color:black; + } + +/* this is either the dingbat that indicates there is a submenu, or a spacer gif in it's place. We give it extra margin to create some space between the text and the dingbat */ +.transMenu .item img { + margin-left:10px; + } \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng/wizard.css b/src/usr/local/www/themes/pfsense_ng/wizard.css new file mode 100644 index 0000000..f2c9f3e --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng/wizard.css @@ -0,0 +1,1117 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.nowrap { white-space: nowrap; } + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + /* background: url('images/background.png') no-repeat; */ + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +.infobox { + width:100%; +} + +.infoboxsave { + padding-right: 10px; +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +.inputerrorsleft { + background-color: #990000; + width: 36px; +} + +.inputerrorsright { + background-color: #FFD9D1; + color: #000000; + font-size: 11px; + padding-left: 8px; + padding-top: 6px; +} diff --git a/src/usr/local/www/themes/pfsense_ng_fs/all.css b/src/usr/local/www/themes/pfsense_ng_fs/all.css new file mode 100644 index 0000000..7286d1c --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/all.css @@ -0,0 +1,1375 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, sans-serif; + font-size: 0.9em; + +} + +.nowrap { white-space: nowrap; } + +.addgatewaybox { + background-color: #990000; + border-style: none none none none; + width: 225px; +} + +.infobox { + width:100%; +} + +.infoboxsave { + padding-right: 10px; +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +.inputerrorsleft { + background-color: #990000; + width: 36px; +} + +.inputerrorsright { + background-color: #FFD9D1; + color: #000000; + font-size: 11px; + padding-left: 8px; + padding-top: 6px; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 220px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 11px; + font-family: "Trebuchet MS", sans-serif; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +a:link { + color: #550000; +} + +a:visited { + color: #550000; +} + +a:active { + color: #550000; +} + +a:hover { + color: #550000; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* style of disabled formelements */ +#wrap div {margin:1em 0} +[disabled] { + color:#666666; + background:#eeeeee; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 40px; + width: 810px; + position: fixed; + left: 0; + margin-bottom: 5px; + z-index: 2; + top: 0; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 40px; + width: 80px; + left: 0px; + top:0px; + float: left; +} +#header-left #status-link { + position: relative; + top: 0px; + left: 0px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 30px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +/* for forcing an alert run the following command from diagnostics>command, php command: +file_notice("blah", "blah blah...testing my new theme..."); +*/ + +#header-right .container .right #alerts { + position: fixed; + background: url('images/alert_bgr.png') no-repeat; + height: 40px; + width: 400px; + top: 0px; + left: 810px; + z-index: 2; + padding-top: 1px; + padding-left: 10px; + margin: 0px; +} + +#header-right .container .right #hostname { + position: fixed; + background: url('images/hostname.png') no-repeat; + height: 40px; + width: 400px; + z-index: 1; + padding-right: 5px; + margin: 0px; + top: 0px; + left: 810px; + font-size: 12px; + color: #000000; + font-weight: bold; + padding-left: 40px; + padding-top: 2px; + text-align: left; +} + + + + +table#marquee { + position: relative; + top: -4px; + left: 15px; + border: 0; + padding: 0; + margin: 0; + width: 350px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { +/* font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; */ + font-size: 12px; + font-weight: normal; + font-style: italic; + color: #000000; + padding-left: 30px; + padding-top: 2px; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 330px; + height: 16px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + +#content { + padding-top: 50px; + padding-right: 40px; + padding-left: 40px; +} + + +/* try to abuse left as a fadeout at the end of the page */ +#left { + width: 810px; + height: 1px; +} + +#right { + padding: 10px; + margin-bottom: 30px; + font-size: 12px; + font-weight: 200; + line-height: 12px; + color: inherit; + background-color: #eeeeee; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +#footer { + text-align: center; +} +#footer p { + padding: 0px; + margin: 0px; + +} + +/* Style the List */ +#navigation { + position: fixed; + top: 0px; + left: 100px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; + margin-left: 10px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + padding-right: 20px; + top: 0px; +} + +/* Text mainmenubar */ +#navigation ul li div { + background-image: url(images/mainmenu-right.gif); + background-position: 2% 50%; + background-repeat: no-repeat; + padding-top:0px; + font-size: 12px; + font-weight: normal; + color: #ffffff; + text-align: left; + padding-left: 13px; + height: 13px; +} + +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + font-weight: normal; + margin-top: 1px; + padding-top: 5px; + background: #850000; + border: 0px; + /* transparent */ + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=95); + -moz-opacity: 0.95; + -khtml-opacity: 0.95; + opacity: 0.95; + /* borders */ + border-bottom-right-radius: 0px; + border-bottom-left-radius: 6px; + border-top-left-radius: 6px; + border-top-right-radius: 6px; + /* Mozilla */ + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-topleft: 6px; + /* WebKit */ + -webkit-border-bottom-right-radius: 0px; + -webkit-border-bottom-left-radius: 6px; + -webkit-border-top-right-radius: 6px; + -webkit-border-top-left-radius: 6px; + /* Shadow Effect */ + box-shadow: 5px 5px 10px #000000; + -webkit-box-shadow: 5px 5px 10px #000000; + -moz-box-shadow: 5px 5px 10px #000000; + /* Vertical menu max size */ + /* max-height: 259px; / + /* Horizontal menu max size */ + max-width: 128px; + overflow-x: hidden; + overflow-y: auto; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; + background-image: url(images/mainmenu-down.gif); + background-position: 5% 50%; + background-repeat: no-repeat; +} + +#navigation ul li { + background-color: transparent; + color: #000000; +} +/* dropdownmenu */ +#navigation ul li ul li { + border: 0px solid #850000; + width: 128px; + height: 1.6em; + line-height: 1.6em; + background-color: #850000; + /* borders */ + border-bottom-right-radius: 0px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + /* Mozilla */ + -moz-border-radius-bottomright: 0px; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-topleft: 3px; + /* WebKit */ + -webkit-border-bottom-right-radius: 0px; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-right-radius: 3px; + -webkit-border-top-left-radius: 3px; +} +/* last element in dropdown menu*/ +#navigation ul li ul li:last-child { + margin-bottom: 5px; +} +#navigation ul li ul li:hover { + margin-left: 5px; + background-color: #666666; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=95); + -moz-opacity: 0.95; + -khtml-opacity: 0.95; + opacity: 0.95; +} + +/* textcolor in dropdownmenu */ +#navigation li li a { + display: block; + padding-left: 8px; + padding-right: 8px; + color: #ffffff; + font-size: 11px; + font-weight: normal; + text-align: left; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { +} +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; + background-color: transparent; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listrborder { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-left: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + color: #FFFFFF; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} + +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #DDDDDD; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + +/* style of disabled formelements */ +[disabled] { + color:#666666; + background:#eeeeee; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 6px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; + +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password, #password2 { + font-size: small; + width: 60%; + padding-left: 19px; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #B1B1B1; + padding-right: 6px; + padding-left: 6px; + color: #000000; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} +.widgetconfigdiv{ + background:#BBBBBB; + font-size: 11px; + color: #000000; + padding-right: 5px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +div#log div.log-entry-mini { + clear: both; +} + +div#log div.log-entry-mini span { + padding: 2px 2px 2px 2px; + padding-left: 6px; +} + +div#log span.log-action-mini-header, +div#log span.log-time-mini-header, +div#log span.log-interface-mini-header, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header, +div#log span.log-protocol-mini-header { + float: left; + text-align: left; + background-color: #B1B1B1; + font-size: 12px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-time-mini, +div#log span.log-interface-mini, +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-protocol-mini { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 11px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-action-mini-header { + width: 6%; +} + +div#log span.log-time-mini, +div#log span.log-time-mini-header { + width: 19%; +} + +div#log span.log-interface-mini, +div#log span.log-interface-mini-header { + width: 8%; +} + +div#log span.log-source-mini, +div#log span.log-source-mini-header { + width: 23%; +} + +div#log span.log-destination-mini, +div#log span.log-destination-mini-header { + width: 31%; +} + +div#log span.log-protocol-mini, +div#log span.log-protocol-mini-header { + width: 8%; + border-right: 1px solid #999; +} + +/* Sortable tables */ +table.sortable thead { + cursor: default; + /* background-color: #EEEEEE; this causing light gray rectangles to the right of many tables in gui */ + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} + +/*thermal_sensors widget styles*/ + +.thermalSensorRow { width: 100%; border: 0px solid #ddd; padding: 1px; border-radius: 3px; } +.thermalSensorBarShell { position: relative; width: 100%; height: 5px; border: 1px solid lightgray; border-radius: 3px; } +.thermalSensorBar { position: absolute; width: 0%; height: 1px; z-index: 1; border-style: solid; border-radius: 3px; + background-color: LimeGreen; + border-top-width: 2px; border-top-color: Lime; + border-left-width: 0px; + border-right-width: 0px; + border-bottom-width: 2px; border-bottom-color: Green; +} +.thermalSensorTextShell { height: 20px; width: 100%; top: 3px; } +.thermalSensorText { float: left; height: 20px; top: 3px; } +.thermalSensorValue { float: left; height: 20px; top: 3px; font-weight: bold; margin-left: 10px;} + +.thermalSensorWarnThresh { position: absolute; background-color: orange; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } +.thermalSensorCritThresh { position: absolute; background-color: red; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } + +.thermal_sensors_widget_scale000 { position: absolute; height: 5px; width: 1px; left: -1px; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale020 { position: absolute; height: 3px; width: 1px; left: 10%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale010 { position: absolute; height: 3px; width: 1px; left: 20%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale030 { position: absolute; height: 3px; width: 1px; left: 30%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale040 { position: absolute; height: 3px; width: 1px; left: 40%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale050 { position: absolute; height: 3px; width: 1px; left: 50%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale060 { position: absolute; height: 3px; width: 1px; left: 60%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale070 { position: absolute; height: 3px; width: 1px; left: 70%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale080 { position: absolute; height: 3px; width: 1px; left: 80%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale090 { position: absolute; height: 3px; width: 1px; left: 90%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; } + +.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; } + +/* widget textarea styles - full width */ +.textarea_widget { + width: 100%; + resize:vertical; + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* IE 8+ */ +} diff --git a/src/usr/local/www/themes/pfsense_ng_fs/apple-touch-icon.png b/src/usr/local/www/themes/pfsense_ng_fs/apple-touch-icon.png new file mode 100755 index 0000000..7a4b975 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/apple-touch-icon.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/bottom-loader.js b/src/usr/local/www/themes/pfsense_ng_fs/bottom-loader.js new file mode 100644 index 0000000..a21f775 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/bottom-loader.js @@ -0,0 +1,10 @@ +// diff --git a/src/usr/local/www/themes/pfsense_ng_fs/favicon.ico b/src/usr/local/www/themes/pfsense_ng_fs/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/favicon.ico differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/graphlink.css b/src/usr/local/www/themes/pfsense_ng_fs/graphlink.css new file mode 100644 index 0000000..521059e --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/graphlink.css @@ -0,0 +1,43 @@ +/******************************************************************************* + $Id: graphlink.css,v 1.2.2.1 2007/01/17 18:43:30 sullrich Exp $ + + This file is part of the GraphLink software. + GraphLink is distributed under the MIT License. + Copyright (C) 2005-2006 Max Khitrov +*******************************************************************************/ + +/** + * Defines the background image used for the graph, as well as the actual data + * locations. + * Use padding-left and padding-top to align the data area correctly with your + * background image. + * Width and height should same as the dimensions of the image, minus the + * padding values in both directions. + */ +div.GraphLink { + width: 212px; + height: 60px; + padding-left: 38px; + padding-top: 10px; + background-image: url(/themes/nervecenter/images/misc/graph.png); + overflow: hidden; +} + +/** + * Defines the data display area. Modify to fit your background image. + */ +div.GraphLinkData { + width: 200px; + height: 50px; + overflow: hidden; +} + +/** + * Defines the look of one bar. Nothing to change here other than the color. + */ +span.GraphLinkBar { + background-color: #990000; + height: 100%; + float: left; + overflow: hidden; +} diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/alert_bgr.png b/src/usr/local/www/themes/pfsense_ng_fs/images/alert_bgr.png new file mode 100755 index 0000000..5a8ac81 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/alert_bgr.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/alerter.png b/src/usr/local/www/themes/pfsense_ng_fs/images/alerter.png new file mode 100755 index 0000000..e026bfe Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/alerter.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/background.jpg b/src/usr/local/www/themes/pfsense_ng_fs/images/background.jpg new file mode 100755 index 0000000..ebdff47 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/background.jpg differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/footer.png b/src/usr/local/www/themes/pfsense_ng_fs/images/footer.png new file mode 100755 index 0000000..b10002b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/footer.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/header.png b/src/usr/local/www/themes/pfsense_ng_fs/images/header.png new file mode 100755 index 0000000..6f8128c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/header.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/help.png b/src/usr/local/www/themes/pfsense_ng_fs/images/help.png new file mode 100755 index 0000000..1de05e3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/help.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/horizontal.png b/src/usr/local/www/themes/pfsense_ng_fs/images/horizontal.png new file mode 100755 index 0000000..f098bb3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/horizontal.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/hostname.png b/src/usr/local/www/themes/pfsense_ng_fs/images/hostname.png new file mode 100755 index 0000000..cd79f5c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/hostname.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/favicon.ico b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/favicon.ico differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_3g.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_3g.gif new file mode 100755 index 0000000..46ccb92 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_3g.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_3g_inactive.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_3g_inactive.gif new file mode 100755 index 0000000..cf983e4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_3g_inactive.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_advanced.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_advanced.gif new file mode 100755 index 0000000..3ede1ff Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_advanced.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_advanced_s.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_advanced_s.gif new file mode 100755 index 0000000..b233549 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_advanced_s.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alert.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alert.gif new file mode 100755 index 0000000..7646941 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alert.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_host.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_host.gif new file mode 100755 index 0000000..ad43e17 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_host.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_net.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_net.gif new file mode 100755 index 0000000..abd1b8b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_net.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_port.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_port.gif new file mode 100755 index 0000000..4acf2aa Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_port.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_url.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_url.gif new file mode 100755 index 0000000..660571e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_url.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_url_reload.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_url_reload.gif new file mode 100755 index 0000000..55c1c4a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_alias_url_reload.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block.gif new file mode 100755 index 0000000..670c968 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block_add.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block_add.gif new file mode 100755 index 0000000..eb726d6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block_add.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block_d.gif new file mode 100755 index 0000000..e6345fe Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_block_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cablenic.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cablenic.gif new file mode 100755 index 0000000..a071c66 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cablenic.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cal.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cal.gif new file mode 100755 index 0000000..a9c7c87 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cal.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cal_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cal_mo.gif new file mode 100755 index 0000000..1647e2f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_cal_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_carp.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_carp.gif new file mode 100755 index 0000000..9454a82 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_carp.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_carp_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_carp_d.gif new file mode 100755 index 0000000..2ba8db2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_carp_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_chain.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_chain.png new file mode 100755 index 0000000..12db07a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_chain.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_check.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_check.gif new file mode 100755 index 0000000..393674d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_check.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_green.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_green.gif new file mode 100755 index 0000000..e171ba8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_green.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_grey.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_grey.gif new file mode 100755 index 0000000..00c865a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_grey.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_red.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_red.gif new file mode 100755 index 0000000..7b412ee Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_clock_red.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_close.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_close.gif new file mode 100755 index 0000000..e0f86a7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_close.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_configure.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_configure.gif new file mode 100755 index 0000000..7182e0d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_configure.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down.gif new file mode 100755 index 0000000..b71a9c5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down_d.gif new file mode 100755 index 0000000..70a7473 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down_mo.gif new file mode 100755 index 0000000..584587a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_down_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_e.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_e.gif new file mode 100755 index 0000000..2950800 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_e.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_e_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_e_mo.gif new file mode 100755 index 0000000..9ba5738 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_e_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_error.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_error.gif new file mode 100755 index 0000000..e0fa659 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_error.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_exclam.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_exclam.gif new file mode 100755 index 0000000..36c2ec7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_exclam.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_de.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_de.png new file mode 100755 index 0000000..069cbbe Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_de.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_en.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_en.png new file mode 100755 index 0000000..bd7f9a5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_en.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_es.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_es.png new file mode 100755 index 0000000..434776c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_es.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_pt_BR.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_pt_BR.png new file mode 100755 index 0000000..f786349 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_flag_pt_BR.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_cert.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_cert.png new file mode 100755 index 0000000..48a34b6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_cert.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_file.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_file.png new file mode 100755 index 0000000..48a9ed2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_file.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_group.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_group.png new file mode 100755 index 0000000..7d929c0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_group.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_host.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_host.png new file mode 100755 index 0000000..867ef2c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_host.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_imp.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_imp.png new file mode 100755 index 0000000..f667cfc Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_imp.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_mail.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_mail.png new file mode 100755 index 0000000..d2d4548 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_mail.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_pwd.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_pwd.png new file mode 100755 index 0000000..06b53a1 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_pwd.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_search.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_search.png new file mode 100755 index 0000000..33de926 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_search.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_time.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_time.png new file mode 100755 index 0000000..aa8300a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_time.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_unknown.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_unknown.png new file mode 100755 index 0000000..1857d0e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_unknown.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_url.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_url.png new file mode 100755 index 0000000..cf56792 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_url.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_user.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_user.png new file mode 100755 index 0000000..e00eebe Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_frmfld_user.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_fw-update.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_fw-update.gif new file mode 100755 index 0000000..52c18ac Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_fw-update.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_help.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_help.gif new file mode 100644 index 0000000..84c84db Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_help.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ifalias.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ifalias.gif new file mode 100755 index 0000000..0c569a7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ifalias.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ifalias_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ifalias_d.gif new file mode 100755 index 0000000..faa84d4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ifalias_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_import_alias.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_import_alias.gif new file mode 100755 index 0000000..d11a5f0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_import_alias.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_in.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_in.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_in_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_in_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_info_pkg.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_info_pkg.gif new file mode 100755 index 0000000..cd3a532 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_info_pkg.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_interface_down.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_interface_down.gif new file mode 100755 index 0000000..0626655 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_interface_down.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_interface_up.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_interface_up.gif new file mode 100755 index 0000000..1449513 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_interface_up.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left.gif new file mode 100755 index 0000000..8effefe Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left_d.gif new file mode 100755 index 0000000..c778014 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left_mo.gif new file mode 100755 index 0000000..84c6fa2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_left_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log.gif new file mode 100755 index 0000000..4a1983a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_d.gif new file mode 100755 index 0000000..d31bd9b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_s.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_s.gif new file mode 100755 index 0000000..f9fda33 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_s.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_s_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_s_d.gif new file mode 100755 index 0000000..fb2c05f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_log_s_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_logs.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_logs.gif new file mode 100644 index 0000000..afe0104 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_logs.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_match.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_match.gif new file mode 100644 index 0000000..215571f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_match.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_match_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_match_d.gif new file mode 100644 index 0000000..6e4c364 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_match_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_minus.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_minus.gif new file mode 100755 index 0000000..417544f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_minus.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_open.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_open.gif new file mode 100755 index 0000000..ac3da14 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_open.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_other.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_other.gif new file mode 100755 index 0000000..e6f780f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_other.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_other_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_other_d.gif new file mode 100755 index 0000000..b08d970 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_other_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_out.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_out.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_out_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_out_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_parp.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_parp.gif new file mode 100755 index 0000000..96acaf3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_parp.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_parp_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_parp_d.gif new file mode 100755 index 0000000..7d7d00e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_parp_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass.gif new file mode 100755 index 0000000..fe1bb0d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass_add.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass_add.gif new file mode 100755 index 0000000..f7f4c20 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass_add.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass_d.gif new file mode 100755 index 0000000..6adc431 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_pass_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus.gif new file mode 100755 index 0000000..2a94eeb Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_bl.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_bl.gif new file mode 100755 index 0000000..8dcd7c0 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_bl.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_bl_p.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_bl_p.gif new file mode 100755 index 0000000..0c79849 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_bl_p.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_d.gif new file mode 100755 index 0000000..ebc7457 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_mo.gif new file mode 100755 index 0000000..1c7ca08 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_p.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_p.gif new file mode 100755 index 0000000..eb41284 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_plus_p.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall.gif new file mode 100755 index 0000000..d78b867 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_d.gif new file mode 100755 index 0000000..13658f7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_mo.gif new file mode 100755 index 0000000..90b576e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg.gif new file mode 100755 index 0000000..9aebb03 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg_d.gif new file mode 100755 index 0000000..4ab4992 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg_mo.gif new file mode 100755 index 0000000..7025d20 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_pkg_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml.gif new file mode 100755 index 0000000..4542432 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml_d.gif new file mode 100755 index 0000000..8d3a68d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml_mo.gif new file mode 100755 index 0000000..15e0aed Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reinstall_xml_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reject.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reject.gif new file mode 100755 index 0000000..5565cd6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reject.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reject_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reject_d.gif new file mode 100755 index 0000000..6c09fae Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_reject_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_right.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_right.gif new file mode 100755 index 0000000..fdf2d8b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_right.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_restart.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_restart.gif new file mode 100755 index 0000000..e49fbd7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_restart.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_restart_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_restart_d.gif new file mode 100755 index 0000000..a5d6d7c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_restart_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_running.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_running.gif new file mode 100644 index 0000000..543fd56 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_running.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_start.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_start.gif new file mode 100755 index 0000000..09bb58f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_start.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_start_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_start_d.gif new file mode 100755 index 0000000..f58f111 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_start_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_status.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_status.gif new file mode 100644 index 0000000..a93bcfb Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_status.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stop.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stop.gif new file mode 100755 index 0000000..922addc Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stop.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stop_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stop_d.gif new file mode 100755 index 0000000..b4cfdea Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stop_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stopped.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stopped.gif new file mode 100644 index 0000000..f93a25d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_service_stopped.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_restart_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_restart_mo.gif new file mode 100755 index 0000000..a092b40 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_restart_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_start_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_start_mo.gif new file mode 100755 index 0000000..ecdb58f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_start_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_stop_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_stop_mo.gif new file mode 100755 index 0000000..c00e208 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_services_stop_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-group-grey.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-group-grey.png new file mode 100755 index 0000000..d7b964d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-group-grey.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-group.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-group.png new file mode 100755 index 0000000..1c974f2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-group.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-user-grey.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-user-grey.png new file mode 100755 index 0000000..2f6047d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-user-grey.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-user.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-user.png new file mode 100755 index 0000000..ef82156 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system-user.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system_lock_screen.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system_lock_screen.png new file mode 100755 index 0000000..30f306d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system_lock_screen.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system_logout.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system_logout.png new file mode 100755 index 0000000..9bbb6c7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_system_logout.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_trapped.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_trapped.gif new file mode 100755 index 0000000..ffeb2cd Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_trapped.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_trapped_p.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_trapped_p.gif new file mode 100755 index 0000000..6d46aaf Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_trapped_p.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ts_rule.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ts_rule.gif new file mode 100755 index 0000000..e15ab6c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ts_rule.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ts_rule_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ts_rule_d.gif new file mode 100755 index 0000000..f776281 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_ts_rule_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up.gif new file mode 100755 index 0000000..883c5a2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up_d.gif new file mode 100755 index 0000000..0ddcce2 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up_mo.gif new file mode 100755 index 0000000..9f869a4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_up_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wlan.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wlan.gif new file mode 100755 index 0000000..1f0addc Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wlan.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wlan_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wlan_d.gif new file mode 100755 index 0000000..35bf580 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wlan_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wol_all.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wol_all.gif new file mode 100755 index 0000000..2d22182 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wol_all.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wzd_nsaved.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wzd_nsaved.png new file mode 100755 index 0000000..21cb27d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wzd_nsaved.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wzd_saved.png b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wzd_saved.png new file mode 100755 index 0000000..ab82946 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_wzd_saved.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x.gif new file mode 100755 index 0000000..24e4d49 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_d.gif new file mode 100755 index 0000000..d2bfbc8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_mo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_mo.gif new file mode 100755 index 0000000..da7b57c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_mo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_p.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_p.gif new file mode 100755 index 0000000..8828fa6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/icon_x_p.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/in.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/in.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/in_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/in_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/out.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/out.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/icons/out_d.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/icons/out_d.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/log.png b/src/usr/local/www/themes/pfsense_ng_fs/images/log.png new file mode 100755 index 0000000..762ba80 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/log.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/logo.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/logo.gif new file mode 100755 index 0000000..e5da95c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/logo.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/logobig.jpg b/src/usr/local/www/themes/pfsense_ng_fs/images/logobig.jpg new file mode 100755 index 0000000..2ef196d Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/logobig.jpg differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/mainmenu-down.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/mainmenu-down.gif new file mode 100755 index 0000000..e59432a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/mainmenu-down.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/mainmenu-right.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/mainmenu-right.gif new file mode 100755 index 0000000..14298a1 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/mainmenu-right.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/mainmenuitem.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/mainmenuitem.gif new file mode 100755 index 0000000..6e97478 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/mainmenuitem.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/menu-dot.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/menu-dot.gif new file mode 100755 index 0000000..c76609b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/menu-dot.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/menu_footer.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/menu_footer.gif new file mode 100755 index 0000000..d06faa4 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/menu_footer.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/menu_right.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/menu_right.gif new file mode 100755 index 0000000..881327c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/menu_right.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/menubgr.png b/src/usr/local/www/themes/pfsense_ng_fs/images/menubgr.png new file mode 100755 index 0000000..45e0ec7 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/menubgr.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/menubgr_footer.png b/src/usr/local/www/themes/pfsense_ng_fs/images/menubgr_footer.png new file mode 100755 index 0000000..fdff49f Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/menubgr_footer.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/menubgr_highlight.png b/src/usr/local/www/themes/pfsense_ng_fs/images/menubgr_highlight.png new file mode 100755 index 0000000..05f4832 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/menubgr_highlight.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_blue.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_blue.gif new file mode 100755 index 0000000..741186a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_blue.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_gray.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_gray.gif new file mode 100755 index 0000000..e86e245 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_gray.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_left.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_left.gif new file mode 100755 index 0000000..af751fa Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_left.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_right.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_right.gif new file mode 100755 index 0000000..ff12d9e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bar_right.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bullet_toggle_minus.png b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bullet_toggle_minus.png new file mode 100755 index 0000000..37db2fd Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bullet_toggle_minus.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bullet_toggle_plus.png b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bullet_toggle_plus.png new file mode 100755 index 0000000..fba7af9 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/bullet_toggle_plus.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/button.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/button.gif new file mode 100755 index 0000000..e85dbb3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/button.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/graph.png b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/graph.png new file mode 100755 index 0000000..507ec75 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/graph.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_128.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_128.gif new file mode 100755 index 0000000..ea5ae34 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_128.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_152.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_152.gif new file mode 100755 index 0000000..6c7fc03 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_152.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_256.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_256.gif new file mode 100755 index 0000000..3e1c377 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_256.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_64.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_64.gif new file mode 100755 index 0000000..87892bd Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/key_64.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/left_background.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/left_background.gif new file mode 100755 index 0000000..529d827 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/left_background.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader.gif new file mode 100755 index 0000000..5d10ac3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_all.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_all.gif new file mode 100755 index 0000000..cb6bc0c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_all.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_filter.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_filter.gif new file mode 100755 index 0000000..b838b17 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_filter.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_tab.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_tab.gif new file mode 100755 index 0000000..05bb04c Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/loader_tab.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/logon.png b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/logon.png new file mode 100755 index 0000000..98aa37a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/logon.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/progress_bar.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/progress_bar.gif new file mode 100755 index 0000000..3b4aa52 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/progress_bar.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/rrd_error.png b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/rrd_error.png new file mode 100755 index 0000000..a79ecf3 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/rrd_error.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_alerter.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_alerter.gif new file mode 100755 index 0000000..7ff1e95 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_alerter.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_carpmaster.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_carpmaster.gif new file mode 100755 index 0000000..2c32908 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_carpmaster.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_left.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_left.gif new file mode 100755 index 0000000..b5a2930 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_left.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_page_loading.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_page_loading.gif new file mode 100755 index 0000000..067ef18 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_page_loading.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_reload_all.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_reload_all.gif new file mode 100755 index 0000000..72de6bd Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_reload_all.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_reload_filter.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_reload_filter.gif new file mode 100755 index 0000000..d72761a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_reload_filter.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_right.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_right.gif new file mode 100755 index 0000000..bf66fdb Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/status_right.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_c.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_c.gif new file mode 100755 index 0000000..317b758 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_c.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_c_black.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_c_black.gif new file mode 100755 index 0000000..309846e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_c_black.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_o.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_o.gif new file mode 100755 index 0000000..eb95c32 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_o.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_o_black.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_o_black.gif new file mode 100755 index 0000000..f818f3b Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/tri_o_black.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/misc/widget_loader.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/widget_loader.gif new file mode 100755 index 0000000..ca35e2a Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/misc/widget_loader.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/new_tab_menu.png b/src/usr/local/www/themes/pfsense_ng_fs/images/new_tab_menu.png new file mode 100755 index 0000000..4bdfcef Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/new_tab_menu.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/status.png b/src/usr/local/www/themes/pfsense_ng_fs/images/status.png new file mode 100755 index 0000000..a3e368e Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/status.png differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/transparent.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/transparent.gif new file mode 100755 index 0000000..89c5530 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/transparent.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/images/transparent_pixel.gif b/src/usr/local/www/themes/pfsense_ng_fs/images/transparent_pixel.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/images/transparent_pixel.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/blank.gif b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/blank.gif new file mode 100755 index 0000000..a4fe2e6 Binary files /dev/null and b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/blank.gif differ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-box-model.js b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-box-model.js new file mode 100644 index 0000000..45543f6 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-box-model.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-box-model",function(){var NUMERIC="\x5cs*:\x5cs*\x5cd[\x5cw%]*",UNIT=/^\d\w*$/,PERCENT=/^\d+%$/,PIXEL=/^\d+(px)?$/;var MATCH=(appVersion<6)?/\b(min|max)-(width|height)\s*:\s*\d/gi:/\b(min|max)-width\s*:\s*\d/gi;var AUTO=(appVersion<5.5)?/^auto|0cm$/:/^auto$/;var ie7_tmp=tmpElement();push(IE7.recalcs,function removeTempElement(){if(ie7_tmp.parentElement)ie7_tmp.parentElement.removeChild(ie7_tmp)});CSSFixes.addFix(MATCH,function(match){return match.slice(0,3)+match.charAt(4).toUpperCase()+match.slice(5)});var viewport=(quirksMode)?document.body:documentElement;function isFixed(element){return element.style.position=="fixed"||element.currentStyle.position=="fixed"};function layoutParent(element){var layoutParent=element.offsetParent;while(layoutParent&&!hasLayout(layoutParent))layoutParent=layoutParent.offsetParent;if(!layoutParent||isFixed(element))layoutParent=viewport;return layoutParent};function fixWidth(HEIGHT){fixWidth=function(element,value){if(!element.runtimeStyle.fixedWidth&&(!isHTML||element.tagName!="HR")){if(!value)value=element.currentStyle.width;element.runtimeStyle.fixedWidth=(UNIT.test(value))?Math.max(0,getFixedWidth(element,value)):value;element.runtimeStyle.width=element.runtimeStyle.fixedWidth;boxSizing(element)}};if(quirksMode)CSSFixes.addRecalc("width\x5cs*:\x5cs*\x5cd\x5cw*[^%]",fixWidth);var getFixedWidth=(quirksMode)?function(element,value){return getPixelWidth(element,value)+getBorderWidth(element)+getPaddingWidth(element)}:function(element,value){return getPixelWidth(element,value)};function getBorderWidth(element){return element.offsetWidth-element.clientWidth};function getPaddingWidth(element){return getPixelWidth(element,element.currentStyle.paddingLeft)+getPixelWidth(element,element.currentStyle.paddingRight)};function getMarginWidth(element){return((element.currentStyle.marginLeft=="auto")?0:getPixelLeft(element,element.currentStyle.marginLeft))+((element.currentStyle.marginRight=="auto")?0:getPixelLeft(element,element.currentStyle.marginRight))};function minWidth(element){minWidth[minWidth.count++]=element;if(element.currentStyle.minHeight=="auto")element.runtimeStyle.minHeight=0;fixWidth(element);boxSizing(element);resizeWidth(element)};minWidth.count=0;CSSFixes.addRecalc("min-width"+NUMERIC,minWidth);eval(String(minWidth).replace(/min/g,"max"));maxWidth.count=0;CSSFixes.addRecalc("max-width"+NUMERIC,maxWidth);function resizeWidth(element){var rect=element.getBoundingClientRect();var width=rect.right-rect.left;if(element.currentStyle.maxWidth&&width>=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)}); diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-core.js b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-core.js new file mode 100644 index 0000000..b11e2b1 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-core.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-css-strict.js b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-css-strict.js new file mode 100644 index 0000000..4406d7a --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-css-strict.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-strict",function(){if(!modules["ie7-css2"])return;var NONE=[],ID=/#/g,CLASS=/[:@\.]/g,TAG=/^\w|[\s>+~]\w/g;IE7.parser.parse=function(cssText){var DYNAMIC=new RegExp("(.*):("+dynamicPseudoClasses+")(.*)");function addRule(selector,cssText){var match=selector.match(DYNAMIC);if(match)new DynamicRule(selector,match[1],match[2],match[3],cssText);else new Rule(selector,cssText)};cssText=cssText.replace(IE7.PseudoElement.ALL,IE7.PseudoElement.ID);var RULE=/([^\{]+)\{(\d+)\}/g,match;while(match=RULE.exec(cssText)){addRule(match[1],match[2]);if(appVersion<5.5)cssText=cssText.slice(match.lastIndex)}IE7.classes.sort(Rule.compare);return IE7.classes.join("\n")};function Rule(selector,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.Class;this.inherit(selector)};Rule.prototype=new IE7.Class.ancestor;Rule.prototype.toString=function(){return "."+this.name+"{"+this.cssText+"}"};Rule.score=function(selector){return(selector.match(ID)||NONE).length*10000+(selector.match(CLASS)||NONE).length*100+(selector.match(TAG)||NONE).length};Rule.compare=function(rule1,rule2){return rule1.specificity-rule2.specificity};function DynamicRule(selector,attach,dynamicPseudoClass,target,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.DynamicStyle;this.inherit(selector,attach,dynamicPseudoClass,target)};DynamicRule.prototype=new IE7.DynamicStyle.ancestor;DynamicRule.prototype.toString=Rule.prototype.toString}); diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-css2.js b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-css2.js new file mode 100644 index 0000000..7121c8e --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-css2.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i"){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!ù.´)Ó £(){ÿ{ù.´=ª;¢ ¢Æ=ª.¢´=Ó ¤×;£ ¢©(){if(«.¢Ù)«.¢Ù.Í.¤Ö=¤þ};ª.Õ=£(){¤ ¤ÿ};¢ â=(¤Ù.±(¢î.£Ë))?£(£Ì){ù.â(´+¥¡+£Ì)}:¢Æ;¢ Å=¤Ñ.Å.¬(¤Ú)[1];if(¤Û.±(¢î.£Ë)||Å<5||!¤Ü.±(«.Ù.ü))¤ ¢©();¢ è=¢£(«.¤Í!=¥¢);¢ ë=(¤Ë «.£Ê==¥£)?!¤Ýi.±(¢î.¢Ç):¢£(«.£Ê!=¥¤);¢ ¢í=¥¥;¢ ¢ë=¢í;if(!ë)¢ë+=¥¦;¢ ¢¹;¢ Ù=«.Ù;¢ ó={};ª.¢´=£(£È,ô,£É){if(!ó)¤;if(¢«)¢¬(¥§+¢Î(ô));if(£É){ô();ô=¢Æ}ó[£È]=ô};¢ £Ç=¤Þ;£ ¢È(²,¹){if(£Ç.±(²))²=(¹||¥¨)+²;¤ ²};£ ¢Ä(²,¹){²=¢È(²,¹);¤ ².»(0,².£Ã(¥©)+1)};¢ ¹=¢Ä(«.£Æ[«.£Æ.­-1].¤Å);¢ ¢Ê=Ó ¤Ä(¥ª);£ ã(²,¹){ÿ{²=¢È(²,¹);¢Ê.¤Á(¥«,²,Þ);¢Ê.¤¿();¤ ¢Ê.¤¾}õ(¢à){â(¥¬+²);¤ ¥¨}};¢ ·=£(¢É,¢À){¤ ¢É.·(¢À)};¢ ¢½=£(¢É){¤ ¢É.¢½()};if(Å<5.5)¢¬(ã(¥­,¹));if(«.¢Í==¥®||!ë)«.¤¹();Ö «.¤¸(¥¯);ª.¶=«.É[«.É.­-1];ª.¶.§=¢í;ª.¶.Æ=×;¢ §={};£ £¿(¶,¹){¢ ¢§=¢È(¶.²,¹);if(§[¢§])¤ ¥¨;§[¢§]=(¶.ý)?¥¨:£Å(¢Ã(¶,¹),¢Ä(¶.²,¹));¤ §[¢§]};¢ ¢Ã=£(¶){¤ ¶.§};¢ £Ä=¤ßgi;£ £Å(§,¢Ç){¤ §.³(£Ä,¥°+¢Ç.»(0,¢Ç.£Ã(¥©)+1)+¥±)};ª.Ë=[];ª.£¾=¢Æ;¢ ä=Þ;£ _ã(){ÿ{ä=×;¢ £Á=¤ài;¢ É=«.É;¢ ¢ì=[];¢ ¢Å=«.£µ(¥²);¯(¢ i=¢Å.­-1;i>=0;i--){·(¢ì,¤á.±(¢Å[i].£Â)?¥¨:¢Å[i].£Â)}£ ¢Ã(¶,¹){¢ §=¥¨;if(£Á.±(¶.¤µ)){¯(¢ i=0;i<¶.£À.­;i++){§+=¢¡.¤´(¶.£À[i],¢Ä(¶.²,¹))}§+=((¶.²)?£¿(¶,¹):¢½(¢ì))}¤ §};´.§=¥¨;¯(i=0;i<É.­;i++)´.§+=¢Ã(É[i],¥¨);´.§=£´(´.§);¯(i in ó)ó[i]();£¦ ó;if(¢¹)¢¹.¢·();Ñ.¢·();´.£¾();´.¶.§=¢ë+£³(´.§);¯(i=0;i<É.­;i++){if(!É[i].ý&&!É[i].Æ)É[i].§=¥¨}´.¢Â();â(¥³)}õ(¢¨){â(¥´+¢¨.¢ï)}¢Ë{¢©()}};ª.¢Â=£(){Ñ.¢Â();¯(¢ i=0;i<ª.Ë.­;i++)ª.Ë[i]()};¢ Ñ=Ó £(){¢ Ç=[];ª.û=£(){·(Ç,¢¡)};¢ Ë=[];ª.Ú=£(á,¢Þ){¢ £½=Ó ¢æ(¥µ+á,¥¶);¢ §=´.§;á=[];Ê(¬=£½.¤²(§)){·(á,¬[1]);if(Å<5.5)§=§.»(¬.¤±)}if(á.­){á=á.Õ();·(Ë,¢¡)}};ª.¢·=£(){¯(¢ i=0;i<Ç.­;i++){´.§=´.§.³(Ç[i][0],Ç[i][1])}ª.Ú(¥·,é);ª.Ú(¥¸,£(¡){if(¡.¢².©.Ü==¥¹)é(¡.¢²)})};ª.¢Â=£(){¯(¢ i=0;i<Ë.­;i++){¢ î=¢¶(Ë[i][0]);¯(¢ j=0;j<î.­;j++)Ë[i][1](î[j])}};ª.û(¤âgi,¥º);if(Å<6)ª.û(¤ãgi,¥»);if(è){¢ à=¥¼.¢ç(¥½);¯(¢ i=0;i<à.­;i++)à[à[i]]=à[i-1]||¥¾;£ ³($,$1,$2,$3){¤ $1+à[$3]};ª.û(Ó ¢æ(¥¿+à.¢å(¥À)+¥Á,¥¶),³)}};¢ £¹=¤ä;¢ £¸=¤åg;¢ £·=¤æ;¢ £¼=¤çg;¢ £»=¥Â;¢ þ={};£ ¢¶(µ,¦){¢ ¢è=!¦;¢ ¢é=(¦)?(¦.¤§==¤¦)?¦:[¦]:[«];¢ ñ=µ.³(£¼,£»).¢ç(¥½);¢ ¬=[];¯(¢ i=0;i<ñ.­;i++){µ=£º(ñ[i]);if(µ.»(0,3).¢å(¥¨)==¥Ã){µ=µ.»(2);¦=£¶(¢é,µ[1])}Ö ¦=¢é;¢ j=0,ß,®,Á,ò=¥¨;Ê(j<µ.­){ß=µ[j++];®=µ[j++];ò+=ß+®;Á=¥¨;if(µ[j]==¥Ä){Ê(µ[j++]!=¥Á)Á+=µ[j];Á=Á.»(0,-1);ò+=¥Ä+Á+¥Á}¦=(¢è&&þ[ò])?þ[ò]:¢ß(¦,ß,®,Á);if(¢è)þ[ò]=¦}¬=¬.¤¥(¦)}¤ ¬};£ £º(µ){if(£¹.±(µ))µ=¥Å+µ;¤ µ.¬(£¸)};£ ¢ß(¦,ß,®,Á){¢ À=¥¨;if(£·.±(®)){®=®.¢ç(¥À);À=®[0];®=®[1]}¢ ¸=[];if(ñ[ß])ñ[ß](¸,¦,®,À||Á);¤ ¸};£ £¶(¦,id){¢ ¸=[],i,j;¯(i=0;i<¦.­;i++){¢ ¬=¦[i].ì.¢À(id);if(¬){if(¬.­==¤¤)·(¸,¬);Ö ¯(j=0;j<¬.­;j++)·(¸,¬[j])}}¤ ¸};¢ ñ={¥Å:£(¸,¦,®,À){¯(¢ i=0;i<¦.­;i++){¢ ¢¦=(®==¥Æ&&¦[i].ì)?¦[i].ì:¦[i].£µ(®);¯(¢ j=0;j<¢¦.­;j++){if(ï(¢¦[j])&&(!À||¢¦[j].À==À))·(¸,¢¦[j])}}},¥Ç:£(¸,¦,®){¯(¢ i=0;i<¦.­;i++)if(¦[i].id==®)·(¸,¦[i])},¥È:£(¸,¦,®){®=Ó ¢æ(¥É+®+¥Ê);¯(¢ i=0;i<¦.­;i++)if(®.±(¦[i].¤£))·(¸,¦[i])},¥Ë:£(¸,¦,®,Á){®=¢ä[®];if(®)¯(¢ i=0;i<¦.­;i++)if(®(¦[i],Á))·(¸,¦[i])}};¢ ¤¢=¥¨;¢ ¢ä={Õ:£(){¢ Õ=[];¯(¢ ð in ª){if(ð!=¥Ì&&ð!=¥Í){if(ª[ð].­>1)ð+=¥Î;·(Õ,ð)}}¤ Õ.¢å(¥À)},¥Ì:£(¡){¤ ¢£(¡.©[¥Ï]==¥Ì)},¥Í:£(¡){¤ ¢£(¡.©[¥Ï]==¥Í)}};¢ ¤¡={Õ:¢ä.Õ};£ £ÿ(¡,º,À){if(À&&¡.À!=À)¤ Þ;¤(º==¥Æ)?ï(¡):(ë)?(¡.º==º.¢ý()):(¡.º==º)};¢ ¢¾=[];£ £þ(¢¿){¤ ¢».±(¢¿)?¢¾[¢¿.»(1,-1)]:¢¿};¢ £´=£(§){¤ §.³(¤èg,£(¬){¤(¬.¢þ(0)==¥©)?¥¨:¥Ð+(·(¢¾,¬.»(1,-1))-1)+¥Ð}).³(¤ég,¥¨).³(¤êg,¥À).³(¤ëg,¥°)};£ £³(§){¤ §.³(¤æg,¥Ñ).³(¤ìg,£(¬,£²){¤ ¢¾[£²]})};¢ ¢¼=[];£ ö(¡,Ý,Ô){¡.£±(Ý,Ô);·(¢¼,¢¡)};£ £°(¡,Ý,Ô){ÿ{¡.£û(Ý,Ô)}õ(¢à){}};ù.£±(¥Ò,£(){Ê(¢¼.­){¢ Ô=¢½(¢¼);£°(Ô[0],Ô[1],Ô[2])}});¢ ¢³=(Å<6)?£(¡){¤ ¡.Ä}:£(¡){¤ ¡.©.¢³};£ é(¡){if(!¢³(¡)){¡.£ù=Þ;£¯(£«(¡))}};£ £¯(¡){Ê(¡){¡.°.£®=¡.©.£®;¡=¢â(¡)}};¢ ¢»=¤í;£ £ø(¥){¤(¢».±(¥))?¥:¥Ð+¥+¥Ð};£ £÷(¥){¤(¢».±(¥))?¥.»(1,-1):¥};£ £¡(º){¢ ¡=«.£ª(º||¥Ó);¡.Í.§=¥Ô;¤ ¡};£ ï(¢¢){¤ ¢£(¢¢&&¢¢.£ñ==1&&¢¢.º!=¥Õ&&!¢¢.£ð)};£ £ï(¡){Ê(¡&&(¡=¡.£î)&&!ï(¡))£¬;¤ ¡};£ ¢â(¡){Ê(¡&&(¡=¡.Ì)&&!ï(¡))£¬;¤ ¡};£ £«(¡){¡=¡.£í;¤(ï(¡))?¡:¢â(¡)};¢ ¢«=Þ;´.¢´(¥Ö,£(){if(ë)¢¹=Ó £(){¢ Ç=[];£ ¢Þ(¡){¢ ¢¸=«.£ª(¥×+¡.¢µ.»(1));if(¡.¢µ.»(-2)!=¥Ø){¢ £©=¥Ù+¡.º+¥Ú,Ì;Ê((Ì=¡.Ì)&&Ì.¢µ!=£©){¡.¢á.¢Ú(Ì);¢¸.¢Ï(Ì)}if(Ì)¡.¢á.¢Ú(Ì)}¡.¢á.£ë(¢¸,¡);¤ ¢¸};ª.í=£(){·(Ç,¢¡)};ª.¢·=£(){ÿ{if(Å>5)«.£ê.í(¥Û,¥Ü)}õ(¢à){}¢Ë{¯(¢ i=0;i<Ç.­;i++){¢ î=¢¶(Ç[i][0]);¯(¢ j=0;j<î.­;j++)Ç[i][1](î[j])}}};ª.í(¥Ý,£(¡){if(!¡.£§){¢ Ò=¢¶(¥Þ,¡)[0];if(Ò){if(!Ò.id)Ò.id=Ò.ü;¡.£§=Ò.id}}});ª.í(¥ß,£(¡){¢Þ(¡);£¦ þ[¥à]});ª.í(¥á,£(¡){if(¡.º==¥â){¢ ¬=¡.¢µ.¬(¤îi);¡.°.¥=(¬)?¬[1]:¥¨}if(¡.Ý==¥ã){ö(¡,¥ä,£(){¡.°.¢Ý=×;¢ª(¥å+¡.ü+¥æ,1)})}});ª.í(¥ç,£(¡){¢ ££=¤ï;ö(¡,¥è,£(){¯(¢ i=0;i<¡.­;i++){if(££.±(¡[i].Ý)&&!¡[i].ý&&!¡[i].°.¢Ý){¡[i].ý=×;¢ª(¥å+¡[i].ü+¥é,1)}Ö if(¡[i].º==¥â&&¡[i].Ý==¥ã){¢ª(¥å+¡[i].ü+¥ê+¡[i].¥+¥Ð,1);¡[i].¥=¡[i].°.¥}}})})}},×);´.¢´(¥ë,£(){¢ ¢¯=¥ì,¢û=¤ð,¢ñ=¤ñ,¢Ð=¤ò;¢ ¢ÿ=(Å<6)?¤ógi:¤ôgi;¢ ¢ö=(Å<5.5)?¤õ:¤ö;¢ Ã=£¡();·(´.Ë,£ ¢ò(){if(Ã.Î)Ã.Î.¢Ú(Ã)});Ñ.û(¢ÿ,£(¬){¤ ¬.»(0,3)+¬.¢þ(4).¢ý()+¬.»(5)});¢ ¢ü=(è)?«.¢Ù:Ù;£ ¢Ó(¡){¤ ¡.Í.Ü==¥í||¡.©.Ü==¥í};£ ¾(¡){¢ ¾=¡.¢²;Ê(¾&&!¢³(¾))¾=¾.¢²;if(!¾||¢Ó(¡))¾=¢ü;¤ ¾};£ å(¢ó){å=£(¡,¥){if(!¡.°.¿&&(!ë||¡.º!=¥î)){if(!¥)¥=¡.©.¨;¡.°.¿=(¢û.±(¥))?£Þ.ú(0,ê(¡,¥)):¥;¡.°.¨=¡.°.¿;é(¡)}};if(è)Ñ.Ú(¥ï,å);¢ ê=(è)?£(¡,¥){¤ ç(¡,¥)+¢Õ(¡)+¢Ô(¡)}:£(¡,¥){¤ ç(¡,¥)};£ ¢Õ(¡){¤ ¡.¢Ñ-¡.Ä};£ ¢Ô(¡){¤ ç(¡,¡.©.£Ý)+ç(¡,¡.©.£Ü)};£ ¢ô(¡){¤((¡.©.¢ù==¥ð)?0:÷(¡,¡.©.¢ù))+((¡.©.¢ø==¥ð)?0:÷(¡,¡.©.¢ø))};£ ¼(¡){¼[¼.Ï++]=¡;if(¡.©.¢÷==¥ð)¡.°.¢÷=0;å(¡);é(¡);¢®(¡)};¼.Ï=0;Ñ.Ú(¥ñ+¢¯,¼);¢¬(¢Î(¼).³(¤÷g,¥ò));Ð.Ï=0;Ñ.Ú(¥ó+¢¯,Ð);£ ¢®(¡){¢ ¢°=¡.¢õ();¢ ¨=¢°.æ-¢°.Â;if(¡.©.Ð&&¨>=ê(¡,¡.©.Ð))¡.°.¨=ê(¡,¡.©.Ð);Ö if(¡.©.¼&&¨<=ê(¡,¡.©.¼))¡.°.¨=ê(¡,¡.©.¼);Ö ¡.°.¨=¡.°.¿};£ Ø(¡){if((¡.©.Ü==¥ô||¡.©.Ü==¥í)&&¡.©.Â!=¥ð&&¡.©.æ!=¥ð&&¢ö.±(¡.©.¨)){Ø[Ø.Ï++]=¡;é(¡);¢Ò(¡)}};Ø.Ï=0;Ñ.Ú(¥õ+¢¯,Ø);£ ¢Ò(¡){¡.°.¨=¥¨;¢ Î=¾(¡);¢ Â=(¡.°.£Û)?¡.¢õ().Â-2:÷(¡,¡.©.Â);¢ ¨=Î.Ä-÷(¡,¡.©.æ)-Â-¢ô(¡);if(!è)¨-=¢Õ(¡)+¢Ô(¡);if(¨<0)¨=0;if(¢Ó(¡)||¢ó||¡.¢Ñ<¨){¡.°.¿=¨;¡.°.¨=¨}};¢ Ä=Ù.Ä;ö(ù,¥ö,£(){¢ i,ø=(Ä<Ù.Ä);Ä=Ù.Ä;¯(i=0;i<¼.Ï;i++){¢ ¡=¼[i];¢ ¿=(¡.°.¨==¡.©.¼);if(ø&&¿)¡.°.¨=¥¨;if(ø==¿)¢®(¡)}¯(i=0;i<Ð.Ï;i++){¢ ¡=Ð[i];¢ ¿=(¡.°.¨==¡.©.Ð);if(!ø&&¿)¡.°.¨=¥¨;if(ø!=¿)¢®(¡)}¯(i=0;i<Ø.Ï;i++)¢Ò(Ø[i]);¢ò()});£ ç(¡,¥){if(¢Ð.±(¥))¤ ¢­(¥);if(¢ñ.±(¥))¤ ¢­(£Ù(¥)/100*¾(¡).Ä);¢ Î=(¡.£Ø)?¡:¡.Î;Î.¢Ï(Ã);Ã.Í.¨=¥;¤ Ã.¢Ñ};£ ÷(¡,¥){if(¢­(¥)>0)¤ ç(¡,¥);if(¢Ð.±(¥))¤ ¢­(¥);¡.Î.¢Ï(Ã);Ã.Í.Â=¥;¤ Ã.£×}};¢¬(¢Î(å).³(¤øg,¥÷).³(¤ùg,¥ø).³(¤úg,¥ù).³(¤ûg,¥ú).³(¤üg,¥û).³(¤ýg,¥ü));å();£Î(×)});¢«=×;if(«.¢Í==¥®)_ã();Ö ö(«,¥ý,£(){if(!ä&&«.¢Í==¥®)¢ª(_ã,0)})}õ(¢¨){¢©();â(¥þ+¢¨.¢ï)}¢Ë{}}();',340,0,/./,String,95,'element`var`function`return`value`from`cssText`width`currentStyle`this`document`match`length`filter`for`runtimeStyle`test`href`replace`IE7`selector`styleSheet`push`filtered`path`tagName`slice`minWidth`x5cs`layoutParent`fixedWidth`scopeName`filterArgs`left`ie7_tmp`clientWidth`appVersion`ie7`fixes`link`styleSheets`while`recalcs`nextSibling`style`parentElement`count`maxWidth`CSSFixes`input`new`handler`toString`else`true`fixRight`documentElement`addRecalc`auto`position`type`false`token`SIZES`pattern`alert`load`complete`fixWidth`right`getPixelWidth`quirksMode`boxSizing`getFixedWidth`isHTML`all`add`elements`isElement`pseudoClass`selectors`cacheSelector`modules`script`catch`addEventHandler`getPixelLeft`wider`window`max`addFix`uniqueID`disabled`cssCache`try`arguments`node`Boolean`x5c`visited`subset`url`error`unHide`setTimeout`loaded`eval`parseInt`resizeWidth`NUMERIC`rect`min`offsetParent`hasLayout`addModule`outerHTML`cssQuery`apply`fixedElement`HTMLFixes`display`QUOTED`handlers`pop`strings`string`item`small`recalc`getCSSText`getPath`styles`DUMMY`pathname`makePath`array`httpRequest`finally`Error`readyState`String`appendChild`PIXEL`offsetWidth`resizeRight`isFixed`getPaddingWidth`getBorderWidth`fixed`absolute`x5cw`body`removeChild`box`submit`clicked`fix`select`ignore`parentNode`nextElement`x2f`pseudoClasses`join`RegExp`split`useCache`base`large`HEADER`inlineStyles`LINKS`location`description`height`PERCENT`removeTempElement`HEIGHT`getMarginWidth`getBoundingClientRect`AUTO`minHeight`marginRight`marginLeft`x5cd`UNIT`viewport`toUpperCase`charAt`MATCH`tmpElement`BUTTON`UNSUCCESSFUL`button`abbr`delete`htmlFor`HTML`endTag`createElement`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`decode`encode`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`parse`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`name`autoload`mimeType`search`message`onreadystatechange`fixHeight`bottom`Bottom`Right`top`Top`Left`Height`Width`offsetLeft`canHaveChildren`parseFloat`onresize`screenLeft`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`firstChild`previousSibling`previousElement`ie7_anon`nodeType`clip`none`border`padding`object`unquote`quote`contentEditable`onbeforeunload`detachEvent`import`namespace`getString`compareTagName`dynamicPseudoClasses`attributeTests`className`null`concat`Array`constructor`size`font`medium`list`inline`float`relative`content`sizing`lastIndex`exec`successfully`callee`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`Microsoft`ActiveXObject`src`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ms_`ie7_off`MSIE`navigator`ie7_debug`alpha`version`visible`visibility`Function`fromCharCode`¤Ò`¤Ð (\\d\\.\\d)`¤Ï`^¤Î`\\.¤É$`^[\\w\\.]+[^:]*$`(¢§\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¤·\\b|\\¤¶\\b|^$`Æ-È`(¤­\\s*:\\s*(Â|æ))`¢º\\s*:\\s*¤«-¢À`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢ã\\*[^\\*]*\\*+([^\\¢ã][^\\*]*\\*+)*\\¢ã)|(\x27[^\x27]*\x27)|("[^"]*")`@(£ý|£ü)[^;\\n]+[;\\n]|`\\¢¤:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ¥="([^"]*)"`^(¢Ü|£á|£¤)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(¢±|ú)-(¨|¢ð)\\s*:\\s*\\d`\\b(¢±|ú)-¨\\s*:\\s*\\d`^Û|0cm$`^Û$`¢±`£Ö`¨`£Ô`Â`£Ñ`æ`¤Õ`´ ¤Ô 0.7.3 (¤Ó)`\\n\\n`¤Ì`¤Ê`¤È ¤Ç`:È{Æ-È:È}:¢¥{Æ-È:¢¥}`*{¤Æ:0}`ô=``/`¤Ã.¤Â`¤À`¢Ì [1]: ¤½ ¤¼ ã ¤» `Æ-¤º.js`ä`<Í>`$1`$2`Í`¢« ¤³`¢Ì [2]: `([^{}]*)\\¢¤{([^}]*[^\\¢Ø-])?`gi`¢Û-¤°\\½*:\\½*¤¯-¢Û`Ü\\½*:\\½*¢×`¤®`¢º:¤¬;$1`¢º:£­`xx-¢Á,x-¢Á,¢Á,¤ª,¢ê,x-¢ê,xx-¢ê`,`xx-¢Á`(¤©(-¤¨)?\\½*:\\½*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\½)`(\\½|$)`:`È`¢¥`\\¢¤([^)]*\\¢¤)`Æ-È`\x27`\\¢¤:`£ú`£ö`Ü:¢×;£õ:0;¢º:£­;£ô:£ó;£ò:¢°(0 0 0 0);Â:-9999`!`Æ-£ì`<£¨:`/>``£¨`£é://£è.w3.£ç/1999/£æ`£å`Ò,¢ß,£ä`£¥` £¥`£¤,Ò`£¢`¢Ü`£ã`«.ì.`.°.¢Ý=Þ`£â`£à`.ý=Þ`.¥=\x27`Æ-¢Û-£ß`\\½*:\\½*\\¢ú[\\¢Ø%]*`¢Ö`HR`¨\\½*:\\½*\\¢ú\\¢Ø*[^%]`Û`¢±-¨`ú`ú-¨`¢×`æ`£Ú`£Õ`¢ð`£Ó`£Ò`£Ð`£Ï`£Í`¢Ì [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-lite.js b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-lite.js new file mode 100644 index 0000000..88c764f --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-lite.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-png.js b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-png.js new file mode 100644 index 0000000..7b8f2cf --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-png.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-png",function(){if(appVersion<5.5)return;var FILTER="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=%1,sizingMethod='scale')";var NULL=(/\bSV1\b/.test(navigator.userAgent))?makePath("blank.gif",path):"javascript:'#define x_width 1\x5cn#define x_height 1\x5cnstatic char x_bits[]={0x00}'";var pngTest=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");function addFilter(element,src){element.runtimeStyle.filter=FILTER.replace(/%1/,src)};var MATCH=/background(-image)?\s*:([^(};]*)url\(([^\)]+)\)([^;}]*)/gi;CSSFixes.addFix(MATCH,function replace(match,image,prefix,url,suffix){url=getString(url);return pngTest.test(url)?"filter:"+FILTER.replace(/scale/,"crop").replace(/%1/,url)+";zoom:1;background"+(image||"")+":"+(prefix||"")+"none"+(suffix||""):match});if(HTMLFixes){function fixImg(element){if(pngTest.test(element.src)){var width=element.width,height=element.height;addFilter(element,element.src);element.src=NULL;element.width=width;element.height=height}else element.runtimeStyle.filter=""};HTMLFixes.add("img,input",function(element){if(element.tagName=="INPUT"&&element.type!="image")return;fixImg(element);addEventHandler(element,"onpropertychange",function(){if(event.propertyName=="src")fixImg(element)})})}}); diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-server.css b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-server.css new file mode 100644 index 0000000..47c7edd --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-server.css @@ -0,0 +1,43 @@ +body, td, dd {font: 10pt Verdana, Arial, Helvetica, sans-serif; color: black;} +body {margin: 8px; background: #333;} +h1 {margin: 0;} +h1 a:hover {background-color: transparent;} +h2 {font-size: 1.75em;} +h3 {font-size: 1.1em;} +a:active {color: #ff0000;} +a:link {color: #0a6cce;} +a:visited {color: #0a6cce;} +code, *.code {font-family: monospace; font-size: 100%; font-style: normal; white-space: nowrap; + padding: 0 1px; background: #f2f3f8; border: #d6d9e9 1px solid;} +code.box {display: block; padding: 10px; margin: 0.5em 0;} +ul {list-style-type: square;} +dd {margin: .2em 0 .5em 1em;} +dl.library dt {display: list-item; margin-left: 3em; list-style-type: square;} +dl.library dd {font-style: italic; margin-left: 3em;} +dt {font-weight: bold;} +dt.pack {color: brown;} +a img {border-style: none;} +hr {height: 1px; color: #000; border-style: solid;} +hr.short {height: 2px; width: 100px;} +div.document {background: #eef; padding: 20px 20px 5px 20px; width: 600px; border: 1px solid black;} +hr {border-bottom-width: 0px;} +div.header hr {color: #0a6cce; background-color: #0a6cce;} +div.content {min-height: 100px;} +div.footer hr {color: #898e79; background-color: #898e79; } +div.header, div.header a:link, div.header a:visited, h3 a:link, h3 a:visited {text-decoration: none;} +a:hover {color: #fff; background-color: #0a6cce; text-decoration: none;} +div.footer a:hover {background-color: transparent; text-decoration: none;} +div.header .menu {text-align: right;} +div.footer {font-size: x-small; margin-top: 8px;} +div.footnote {font-family: "times new roman", times; font-style: italic; margin-top: 10px;} +#license {margin-top: 5px; font-size: xx-small;} +table {border-top: 1px solid #000; border-left: 1px solid #000;} +th {background-color: #fff; text-align: left;} +th, td {border-right: 1px solid #000; border-bottom: 1px solid #000;} +th.small {width: 100px;} +th.medium {width: 200px;} +th.large {width: 270px;} +th.x-large {width: 408px;} +table.fixed {table-layout: fixed;} +span.comment {color: #666;} + diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-standard-p.js b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-standard-p.js new file mode 100644 index 0000000..73e99ac --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-standard-p.js @@ -0,0 +1,3 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +eval(function(A,r,s,e,n,a,l){s=function(e){return((e=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!¢¡.ª)¶ ¢(){¢Æ{¢¡.ª=¤;£ ¢Ø=¤.¢©=¶ ¤¬;¢ ¢ì(){if(².ß)².ß.Ì.¦²=¦ë};¤.È=¢(){¥ ¦ì};£ ¢¶=(¦´.µ(¢ô.¤ì))?¢(¤í){¢¡.¢¶(ª+¦í+¤í)}:¢Ø;£ á=¤¥.á.§(¦µ)[1];if(¦¶.µ(¢ô.¤ì)||á<5||!¦·.µ(².ù.¢«))¥ ¢ì();£ ¢§=¢ê(².¦«!=¦î);£ ¢±=(¦© ².¤ë==¦ï)?!¦¸i.µ(¢ô.£»):¢ê(².¤ë!=¦ð);£ £ê=¦ñ;£ £¦=£ê;if(!¢±)£¦+=¦ò;£ ¢½;£ ù=².ù;£ ¢Ñ={};¤.¢©=¢(¢Ç,¢Ò,¤ê){if(!¢Ñ)¥;if(¢í)Ü(¦ó+¢ó(¢Ò));if(¤ê){¢Ò();¢Ò=¢Ø}¢Ñ[¢Ç]=¢Ò};£ ¤é=¦¹;¢ ¢À(¾,Á){if(¤é.µ(¾))¾=(Á||¦ô)+¾;¥ ¾};¢ £¹(¾,Á){¾=¢À(¾,Á);¥ ¾.Æ(0,¾.¤å(¦õ)+1)};£ Á=£¹(².¤è[².¤è.¯-1].î);£ £½=¶ ¦£(¦ö);¢ ê(¾,Á){¢Æ{¾=¢À(¾,Á);£½.¦¡(¦÷,¾,ë);£½.¥þ();¥ £½.¥ý}¢·(£¥){¢¶(¦ø+¾);¥ ¦ô}};£ ¸=¢(£¼,£·){¥ £¼.¸(£·)};£ £´=¢(£¼){¥ £¼.£´()};if(á<5.5)Ü(ê(¦ù,Á));if(².£À==¦ú||!¢±)².¥ø();Û ².¥÷(¦û);¤.¿=².é[².é.¯-1];¤.¿.¨=£ê;¤.¿.Î=Ö;£ ¨={};¢ ¤á(¿,Á){£ Ô=¢À(¿.¾,Á);if(¨[Ô])¥ ¦ô;¨[Ô]=(¿.¢ç)?¦ô:¤ç(¢ã(¿,Á),£¹(¿.¾,Á));¥ ¨[Ô]};£ ¢ã=¢(¿){¥ ¿.¨};£ ¤æ=¦ºgi;¢ ¤ç(¨,£»){¥ ¨.¬(¤æ,¦ü+£».Æ(0,£».¤å(¦õ)+1)+¦ý)};¤.ô=[];¤.¢â=¢Ø;£ ¢¸=ë;¢ _ê(){¢Æ{¢¸=Ö;£ ¤ã=¦»i;£ é=².é;£ £é=[];£ £º=².¤Ø(¦þ);®(£ i=£º.¯-1;i>=0;i--){¸(£é,¦¼.µ(£º[i].¤ä)?¦ô:£º[i].¤ä)}¢ ¢ã(¿,Á){£ ¨=¦ô;if(¤ã.µ(¿.¥ô)){®(£ i=0;i<¿.¤â.¯;i++){¨+=í.£ó(¿.¤â[i],£¹(¿.¾,Á))}¨+=((¿.¾)?¤á(¿,Á):£´(£é))}¥ ¨};ª.¨=¦ô;®(i=0;i<é.¯;i++)ª.¨+=¢ã(é[i],¦ô);ª.¨=£©(ª.¨);®(i in ¢Ñ)¢Ñ[i]();£Ö ¢Ñ;if(¢½)¢½.£°();à.£°();ª.¢â();ª.¿.¨=£¦+£§(ª.¨);®(i=0;i<é.¯;i++){if(!é[i].¢ç&&!é[i].Î)é[i].¨=¦ô}ª.Ø();¢¶(¦ÿ)}¢·(¢ë){¢¶(§¡+¢ë.£ë)}£¾{¢ì()}};¤.Ø=¢(){à.Ø();®(£ i=0;i<¤.ô.¯;i++)¤.ô[i]()};£ à=¶ ¢(){£ è=[];¤.¢¿=¢(){¸(è,í)};£ ô=[];¤.ï=¢(¢µ,£ä){£ ¤à=¶ ç(§¢+¢µ,§£);£ ¨=ª.¨;¢µ=[];Ý(§=¤à.¢ß(¨)){¸(¢µ,§[1]);if(á<5.5)¨=¨.Æ(§.¥ò)}if(¢µ.¯){¢µ=¢µ.È();¸(ô,í)}};¤.£°=¢(){®(£ i=0;i<è.¯;i++){ª.¨=ª.¨.¬(è[i][0],è[i][1])}¤.ï(§¤,¢Ê);¤.ï(§¥,¢(¡){if(¡.¢¥.«.³==§¦)¢Ê(¡.¢¥)})};¤.Ø=¢(){®(£ i=0;i<ô.¯;i++){£ ¢Í=ü(ô[i][0]);®(£ j=0;j<¢Í.¯;j++)ô[i][1](¢Í[j])}};¤.¢¿(¦½gi,§§);if(á<6)¤.¢¿(¦¾gi,§¨);if(¢§){£ ¢´=§©.£¨(§ª);®(£ i=0;i<¢´.¯;i++)¢´[¢´[i]]=¢´[i-1]||§«;¢ ¬($,$1,$2,$3){¥ $1+¢´[$3]};¤.¢¿(¶ ç(§¬+¢´.¢Ü(§­)+§®,§£),¬)}};£ ¤Ü=¦¿;£ ¤Û=¦Àg;£ ¤Ú=¦Á;£ ¤ß=¦Âg;£ ¤Þ=§¯;£ ¢è={};¢ ü(´,­){£ £æ=!­;£ £ç=(­)?(­.¥ê==¥é)?­:[­]:[²];£ ò=´.¬(¤ß,¤Þ).£¨(§ª);£ §=[];®(£ i=0;i<ò.¯;i++){´=¤Ý(ò[i]);if(´.Æ(0,3).¢Ü(¦ô)==§°){´=´.Æ(2);­=¤Ù(£ç,´[1])}Û ­=£ç;£ j=0,¢³,±,É,¢Ð=¦ô;Ý(j<´.¯){¢³=´[j++];±=´[j++];¢Ð+=¢³+±;É=¦ô;if(´[j]==§±){Ý(´[j++]!=§®)É+=´[j];É=É.Æ(0,-1);¢Ð+=§±+É+§®}­=(£æ&&¢è[¢Ð])?¢è[¢Ð]:£å(­,¢³,±,É);if(£æ)¢è[¢Ð]=­}§=§.¥è(­)}¥ §};¢ ¤Ý(´){if(¤Ü.µ(´))´=§²+´;¥ ´.§(¤Û)};¢ £å(­,¢³,±,É){£ Ê=¦ô;if(¤Ú.µ(±)){±=±.£¨(§­);Ê=±[0];±=±[1]}£ ¼=[];if(ò[¢³])ò[¢³](¼,­,±,Ê||É);¥ ¼};¢ ¤Ù(­,id){£ ¼=[],i,j;®(i=0;i<­.¯;i++){£ §=­[i].¢Ì.£·(id);if(§){if(§.¯==¢Þ)¸(¼,§);Û ®(j=0;j<§.¯;j++)¸(¼,§[j])}}¥ ¼};£ ò={§²:¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=(±==§³&&­[i].¢Ì)?­[i].¢Ì:­[i].¤Ø(±);®(£ j=0;j<ó.¯;j++){if(¢Î(ó[j])&&(!Ê||ó[j].Ê==Ê))¸(¼,ó[j])}}},§´:¢(¼,­,±){®(£ i=0;i<­.¯;i++)if(­[i].id==±)¸(¼,­[i])},§µ:¢(¼,­,±){±=¶ ç(§¶+±+§·);®(£ i=0;i<­.¯;i++)if(±.µ(­[i].¢Ý))¸(¼,­[i])},§¸:¢(¼,­,±,É){±=¢®[±];if(±)®(£ i=0;i<­.¯;i++)if(±(­[i],É))¸(¼,­[i])}};£ ¢¬=¦ô;£ ¢®={È:¢(){£ È=[];®(£ ¢Ï in ¤){if(¢Ï!=§¹&&¢Ï!=§º){if(¤[¢Ï].¯>1)¢Ï+=§»;¸(È,¢Ï)}}¥ È.¢Ü(§­)},§¹:¢(¡){¥ ¢ê(¡.«[§¼]==§¹)},§º:¢(¡){¥ ¢ê(¡.«[§¼]==§º)}};£ ¢­={È:¢®.È};¢ £Ù(¡,Ï,Ê){if(Ê&&¡.Ê!=Ê)¥ ë;¥(Ï==§³)?¢Î(¡):(¢±)?(¡.Ï==Ï.¤Ç()):(¡.Ï==Ï)};£ £µ=[];¢ ¢ö(£¶){¥ £².µ(£¶)?£µ[£¶.Æ(1,-1)]:£¶};£ £©=¢(¨){¥ ¨.¬(¦Ãg,¢(§){¥(§.¤È(0)==¦õ)?¦ô:§½+(¸(£µ,§.Æ(1,-1))-1)+§½}).¬(¦Äg,¦ô).¬(¦Åg,§­).¬(¦Æg,¦ü)};¢ £§(¨){¥ ¨.¬(¦Ág,§¾).¬(¦Çg,¢(§,¤×){¥ £µ[¤×]})};£ £³=[];¢ Ó(¡,Õ,þ){¡.¤Ö(Õ,þ);¸(£³,í)};¢ ¤Õ(¡,Õ,þ){¢Æ{¡.¥å(Õ,þ)}¢·(£¥){}};¢¡.¤Ö(§¿,¢(){Ý(£³.¯){£ þ=£´(£³);¤Õ(þ[0],þ[1],þ[2])}});£ £®=(á<6)?¢(¡){¥ ¡.Í}:¢(¡){¥ ¡.«.£®};¢ ¢Ê(¡){if(!£®(¡)){¡.¥ã=ë;¤Ô(¤Ð(¡))}};¢ ¤Ô(¡){Ý(¡){¡.¦.¤Ó=¡.«.¤Ó;¡=¢þ(¡)}};£ £²=¦È;¢ ¤ª(©){¥(£².µ(©))?©:§½+©+§½};¢ ¥â(©){¥(£².µ(©))?©.Æ(1,-1):©};¢ £Ï(Ï){£ ¡=².£Û(Ï||§À);¡.Ì.¨=§Á;¥ ¡};¢ ¢Î(¢é){¥ ¢ê(¢é&&¢é.¥Þ==1&&¢é.Ï!=§Â&&!¢é.¢ÿ)};¢ ¤²(¡){Ý(¡&&(¡=¡.¥Ý)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¢þ(¡){Ý(¡&&(¡=¡.õ)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¤Ð(¡){¡=¡.¤¹;¥(¢Î(¡))?¡:¢þ(¡)};£ ¢í=ë;ª.¢©(§Ã,¢(){if(¢±)¢½=¶ ¢(){£ è=[];¢ £ä(¡){£ £±=².£Û(§Ä+¡.£¯.Æ(1));if(¡.£¯.Æ(-2)!=§Å){£ ¤Ï=§Æ+¡.Ï+§Ç,õ;Ý((õ=¡.õ)&&õ.£¯!=¤Ï){¡.¢ü.¢Õ(õ);£±.¢»(õ)}if(õ)¡.¢ü.¢Õ(õ)}¡.¢ü.¥Û(£±,¡);¥ £±};¤.æ=¢(){¸(è,í)};¤.£°=¢(){¢Æ{if(á>5)².¥Ú.æ(§È,§É)}¢·(£¥){}£¾{®(£ i=0;i<è.¯;i++){£ ¢Í=ü(è[i][0]);®(£ j=0;j<¢Í.¯;j++)è[i][1](¢Í[j])}}};¤.æ(§Ê,¢(¡){if(!¡.¤Í){£ ð=ü(§Ë,¡)[0];if(ð){if(!ð.id)ð.id=ð.¢«;¡.¤Í=ð.id}}});¤.æ(§Ì,¢(¡){£ä(¡);£Ö ¢è[§Í]});¤.æ(§Î,¢(¡){if(¡.Ï==§Ï){£ §=¡.£¯.§(¦Éi);¡.¦.©=(§)?§[1]:¦ô}if(¡.Õ==§Ð){Ó(¡,§Ñ,¢(){¡.¦.£ã=Ö;¢Ó(§Ò+¡.¢«+§Ó,1)})}});¤.æ(§Ô,¢(¡){£ ¤Ê=¦Ê;Ó(¡,§Õ,¢(){®(£ i=0;i<¡.¯;i++){if(¤Ê.µ(¡[i].Õ)&&!¡[i].¢ç&&!¡[i].¦.£ã){¡[i].¢ç=Ö;¢Ó(§Ò+¡[i].¢«+§Ö,1)}Û if(¡[i].Ï==§Ï&&¡[i].Õ==§Ð){¢Ó(§Ò+¡[i].¢«+§×+¡[i].©+§½,1);¡[i].©=¡[i].¦.©}}})})}},Ö);ª.¢©(§Ø,¢(){£ £«=§Ù,¤Æ=¦Ë,¢Ö=¦Ì,£Ý=¦Í;£ ¢¾=(á<6)?¦Îgi:¦Ïgi;£ ¤Ã=(á<5.5)?¦Ð:¦Ñ;£ ¹=£Ï();¸(ª.ô,¢ ¤À(){if(¹.½)¹.½.¢Õ(¹)});à.¢¿(¢¾,¢(§){¥ §.Æ(0,3)+§.¤È(4).¤Ç()+§.Æ(5)});£ Þ=(¢§)?².ß:ù;¢ ö(¡){¥ ¡.Ì.³==§Ú||¡.«.³==§Ú};¢ ã(¡){£ ã=¡.¢¥;Ý(ã&&!£®(ã))ã=ã.¢¥;if(!ã||ö(¡))ã=Þ;¥ ã};¢ ì(¤Á){ì=¢(¡,©){if(!¡.¦.ä&&(!¢±||¡.Ï!=§Û)){if(!©)©=¡.«.°;¡.¦.ä=(¤Æ.µ(©))?¥Î.¢æ(0,¢Ë(¡,©)):©;¡.¦.°=¡.¦.ä;¢Ê(¡)}};if(¢§)à.ï(§Ü,ì);£ ¢Ë=(¢§)?¢(¡,©){¥ ¢É(¡,©)+£à(¡)+£ß(¡)}:¢(¡,©){¥ ¢É(¡,©)};¢ £à(¡){¥ ¡.¢¼-¡.Í};¢ £ß(¡){¥ ¢É(¡,¡.«.¥Í)+¢É(¡,¡.«.¥Ì)};¢ ¤Â(¡){¥((¡.«.¢ï==§Ý)?0:¢ä(¡,¡.«.¢ï))+((¡.«.¤Å==§Ý)?0:¢ä(¡,¡.«.¤Å))};¢ Ú(¡){Ú[Ú.Ë++]=¡;if(¡.«.¤Ä==§Ý)¡.¦.¤Ä=0;ì(¡);¢Ê(¡);£ª(¡)};Ú.Ë=0;à.ï(§Þ+£«,Ú);Ü(¢ó(Ú).¬(¦Òg,§ß));ý.Ë=0;à.ï(§à+£«,ý);¢ £ª(¡){£ £¬=¡.£É();£ °=£¬.×-£¬.À;if(¡.«.ý&&°>=¢Ë(¡,¡.«.ý))¡.¦.°=¢Ë(¡,¡.«.ý);Û if(¡.«.Ú&&°<=¢Ë(¡,¡.«.Ú))¡.¦.°=¢Ë(¡,¡.«.Ú);Û ¡.¦.°=¡.¦.ä};¢ ¢²(¡){if((¡.«.³==§á||¡.«.³==§Ú)&&¡.«.À!=§Ý&&¡.«.×!=§Ý&&¤Ã.µ(¡.«.°)){¢²[¢².Ë++]=¡;¢Ê(¡);£Þ(¡)}};¢².Ë=0;à.ï(§â+£«,¢²);¢ £Þ(¡){¡.¦.°=¦ô;£ ½=ã(¡);£ À=(¡.¦.¢Ô)?¡.£É().À-2:¢ä(¡,¡.«.À);£ °=½.Í-¢ä(¡,¡.«.×)-À-¤Â(¡);if(!¢§)°-=£à(¡)+£ß(¡);if(°<0)°=0;if(ö(¡)||¤Á||¡.¢¼<°){¡.¦.ä=°;¡.¦.°=°}};£ Í=ù.Í;Ó(¢¡,§ã,¢(){£ i,¢å=(Í<ù.Í);Í=ù.Í;®(i=0;i<Ú.Ë;i++){£ ¡=Ú[i];£ ä=(¡.¦.°==¡.«.Ú);if(¢å&&ä)¡.¦.°=¦ô;if(¢å==ä)£ª(¡)}®(i=0;i<ý.Ë;i++){£ ¡=ý[i];£ ä=(¡.¦.°==¡.«.ý);if(!¢å&&ä)¡.¦.°=¦ô;if(¢å!=ä)£ª(¡)}®(i=0;i<¢².Ë;i++)£Þ(¢²[i]);¤À()});¢ ¢É(¡,©){if(£Ý.µ(©))¥ ø(©);if(¢Ö.µ(©))¥ ø(£Æ(©)/100*ã(¡).Í);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);¹.Ì.°=©;¥ ¹.¢¼};¢ ¢ä(¡,©){if(ø(©)>0)¥ ¢É(¡,©);if(£Ý.µ(©))¥ ø(©);¡.½.¢»(¹);¹.Ì.À=©;¥ ¹.¢¤}};Ü(¢ó(ì).¬(¦Óg,§ä).¬(¦Ôg,§å).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦×g,§è).¬(¦Øg,§é));ì();¥É(Ö)});ª.¢©(§ê,¢(){£ ¤§=¦Ùg,¤½=¦Úi;ª.¢á=[];ª.¤¿=¶ ¤¾;ª.·=·;ª.Ò=Ò;ª.Ã=Ã;ª.¢â=¢(){¥Ç(¤.¤¿)¤.¨=£§(¢â(£©(¤.¨)));®(£ i=0;i<ª.¢á.¯;i++)ª.¢á[i].¢ß();®(i=0;i<£¡.¯;i++)£¡[i].¤º()};¢ã=¢(¿,Á){¥ ê(¿.¾,Á)};£ ££=[];¢ ¤¾(){¤.¢â=¢(¨){·.û=¶ ç(§ë+¢®+§ì,§í);·.¤¨=¶ ç(§î+¢®+§­+¢­+§ï,§í);Ò.û=¶ ç(§ð+¢­+§ñ,§í);¥ ¨.¬(Ã.û,Ã.ID).¬(Ò.û,Ò.ID).¬(·.û,·.ID)};¤.£©=¢(¨){ñ.û=¶ ç(§ò+¢¬+§ó+¢¬+§ô,§í);¥ ¨.¬(ñ.û,ñ.ID).¬(¦Ûg,¢($){¥ §õ+(¸(££,$)-1)+§ö}).¬(¦Üg,§¸).¬(¦Ýg,¢(§,À,×){¥ À.£¨(§ª).¢Ü(×)+×})};¤.£§=¢(¨){¥ ¨.¬(¦Þg,¢($,$1){¥ ££[$1]})}};¢ _·(){¤.È=¢(){¥ §µ+¤.¢Ç};¤.æ=¢(¡){¡.¢Ý+=§²+¤.¢Ç};¤.¤©=¢(¡){¡.¢Ý=¡.¢Ý.¬(¤.¢¾,¦ô)};¤.¢ß=¢(){£ §=ü(¤.´);®(£ i=0;i<§.¯;i++)¤.æ(§[i])}};¢ ·(´,¨){¤.id=ª.¢á.¯;¤.¢Ç=·.¢ø+¤.id;¤.´=´;¤.¢¾=¶ ç(§÷+¤.¢Ç+§ø,§í);¸(ª.¢á,¤)};·.£Ú=_·;·.¢ª=¶ _·;·.¢ø=§ù;·.ID=¢(§){¥ £Õ(§)+¶ ·(§)};¢ _Ò(){¤.¢ß=¢(){£ §=ü(¤.¢°);®(£ i=0;i<§.¯;i++){£ º=(¤.º)?ü(¤.º,§[i]):[§[i]];if(º)¤.¢¯(§[i],º,¤)}}};_Ò.¢ª=¶ _·;¢ Ò(´,¢°,¢¯,º){¤.¢°=¢°;¤.¢¯=¢­[¢¯];¤.º=º;¤.£¢=·;¤.£¢(´)};Ò.£Ú=_Ò;Ò.¢ª=¶ _Ò;Ò.ID=¢(§,¢°,¢¯,º){if(¢±&&¢¯!=§ú&&¤½.µ(¢°)&&!¦ß.µ(º))¥ §;¥ £Õ(§)+¶ Ò(§,¢°,¢¯,º)};£¦+=§û;£ ¤·=¦àg;¢ ¤¶(§,£Ü){¥ Ü(§ü+§ý.Æ(£Ü.¯)+£Ü+§½)};£ £¡=[];¢ _Ã(){¤.Å=¢Þ;¤.È=¢(){¥ ¦ô};¤.¥Ã=0;¢ ¤¸(¢Ä,Å,¨){£ ÿ=¥Â(¢(){¢Æ{if(!¢Ä.ê)¥;¢Ä.ê(¢Ä,Å,¨);¤»(ÿ)}¢·(£¥){¤»(ÿ)}},10)};¤.¤º=¢(){if(¤.Å==¢Þ)¥;®(£ i=0;i<¤.§.¯;i++){£ º=¤.§[i];£ ¢Å=º.¦[¤.³];if(¢Å){£ ½=º.£Ì?º:º.½;£ £¤=¦á.µ(¤.Å);£ ¡=².£Û(£¤?Ã.¤³:§Â);¡.¢ÿ=Ö;¡.¦.¨=¢Å.¨;if(!£¤)¡.¥Á=¢Å.Å;if(¤.³==§þ){½.¥À(¡,½.¤¹)}Û{½.¢»(¡)}if(£¤)¤¸(¡,¢Å.Å,¢Å.¨);º.¦[¤.³]=¢Þ}}};¤.¢ß=¢(){¤.§=ü(¤.´);®(£ i=0;i<¤.§.¯;i++){£ ¦=¤.§[i].¦;if(!¦[¤.³])¦[¤.³]={¨:¦ô};¦[¤.³].¨+=§ÿ+¤.¨;if(¤.Å!=¢Þ)¦[¤.³].Å=¤.Å}}};_Ã.¢ª=¶ _·;¢ Ã(´,³,¨){¤.³=³;¤.¨=££[¨].Æ(1,-1);£ Å=¤.¨.§(Ã.¤´);if(Å)¤.Å=¢ö(Å[1]).¬(¤·,¤¶);¤.£¢=·;¤.£¢(´);¸(£¡,¤)};Ã.£Ú=_Ã;Ã.¢ª=¶ _Ã;Ã.ID=¢(§,´,³,¨){¥ ¶ Ã(´,³,¨)};Ã.û=¦âg;Ã.¤´=¦ã;Ã.¤³=¨¡+¢À(¨¢,Á)+¨£;ò[§Ç]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=­[i].¥º;®(£ j=0;j<ó.¯;j++)if(£Ù(ó[j],±,Ê))¸(¼,ó[j])}};ò[¨¤]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ¢ý=¢þ(­[i]);if(¢ý&&£Ù(¢ý,±,Ê))¸(¼,¢ý)}};ò[¨¥]=¢(¼,­,±){±=¢ú[±];®(£ i=0;i<­.¯;i++)if(±(­[i]))¸(¼,­[i])};¢®[¨¦]=¢(¡){¥!¤²(¡)};¢®[¨§]=¢(¡,É){É=¶ ç(¨¨+É,¨©);Ý(¡&&!¡.£×(¨§))¡=¡.¢ü;¥ ¡&&É.µ(¡.£×(¨§))};¢­.¢Ù=¢(¡){£ Â=í;Ó(¡,¨ª,¢(){ª.Ð.¢Ù.¢Û(Â)});Ó(¡,¨«,¢(){ª.Ð.¢Ù.¢Ú(Â)})};¢­.¢÷=¢(¡){£ Â=í;Ó(¡,¨¬,¢(){ª.Ð.¢÷.¢Û(Â)})};¢­.¢Á=¢(¡){£ Â=í;Ó(¡,¨­,¢(){ª.Ð.¢Á.¢Û(Â)});Ó(¡,¨®,¢(){ª.Ð.¢Á.¢Ú(Â)});if(¡==².¥²){ª.Ð.¢Á.¢Û(Â)}};Ó(²,¨¯,¢(){£ ú=ª.Ð.¢÷;£ Ù=ú.Ù,i;®(i in Ù)ú.¢Ú(Ù[i]);ú=ª.Ð.¢Ù;Ù=ú.Ù;®(i in Ù)if(!Ù[i][0].£õ(£ü.¥°))ú.¢Ú(Ù[i])});£ ¢ú=[];£ ¤«=¦äg;¢ ñ(Ä,¢Â,©){©=¢ö(©);¤.id=¢ú.¯;£ò(Ä.¥¯()){¢¦ ¨°:Ä=¨±;¤­;¢¦ ¨²:Ä=¨³;¤­;£ñ:Ä=¨´+Ä+¨µ}¢Â=¢¬[¢Â];¸(¢ú,¶ ¤¬(¨¶,¨·+¢Â(Ä,©)))};ñ.ID=¢(§,Ä,¢Â,©){¥ ¶ ñ(Ä,¢Â,©)};ñ.¢ª.È=¢(){¥ ñ.¢ø+¤.id};¢¬={È:¢(){£ È=[];®(£ i in ¤)if(i&&i!=¨¸)¸(È,i);¥ È.¢Ü(¦ô).¬(¦åg,¦ô)},¢ù:¢(©){¥ ©.¬(¤«,¨¹)},¦ô:¢(Ä){¥ Ä},¨º:¢(Ä,©){¥ Ä+¨»+¤ª(©)},¨¼:¢(Ä,©){¥ ¨½+¢¬.¢ù(©)+¨¾+Ä+§®},¨¿:¢(Ä,©){¥ ¨À+¢¬.¢ù(©)+¨Á+Ä+§®}};ñ.¢ø=¨¥;¢ _ú(){¤.¢Û=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.æ(º[i]);¤.Ù[·.id+¡.¢«]=Â};¤.¢Ú=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.¤©(º[i]);£Ö ¤.Ù[·.id+¡.¢«]}};ª.Ð=¢(Õ){¤.Õ=Õ;¤.Ù={};ª.Ð[Õ]=¤};ª.Ð.¢ª=¶ _ú;¶ ª.Ð(¨Â);¶ ª.Ð(¨Ã);¶ ª.Ð(§ú);¢ £Õ(´){¥ ´.¬(·.¤¨,¦ô).¬(¤§,§²)}},Ö);ª.¢©(¨Ä,¢(){if(á<5.5)¥;£ £Ô=¨Å;£ £ý=(¦æ.µ(¤¥.¥©))?¢À(¨Æ,Á):¨Ç;£ £Ó=¶ ç((¢¡.¤ý||¨È)+¨É,¨©);¢ £þ(¡,î){¡.¦.±=£Ô.¬(¦ç,î)};£ ¢¾=¦ègi;à.¢¿(¢¾,¢ ¬(§,¢õ,¤¡,Ô,£ÿ){Ô=¢ö(Ô);¥ £Ó.µ(Ô)?¨Ê+£Ô.¬(¦é,¨Ë).¬(¦ç,Ô)+¨Ì+(¢õ||¦ô)+§¸+(¤¡||¦ô)+¨Í+(£ÿ||¦ô):§});if(¢½){¢ £Ò(¡){if(£Ó.µ(¡.î)){£ °=¡.°,÷=¡.÷;£þ(¡,¡.î);¡.î=£ý;¡.°=°;¡.÷=÷}Û ¡.¦.±=¦ô};¢½.æ(¨Î,¢(¡){if(¡.Ï==¨Ï&&¡.Õ!=¨Ð)¥;£Ò(¡);Ó(¡,¨Ñ,¢(){if(£ü.£Ê==¨Ò)£Ò(¡)})})}});ª.¢©(¨Ó,¢(){£ ¢Ö=¦Ì;à.ï(¨Ô,¢¢);à.ï(¨Õ,¢£);£ ß=².ß;£ Þ$=(¢§)?¨Ö:¨×;£ Þ=Ü(Þ$);¢ ¢ñ(){if(ß.«.£Î!=§Ú){if(ß.«.£Í==¨Í){ß.¦.£Í=¨Ø+¢ô.¤÷+§®}ß.¦.£Î=§Ú}¢ñ=¢Ø};£ ¹=£Ï(¨Ù);¢ ¢º(£ú){¥ ¢ó(£ú).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦Óg,§ä).¬(¦êg,¨Ú)};¢ ¢£(¡){if(¡.«.£Î!=§Ú)¥;if(!¡.£õ(ß)){¢ñ();¢£[¢£.Ë++]=¡;£Ë(¡);¤ö(¡);£Â(¡)}};¢£.Ë=0;¢ £Â(¡){¹.î=¡.«.£Í.Æ(5,-2);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);£È(¡);¤õ(¡);½.¢Õ(¹)};¢ £Ë(¡){¡.Ì.¢×=¡.«.¢×;if(!ö(¡)){£ £ô=¨Û+Þ$+¨Ü;¡.¦.£ð(¨Ý,£ô)}};Ü(¢º(£Ë));¢ £È(¡){£ £Ê=ö(¡)?¨Ý:¨Þ;¡.¦[£Ê]=£Ç(¡,¡.Ì.¢×)-¡.£É().À-¡.¤ô};Ü(¢º(£È));¢ ö(¡){if(!¡)¥ ë;if(¡.Ì.³==§Ú||¡.«.³==§Ú)¥ Ö;¥ í.£ó(¡.½)};¢ £Ç(¡,³){£ò(³){¢¦ ¨ß:¢¦ §ç:¥ 0;¢¦ §â:¢¦ §é:¥ Þ.Í-¹.¢¼;¢¦ ¨à:¥(Þ.Í-¹.¢¼)/2;£ñ:if(¢Ö.µ(³)){¥ ø((Þ.Í-¹.¢¼)*£Æ(³)/100)}¹.Ì.À=³;¥ ¹.¢¤}};Ü(¢º(£Ç));¢ ¢¢(¡){if(¡.«.³!=§Ú)¥;¢ñ();¢¢[¢¢.Ë++]=¡;¡.Ì.³=§Ú;¡.¦.³=§á;£Á(¡)};¢¢.Ë=0;¢ £Á(¡,Ø){£Å(¡,Ø);¤ò(¡,Ø);if(!Ø||¡.¦.¤ñ){if(ø(¡.«.¢î)==0)¡.¦.¤ð++}};¢ £Å(¡,Ø){if(!Ø&&¢Ö.µ(¡.«.°))¡.¦.ì=¡.«.°;if(¡.¦.ì)¡.¦.°=ø(£Æ(¡.¦.ì)/100*Þ.Í);if(Ø){if(!¡.¦.£Ä)¥}Û{¡.¦.£Ä=¡.«.×!=§Ý&&¡.«.À==§Ý}¡.¦.À=¦ô;¡.¦.¢Ô=¢¹(¡);if(¡.«.¢ï!=§Ý){¡.½.¢»(¹);¹.Ì.À=¡.«.¢ï;¡.¦.¢Ô-=¹.¢¤;¡.½.¢Õ(¹)}if(ö(¡.¢¥))¡.¦.£ï=¡.¦.¢Ô;Û if(!Ø)¡.¦.£ð(¨á,¨â+Þ$+¨ã)};Ü(¢º(£Å).¬(¦Øg,§é).¬(¦Ôg,§å));¢ ¢¹(¡){£ ¢¹=¡.¢¤,£Ã=ë;£ Ç=ö(¡.¢¥)&&¡.¦.£Ä;Ý(¡=¡.¢¥){if(!Ç&&¡.«.³!=¨ä)£Ã=Ö;¢¹+=¡.¢¤*(£Ã?-1:1)}¥ ¢¹};Ü(¢º(¢¹));¢ £ì(){®(£ i=0;i<¢£.Ë;i++)£Â(¢£[i]);®(i=0;i<¢¢.Ë;i++)£Á(¢¢[i],Ö);ÿ=0};£ ÿ;Ó(¢¡,§ã,¢(){if(!ÿ)ÿ=¢Ó(£ì,10)})});¢í=Ö;if(².£À==¦ú)_ê();Û Ó(²,¨å,¢(){if(!¢¸&&².£À==¦ú)¢Ó(_ê,0)})}¢·(¢ë){¢ì();¢¶(¨æ+¢ë.£ë)}£¾{}}();',493,0,/./,String,95,'element`function`var`this`return`runtimeStyle`match`cssText`value`IE7`currentStyle`replace`from`for`length`width`filter`document`position`selector`test`new`Class`push`ie7_tmp`target`x5cs`filtered`parentElement`href`styleSheet`left`path`instance`PseudoElement`attribute`content`slice`fixed`toString`filterArgs`scopeName`count`style`clientWidth`ie7`tagName`Event`x5c`DynamicStyle`addEventHandler`url`type`true`right`recalc`instances`minWidth`else`eval`while`viewport`body`CSSFixes`appVersion`link`layoutParent`fixedWidth`auto`add`RegExp`fixes`styleSheets`load`false`fixWidth`arguments`src`addRecalc`input`AttributeSelector`selectors`subset`recalcs`nextSibling`isFixed`height`parseInt`documentElement`ie7Event`ALL`cssQuery`maxWidth`handler`timer`window`positionFixed`backgroundFixed`offsetLeft`offsetParent`case`quirksMode`x5cw`addModule`prototype`uniqueID`attributeTests`dynamicPseudoClasses`pseudoClasses`dynamicPseudoClass`attach`isHTML`fixRight`token`SIZES`pattern`alert`catch`complete`getScreenLeft`topFunction`appendChild`offsetWidth`HTMLFixes`MATCH`addFix`makePath`focus`compare`x5cd`object`pseudoElement`try`name`visited`getPixelWidth`boxSizing`getFixedWidth`all`elements`isElement`pseudoClass`cacheSelector`modules`script`setTimeout`screenLeft`removeChild`PERCENT`backgroundPositionX`DUMMY`hover`unregister`register`join`className`null`exec`display`classes`parse`getCSSText`getPixelLeft`wider`max`disabled`cssCache`node`Boolean`error`unHide`loaded`bottom`marginLeft`absolute`fixBackground`top`String`location`image`getString`active`PREFIX`escape`attributeSelectors`x2f`parentNode`adjacent`nextElement`ie7_anon`pseudoElements`inherit`encoded`isURL`ignore`HEADER`decode`split`encode`resizeWidth`NUMERIC`rect`min`hasLayout`outerHTML`apply`fixedElement`QUOTED`handlers`pop`strings`string`item`small`getPath`styles`pathname`array`httpRequest`finally`Error`readyState`foregroundPosition`backgroundPosition`nested`autoLeft`positionLeft`parseFloat`getOffsetLeft`setOffsetLeft`getBoundingClientRect`propertyName`backgroundLeft`canHaveChildren`backgroundImage`backgroundAttachment`tmpElement`none`background`fixImg`pngTest`FILTER`simpleSelector`delete`getAttribute`lang`compareTagName`ancestor`createElement`code`PIXEL`resizeRight`getPaddingWidth`getBorderWidth`box`submit`clicked`fix`select`useCache`base`large`inlineStyles`LINKS`description`resize`onresize`scrollLeft`pixelLeft`setExpression`default`switch`callee`expression`contains`Height`Width`Top`Left`leftFunction`img`event`NULL`addFilter`suffix`prefix`scale`png`define`navigator`Microsoft`CHILD`COMPLEX`remove`quote`ESCAPE`Function`break`ie7_`x5cb`class`ms_`previousElement`OBJECT`CONTENT`before`unicode`HEX`addTimer`firstChild`create`clearInterval`inline`ANCHOR`Parser`parser`removeTempElement`HEIGHT`getMarginWidth`AUTO`minHeight`marginRight`UNIT`toUpperCase`charAt`BUTTON`UNSUCCESSFUL`button`abbr`htmlFor`HTML`endTag`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`autoload`mimeType`search`message`onreadystatechange`static`screenTop`autoTop`positionTop`center`clientLeft`setOffsetTop`backgroundTop`protocol`onpropertychange`INPUT`zoom`crop`trans`IE7_PNG_SUFFIX`x00`x_bits`char`x5cnstatic`x_height`x5cn`x_width`javascript`gif`blank`userAgent`bSV1`sizingMethod`AlphaImageLoader`DXImageTransform`progid`toLowerCase`srcElement`onmouseup`activeElement`onblur`onfocus`onmousedown`onmouseout`onmouseover`child`first`children`scriptlet`text`htm`data`after`insertBefore`innerText`setInterval`specificity`x5cu`align`vertical`with`css2`fixHeight`Bottom`Right`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`previousSibling`nodeType`clip`border`padding`unquote`contentEditable`onbeforeunload`detachEvent`import`namespace`concat`Array`constructor`size`font`medium`list`float`relative`sizing`lastIndex`successfully`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`ActiveXObject`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ie7_off`MSIE`ie7_debug`alpha`version`visible`visibility`fromCharCode`¦®`¦­ (\\d\\.\\d)`¦¬`^¤±`\\.¦§$`^[\\w\\.]+[^:]*$`(Ô\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¥ö\\b|\\¥õ\\b|^$`Î-â`(¥ï\\s*:\\s*(À|×))`¢à\\s*:\\s*¥î-£·`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢û\\*[^\\*]*\\*+([^\\¢û][^\\*]*\\*+)*\\¢û)|(\x27[^\x27]*\x27)|("[^"]*")`@(¥ç|¥æ)[^;\\n]+[;\\n]|`\\Ñ:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ©="([^"]*)"`^(£â|¥Ñ|¤Ë)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(£­|¢æ)-(°|÷)\\s*:\\s*\\d`\\b(£­|¢æ)-°\\s*:\\s*\\d`^å|0cm$`^å$`£­`£÷`°`£ù`À`¥Ë`×`>`(\\ba(\\.[\\w-]+)?)$`\\{[^\\}]*\\}`::`([^\\}\\s]*\\,[^\\{]*)(\\{\\d+\\})`\\{(\\d+)\\}`[+>~]`\\Ñ([a-fA-F\\d]+)`^Ô\\(.*\\)$`([^}]*):(¤µ|¥¿)[^{]*\\{([^}]*)\\}`Å\\s*:\\s*([^;]*)(;|$)`([\\¢û()[\\]?{}|*+])`=`\\¥ª\\b`%1`£Ñ(-¢õ)?\\s*:([^(};]*)Ô\\(([^\\)]+)\\)([^;}]*)`¤¢`X`¦±`ª ¦° 0.7.3 (¦¯)`\\n\\n`¦ª`¦¨`¦¦ ¦¥`:â{Î-â:â}:¢È{Î-â:¢È}`*{¦¤:0}`¢Ò=``/`¤¦.¦¢`¥ÿ`£¿ [1]: ¥ü ¥û ê ¥ú `Î-¥ù.js`¢¸`<Ì>`$1`$2`Ì`¢í ¥ó`£¿ [2]: `([^{}]*)\\Ñ{([^}]*[^\\¢¨-])?`gi`£á-¥ñ\\»*:\\»*Å-£á`³\\»*:\\»*¢ð`¥ð`¢à:¤¼;$1`¢à:¤Ò`xx-£¸,x-£¸,£¸,¥í,£è,x-£è,xx-£è`,`xx-£¸`(¥ì(-¥ë)?\\»*:\\»*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\»)`(\\»|$)`:`â`¢È`\\Ñ([^)]*\\Ñ)`Î-â`\x27`\\Ñ:`¥ä`¢Ä`³:¢ð;¥á:0;¢à:¤Ò;¥à:£Ð;¥ß:£¬(0 0 0 0);À:-9999`!`Î-¥Ü`<¤Î:`/>``¤Î`¥Ù://¥Ø.w3.¥×/1999/¥Ö`¥Õ`ð,£å,¥Ô`¤Ì` ¤Ì`¤Ë,ð`¤É`£â`¥Ó`².¢Ì.`.¦.£ã=ë`¥Ò`¥Ð`.¢ç=ë`.©=\x27`Î-£á-¥Ï`\\»*:\\»*\\¢Ã[\\¢¨%]*`Ç`HR`°\\»*:\\»*\\¢Ã\\¢¨*[^%]`å`£­-°`¢æ`¢æ-°`¢ð`×`£í`£ö`÷`£ø`¢ò`¥Ê`¢î`Î-¥È`[^},\\»]*([>+~][^:@,\\»{]+|:(`)|\\Ñ.[\\¢¨-]+\\Ñ.[\\¢¨-.]+|@[@\\¢Ã]+)`g`[^\\»(]+[+~]|@\\¢Ã+|:(â|¢È|`)|\\Ñ.[\\¢¨-.]+`([^}]*):(`)([^{]*)`\\Ñ[([^`=\\Ñ]]+)([`]?=?)([^\\Ñ]]+)?\\Ñ]`{`}`\\»`\\¤¯`¤®`¢Á`.¢ÿ{¥Æ-¥Å:¢ò;¢à:¤¼}`\x27\\¥Ä`0000`¤µ`;`<¢Ä ¤°=¢ÿ ¥¾=\x27`Î-Å.¥½`\x27 °=100% ÷=0 Õ=¥¼/x-¥»>`+`@`¥¹-¥¸`£Ø`^`i`¥·`¥¶`¥µ`¥´`¥³`¥±`id`¡.id.¬(/¤±\\¢Ã+/g,\x27\x27)`¤°`¡.¢Ý.¬(/\\¤¯\\»*¤®\\¢Ã+/g,\x27\x27)`¡.£×(\x27`\x27)`¡`¥ `¢ù`\\Ñ$1`=`==`~=`/(^|\\»)`(\\»|$)/.µ(`|=`/^`(-|$)/.µ(`¢Ù`¢÷`Î-¤£`¥®:¥­.¤¦.¥¬(î=%1,¥«=\x27¤¢\x27)`¥¨.¥§`¥¦:\x27#¤¤ ¥¥ 1\\¥¤#¤¤ ¥£ 1\\¥¢ ¥¡ ¤ÿ[]={0¤þ}\x27`-¤ü.¤£`$`±:`¤û`;¤ú:1;£Ñ`£Ð`£û,ð`¤ù`¢õ`¤ø`î`Î-Ç`³\\»*:\\»*Ç`£Ñ[\\¢¨\\»-]*:[^};]*Ç`ß`ù`Ô(`£û`Y`(ø(¦.¢¤)+².`.£î)||0`¢×`¢¤`À`¤ó`£ï`¦.¢Ô+².`.£î`¤ï`¤î`£¿ [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-standard.js b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-standard.js new file mode 100644 index 0000000..2109905 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/ie7/ie7-standard.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i=0){ + var optar=opt.split(" "); + for(i=0;i=0) ecolor=optar[i]; + if(ecolor=="") ecolor="#666"; + cn+="e"; + edges=true; + } +else if(opt && opt.indexOf("smooth")>=0){ + cn+="a"; + ecolor=Mix(bk,color); + } +if(opt && opt.indexOf("small")>=0) cn+="s"; +prefixt=cn; +prefixb=cn; +if(wich.indexOf("all")>=0){t=true;b=true;} +else if(wich.indexOf("top")>=0) t="true"; +else if(wich.indexOf("tl")>=0){ + t="true"; + if(wich.indexOf("tr")<0) prefixt+="l"; + } +else if(wich.indexOf("tr")>=0){ + t="true"; + prefixt+="r"; + } +if(wich.indexOf("bottom")>=0) b=true; +else if(wich.indexOf("bl")>=0){ + b="true"; + if(wich.indexOf("br")<0) prefixb+="l"; + } +else if(wich.indexOf("br")>=0){ + b="true"; + prefixb+="r"; + } +var v=getElementsBySelector(selector); +var l=v.length; +for(i=0;i=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=1;i<=lim;i++){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingTop=0; +el.insertBefore(d,el.firstChild); +} + +function AddBottom(el,bk,color,bc,cn){ +var i,lim=4,d=CreateEl("b"); + +if(cn.indexOf("s")>=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=lim;i>0;i--){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingBottom=0; +el.appendChild(d); +} + +function CreateEl(x){ +if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x)); +else return(document.createElement(x)); +} + +function getElementsBySelector(selector){ +var i,selid="",selclass="",tag=selector,f,s=[],objlist=[]; + +if(selector.indexOf(" ")>0){ //descendant selector like "tag#id tag" + s=selector.split(" "); + var fs=s[0].split("#"); + if(fs.length==1) return(objlist); + f=document.getElementById(fs[1]); + if(f) return(f.getElementsByTagName(s[1])); + return(objlist); + } +if(selector.indexOf("#")>0){ //id selector like "tag#id" + s=selector.split("#"); + tag=s[0]; + selid=s[1]; + } +if(selid!=""){ + f=document.getElementById(selid); + if(f) objlist.push(f); + return(objlist); + } +if(selector.indexOf(".")>0){ //class selector like "tag.class" + s=selector.split("."); + tag=s[0]; + selclass=s[1]; + } +var v=document.getElementsByTagName(tag); // tag selector like "tag" +if(selclass=="") + return(v); +for(i=0;i=0){ + objlist.push(v[i]); + } + } +return(objlist); +} + +function Mix(c1,c2){ +var i,step1,step2,x,y,r=new Array(3); +if(c1.length==4)step1=1; +else step1=2; +if(c2.length==4) step2=1; +else step2=2; +for(i=0;i<3;i++){ + x=parseInt(c1.substr(1+step1*i,step1),16); + if(step1==1) x=16*x+x; + y=parseInt(c2.substr(1+step2*i,step2),16); + if(step2==1) y=16*y+y; + r[i]=Math.floor((x*50+y*50)/100); + } +return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16)); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu-body.php b/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu-body.php new file mode 100644 index 0000000..afb7090 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu-body.php @@ -0,0 +1,51 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +function nervecenterTransmenuGetBodyJS() { + global $rootmenu; + + if (isset($rootmenu)) { + return $rootmenu->getMenuJScript(); + } else if (empty($rootmenu)) { + return "alert('No rootmenu object found.');"; + } else { + return "alert('No JavaScript attached to rootmenu object.');"; + } +} + +?> diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu-head.php b/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu-head.php new file mode 100644 index 0000000..afc6402 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu-head.php @@ -0,0 +1,85 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +function nervecenterTransmenuGetHeadJS() { + global $g, $rootmenu; + + $transmenu_stub =<<getChildren() as $component) { + $id = "mnua_" . str_replace(" ", "", strtolower($component->getID())); + + $childJScript .=<< diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu.org b/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu.org new file mode 100644 index 0000000..6c9e353 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenu.org @@ -0,0 +1,785 @@ +/* ================================================================================================= + * TransMenu + * March, 2003 + * + * Customizable multi-level animated DHTML menus with transparency. + * + * Copyright 2003-2004, Aaron Boodman (www.youngpup.net) + * ================================================================================================= + * "Can I use this?" + * + * Use of this library is governed by the Creative Commons Attribution 2.0 License. You can check it + * out at: http://creativecommons.org/licenses/by/2.0/ + * + * Basically: You may copy, distribute, and eat this code as you wish. But you must give me credit + * for writing it. You may not misrepresent yourself as the author of this code. + * ================================================================================================= + * "It's kinda hard to read, though" + * + * The uncompressed, commented version of this script can be found at: + * http://youngpup.net/projects/transMenus + * ================================================================================================= + * updates: + * 04.19.04 fixed cascade problem with menus nested greater than two levels. + * 12.23.03 added hideCurrent for menu actuators with no menus. renamed to TransMenu. + * 04.18.03 fixed render bug in IE 5.0 Mac by removing that browser from compatibility table ;) + * also made gecko check a little more strict by specifying build no. + * ============================================================================================== */ + + + +//================================================================================================== +// Configuration properties +//================================================================================================== +TransMenu.spacerGif = "themes/nervecenter/javascript/img/x.gif"; // path to a transparent spacer gif +TransMenu.dingbatOn = "themes/nervecenter/javascript/img/submenu-on.gif"; // path to the active sub menu dingbat +TransMenu.dingbatOff = "themes/nervecenter/javascript/img/submenu-off.gif"; // path to the inactive sub menu dingbat +TransMenu.dingbatSize = 14; // size of the dingbat (square shape assumed) +TransMenu.menuPadding = 5; // padding between menu border and items grid +TransMenu.itemPadding = 3; // additional padding around each item +TransMenu.shadowSize = 2; // size of shadow under menu +TransMenu.shadowOffset = 3; // distance shadow should be offset from leading edge +TransMenu.shadowColor = "#FF0000"; // color of shadow (transparency is set in CSS) +TransMenu.shadowPng = "themes/nervecenter/javascript/img/grey-40.png"; // a PNG graphic to serve as the shadow for mac IE5 +TransMenu.backgroundColor = "#990000"; // color of the background (transparency set in CSS) +TransMenu.backgroundPng = "themes/nervecenter/javascript/img/white-90.png"; // a PNG graphic to server as the background for mac IE5 +TransMenu.hideDelay = 1000; // number of milliseconds to wait before hiding a menu +TransMenu.slideTime = 400; // number of milliseconds it takes to open and close a menu + + +//================================================================================================== +// Internal use properties +//================================================================================================== +TransMenu.reference = {topLeft:1,topRight:2,bottomLeft:3,bottomRight:4}; +TransMenu.direction = {down:1,right:2}; +TransMenu.registry = []; +TransMenu._maxZ = 100; + + + +//================================================================================================== +// Static methods +//================================================================================================== +// supporting win ie5+, mac ie5.1+ and gecko >= mozilla 1.0 +TransMenu.isSupported = function() { + var ua = navigator.userAgent.toLowerCase(); + var pf = navigator.platform.toLowerCase(); + var an = navigator.appName; + var r = false; + + if (ua.indexOf("gecko") > -1 && navigator.productSub >= 20020605) r = true; // gecko >= moz 1.0 + else if (an == "Microsoft Internet Explorer") { + if (document.getElementById) { // ie5.1+ mac,win + if (pf.indexOf("mac") == 0) { + r = /msie (\d(.\d*)?)/.test(ua) && Number(RegExp.$1) >= 5.1; + } + else r = true; + } + } + + return r; +} + +// call this in onload once menus have been created +TransMenu.initialize = function() { + for (var i = 0, menu = null; menu = this.registry[i]; i++) { + menu.initialize(); + } +} + +// call this in document body to write out menu html +TransMenu.renderAll = function() { + var aMenuHtml = []; + for (var i = 0, menu = null; menu = this.registry[i]; i++) { + aMenuHtml[i] = menu.toString(); + } + document.write(aMenuHtml.join("")); +} + +//================================================================================================== +// TransMenu constructor (only called internally) +//================================================================================================== +// oActuator : The thing that causes the menu to be shown when it is mousedover. Either a +// reference to an HTML element, or a TransMenuItem from an existing menu. +// iDirection : The direction to slide out. One of TransMenu.direction. +// iLeft : Left pixel offset of menu from actuator +// iTop : Top pixel offset of menu from actuator +// iReferencePoint : Corner of actuator to measure from. One of TransMenu.referencePoint. +// parentMenuSet : Menuset this menu will be added to. +//================================================================================================== +function TransMenu(oActuator, iDirection, iLeft, iTop, iReferencePoint, parentMenuSet) { + // public methods + this.addItem = addItem; + this.addMenu = addMenu; + this.toString = toString; + this.initialize = initialize; + this.isOpen = false; + this.show = show; + this.hide = hide; + this.items = []; + + // events + this.onactivate = new Function(); // when the menu starts to slide open + this.ondeactivate = new Function(); // when the menu finishes sliding closed + this.onmouseover = new Function(); // when the menu has been moused over + this.onqueue = new Function(); // hack .. when the menu sets a timer to be closed a little while in the future + this.ondequeue = new Function(); + + // initialization + this.index = TransMenu.registry.length; + TransMenu.registry[this.index] = this; + + var id = "TransMenu" + this.index; + var contentHeight = null; + var contentWidth = null; + var childMenuSet = null; + var animating = false; + var childMenus = []; + var slideAccel = -1; + var elmCache = null; + var ready = false; + var _this = this; + var a = null; + + var pos = iDirection == TransMenu.direction.down ? "top" : "left"; + var dim = null; + + // private and public method implimentations + function addItem(sText, sUrl) { + var item = new TransMenuItem(sText, sUrl, this); + item._index = this.items.length; + this.items[item._index] = item; + } + + function addMenu(oMenuItem) { + if (!oMenuItem.parentMenu == this) throw new Error("Cannot add a menu here"); + + if (childMenuSet == null) childMenuSet = new TransMenuSet(TransMenu.direction.right, -5, 2, TransMenu.reference.topRight); + + var m = childMenuSet.addMenu(oMenuItem); + + childMenus[oMenuItem._index] = m; + m.onmouseover = child_mouseover; + m.ondeactivate = child_deactivate; + m.onqueue = child_queue; + m.ondequeue = child_dequeue; + + return m; + } + + function initialize() { + initCache(); + initEvents(); + initSize(); + ready = true; + } + + function show() { + //dbg_dump("show"); + if (ready) { + _this.isOpen = true; + animating = true; + setContainerPos(); + elmCache["clip"].style.visibility = "visible"; + elmCache["clip"].style.zIndex = TransMenu._maxZ++; + //dbg_dump("maxZ: " + TransMenu._maxZ); + slideStart(); + _this.onactivate(); + } + } + + function hide() { + if (ready) { + _this.isOpen = false; + animating = true; + + for (var i = 0, item = null; item = elmCache.item[i]; i++) + dehighlight(item); + + if (childMenuSet) childMenuSet.hide(); + + slideStart(); + _this.ondeactivate(); + } + } + + function setContainerPos() { + var sub = oActuator.constructor == TransMenuItem; + var act = sub ? oActuator.parentMenu.elmCache["item"][oActuator._index] : oActuator; + var el = act; + + var x = 0; + var y = 0; + + + var minX = 0; + var maxX = (window.innerWidth ? window.innerWidth : document.body.clientWidth) - parseInt(elmCache["clip"].style.width); + var minY = 0; + var maxY = (window.innerHeight ? window.innerHeight : document.body.clientHeight) - parseInt(elmCache["clip"].style.height); + + // add up all offsets... subtract any scroll offset + while (sub ? el.parentNode.className.indexOf("transMenu") == -1 : el.offsetParent) { + x += el.offsetLeft; + y += el.offsetTop; + + if (el.scrollLeft) x -= el.scrollLeft; + if (el.scrollTop) y -= el.scrollTop; + + el = el.offsetParent; + } + + if (oActuator.constructor == TransMenuItem) { + x += parseInt(el.parentNode.style.left); + y += parseInt(el.parentNode.style.top); + } + + switch (iReferencePoint) { + case TransMenu.reference.topLeft: + break; + case TransMenu.reference.topRight: + x += act.offsetWidth; + break; + case TransMenu.reference.bottomLeft: + y += act.offsetHeight; + break; + case TransMenu.reference.bottomRight: + x += act.offsetWidth; + y += act.offsetHeight; + break; + } + + x += iLeft; + y += iTop; + + x = Math.max(Math.min(x, maxX), minX); + y = Math.max(Math.min(y, maxY), minY); + + elmCache["clip"].style.left = x + "px"; + elmCache["clip"].style.top = y + "px"; + } + + function slideStart() { + var x0 = parseInt(elmCache["content"].style[pos]); + var x1 = _this.isOpen ? 0 : -dim; + + if (a != null) a.stop(); + a = new Accelimation(x0, x1, TransMenu.slideTime, slideAccel); + + a.onframe = slideFrame; + a.onend = slideEnd; + + a.start(); + } + + function slideFrame(x) { + elmCache["content"].style[pos] = x + "px"; + } + + function slideEnd() { + if (!_this.isOpen) elmCache["clip"].style.visibility = "hidden"; + animating = false; + } + + function initSize() { + // everything is based off the size of the items table... + var ow = elmCache["items"].offsetWidth; + var oh = elmCache["items"].offsetHeight; + var ua = navigator.userAgent.toLowerCase(); + + // clipping container should be ow/oh + the size of the shadow + elmCache["clip"].style.width = ow + TransMenu.shadowSize + 2 + "px"; + elmCache["clip"].style.height = oh + TransMenu.shadowSize + 2 + "px"; + + // same with content... + elmCache["content"].style.width = ow + TransMenu.shadowSize + "px"; + elmCache["content"].style.height = oh + TransMenu.shadowSize + "px"; + + contentHeight = oh + TransMenu.shadowSize; + contentWidth = ow + TransMenu.shadowSize; + + dim = iDirection == TransMenu.direction.down ? contentHeight : contentWidth; + + // set initially closed + elmCache["content"].style[pos] = -dim - TransMenu.shadowSize + "px"; + elmCache["clip"].style.visibility = "hidden"; + + // if *not* mac/ie 5 + if (ua.indexOf("mac") == -1 || ua.indexOf("gecko") > -1) { + // set background div to offset size + elmCache["background"].style.width = ow + "px"; + elmCache["background"].style.height = oh + "px"; + elmCache["background"].style.backgroundColor = TransMenu.backgroundColor; + + // shadow left starts at offset left and is offsetHeight pixels high + elmCache["shadowRight"].style.left = ow + "px"; + elmCache["shadowRight"].style.height = oh - (TransMenu.shadowOffset - TransMenu.shadowSize) + "px"; + elmCache["shadowRight"].style.backgroundColor = TransMenu.shadowColor; + + // shadow bottom starts at offset height and is offsetWidth - shadowOffset + // pixels wide (we don't want the bottom and right shadows to overlap or we + // get an extra bright bottom-right corner) + elmCache["shadowBottom"].style.top = oh + "px"; + elmCache["shadowBottom"].style.width = ow - TransMenu.shadowOffset + "px"; + elmCache["shadowBottom"].style.backgroundColor = TransMenu.shadowColor; + } + // mac ie is a little different because we use a PNG for the transparency + else { + // set background div to offset size + elmCache["background"].firstChild.src = TransMenu.backgroundPng; + elmCache["background"].firstChild.width = ow; + elmCache["background"].firstChild.height = oh; + + // shadow left starts at offset left and is offsetHeight pixels high + elmCache["shadowRight"].firstChild.src = TransMenu.shadowPng; + elmCache["shadowRight"].style.left = ow + "px"; + elmCache["shadowRight"].firstChild.width = TransMenu.shadowSize; + elmCache["shadowRight"].firstChild.height = oh - (TransMenu.shadowOffset - TransMenu.shadowSize); + + // shadow bottom starts at offset height and is offsetWidth - shadowOffset + // pixels wide (we don't want the bottom and right shadows to overlap or we + // get an extra bright bottom-right corner) + elmCache["shadowBottom"].firstChild.src = TransMenu.shadowPng; + elmCache["shadowBottom"].style.top = oh + "px"; + elmCache["shadowBottom"].firstChild.height = TransMenu.shadowSize; + elmCache["shadowBottom"].firstChild.width = ow - TransMenu.shadowOffset; + } + } + + function initCache() { + var menu = document.getElementById(id); + var all = menu.all ? menu.all : menu.getElementsByTagName("*"); // IE/win doesn't support * syntax, but does have the document.all thing + + elmCache = {}; + elmCache["clip"] = menu; + elmCache["item"] = []; + + for (var i = 0, elm = null; elm = all[i]; i++) { + switch (elm.className) { + case "items": + case "content": + case "background": + case "shadowRight": + case "shadowBottom": + elmCache[elm.className] = elm; + break; + case "item": + elm._index = elmCache["item"].length; + elmCache["item"][elm._index] = elm; + break; + } + } + + // hack! + _this.elmCache = elmCache; + } + + function initEvents() { + // hook item mouseover + for (var i = 0, item = null; item = elmCache.item[i]; i++) { + item.onmouseover = item_mouseover; + item.onmouseout = item_mouseout; + item.onclick = item_click; + } + + // hook actuation + if (typeof oActuator.tagName != "undefined") { + oActuator.onmouseover = actuator_mouseover; + oActuator.onmouseout = actuator_mouseout; + } + + // hook menu mouseover + elmCache["content"].onmouseover = content_mouseover; + elmCache["content"].onmouseout = content_mouseout; + } + + function highlight(oRow) { + oRow.className = "item hover"; + if (childMenus[oRow._index]) + oRow.lastChild.firstChild.src = TransMenu.dingbatOn; + } + + function dehighlight(oRow) { + oRow.className = "item"; + if (childMenus[oRow._index]) + oRow.lastChild.firstChild.src = TransMenu.dingbatOff; + } + + function item_mouseover() { + if (!animating) { + highlight(this); + + if (childMenus[this._index]) + childMenuSet.showMenu(childMenus[this._index]); + else if (childMenuSet) childMenuSet.hide(); + } + } + + function item_mouseout() { + if (!animating) { + if (childMenus[this._index]) + childMenuSet.hideMenu(childMenus[this._index]); + else // otherwise child_deactivate will do this + dehighlight(this); + } + } + + function item_click() { + if (!animating) { + if (_this.items[this._index].url) + location.href = _this.items[this._index].url; + } + } + + function actuator_mouseover() { + parentMenuSet.showMenu(_this); + } + + function actuator_mouseout() { + parentMenuSet.hideMenu(_this); + } + + function content_mouseover() { + if (!animating) { + parentMenuSet.showMenu(_this); + _this.onmouseover(); + } + } + + function content_mouseout() { + if (!animating) { + parentMenuSet.hideMenu(_this); + } + } + + function child_mouseover() { + if (!animating) { + parentMenuSet.showMenu(_this); + } + } + + function child_deactivate() { + for (var i = 0; i < childMenus.length; i++) { + if (childMenus[i] == this) { + dehighlight(elmCache["item"][i]); + break; + } + } + } + + function child_queue() { + parentMenuSet.hideMenu(_this); + } + + function child_dequeue() { + parentMenuSet.showMenu(_this); + } + + function toString() { + var aHtml = []; + var sClassName = "transMenu" + (oActuator.constructor != TransMenuItem ? " top" : ""); + + for (var i = 0, item = null; item = this.items[i]; i++) { + aHtml[i] = item.toString(childMenus[i]); + } + + return '
                            ' + + '
                            ' + + '' + + aHtml.join('') + + '
                            ' + + '
                            ' + + '
                            ' + + '
                            ' + + '
                            '; + } +} + + +//================================================================================================== +// TransMenuSet +//================================================================================================== +// iDirection : The direction to slide out. One of TransMenu.direction. +// iLeft : Left pixel offset of menus from actuator +// iTop : Top pixel offset of menus from actuator +// iReferencePoint : Corner of actuator to measure from. One of TransMenu.referencePoint. +//================================================================================================== +TransMenuSet.registry = []; + +function TransMenuSet(iDirection, iLeft, iTop, iReferencePoint) { + // public methods + this.addMenu = addMenu; + this.showMenu = showMenu; + this.hideMenu = hideMenu; + this.hide = hide; + this.hideCurrent = hideCurrent; + + // initialization + var menus = []; + var _this = this; + var current = null; + + this.index = TransMenuSet.registry.length; + TransMenuSet.registry[this.index] = this; + + // method implimentations... + function addMenu(oActuator) { + var m = new TransMenu(oActuator, iDirection, iLeft, iTop, iReferencePoint, this); + menus[menus.length] = m; + return m; + } + + function showMenu(oMenu) { + if (oMenu != current) { + // close currently open menu + if (current != null) hide(current); + + // set current menu to this one + current = oMenu; + + // if this menu is closed, open it + oMenu.show(); + } + else { + // hide pending calls to close this menu + cancelHide(oMenu); + } + } + + function hideMenu(oMenu) { + //dbg_dump("hideMenu a " + oMenu.index); + if (current == oMenu && oMenu.isOpen) { + //dbg_dump("hideMenu b " + oMenu.index); + if (!oMenu.hideTimer) scheduleHide(oMenu); + } + } + + function scheduleHide(oMenu) { + //dbg_dump("scheduleHide " + oMenu.index); + oMenu.onqueue(); + oMenu.hideTimer = window.setTimeout("TransMenuSet.registry[" + _this.index + "].hide(TransMenu.registry[" + oMenu.index + "])", TransMenu.hideDelay); + } + + function cancelHide(oMenu) { + //dbg_dump("cancelHide " + oMenu.index); + if (oMenu.hideTimer) { + oMenu.ondequeue(); + window.clearTimeout(oMenu.hideTimer); + oMenu.hideTimer = null; + } + } + + function hide(oMenu) { + if (!oMenu && current) oMenu = current; + + if (oMenu && current == oMenu && oMenu.isOpen) { + hideCurrent(); + } + } + + function hideCurrent() { + if (null != current) { + cancelHide(current); + current.hideTimer = null; + current.hide(); + current = null; + } + } +} + +//================================================================================================== +// TransMenuItem (internal) +// represents an item in a dropdown +//================================================================================================== +// sText : The item display text +// sUrl : URL to load when the item is clicked +// oParent : Menu this item is a part of +//================================================================================================== +function TransMenuItem(sText, sUrl, oParent) { + this.toString = toString; + this.text = sText; + this.url = sUrl; + this.parentMenu = oParent; + + function toString(bDingbat) { + var sDingbat = bDingbat ? TransMenu.dingbatOff : TransMenu.spacerGif; + var iEdgePadding = TransMenu.itemPadding + TransMenu.menuPadding; + var sPaddingLeft = "padding:" + TransMenu.itemPadding + "px; padding-left:" + iEdgePadding + "px;" + var sPaddingRight = "padding:" + TransMenu.itemPadding + "px; padding-right:" + iEdgePadding + "px;" + + return '' + + sText + '' + + ''; + } +} + + + + + + +//===================================================================== +// Accel[erated] [an]imation object +// change a property of an object over time in an accelerated fashion +//===================================================================== +// obj : reference to the object whose property you'd like to animate +// prop : property you would like to change eg: "left" +// to : final value of prop +// time : time the animation should take to run +// zip : optional. specify the zippiness of the acceleration. pick a +// number between -1 and 1 where -1 is full decelerated, 1 is +// full accelerated, and 0 is linear (no acceleration). default +// is 0. +// unit : optional. specify the units for use with prop. default is +// "px". +//===================================================================== +// bezier functions lifted from the lib_animation.js file in the +// 13th Parallel API. www.13thparallel.org +//===================================================================== + +function Accelimation(from, to, time, zip) { + if (typeof zip == "undefined") zip = 0; + if (typeof unit == "undefined") unit = "px"; + + this.x0 = from; + this.x1 = to; + this.dt = time; + this.zip = -zip; + this.unit = unit; + this.timer = null; + this.onend = new Function(); + this.onframe = new Function(); +} + + + +//===================================================================== +// public methods +//===================================================================== + +// after you create an accelimation, you call this to start it-a runnin' +Accelimation.prototype.start = function() { + this.t0 = new Date().getTime(); + this.t1 = this.t0 + this.dt; + var dx = this.x1 - this.x0; + this.c1 = this.x0 + ((1 + this.zip) * dx / 3); + this.c2 = this.x0 + ((2 + this.zip) * dx / 3); + Accelimation._add(this); +} + +// and if you need to stop it early for some reason... +Accelimation.prototype.stop = function() { + Accelimation._remove(this); +} + + + +//===================================================================== +// private methods +//===================================================================== + +// paints one frame. gets called by Accelimation._paintAll. +Accelimation.prototype._paint = function(time) { + if (time < this.t1) { + var elapsed = time - this.t0; + this.onframe(Accelimation._getBezier(elapsed/this.dt,this.x0,this.x1,this.c1,this.c2)); + } + else this._end(); +} + +// ends the animation +Accelimation.prototype._end = function() { + Accelimation._remove(this); + this.onframe(this.x1); + this.onend(); +} + + + + +//===================================================================== +// static methods (all private) +//===================================================================== + +// add a function to the list of ones to call periodically +Accelimation._add = function(o) { + var index = this.instances.length; + this.instances[index] = o; + // if this is the first one, start the engine + if (this.instances.length == 1) { + this.timerID = window.setInterval("Accelimation._paintAll()", this.targetRes); + } +} + +// remove a function from the list +Accelimation._remove = function(o) { + for (var i = 0; i < this.instances.length; i++) { + if (o == this.instances[i]) { + this.instances = this.instances.slice(0,i).concat( this.instances.slice(i+1) ); + break; + } + } + // if that was the last one, stop the engine + if (this.instances.length == 0) { + window.clearInterval(this.timerID); + this.timerID = null; + } +} + +// "engine" - call each function in the list every so often +Accelimation._paintAll = function() { + var now = new Date().getTime(); + for (var i = 0; i < this.instances.length; i++) { + this.instances[i]._paint(now); + } +} + + +// Bezier functions: +Accelimation._B1 = function(t) { return t*t*t } +Accelimation._B2 = function(t) { return 3*t*t*(1-t) } +Accelimation._B3 = function(t) { return 3*t*(1-t)*(1-t) } +Accelimation._B4 = function(t) { return (1-t)*(1-t)*(1-t) } + + +//Finds the coordinates of a point at a certain stage through a bezier curve +Accelimation._getBezier = function(percent,startPos,endPos,control1,control2) { + return endPos * this._B1(percent) + control2 * this._B2(percent) + control1 * this._B3(percent) + startPos * this._B4(percent); +} + + +//===================================================================== +// static properties +//===================================================================== + +Accelimation.instances = []; +Accelimation.targetRes = 10; +Accelimation.timerID = null; + + +//===================================================================== +// IE win memory cleanup +//===================================================================== + +if (window.attachEvent) { + var cearElementProps = [ + 'data', + 'onmouseover', + 'onmouseout', + 'onmousedown', + 'onmouseup', + 'ondblclick', + 'onclick', + 'onselectstart', + 'oncontextmenu' + ]; + + window.attachEvent("onunload", function() { + var el; + for(var d = document.all.length;d--;){ + el = document.all[d]; + for(var c = cearElementProps.length;c--;){ + el[cearElementProps[c]] = null; + } + } + }); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenuC.js b/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenuC.js new file mode 100644 index 0000000..88626c7 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/javascript/transmenuC.js @@ -0,0 +1,86 @@ +/* ================================================================================================= + * TransMenu + * March, 2003 + * Customizable multi-level animated DHTML menus with transparency. + * ================================================================================================= + * "Can I use this?" + * + * Use of this library is governed by the Creative Commons Attribution 2.0 License. You can check it + * out at: http://creativecommons.org/licenses/by/2.0/ + * + * Basically: You may copy, distribute, and eat this code as you wish. But you must give me credit + * for writing it. You may not misrepresent yourself as the author of this code. + * ================================================================================================= + * "It's kinda hard to read, though" + * + * The uncompressed, commented version of this script can be found at: + * http://youngpup.net/projects/transMenus + * ============================================================================================== */ +TransMenu.spacerGif="themes/nervecenter/javascript/img/x.gif";TransMenu.dingbatOn="themes/nervecenter/javascript/img/submenu-on.gif";TransMenu.dingbatOff="themes/nervecenter/javascript/img/submenu-off.gif";TransMenu.dingbatSize=14;TransMenu.menuPadding=5;TransMenu.itemPadding=3;TransMenu.shadowSize=2;TransMenu.shadowOffset=3;TransMenu.shadowColor="#000000";TransMenu.shadowPng="themes/nervecenter/javascript/img/grey-40.png";TransMenu.backgroundColor="#990000";TransMenu.backgroundPng="themes/nervecenter/javascript/img/white-90.png";TransMenu.hideDelay=1000;TransMenu.slideTime=400;TransMenu.reference={topLeft:1,topRight:2,bottomLeft:3,bottomRight:4};TransMenu.direction={down:1,right:2};TransMenu.registry=[];TransMenu._maxZ=100;TransMenu.isSupported=function(){var ua=navigator.userAgent.toLowerCase();var pf=navigator.platform.toLowerCase();var an=navigator.appName;var r=false;if(ua.indexOf("gecko")>-1&&navigator.productSub>=20020605)r=true;else if(an=="Microsoft Internet Explorer"){if(document.getElementById){if(pf.indexOf("mac")==0){r=/msie (\d(.\d*)?)/.test(ua)&&Number(RegExp.$1)>=5.1;} +else r=true;}} +return r;} +TransMenu.initialize=function(){for(var i=0,menu=null;menu=this.registry[i];i++){menu.initialize();}} +TransMenu.renderAll=function(){var aMenuHtml=[];for(var i=0,menu=null;menu=this.registry[i];i++){aMenuHtml[i]=menu.toString();} +document.write(aMenuHtml.join(""));} +function TransMenu(oActuator,iDirection,iLeft,iTop,iReferencePoint,parentMenuSet){this.addItem=addItem;this.addMenu=addMenu;this.toString=toString;this.initialize=initialize;this.isOpen=false;this.show=show;this.hide=hide;this.items=[];this.onactivate=new Function();this.ondeactivate=new Function();this.onmouseover=new Function();this.onqueue=new Function();this.ondequeue=new Function();this.index=TransMenu.registry.length;TransMenu.registry[this.index]=this;var id="TransMenu"+this.index;var contentHeight=null;var contentWidth=null;var childMenuSet=null;var animating=false;var childMenus=[];var slideAccel=-1;var elmCache=null;var ready=false;var _this=this;var a=null;var pos=iDirection==TransMenu.direction.down?"top":"left";var dim=null;function addItem(sText,sUrl){var item=new TransMenuItem(sText,sUrl,this);item._index=this.items.length;this.items[item._index]=item;} +function addMenu(oMenuItem){if(!oMenuItem.parentMenu==this)throw new Error("Cannot add a menu here");if(childMenuSet==null)childMenuSet=new TransMenuSet(TransMenu.direction.right,-5,2,TransMenu.reference.topRight);var m=childMenuSet.addMenu(oMenuItem);childMenus[oMenuItem._index]=m;m.onmouseover=child_mouseover;m.ondeactivate=child_deactivate;m.onqueue=child_queue;m.ondequeue=child_dequeue;return m;} +function initialize(){initCache();initEvents();initSize();ready=true;} +function show(){if(ready){_this.isOpen=true;animating=true;setContainerPos();elmCache["clip"].style.visibility="visible";elmCache["clip"].style.zIndex=TransMenu._maxZ++;slideStart();_this.onactivate();}} +function hide(){if(ready){_this.isOpen=false;animating=true;for(var i=0,item=null;item=elmCache.item[i];i++)dehighlight(item);if(childMenuSet)childMenuSet.hide();slideStart();_this.ondeactivate();}} +function setContainerPos(){var sub=oActuator.constructor==TransMenuItem;var act=sub?oActuator.parentMenu.elmCache["item"][oActuator._index]:oActuator;var el=act;var x=0;var y=0;var minX=0;var maxX=(window.innerWidth?window.innerWidth:document.body.clientWidth)-parseInt(elmCache["clip"].style.width);var minY=0;var maxY=(window.innerHeight?window.innerHeight:document.body.clientHeight)-parseInt(elmCache["clip"].style.height);while(sub?el.parentNode.className.indexOf("transMenu")==-1:el.offsetParent){x+=el.offsetLeft;y+=el.offsetTop;if(el.scrollLeft)x-=el.scrollLeft;if(el.scrollTop)y-=el.scrollTop;el=el.offsetParent;} +if(oActuator.constructor==TransMenuItem){x+=parseInt(el.parentNode.style.left);y+=parseInt(el.parentNode.style.top);} +switch(iReferencePoint){case TransMenu.reference.topLeft:break;case TransMenu.reference.topRight:x+=act.offsetWidth;break;case TransMenu.reference.bottomLeft:y+=act.offsetHeight;break;case TransMenu.reference.bottomRight:x+=act.offsetWidth;y+=act.offsetHeight;break;} +x+=iLeft;y+=iTop;x=Math.max(Math.min(x,maxX),minX);y=Math.max(Math.min(y,maxY),minY);elmCache["clip"].style.left=x+"px";elmCache["clip"].style.top=y+"px";} +function slideStart(){var x0=parseInt(elmCache["content"].style[pos]);var x1=_this.isOpen?0:-dim;if(a!=null)a.stop();a=new Accelimation(x0,x1,TransMenu.slideTime,slideAccel);a.onframe=slideFrame;a.onend=slideEnd;a.start();} +function slideFrame(x){elmCache["content"].style[pos]=x+"px";} +function slideEnd(){if(!_this.isOpen)elmCache["clip"].style.visibility="hidden";animating=false;} +function initSize(){var ow=elmCache["items"].offsetWidth;var oh=elmCache["items"].offsetHeight;var ua=navigator.userAgent.toLowerCase();elmCache["clip"].style.width=ow+TransMenu.shadowSize+2+"px";elmCache["clip"].style.height=oh+TransMenu.shadowSize+2+"px";elmCache["content"].style.width=ow+TransMenu.shadowSize+"px";elmCache["content"].style.height=oh+TransMenu.shadowSize+"px";contentHeight=oh+TransMenu.shadowSize;contentWidth=ow+TransMenu.shadowSize;dim=iDirection==TransMenu.direction.down?contentHeight:contentWidth;elmCache["content"].style[pos]=-dim-TransMenu.shadowSize+"px";elmCache["clip"].style.visibility="hidden";if(ua.indexOf("mac")==-1||ua.indexOf("gecko")>-1){elmCache["background"].style.width=ow+"px";elmCache["background"].style.height=oh+"px";elmCache["background"].style.backgroundColor=TransMenu.backgroundColor;elmCache["shadowRight"].style.left=ow+"px";elmCache["shadowRight"].style.height=oh-(TransMenu.shadowOffset-TransMenu.shadowSize)+"px";elmCache["shadowRight"].style.backgroundColor=TransMenu.shadowColor;elmCache["shadowBottom"].style.top=oh+"px";elmCache["shadowBottom"].style.width=ow-TransMenu.shadowOffset+"px";elmCache["shadowBottom"].style.backgroundColor=TransMenu.shadowColor;} +else{elmCache["background"].firstChild.src=TransMenu.backgroundPng;elmCache["background"].firstChild.width=ow;elmCache["background"].firstChild.height=oh;elmCache["shadowRight"].firstChild.src=TransMenu.shadowPng;elmCache["shadowRight"].style.left=ow+"px";elmCache["shadowRight"].firstChild.width=TransMenu.shadowSize;elmCache["shadowRight"].firstChild.height=oh-(TransMenu.shadowOffset-TransMenu.shadowSize);elmCache["shadowBottom"].firstChild.src=TransMenu.shadowPng;elmCache["shadowBottom"].style.top=oh+"px";elmCache["shadowBottom"].firstChild.height=TransMenu.shadowSize;elmCache["shadowBottom"].firstChild.width=ow-TransMenu.shadowOffset;}} +function initCache(){var menu=document.getElementById(id);var all=menu.all?menu.all:menu.getElementsByTagName("*");elmCache={};elmCache["clip"]=menu;elmCache["item"]=[];for(var i=0,elm=null;elm=all[i];i++){switch(elm.className){case"items":case"content":case"background":case"shadowRight":case"shadowBottom":elmCache[elm.className]=elm;break;case"item":elm._index=elmCache["item"].length;elmCache["item"][elm._index]=elm;break;}} +_this.elmCache=elmCache;} +function initEvents(){for(var i=0,item=null;item=elmCache.item[i];i++){item.onmouseover=item_mouseover;item.onmouseout=item_mouseout;item.onclick=item_click;} +if(typeof oActuator.tagName!="undefined"){oActuator.onmouseover=actuator_mouseover;oActuator.onmouseout=actuator_mouseout;} +elmCache["content"].onmouseover=content_mouseover;elmCache["content"].onmouseout=content_mouseout;} +function highlight(oRow){oRow.className="item hover";if(childMenus[oRow._index])oRow.lastChild.firstChild.src=TransMenu.dingbatOn;} +function dehighlight(oRow){oRow.className="item";if(childMenus[oRow._index])oRow.lastChild.firstChild.src=TransMenu.dingbatOff;} +function item_mouseover(){if(!animating){highlight(this);if(childMenus[this._index])childMenuSet.showMenu(childMenus[this._index]);else if(childMenuSet)childMenuSet.hide();}} +function item_mouseout(){if(!animating){if(childMenus[this._index])childMenuSet.hideMenu(childMenus[this._index]);else dehighlight(this);}} +function item_click(){if(!animating){if(_this.items[this._index].url)location.href=_this.items[this._index].url;}} +function actuator_mouseover(){parentMenuSet.showMenu(_this);} +function actuator_mouseout(){parentMenuSet.hideMenu(_this);} +function content_mouseover(){if(!animating){parentMenuSet.showMenu(_this);_this.onmouseover();}} +function content_mouseout(){if(!animating){parentMenuSet.hideMenu(_this);}} +function child_mouseover(){if(!animating){parentMenuSet.showMenu(_this);}} +function child_deactivate(){for(var i=0;i'+'
                            '+''+aHtml.join('')+'
                            '+'
                            '+'
                            '+'
                            '+'
                            ';}} +TransMenuSet.registry=[];function TransMenuSet(iDirection,iLeft,iTop,iReferencePoint){this.addMenu=addMenu;this.showMenu=showMenu;this.hideMenu=hideMenu;this.hide=hide;this.hideCurrent=hideCurrent;var menus=[];var _this=this;var current=null;this.index=TransMenuSet.registry.length;TransMenuSet.registry[this.index]=this;function addMenu(oActuator){var m=new TransMenu(oActuator,iDirection,iLeft,iTop,iReferencePoint,this);menus[menus.length]=m;return m;} +function showMenu(oMenu){if(oMenu!=current){if(current!=null)hide(current);current=oMenu;oMenu.show();} +else{cancelHide(oMenu);}} +function hideMenu(oMenu){if(current==oMenu&&oMenu.isOpen){if(!oMenu.hideTimer)scheduleHide(oMenu);}} +function scheduleHide(oMenu){oMenu.onqueue();oMenu.hideTimer=window.setTimeout("TransMenuSet.registry["+_this.index+"].hide(TransMenu.registry["+oMenu.index+"])",TransMenu.hideDelay);} +function cancelHide(oMenu){if(oMenu.hideTimer){oMenu.ondequeue();window.clearTimeout(oMenu.hideTimer);oMenu.hideTimer=null;}} +function hide(oMenu){if(!oMenu&¤t)oMenu=current;if(oMenu&¤t==oMenu&&oMenu.isOpen){hideCurrent();}} +function hideCurrent(){if (null != current){cancelHide(current);current.hideTimer=null;current.hide();current=null;}}} +function TransMenuItem(sText,sUrl,oParent){this.toString=toString;this.text=sText;this.url=sUrl;this.parentMenu=oParent;function toString(bDingbat){var sDingbat=bDingbat?TransMenu.dingbatOff:TransMenu.spacerGif;var iEdgePadding=TransMenu.itemPadding+TransMenu.menuPadding;var sPaddingLeft="padding:"+TransMenu.itemPadding+"px; padding-left:"+iEdgePadding+"px;" +var sPaddingRight="padding:"+TransMenu.itemPadding+"px; padding-right:"+iEdgePadding+"px;" +return''+sText+''+'';}} +function Accelimation(from,to,time,zip){if(typeof zip=="undefined")zip=0;if(typeof unit=="undefined")unit="px";this.x0=from;this.x1=to;this.dt=time;this.zip=-zip;this.unit=unit;this.timer=null;this.onend=new Function();this.onframe=new Function();} +Accelimation.prototype.start=function(){this.t0=new Date().getTime();this.t1=this.t0+this.dt;var dx=this.x1-this.x0;this.c1=this.x0+((1+this.zip)*dx/3);this.c2=this.x0+((2+this.zip)*dx/3);Accelimation._add(this);} +Accelimation.prototype.stop=function(){Accelimation._remove(this);} +Accelimation.prototype._paint=function(time){if(time= !,... +# where: forbidden pages are those pages that should *not* use +# the particular JavaScript function within the JS event +# specified below. +# $Id: body.def,v 1.2.2.1 2007/01/17 18:43:52 sullrich Exp $ +# +onload=tmenuinit(); !wizard.php \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng_fs/loader.js b/src/usr/local/www/themes/pfsense_ng_fs/loader.js new file mode 100644 index 0000000..c8ebe60 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/loader.js @@ -0,0 +1,294 @@ +//'); + +document.write(''); + +/////////////////////////////////////////// +// jQuery code for columns / widgets part 1 +/////////////////////////////////////////// + +var noCols = 2; +var printed3 = false; +var printed4 = false; +var printed5 = false; +var printed6 = false; +var printed7 = false; +var printed8 = false; +var printed9 = false; +var printed10 = false; +var id; +var noColsOnLoad = noCols; // holds a reference to the number of displayed columns on load +var existing =[]; // array to hold each columns contents +var specifiedColWidth = 350; // width of columns for resizing + +/////////////////////////////////////////// +// jQuery Widget functions +/////////////////////////////////////////// + +// function to connect all columns to each other to allow jQuery interaction (drag and droppable) +function connectColumns() +{ + jQuery('.ui-sortable').sortable({connectWith: '.ui-sortable', dropOnEmpty: true, handle: '.widgetheader', change: showSave}); +} + +// function to add columns due to a window resize +function resizeAddColumns() +{ + if(noColsOnLoad > noCols) // if a column has previously been deleted + { + var maxCols = maxColsToDisplay(); // the maximum we can display + + if(noColsOnLoad < maxCols) // if the number of columns on load is less then the maximum number of columns we can display + maxCols = noColsOnLoad; // change the maximum number of columns as we do not want to display them all + if( (maxCols - noCols) > 0 ) // if we need to add more columns + { + replaceColumn(); + + for(var i=noCols; i "); + jQuery(existing[i]).appendTo('#col' + addCols ); // append onLoad contents + } + noCols = maxCols; + for(var i=noCols; i 1 ) // keep at least 1 column displayed at all times + { + var maxCols = maxColsToDisplay(); + var noColsToDel = noCols - maxCols; + + if(noColsToDel>0) // if columns need deleteing + { + for(var i=(noCols-noColsToDel); i "); + else + jQuery('#col' + (tmpReplace).toString() ).after("
                            "); + jQuery(existing[tmpReplace]).appendTo('#col' + noCols); +} + + +// function to calculate & return the maximum number of columns we can display +function maxColsToDisplay() +{ + var niftyWidth = jQuery('#niftyOutter.fakeClass').width(); + return Math.round(niftyWidth / specifiedColWidth); +} + +// function to amend the widget width +function correctWidgetDisplay(noCols) +{ + var percent = ( 100 / noCols ) - 0.1; + var percentStr = percent.toString() + '%'; + + // set all column widths + jQuery('.ui-sortable').width(percentStr); +} + +// function to insert a new column we can place content into (from saved state) +function printColumn(newNum) +{ + if(newNum > noCols) + { + noCols = newNum; + noColsOnLoad = noCols; + } + + document.write("
                            "); + correctWidgetDisplay(noCols); + connectColumns(); +} + +// function to create the columns +function createColumn(colPos) +{ + if (colpos == "col3" && printed3 == false){ + printColumn(3); + printed3=true; + } + else if (colpos == "col4" && printed4 == false){ + printColumn(4); + printed4=true; + } + else if (colpos == "col5" && printed5 == false){ + printColumn(5); + printed5=true; + } + else if (colpos == "col6" && printed6 == false){ + printColumn(6); + printed6=true; + } + else if (colpos == "col7" && printed7 == false){ + printColumn(7); + printed7=true; + } + else if (colpos == "col8" && printed8 == false){ + printColumn(8); + printed8=true; + } + else if (colpos == "col9" && printed9 == false){ + printColumn(9); + printed9=true; + } + else if (colpos == "col10" && printed10 == false){ + printColumn(10); + printed10=true; + } +} + +// function which is called when the broswer window is resized +jQuery( window ).resize(function() +{ + // stop resize firing twice: http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing + clearTimeout(id); + id = setTimeout(finishedResizing, 500); +}); + +// function called after the browser has finished resizing +function finishedResizing() +{ + var colWidth = jQuery("#col1").width(); + if( colWidth < specifiedColWidth ) // Columns width is too small to display all the columns properly so we delete some columns and resize the remaining columns + resizeRmColumns(); // Check if we can delete any columns + else if( colWidth > specifiedColWidth ) // Columns width COULD display more columns properly + resizeAddColumns(); // Check if we can add any columns +} + +///////////////// end widget code part 1 ///////////////////////// + +// jQuery function to define dropdown menu size +jQuery(document).ready(function () +{ + var hwindow = ''; + hwindow = (jQuery(window).height()-35); + // Force the size dropdown menu + jQuery('#navigation ul li ul').css('max-height', hwindow); + + /////////////////////////////////////////// + // jQuery code for columns / widgets part 2 + /////////////////////////////////////////// + + // insert add/delete column buttons + jQuery('

                            \"Click
                             Add column 
                            \"Click
                             Delete column


                            ').insertBefore('#niftyOutter.fakeClass'); + + if ( jQuery('#columnModifier').length > 0 ) // only perform resizing on the dashboard page + { + // correct the css for column 2 + jQuery('#col2').css("float","left"); + + // Make a copy of the current state of columns on page load + for ( var i = 1; i <= noCols; i = i + 1 ) + { + var contents = jQuery('#col' + i ).html(); + existing.push( contents ); + } + + finishedResizing(); // on page load correct display of columns to fit + } + + // on click add a new column and change column widths + jQuery('#addCol').click(function() + { + var maxCols = maxColsToDisplay(); + if( (noCols < maxCols) && (noCols < 10) ) + { + var colAfter = noCols; + noCols++; + + // insert new column + jQuery('#col' + (colAfter).toString() ).after("
                            "); + + correctWidgetDisplay(noCols); + connectColumns(); + } + else + jQuery('#columnWarningText').html('Maximum number of columns reached for the current window size').show().delay(1000).fadeOut(1000); + }); + + // on click delete a columns and change column widths + jQuery('#delCol').click(function() + { + if( noCols > 1 ) + { + var colToDel = noCols; + noCols -= 1; + + correctWidgetDisplay(noCols); + + // get column contents before deletion + var colContent = jQuery('#col' + colToDel ).html(); + + // remove column + jQuery('#col' + colToDel ).remove(); + + // append deleted columns content to preceeding column + jQuery(colContent).appendTo('#col' + noCols ); + + showSave(); + } + else + jQuery('#columnWarningText').html('Minimum number of columns reached for the current window size').show().delay(1000).fadeOut(1000); + }); +}); +//]]> diff --git a/src/usr/local/www/themes/pfsense_ng_fs/login.css b/src/usr/local/www/themes/pfsense_ng_fs/login.css new file mode 100644 index 0000000..f8abdfc --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/login.css @@ -0,0 +1,1127 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + + +#login { +/* background: #cccccc; */ + background-color: transparent; + border: 0px solid #cccccc; + margin: 5em auto; + padding: 0em; + width: 400px; +/* filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; */ +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; +/* background: #ffffff; */ + margin-top: 0; + display: block; + text-indent: -1000px; + height: 400px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -420px; + left: 70px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + top: -300px; */ +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + left: 10px; + top: -300px; */ +} + +#login #submit { + font-size: 1em; + font-weight: bold; + text-align: center; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -20px; + left: 170px; +} + +/* loginerror box follows */ + +#login #inputerrors { + background-color: transparent; + border: 0px solid #666666; + margin: 5em auto; + vertical-align: middle; + padding: 0em; + width: 330px; + height: 50px; + position: relative; + top: -370px; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng_fs/menu.inc b/src/usr/local/www/themes/pfsense_ng_fs/menu.inc new file mode 100644 index 0000000..d703daf --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/menu.inc @@ -0,0 +1,177 @@ + + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +require("menu.inc"); + +define("TMENU_STUB", " + // set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. + // but you can experiment with effect on loadtime. + if (TransMenu.isSupported()) { + + //================================================================================================== + // create a set of dropdowns + //================================================================================================== + // the first param should always be down, as it is here + // + // The second and third param are the top and left offset positions of the menus from their actuators + // respectively. To make a menu appear a little to the left and bottom of an actuator, you could use + // something like -5, 5 + // + // The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner + // of the actuator from which to measure the offset positions above. Here we are saying we want the + // menu to appear directly below the bottom left corner of the actuator + //================================================================================================== + var ms = new TransMenuSet(TransMenu.direction.down, 1, 0, TransMenu.reference.bottomLeft); + + //================================================================================================== + // create a dropdown menu + //================================================================================================== + // the first parameter should be the HTML element which will act actuator for the menu + //================================================================================================== + + @@MENU_DEFINITIONS@@ + + //================================================================================================== + // write drop downs into page + //================================================================================================== + // this method writes all the HTML for the menus into the page with document.write(). It must be + // called within the body of the HTML page. + //================================================================================================== + TransMenu.renderAll(); + } +"); + +class NervecenterMenu extends Menu { + private $menuJScript = "NOT-SET"; + private $menuJScriptEvents = "NOT-SET"; + private $menuID = "NOT-SET"; + + public function __construct($identification = "", $filename = "", Component $c = NULL) { + parent::__construct($identification, $filename, $c); + + $id = "mnua_" . str_replace(" ", "", strtolower($this->getID())); + $this->menuID = $id; + + if ($this->hasParent()) { + $this->menuJScript = "\tvar {$id} = ms.addMenu(document.getElementById('{$id}'));\n"; + } + } // end __construct + + public function getMenuID() { + return $this->menuID; + } + + public function setMenuID($myMenuID) { + $this->menuID = $myMenuID; + } + + public function getMenuJScript() { + $childJScript = ""; + foreach ($this->getChildren() as $component) { + $childJScript .= $component->getMenuJScript(); + } + + if (! $this->hasParent()) { + $this->menuJScript = str_replace("@@MENU_DEFINITIONS@@", $childJScript, TMENU_STUB); + } else { + $this->menuJScript .= "\n$childJScript\n"; + } + + return $this->menuJScript; + } + + public function getMenuJScriptEvents() { + return $this->menuJScriptEvents; + } + + public function __toString() { + if (! $this->hasParent()) { + $menuMarkup =<< + @@CHILD_ELEMENTS@@ +
                            + +EOD; + } else { + $name = gettext($this->getID()); + $id = "mnua_" . str_replace(" ", "", strtolower($this->getID())); + + $menuMarkup =<<{$name} + @@CHILD_ELEMENTS@@ +EOD; + } + + $childMarkup = ""; + foreach ($this->getChildren() as $component) { + $childMarkup .= $component; + } + + $menuMarkup = str_replace("@@CHILD_ELEMENTS@@", $childMarkup, $menuMarkup); + + return $menuMarkup; + } +} + +class NervecenterMenuItem extends MenuItem { + private $menuJScript = "NOT-SET"; + private $menuJScriptEvents = "NOT-SET"; + + public function __construct($identification = "", $filename = "", $href = "", Component $c = NULL) { + parent::__construct($identification, $filename, $href, $c); + + $href = $this->getHref() <> "" ? $this->getHref() : "{$this->getFile()}"; + $name = gettext($this->getID()); + $file = $this->getFile(); + + $this->menuJScript = $this->check_access("{$file}", "\t{$this->getParent()->getMenuID()}.addItem('{$name}', '{$href}');\n"); + } + + public function getMenuJScript() { + return $this->menuJScript; + } + + public function getMenuJScriptEvents() { + return $this->menuJScriptEvents; + } + + public function __toString() { + return ""; + } +} + +?> diff --git a/src/usr/local/www/themes/pfsense_ng_fs/new_tab_menu.css b/src/usr/local/www/themes/pfsense_ng_fs/new_tab_menu.css new file mode 100644 index 0000000..04c4cf2 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/new_tab_menu.css @@ -0,0 +1,101 @@ +/* + new_tab_menu.css + part of pfSense + Copyright (C) 2010-2011 Robert Zelaya + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + + Replace your old tab menu with the following code. To add a second tab menu line just cut and paste again. + The following code is dependent on new_tab_menu.css and images/new_tab_menu.png. + + + + + + + +*/ + +.newtabmenu ul, li{border:0; margin:0; padding:0; list-style:none;} + +.newtabmenu li{float:left; margin-right:2px; text-align: center;} +.newtabmenu a:link, .newtabmenu a:visited{ + background:url(images/new_tab_menu.png) right 45px; + color:#ffffff; /* noactive font */ + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + font-weight:bold; + font-size:.9em; + height:20px; + line-height:20px; + text-decoration:none; +} +.newtabmenu a span{ + background:url(images/new_tab_menu.png) left 45px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + height:20px; + margin-right:7px; + padding-left:7px; +} +.newtabmenu a:hover{ + background:url(images/new_tab_menu.png) right 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + color:#ffffff; /* hover over font */ +} +.newtabmenu a:hover span{ + background:url(images/new_tab_menu.png) left 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ +} + +/* -------------------------------- */ +/* ACTIVE ELEMENTS */ +.newtabmenu_active a:link, .newtabmenu_active a:visited, .newtabmenu_active a:visited, .newtabmenu_active a:hover{ + color:#000000; /* active font */ + background:url(images/new_tab_menu.png) right 0 no-repeat; +} +.newtabmenu_active a span, .newtabmenu_active a:hover span{ + background:url(images/new_tab_menu.png) left 0 no-repeat; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng_fs/no_big_logo b/src/usr/local/www/themes/pfsense_ng_fs/no_big_logo new file mode 100644 index 0000000..6e5c70d --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/no_big_logo @@ -0,0 +1 @@ +NO! DONT! \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng_fs/rrdcolors.inc.php b/src/usr/local/www/themes/pfsense_ng_fs/rrdcolors.inc.php new file mode 100644 index 0000000..dcb7a39 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/rrdcolors.inc.php @@ -0,0 +1,89 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This file is included by the RRD graphing page and sets the colors */ + +/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Traffic Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colortrafficdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* Packets Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colorpacketsup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Packets Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colorpacketsdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* 95th Percentile Lines Out, In */ +$colortraffic95 = array('660000', 'FF0000'); + +/* State Table pfrate, pfstates, pfnat, srcip, dstip */ +$colorstates = array('00AA00','990000','0000FF','000000','DD9B00'); + +/* Processor Usage user, nice, system, int, processes */ +$colorprocessor = array('00AA00','990000','0000FF','DD9B00','000000'); + +/* Memory Usage active, inact, free, cache, wire */ +$colormemory = array('00AA00','990000','0000FF','666666','DD9B00'); + +/* MBUF Usage current, cache, total, max */ +$colormbuf = array('0080FF','00E344','FF0000','000000'); + +/* Traffic Shaper Queues q1, q2, q3, q4, q5, q6, q7, q8, q9 */ +$colorqueuesup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +$colorqueuesdropup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +/* Quality Graph Delay >420, 180-420, 60-180, 20-60, <20, Delay Avg */ +$colorqualityrtt = array('990000','a83c3c','b36666','bd9090','cccccc','000000'); +/* Quality Graph Loss */ +$colorqualityloss = 'ee0000'; + +/* Wireless Graph SNR, Rate, Channel*/ +/* Cellular Graph RSSI, */ +$colorwireless = array('333333','a83c3c','999999'); + +/* SPAMD Times min area, avg area, max area, Time line */ +$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); +/* SPAMD Connections max area, min area, min line, max line, avg line */ +$colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600'); + +/* OpenVPN Users Online Users */ +$colorvpnusers = array('990000'); + +/* Captive Portal Total Users Total Users */ +/* Captive Portal Concurrent Concurrent Users */ +$colorcaptiveportalusers = array('990000'); + +?> diff --git a/src/usr/local/www/themes/pfsense_ng_fs/styles/jquery-ui-1.11.1.css b/src/usr/local/www/themes/pfsense_ng_fs/styles/jquery-ui-1.11.1.css new file mode 100644 index 0000000..8a8c54f --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/styles/jquery-ui-1.11.1.css @@ -0,0 +1,1226 @@ +/*! jQuery UI - v1.11.1 - 2014-09-22 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2C%20Helvetica%2C%20Arial%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=glass&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=inset_soft&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=glass&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=bbbbbb&fcHover=599fcf&iconColorHover=3383bb&bgColorActive=999999&bgTextureActive=inset_hard&bgImgOpacityActive=75&borderColorActive=999999&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=444444&iconColorHighlight=3383bb&bgColorError=c0402a&bgTextureError=flat&bgImgOpacityError=55&borderColorError=c0402a&fcError=ffffff&iconColorError=fbc856&bgColorOverlay=eeeeee&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0pxdow +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; + background-color: #990000; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #c9c9c9 url("../../../javascript/jquery/images/ui-bg_inset-soft_50_c9c9c9_1x100.png") 50% bottom repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #bbbbbb; + /* background: #dddddd url("../../../javascript/jquery/images/ui-bg_glass_35_dddddd_1x400.png") 50% 50% repeat-x; */ + color: #444444; + font-weight: bold; +} +.ui-widget-header a { + color: #444444; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_glass_60_eeeeee_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #3383bb; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #3383bb; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #bbbbbb; + background: #f8f8f8 url("../../../javascript/jquery/images/ui-bg_glass_100_f8f8f8_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #599fcf; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #599fcf; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #999999; + background: #999999 url("../../../javascript/jquery/images/ui-bg_inset-hard_75_999999_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #ffffff; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_55_eeeeee_40x100.png") 50% 50% repeat-x; + color: #444444; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #444444; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #c0402a; + background: #c0402a url("../../../javascript/jquery/images/ui-bg_flat_55_c0402a_40x100.png") 50% 50% repeat-x; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_70b2e1_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_454545_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_fbc856_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_0_eeeeee_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -4px 0 0 -4px; + padding: 4px; + background: #aaaaaa url("../../../javascript/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 0pxdow; +} diff --git a/src/usr/local/www/themes/pfsense_ng_fs/styles/menustyles.css b/src/usr/local/www/themes/pfsense_ng_fs/styles/menustyles.css new file mode 100644 index 0000000..06b3c7a --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/styles/menustyles.css @@ -0,0 +1,44 @@ +#navigation { + /* border:1px solid black; */ + width: 98%; + vertical-align: middle; + height: 16px; + padding-top: 4px; + } + +#menu { + /* background: #990000; */ + /* border-bottom:1px solid white; */ + padding: 0 0 0 0; + width: 98%; + vertical-align: middle; + height: 16px; + } +#menu a { + padding: 2px 28px 4px 28px; + text-decoration: none; + font-weight: bold; + font-size: 1.0em; + color: #FFFFFF; + width: 08%; + height: 16px; + } +#menu a.hover { + background: #AF2020; + } +#menu span { + display: none; + } + +#subnav { + font-size: 10px; + margin-bottom: 2em; + } +#subnav a { + color: #FF0000; /* #FB3B00; */ + margin-right: 1em; + } +#subnav span { + color: silver; + margin-right: 1em; + } diff --git a/src/usr/local/www/themes/pfsense_ng_fs/styles/transmenu.css b/src/usr/local/www/themes/pfsense_ng_fs/styles/transmenu.css new file mode 100644 index 0000000..f683574 --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/styles/transmenu.css @@ -0,0 +1,75 @@ +/* this is the clipping region for the menu. it's width and height get set by script, depending on the size of the items table */ +.transMenu { + position:absolute; + overflow:hidden; + left:-1000px; + top:-1000px; + } + +/* this is the main container for the menu itself. it's width and height get set by script, depending on the size of the items table */ +.transMenu .content { + position:absolute; + } + +/* this table comprises all menu items. each TR is one item. It is relatively positioned so that the shadow and background transparent divs can be positioned underneath it */ +.transMenu .items { + position:relative; + left:0px; top:0px; + z-index:2; + } + +.transMenu.top .items { + border-top:none; + } + +/* each TR.item is one menu item */ +.transMenu .item { + color: #FFFFFF; /* #336; */ + font-size: 1.1em; + font-weight: normal; + font-family:sans-serif; + text-decoration:none; + /* this is a hack for mac/ie5, whom incorrectly cascades the border properties of the parent table to each row */ + border:none; + cursor:pointer; + cursor:hand; + } + +/* this DIV is the semi-transparent white background of each menu. the -moz-opacity is a proprietary way to get transparency in mozilla, the filter is for IE/windows 5.0+. */ +/* we set the background color in script because ie mac does not use it; that browser only uses a semi-transparent white PNG that the spacer gif inside this DIV is replaced by */ +.transMenu .background { + position:absolute; + left:0px; top:0px; + z-index:1; + -moz-opacity:.8; + filter:alpha(opacity=80); + } + +/* same concept as .background, but this is the sliver of shadow on the right of the menu. It's left, height, and background are set by script. In IE5/mac, it uses a PNG */ +.transMenu .shadowRight { + position:absolute; + z-index:3; + top:3px; width:2px; + -moz-opacity:.4; + filter:alpha(opacity=40); + } + +/* same concept as .background, but this is the sliver of shadow on the bottom of the menu. It's top, width, and background are set by script. In IE5/mac, it uses a PNG */ +.transMenu .shadowBottom { + position:absolute; + z-index:1; + left:3px; height:2px; + -moz-opacity:.4; + filter:alpha(opacity=40); + } + +/* this is the class that is used when the mouse is over an item. script sets the row to this class when required. */ +.transMenu .item.hover { + background:#fdfdfd; + color:black; + } + +/* this is either the dingbat that indicates there is a submenu, or a spacer gif in it's place. We give it extra margin to create some space between the text and the dingbat */ +.transMenu .item img { + margin-left:10px; + } \ No newline at end of file diff --git a/src/usr/local/www/themes/pfsense_ng_fs/wizard.css b/src/usr/local/www/themes/pfsense_ng_fs/wizard.css new file mode 100644 index 0000000..f2c9f3e --- /dev/null +++ b/src/usr/local/www/themes/pfsense_ng_fs/wizard.css @@ -0,0 +1,1117 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.nowrap { white-space: nowrap; } + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + /* background: url('images/background.png') no-repeat; */ + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +.infobox { + width:100%; +} + +.infoboxsave { + padding-right: 10px; +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +.inputerrorsleft { + background-color: #990000; + width: 36px; +} + +.inputerrorsright { + background-color: #FFD9D1; + color: #000000; + font-size: 11px; + padding-left: 8px; + padding-top: 6px; +} diff --git a/src/usr/local/www/themes/the_wall/all.css b/src/usr/local/www/themes/the_wall/all.css new file mode 100644 index 0000000..35ddbd4 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/all.css @@ -0,0 +1,1308 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, sans-serif; + font-size: 0.9em; + +} + +.nowrap { white-space: nowrap; } + +.addgatewaybox { + background-color: #990000; + border-style: none none none none; + width: 225px; +} + +.infobox { + width:100%; +} + +.infoboxsave { + padding-right: 10px; +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +.inputerrorsleft { + background-color: #990000; + width: 36px; + text-align: center; +} + +.inputerrorsright { + background-color: #FFD9D1; + color: #000000; + font-size: 11px; + padding-left: 8px; + padding-top: 6px; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 220px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 11px; + font-family: "Trebuchet MS", sans-serif; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background: url('images/background.jpg') repeat-x; background-attachment:fixed; + background-position : center 0px; + background-color: #999999; +} + +a:link{color: #660000;} +a:visited{color: #660000;} +a:active{color: #660000;} +a:hover{color: #660000;} + + + + + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 202px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 90px; + width: 190px; + z-index: 1; + top: 55px; + left: -5px; + padding-top: 45px; + padding-left: 0px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 128px; + left: 230px; + font-size: 14px; + color: #000000; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -21px; + left: -20px; + border: 0; + padding: 0; + margin: 0; + width: 170px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.0em; + font-weight: normal; + font-family: Verdana; + font-weight: bold; + color: #000000; + padding-left: 5px; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 170px; + height: 16px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + +#content { + position: relative; + top: -5px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background: url('images/horizontal.png') repeat-y; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -5px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + position: relative; + top: -25px; + left: 3px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 5px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + width: 80px; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +/* dropdownmenu mainitems textcolor */ +#navigation ul li { + background-color: transparent; + font-size:13px; + color: #000000; +} +/* dropdownmenubackground */ +#navigation ul li ul li { + border: 0px solid #999999; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #999999; + color: #FFF; + filter:alpha(opacity=90); + -moz-opacity:0.9; + -khtml-opacity: 0.9; + opacity: 0.9; +} +#navigation ul li ul li:hover { + background-color: #cccccc; +} +/* textcolor in dropdownmenu */ +#navigation li li a { + display: block; + padding-left: 5px; + margin-right: 10px; + color: #000000; +} +/* textcolor mouseover in dropdownmenu */ +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; + color: #000000; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listrborder { + background-color: #FFFFFF; + border-left: 1px solid #999999; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + color: #FFFFFF; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 6px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #DDDDDD; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 6px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; + +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; + margin: 0px auto; + background: url('images/background.jpg') repeat-x; background-attachment:fixed; + background-position : center 0px; + background-color: #999999; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password, #password2 { + font-size: small; + width: 60%; + padding-left: 19px; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #B1B1B1; + padding-right: 6px; + padding-left: 6px; + color: #000000; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} +.widgetconfigdiv{ + background:#BBBBBB; + font-size: 11px; + color: #000000; + padding-right: 5px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +div#log div.log-entry-mini { + clear: both; +} + +div#log div.log-entry-mini span { + padding: 2px 2px 2px 2px; + padding-left: 6px; +} + +div#log span.log-action-mini-header, +div#log span.log-time-mini-header, +div#log span.log-interface-mini-header, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header, +div#log span.log-protocol-mini-header { + float: left; + text-align: left; + background-color: #B1B1B1; + font-size: 12px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-time-mini, +div#log span.log-interface-mini, +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-protocol-mini { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 11px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-action-mini-header { + width: 6%; +} + +div#log span.log-time-mini, +div#log span.log-time-mini-header { + width: 19%; +} + +div#log span.log-interface-mini, +div#log span.log-interface-mini-header { + width: 8%; +} + +div#log span.log-source-mini, +div#log span.log-source-mini-header { + width: 23%; +} + +div#log span.log-destination-mini, +div#log span.log-destination-mini-header { + width: 31%; +} + +div#log span.log-protocol-mini, +div#log span.log-protocol-mini-header { + width: 8%; + border-right: 1px solid #999; +} + +/* Sortable tables */ +table.sortable thead { + cursor: default; + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} + +/*thermal_sensors widget styles*/ + +.thermalSensorRow { width: 100%; border: 0px solid #ddd; padding: 1px; border-radius: 3px; } +.thermalSensorBarShell { position: relative; width: 100%; height: 5px; border: 1px solid lightgray; border-radius: 3px; } +.thermalSensorBar { position: absolute; width: 0%; height: 1px; z-index: 1; border-style: solid; border-radius: 3px; + background-color: LimeGreen; + border-top-width: 2px; border-top-color: Lime; + border-left-width: 0px; + border-right-width: 0px; + border-bottom-width: 2px; border-bottom-color: Green; +} +.thermalSensorTextShell { height: 20px; width: 100%; top: 3px; } +.thermalSensorText { float: left; height: 20px; top: 3px; } +.thermalSensorValue { float: left; height: 20px; top: 3px; font-weight: bold; margin-left: 10px;} + +.thermalSensorWarnThresh { position: absolute; background-color: orange; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } +.thermalSensorCritThresh { position: absolute; background-color: red; height: 16px; width: 2px; z-index: 2; margin-top: -8px; } + +.thermal_sensors_widget_scale000 { position: absolute; height: 5px; width: 1px; left: -1px; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale020 { position: absolute; height: 3px; width: 1px; left: 10%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale010 { position: absolute; height: 3px; width: 1px; left: 20%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale030 { position: absolute; height: 3px; width: 1px; left: 30%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale040 { position: absolute; height: 3px; width: 1px; left: 40%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale050 { position: absolute; height: 3px; width: 1px; left: 50%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale060 { position: absolute; height: 3px; width: 1px; left: 60%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale070 { position: absolute; height: 3px; width: 1px; left: 70%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale080 { position: absolute; height: 3px; width: 1px; left: 80%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale090 { position: absolute; height: 3px; width: 1px; left: 90%; margin-top: -4px; background-color: lightgray; z-index: 0; font-size: 0; } +.thermal_sensors_widget_scale100 { position: absolute; height: 9px; width: 1px; left: 100%; margin-top: -6px; background-color: lightgray; z-index: 0; font-size: 0; } + +.thermal_sensors_widget_mark100 { position: absolute; width: 15px; left: 96%; margin-top: -12px; font: 6pt Arial, sans-serif; text-align: left; color: #575757; } + +/* widget textarea styles - full width */ +.textarea_widget { + width: 100%; + resize:vertical; + -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; /* Firefox, other Gecko */ + box-sizing: border-box; /* IE 8+ */ +} diff --git a/src/usr/local/www/themes/the_wall/apple-touch-icon.png b/src/usr/local/www/themes/the_wall/apple-touch-icon.png new file mode 100755 index 0000000..7a4b975 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/apple-touch-icon.png differ diff --git a/src/usr/local/www/themes/the_wall/bottom-loader.js b/src/usr/local/www/themes/the_wall/bottom-loader.js new file mode 100644 index 0000000..a21f775 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/bottom-loader.js @@ -0,0 +1,10 @@ +// diff --git a/src/usr/local/www/themes/the_wall/favicon.ico b/src/usr/local/www/themes/the_wall/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/favicon.ico differ diff --git a/src/usr/local/www/themes/the_wall/graphlink.css b/src/usr/local/www/themes/the_wall/graphlink.css new file mode 100644 index 0000000..13f65f0 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/graphlink.css @@ -0,0 +1,43 @@ +/******************************************************************************* + $Id$ + + This file is part of the GraphLink software. + GraphLink is distributed under the MIT License. + Copyright (C) 2005-2006 Max Khitrov +*******************************************************************************/ + +/** + * Defines the background image used for the graph, as well as the actual data + * locations. + * Use padding-left and padding-top to align the data area correctly with your + * background image. + * Width and height should same as the dimensions of the image, minus the + * padding values in both directions. + */ +div.GraphLink { + width: 212px; + height: 60px; + padding-left: 38px; + padding-top: 10px; + background-image: url(/themes/nervecenter/images/misc/graph.png); + overflow: hidden; +} + +/** + * Defines the data display area. Modify to fit your background image. + */ +div.GraphLinkData { + width: 200px; + height: 50px; + overflow: hidden; +} + +/** + * Defines the look of one bar. Nothing to change here other than the color. + */ +span.GraphLinkBar { + background-color: #990000; + height: 100%; + float: left; + overflow: hidden; +} diff --git a/src/usr/local/www/themes/the_wall/images/alert_bgr.png b/src/usr/local/www/themes/the_wall/images/alert_bgr.png new file mode 100755 index 0000000..b186db0 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/alert_bgr.png differ diff --git a/src/usr/local/www/themes/the_wall/images/background.jpg b/src/usr/local/www/themes/the_wall/images/background.jpg new file mode 100755 index 0000000..cdd1df6 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/background.jpg differ diff --git a/src/usr/local/www/themes/the_wall/images/footer.png b/src/usr/local/www/themes/the_wall/images/footer.png new file mode 100755 index 0000000..399e0ff Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/footer.png differ diff --git a/src/usr/local/www/themes/the_wall/images/header.png b/src/usr/local/www/themes/the_wall/images/header.png new file mode 100755 index 0000000..25b813c Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/header.png differ diff --git a/src/usr/local/www/themes/the_wall/images/help.png b/src/usr/local/www/themes/the_wall/images/help.png new file mode 100755 index 0000000..1de05e3 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/help.png differ diff --git a/src/usr/local/www/themes/the_wall/images/horizontal.gif b/src/usr/local/www/themes/the_wall/images/horizontal.gif new file mode 100755 index 0000000..a280dcb Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/horizontal.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/horizontal.png b/src/usr/local/www/themes/the_wall/images/horizontal.png new file mode 100755 index 0000000..e774028 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/horizontal.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/favicon.ico b/src/usr/local/www/themes/the_wall/images/icons/favicon.ico new file mode 100644 index 0000000..3440bf2 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/favicon.ico differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_3g.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_3g.gif new file mode 100755 index 0000000..46ccb92 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_3g.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_3g_inactive.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_3g_inactive.gif new file mode 100755 index 0000000..cf983e4 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_3g_inactive.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_advanced.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_advanced.gif new file mode 100755 index 0000000..3ede1ff Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_advanced.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_advanced_s.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_advanced_s.gif new file mode 100755 index 0000000..b233549 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_advanced_s.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_alert.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_alert.gif new file mode 100755 index 0000000..7646941 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_alert.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_alias_host.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_alias_host.gif new file mode 100755 index 0000000..ad43e17 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_alias_host.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_alias_net.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_alias_net.gif new file mode 100755 index 0000000..abd1b8b Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_alias_net.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_alias_port.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_alias_port.gif new file mode 100755 index 0000000..4acf2aa Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_alias_port.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_alias_url.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_alias_url.gif new file mode 100755 index 0000000..660571e Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_alias_url.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_alias_url_reload.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_alias_url_reload.gif new file mode 100755 index 0000000..55c1c4a Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_alias_url_reload.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_block.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_block.gif new file mode 100755 index 0000000..670c968 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_block.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_block_add.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_block_add.gif new file mode 100755 index 0000000..eb726d6 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_block_add.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_block_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_block_d.gif new file mode 100755 index 0000000..e6345fe Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_block_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_cablenic.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_cablenic.gif new file mode 100755 index 0000000..a071c66 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_cablenic.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_cal.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_cal.gif new file mode 100755 index 0000000..a9c7c87 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_cal.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_cal_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_cal_mo.gif new file mode 100755 index 0000000..1647e2f Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_cal_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_carp.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_carp.gif new file mode 100755 index 0000000..9454a82 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_carp.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_carp_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_carp_d.gif new file mode 100755 index 0000000..2ba8db2 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_carp_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_chain.png b/src/usr/local/www/themes/the_wall/images/icons/icon_chain.png new file mode 100644 index 0000000..12db07a Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_chain.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_check.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_check.gif new file mode 100755 index 0000000..393674d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_check.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_clock_green.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_clock_green.gif new file mode 100755 index 0000000..e171ba8 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_clock_green.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_clock_grey.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_clock_grey.gif new file mode 100755 index 0000000..00c865a Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_clock_grey.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_clock_red.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_clock_red.gif new file mode 100755 index 0000000..7b412ee Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_clock_red.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_close.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_close.gif new file mode 100755 index 0000000..e0f86a7 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_close.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_configure.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_configure.gif new file mode 100755 index 0000000..7182e0d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_configure.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_down.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_down.gif new file mode 100755 index 0000000..b71a9c5 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_down.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_down_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_down_d.gif new file mode 100755 index 0000000..70a7473 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_down_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_down_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_down_mo.gif new file mode 100755 index 0000000..584587a Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_down_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_e.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_e.gif new file mode 100755 index 0000000..2950800 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_e.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_e_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_e_mo.gif new file mode 100755 index 0000000..9ba5738 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_e_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_error.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_error.gif new file mode 100755 index 0000000..e0fa659 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_error.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_exclam.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_exclam.gif new file mode 100755 index 0000000..36c2ec7 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_exclam.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_flag_de.png b/src/usr/local/www/themes/the_wall/images/icons/icon_flag_de.png new file mode 100755 index 0000000..069cbbe Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_flag_de.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_flag_en.png b/src/usr/local/www/themes/the_wall/images/icons/icon_flag_en.png new file mode 100755 index 0000000..bd7f9a5 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_flag_en.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_flag_es.png b/src/usr/local/www/themes/the_wall/images/icons/icon_flag_es.png new file mode 100755 index 0000000..434776c Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_flag_es.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_flag_pt_BR.png b/src/usr/local/www/themes/the_wall/images/icons/icon_flag_pt_BR.png new file mode 100755 index 0000000..f786349 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_flag_pt_BR.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_cert.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_cert.png new file mode 100755 index 0000000..48a34b6 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_cert.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_file.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_file.png new file mode 100755 index 0000000..48a9ed2 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_file.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_group.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_group.png new file mode 100755 index 0000000..7d929c0 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_group.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_host.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_host.png new file mode 100755 index 0000000..867ef2c Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_host.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_imp.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_imp.png new file mode 100755 index 0000000..f667cfc Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_imp.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_mail.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_mail.png new file mode 100755 index 0000000..d2d4548 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_mail.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_pwd.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_pwd.png new file mode 100755 index 0000000..06b53a1 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_pwd.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_search.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_search.png new file mode 100755 index 0000000..33de926 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_search.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_time.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_time.png new file mode 100755 index 0000000..aa8300a Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_time.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_unknown.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_unknown.png new file mode 100755 index 0000000..1857d0e Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_unknown.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_url.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_url.png new file mode 100755 index 0000000..cf56792 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_url.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_user.png b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_user.png new file mode 100755 index 0000000..e00eebe Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_frmfld_user.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_fw-update.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_fw-update.gif new file mode 100755 index 0000000..52c18ac Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_fw-update.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_help.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_help.gif new file mode 100644 index 0000000..84c84db Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_help.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_ifalias.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_ifalias.gif new file mode 100755 index 0000000..0c569a7 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_ifalias.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_ifalias_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_ifalias_d.gif new file mode 100755 index 0000000..faa84d4 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_ifalias_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_import_alias.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_import_alias.gif new file mode 100755 index 0000000..d11a5f0 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_import_alias.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_in.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_in.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_in_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_in_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_info_pkg.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_info_pkg.gif new file mode 100755 index 0000000..cd3a532 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_info_pkg.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_interface_down.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_interface_down.gif new file mode 100755 index 0000000..0626655 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_interface_down.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_interface_up.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_interface_up.gif new file mode 100755 index 0000000..1449513 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_interface_up.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_left.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_left.gif new file mode 100755 index 0000000..8effefe Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_left.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_left_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_left_d.gif new file mode 100755 index 0000000..c778014 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_left_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_left_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_left_mo.gif new file mode 100755 index 0000000..84c6fa2 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_left_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_log.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_log.gif new file mode 100755 index 0000000..4a1983a Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_log.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_log_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_log_d.gif new file mode 100755 index 0000000..d31bd9b Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_log_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_log_s.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_log_s.gif new file mode 100755 index 0000000..f9fda33 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_log_s.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_log_s_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_log_s_d.gif new file mode 100755 index 0000000..fb2c05f Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_log_s_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_logs.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_logs.gif new file mode 100644 index 0000000..afe0104 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_logs.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_match.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_match.gif new file mode 100644 index 0000000..215571f Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_match.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_match_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_match_d.gif new file mode 100644 index 0000000..6e4c364 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_match_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_minus.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_minus.gif new file mode 100755 index 0000000..417544f Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_minus.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_open.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_open.gif new file mode 100755 index 0000000..ac3da14 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_open.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_other.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_other.gif new file mode 100755 index 0000000..e6f780f Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_other.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_other_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_other_d.gif new file mode 100755 index 0000000..b08d970 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_other_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_out.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_out.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_out_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_out_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_parp.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_parp.gif new file mode 100755 index 0000000..96acaf3 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_parp.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_parp_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_parp_d.gif new file mode 100755 index 0000000..7d7d00e Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_parp_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_pass.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_pass.gif new file mode 100755 index 0000000..fe1bb0d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_pass.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_pass_add.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_pass_add.gif new file mode 100755 index 0000000..f7f4c20 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_pass_add.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_pass_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_pass_d.gif new file mode 100755 index 0000000..6adc431 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_pass_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_plus.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_plus.gif new file mode 100755 index 0000000..2a94eeb Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_plus.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_plus_bl.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_plus_bl.gif new file mode 100755 index 0000000..8dcd7c0 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_plus_bl.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_plus_bl_p.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_plus_bl_p.gif new file mode 100755 index 0000000..0c79849 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_plus_bl_p.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_plus_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_plus_d.gif new file mode 100755 index 0000000..ebc7457 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_plus_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_plus_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_plus_mo.gif new file mode 100755 index 0000000..1c7ca08 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_plus_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_plus_p.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_plus_p.gif new file mode 100755 index 0000000..eb41284 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_plus_p.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall.gif new file mode 100755 index 0000000..d78b867 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_d.gif new file mode 100755 index 0000000..13658f7 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_mo.gif new file mode 100755 index 0000000..90b576e Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg.gif new file mode 100755 index 0000000..9aebb03 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg_d.gif new file mode 100755 index 0000000..4ab4992 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg_mo.gif new file mode 100755 index 0000000..7025d20 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_pkg_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml.gif new file mode 100755 index 0000000..4542432 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml_d.gif new file mode 100755 index 0000000..8d3a68d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml_mo.gif new file mode 100755 index 0000000..15e0aed Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reinstall_xml_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reject.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reject.gif new file mode 100755 index 0000000..5565cd6 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reject.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_reject_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_reject_d.gif new file mode 100755 index 0000000..6c09fae Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_reject_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_right.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_right.gif new file mode 100755 index 0000000..fdf2d8b Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_right.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_service_restart.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_service_restart.gif new file mode 100755 index 0000000..e49fbd7 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_service_restart.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_service_restart_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_service_restart_d.gif new file mode 100755 index 0000000..a5d6d7c Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_service_restart_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_service_running.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_service_running.gif new file mode 100644 index 0000000..543fd56 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_service_running.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_service_start.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_service_start.gif new file mode 100755 index 0000000..09bb58f Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_service_start.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_service_start_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_service_start_d.gif new file mode 100755 index 0000000..f58f111 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_service_start_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_service_status.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_service_status.gif new file mode 100644 index 0000000..a93bcfb Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_service_status.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_service_stop.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_service_stop.gif new file mode 100755 index 0000000..922addc Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_service_stop.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_service_stop_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_service_stop_d.gif new file mode 100755 index 0000000..b4cfdea Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_service_stop_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_service_stopped.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_service_stopped.gif new file mode 100644 index 0000000..f93a25d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_service_stopped.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_services_restart_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_services_restart_mo.gif new file mode 100755 index 0000000..a092b40 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_services_restart_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_services_start_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_services_start_mo.gif new file mode 100755 index 0000000..ecdb58f Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_services_start_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_services_stop_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_services_stop_mo.gif new file mode 100755 index 0000000..c00e208 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_services_stop_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_system-group-grey.png b/src/usr/local/www/themes/the_wall/images/icons/icon_system-group-grey.png new file mode 100755 index 0000000..d7b964d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_system-group-grey.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_system-group.png b/src/usr/local/www/themes/the_wall/images/icons/icon_system-group.png new file mode 100755 index 0000000..1c974f2 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_system-group.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_system-user-grey.png b/src/usr/local/www/themes/the_wall/images/icons/icon_system-user-grey.png new file mode 100755 index 0000000..2f6047d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_system-user-grey.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_system-user.png b/src/usr/local/www/themes/the_wall/images/icons/icon_system-user.png new file mode 100755 index 0000000..ef82156 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_system-user.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_system_lock_screen.png b/src/usr/local/www/themes/the_wall/images/icons/icon_system_lock_screen.png new file mode 100755 index 0000000..30f306d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_system_lock_screen.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_system_logout.png b/src/usr/local/www/themes/the_wall/images/icons/icon_system_logout.png new file mode 100755 index 0000000..9bbb6c7 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_system_logout.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_trapped.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_trapped.gif new file mode 100755 index 0000000..ffeb2cd Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_trapped.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_trapped_p.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_trapped_p.gif new file mode 100755 index 0000000..6d46aaf Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_trapped_p.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_ts_rule.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_ts_rule.gif new file mode 100755 index 0000000..e15ab6c Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_ts_rule.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_ts_rule_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_ts_rule_d.gif new file mode 100755 index 0000000..f776281 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_ts_rule_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_up.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_up.gif new file mode 100755 index 0000000..883c5a2 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_up.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_up_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_up_d.gif new file mode 100755 index 0000000..0ddcce2 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_up_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_up_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_up_mo.gif new file mode 100755 index 0000000..9f869a4 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_up_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_wlan.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_wlan.gif new file mode 100755 index 0000000..1f0addc Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_wlan.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_wlan_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_wlan_d.gif new file mode 100755 index 0000000..35bf580 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_wlan_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_wol_all.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_wol_all.gif new file mode 100755 index 0000000..2d22182 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_wol_all.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_wzd_nsaved.png b/src/usr/local/www/themes/the_wall/images/icons/icon_wzd_nsaved.png new file mode 100755 index 0000000..21cb27d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_wzd_nsaved.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_wzd_saved.png b/src/usr/local/www/themes/the_wall/images/icons/icon_wzd_saved.png new file mode 100755 index 0000000..ab82946 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_wzd_saved.png differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_x.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_x.gif new file mode 100755 index 0000000..24e4d49 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_x.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_x_d.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_x_d.gif new file mode 100755 index 0000000..d2bfbc8 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_x_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_x_mo.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_x_mo.gif new file mode 100755 index 0000000..da7b57c Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_x_mo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/icon_x_p.gif b/src/usr/local/www/themes/the_wall/images/icons/icon_x_p.gif new file mode 100755 index 0000000..8828fa6 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/icon_x_p.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/in.gif b/src/usr/local/www/themes/the_wall/images/icons/in.gif new file mode 100755 index 0000000..f1da771 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/in.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/in_d.gif b/src/usr/local/www/themes/the_wall/images/icons/in_d.gif new file mode 100755 index 0000000..18e26be Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/in_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/out.gif b/src/usr/local/www/themes/the_wall/images/icons/out.gif new file mode 100755 index 0000000..1a1d1d5 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/out.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/icons/out_d.gif b/src/usr/local/www/themes/the_wall/images/icons/out_d.gif new file mode 100755 index 0000000..879f1da Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/icons/out_d.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/log.png b/src/usr/local/www/themes/the_wall/images/log.png new file mode 100755 index 0000000..762ba80 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/log.png differ diff --git a/src/usr/local/www/themes/the_wall/images/logo.gif b/src/usr/local/www/themes/the_wall/images/logo.gif new file mode 100755 index 0000000..a71ce5a Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/logo.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/logobig.jpg b/src/usr/local/www/themes/the_wall/images/logobig.jpg new file mode 100755 index 0000000..2ef196d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/logobig.jpg differ diff --git a/src/usr/local/www/themes/the_wall/images/menu_down.gif b/src/usr/local/www/themes/the_wall/images/menu_down.gif new file mode 100755 index 0000000..137de8d Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/menu_down.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/menu_right.gif b/src/usr/local/www/themes/the_wall/images/menu_right.gif new file mode 100755 index 0000000..881327c Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/menu_right.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/bar_blue.gif b/src/usr/local/www/themes/the_wall/images/misc/bar_blue.gif new file mode 100755 index 0000000..741186a Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/bar_blue.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/bar_gray.gif b/src/usr/local/www/themes/the_wall/images/misc/bar_gray.gif new file mode 100755 index 0000000..e86e245 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/bar_gray.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/bar_left.gif b/src/usr/local/www/themes/the_wall/images/misc/bar_left.gif new file mode 100755 index 0000000..af751fa Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/bar_left.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/bar_right.gif b/src/usr/local/www/themes/the_wall/images/misc/bar_right.gif new file mode 100755 index 0000000..ff12d9e Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/bar_right.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/bullet_toggle_minus.png b/src/usr/local/www/themes/the_wall/images/misc/bullet_toggle_minus.png new file mode 100755 index 0000000..37db2fd Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/bullet_toggle_minus.png differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/bullet_toggle_plus.png b/src/usr/local/www/themes/the_wall/images/misc/bullet_toggle_plus.png new file mode 100755 index 0000000..fba7af9 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/bullet_toggle_plus.png differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/button.gif b/src/usr/local/www/themes/the_wall/images/misc/button.gif new file mode 100755 index 0000000..e85dbb3 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/button.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/graph.png b/src/usr/local/www/themes/the_wall/images/misc/graph.png new file mode 100755 index 0000000..507ec75 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/graph.png differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/key_128.gif b/src/usr/local/www/themes/the_wall/images/misc/key_128.gif new file mode 100755 index 0000000..ea5ae34 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/key_128.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/key_152.gif b/src/usr/local/www/themes/the_wall/images/misc/key_152.gif new file mode 100755 index 0000000..6c7fc03 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/key_152.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/key_256.gif b/src/usr/local/www/themes/the_wall/images/misc/key_256.gif new file mode 100755 index 0000000..3e1c377 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/key_256.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/key_64.gif b/src/usr/local/www/themes/the_wall/images/misc/key_64.gif new file mode 100755 index 0000000..87892bd Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/key_64.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/loader.gif b/src/usr/local/www/themes/the_wall/images/misc/loader.gif new file mode 100755 index 0000000..a98cf78 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/loader.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/loader_all.gif b/src/usr/local/www/themes/the_wall/images/misc/loader_all.gif new file mode 100755 index 0000000..cb6bc0c Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/loader_all.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/loader_filter.gif b/src/usr/local/www/themes/the_wall/images/misc/loader_filter.gif new file mode 100755 index 0000000..b838b17 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/loader_filter.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/loader_tab.gif b/src/usr/local/www/themes/the_wall/images/misc/loader_tab.gif new file mode 100755 index 0000000..a98cf78 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/loader_tab.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/logon.png b/src/usr/local/www/themes/the_wall/images/misc/logon.png new file mode 100755 index 0000000..acd388b Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/logon.png differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/progress_bar.gif b/src/usr/local/www/themes/the_wall/images/misc/progress_bar.gif new file mode 100755 index 0000000..3b4aa52 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/progress_bar.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/rrd_error.png b/src/usr/local/www/themes/the_wall/images/misc/rrd_error.png new file mode 100755 index 0000000..a79ecf3 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/rrd_error.png differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/status_alerter.gif b/src/usr/local/www/themes/the_wall/images/misc/status_alerter.gif new file mode 100755 index 0000000..7ff1e95 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/status_alerter.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/status_carpmaster.gif b/src/usr/local/www/themes/the_wall/images/misc/status_carpmaster.gif new file mode 100755 index 0000000..2c32908 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/status_carpmaster.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/status_left.gif b/src/usr/local/www/themes/the_wall/images/misc/status_left.gif new file mode 100755 index 0000000..b5a2930 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/status_left.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/status_page_loading.gif b/src/usr/local/www/themes/the_wall/images/misc/status_page_loading.gif new file mode 100755 index 0000000..067ef18 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/status_page_loading.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/status_reload_all.gif b/src/usr/local/www/themes/the_wall/images/misc/status_reload_all.gif new file mode 100755 index 0000000..72de6bd Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/status_reload_all.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/status_reload_filter.gif b/src/usr/local/www/themes/the_wall/images/misc/status_reload_filter.gif new file mode 100755 index 0000000..d72761a Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/status_reload_filter.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/status_right.gif b/src/usr/local/www/themes/the_wall/images/misc/status_right.gif new file mode 100755 index 0000000..bf66fdb Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/status_right.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/tri_c.gif b/src/usr/local/www/themes/the_wall/images/misc/tri_c.gif new file mode 100755 index 0000000..317b758 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/tri_c.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/tri_c_black.gif b/src/usr/local/www/themes/the_wall/images/misc/tri_c_black.gif new file mode 100755 index 0000000..309846e Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/tri_c_black.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/tri_o.gif b/src/usr/local/www/themes/the_wall/images/misc/tri_o.gif new file mode 100755 index 0000000..eb95c32 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/tri_o.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/tri_o_black.gif b/src/usr/local/www/themes/the_wall/images/misc/tri_o_black.gif new file mode 100755 index 0000000..f818f3b Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/tri_o_black.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/widget_loader.gif b/src/usr/local/www/themes/the_wall/images/misc/widget_loader.gif new file mode 100755 index 0000000..ca35e2a Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/widget_loader.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/misc/widget_loader_old.gif b/src/usr/local/www/themes/the_wall/images/misc/widget_loader_old.gif new file mode 100755 index 0000000..fad101f Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/misc/widget_loader_old.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/new_tab_menu.png b/src/usr/local/www/themes/the_wall/images/new_tab_menu.png new file mode 100755 index 0000000..4bdfcef Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/new_tab_menu.png differ diff --git a/src/usr/local/www/themes/the_wall/images/status.png b/src/usr/local/www/themes/the_wall/images/status.png new file mode 100755 index 0000000..a3e368e Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/status.png differ diff --git a/src/usr/local/www/themes/the_wall/images/transparent.gif b/src/usr/local/www/themes/the_wall/images/transparent.gif new file mode 100755 index 0000000..89c5530 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/transparent.gif differ diff --git a/src/usr/local/www/themes/the_wall/images/transparent_pixel.gif b/src/usr/local/www/themes/the_wall/images/transparent_pixel.gif new file mode 100755 index 0000000..35d42e8 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/images/transparent_pixel.gif differ diff --git a/src/usr/local/www/themes/the_wall/javascript/ie7/blank.gif b/src/usr/local/www/themes/the_wall/javascript/ie7/blank.gif new file mode 100755 index 0000000..a4fe2e6 Binary files /dev/null and b/src/usr/local/www/themes/the_wall/javascript/ie7/blank.gif differ diff --git a/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-box-model.js b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-box-model.js new file mode 100644 index 0000000..45543f6 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-box-model.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-box-model",function(){var NUMERIC="\x5cs*:\x5cs*\x5cd[\x5cw%]*",UNIT=/^\d\w*$/,PERCENT=/^\d+%$/,PIXEL=/^\d+(px)?$/;var MATCH=(appVersion<6)?/\b(min|max)-(width|height)\s*:\s*\d/gi:/\b(min|max)-width\s*:\s*\d/gi;var AUTO=(appVersion<5.5)?/^auto|0cm$/:/^auto$/;var ie7_tmp=tmpElement();push(IE7.recalcs,function removeTempElement(){if(ie7_tmp.parentElement)ie7_tmp.parentElement.removeChild(ie7_tmp)});CSSFixes.addFix(MATCH,function(match){return match.slice(0,3)+match.charAt(4).toUpperCase()+match.slice(5)});var viewport=(quirksMode)?document.body:documentElement;function isFixed(element){return element.style.position=="fixed"||element.currentStyle.position=="fixed"};function layoutParent(element){var layoutParent=element.offsetParent;while(layoutParent&&!hasLayout(layoutParent))layoutParent=layoutParent.offsetParent;if(!layoutParent||isFixed(element))layoutParent=viewport;return layoutParent};function fixWidth(HEIGHT){fixWidth=function(element,value){if(!element.runtimeStyle.fixedWidth&&(!isHTML||element.tagName!="HR")){if(!value)value=element.currentStyle.width;element.runtimeStyle.fixedWidth=(UNIT.test(value))?Math.max(0,getFixedWidth(element,value)):value;element.runtimeStyle.width=element.runtimeStyle.fixedWidth;boxSizing(element)}};if(quirksMode)CSSFixes.addRecalc("width\x5cs*:\x5cs*\x5cd\x5cw*[^%]",fixWidth);var getFixedWidth=(quirksMode)?function(element,value){return getPixelWidth(element,value)+getBorderWidth(element)+getPaddingWidth(element)}:function(element,value){return getPixelWidth(element,value)};function getBorderWidth(element){return element.offsetWidth-element.clientWidth};function getPaddingWidth(element){return getPixelWidth(element,element.currentStyle.paddingLeft)+getPixelWidth(element,element.currentStyle.paddingRight)};function getMarginWidth(element){return((element.currentStyle.marginLeft=="auto")?0:getPixelLeft(element,element.currentStyle.marginLeft))+((element.currentStyle.marginRight=="auto")?0:getPixelLeft(element,element.currentStyle.marginRight))};function minWidth(element){minWidth[minWidth.count++]=element;if(element.currentStyle.minHeight=="auto")element.runtimeStyle.minHeight=0;fixWidth(element);boxSizing(element);resizeWidth(element)};minWidth.count=0;CSSFixes.addRecalc("min-width"+NUMERIC,minWidth);eval(String(minWidth).replace(/min/g,"max"));maxWidth.count=0;CSSFixes.addRecalc("max-width"+NUMERIC,maxWidth);function resizeWidth(element){var rect=element.getBoundingClientRect();var width=rect.right-rect.left;if(element.currentStyle.maxWidth&&width>=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)}); diff --git a/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-core.js b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-core.js new file mode 100644 index 0000000..b11e2b1 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-core.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-css-strict.js b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-css-strict.js new file mode 100644 index 0000000..4406d7a --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-css-strict.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-strict",function(){if(!modules["ie7-css2"])return;var NONE=[],ID=/#/g,CLASS=/[:@\.]/g,TAG=/^\w|[\s>+~]\w/g;IE7.parser.parse=function(cssText){var DYNAMIC=new RegExp("(.*):("+dynamicPseudoClasses+")(.*)");function addRule(selector,cssText){var match=selector.match(DYNAMIC);if(match)new DynamicRule(selector,match[1],match[2],match[3],cssText);else new Rule(selector,cssText)};cssText=cssText.replace(IE7.PseudoElement.ALL,IE7.PseudoElement.ID);var RULE=/([^\{]+)\{(\d+)\}/g,match;while(match=RULE.exec(cssText)){addRule(match[1],match[2]);if(appVersion<5.5)cssText=cssText.slice(match.lastIndex)}IE7.classes.sort(Rule.compare);return IE7.classes.join("\n")};function Rule(selector,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.Class;this.inherit(selector)};Rule.prototype=new IE7.Class.ancestor;Rule.prototype.toString=function(){return "."+this.name+"{"+this.cssText+"}"};Rule.score=function(selector){return(selector.match(ID)||NONE).length*10000+(selector.match(CLASS)||NONE).length*100+(selector.match(TAG)||NONE).length};Rule.compare=function(rule1,rule2){return rule1.specificity-rule2.specificity};function DynamicRule(selector,attach,dynamicPseudoClass,target,cssText){this.cssText=cssText;this.specificity=Rule.score(selector);this.inherit=IE7.DynamicStyle;this.inherit(selector,attach,dynamicPseudoClass,target)};DynamicRule.prototype=new IE7.DynamicStyle.ancestor;DynamicRule.prototype.toString=Rule.prototype.toString}); diff --git a/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-css2.js b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-css2.js new file mode 100644 index 0000000..7121c8e --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-css2.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i"){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!ù.´)Ó £(){ÿ{ù.´=ª;¢ ¢Æ=ª.¢´=Ó ¤×;£ ¢©(){if(«.¢Ù)«.¢Ù.Í.¤Ö=¤þ};ª.Õ=£(){¤ ¤ÿ};¢ â=(¤Ù.±(¢î.£Ë))?£(£Ì){ù.â(´+¥¡+£Ì)}:¢Æ;¢ Å=¤Ñ.Å.¬(¤Ú)[1];if(¤Û.±(¢î.£Ë)||Å<5||!¤Ü.±(«.Ù.ü))¤ ¢©();¢ è=¢£(«.¤Í!=¥¢);¢ ë=(¤Ë «.£Ê==¥£)?!¤Ýi.±(¢î.¢Ç):¢£(«.£Ê!=¥¤);¢ ¢í=¥¥;¢ ¢ë=¢í;if(!ë)¢ë+=¥¦;¢ ¢¹;¢ Ù=«.Ù;¢ ó={};ª.¢´=£(£È,ô,£É){if(!ó)¤;if(¢«)¢¬(¥§+¢Î(ô));if(£É){ô();ô=¢Æ}ó[£È]=ô};¢ £Ç=¤Þ;£ ¢È(²,¹){if(£Ç.±(²))²=(¹||¥¨)+²;¤ ²};£ ¢Ä(²,¹){²=¢È(²,¹);¤ ².»(0,².£Ã(¥©)+1)};¢ ¹=¢Ä(«.£Æ[«.£Æ.­-1].¤Å);¢ ¢Ê=Ó ¤Ä(¥ª);£ ã(²,¹){ÿ{²=¢È(²,¹);¢Ê.¤Á(¥«,²,Þ);¢Ê.¤¿();¤ ¢Ê.¤¾}õ(¢à){â(¥¬+²);¤ ¥¨}};¢ ·=£(¢É,¢À){¤ ¢É.·(¢À)};¢ ¢½=£(¢É){¤ ¢É.¢½()};if(Å<5.5)¢¬(ã(¥­,¹));if(«.¢Í==¥®||!ë)«.¤¹();Ö «.¤¸(¥¯);ª.¶=«.É[«.É.­-1];ª.¶.§=¢í;ª.¶.Æ=×;¢ §={};£ £¿(¶,¹){¢ ¢§=¢È(¶.²,¹);if(§[¢§])¤ ¥¨;§[¢§]=(¶.ý)?¥¨:£Å(¢Ã(¶,¹),¢Ä(¶.²,¹));¤ §[¢§]};¢ ¢Ã=£(¶){¤ ¶.§};¢ £Ä=¤ßgi;£ £Å(§,¢Ç){¤ §.³(£Ä,¥°+¢Ç.»(0,¢Ç.£Ã(¥©)+1)+¥±)};ª.Ë=[];ª.£¾=¢Æ;¢ ä=Þ;£ _ã(){ÿ{ä=×;¢ £Á=¤ài;¢ É=«.É;¢ ¢ì=[];¢ ¢Å=«.£µ(¥²);¯(¢ i=¢Å.­-1;i>=0;i--){·(¢ì,¤á.±(¢Å[i].£Â)?¥¨:¢Å[i].£Â)}£ ¢Ã(¶,¹){¢ §=¥¨;if(£Á.±(¶.¤µ)){¯(¢ i=0;i<¶.£À.­;i++){§+=¢¡.¤´(¶.£À[i],¢Ä(¶.²,¹))}§+=((¶.²)?£¿(¶,¹):¢½(¢ì))}¤ §};´.§=¥¨;¯(i=0;i<É.­;i++)´.§+=¢Ã(É[i],¥¨);´.§=£´(´.§);¯(i in ó)ó[i]();£¦ ó;if(¢¹)¢¹.¢·();Ñ.¢·();´.£¾();´.¶.§=¢ë+£³(´.§);¯(i=0;i<É.­;i++){if(!É[i].ý&&!É[i].Æ)É[i].§=¥¨}´.¢Â();â(¥³)}õ(¢¨){â(¥´+¢¨.¢ï)}¢Ë{¢©()}};ª.¢Â=£(){Ñ.¢Â();¯(¢ i=0;i<ª.Ë.­;i++)ª.Ë[i]()};¢ Ñ=Ó £(){¢ Ç=[];ª.û=£(){·(Ç,¢¡)};¢ Ë=[];ª.Ú=£(á,¢Þ){¢ £½=Ó ¢æ(¥µ+á,¥¶);¢ §=´.§;á=[];Ê(¬=£½.¤²(§)){·(á,¬[1]);if(Å<5.5)§=§.»(¬.¤±)}if(á.­){á=á.Õ();·(Ë,¢¡)}};ª.¢·=£(){¯(¢ i=0;i<Ç.­;i++){´.§=´.§.³(Ç[i][0],Ç[i][1])}ª.Ú(¥·,é);ª.Ú(¥¸,£(¡){if(¡.¢².©.Ü==¥¹)é(¡.¢²)})};ª.¢Â=£(){¯(¢ i=0;i<Ë.­;i++){¢ î=¢¶(Ë[i][0]);¯(¢ j=0;j<î.­;j++)Ë[i][1](î[j])}};ª.û(¤âgi,¥º);if(Å<6)ª.û(¤ãgi,¥»);if(è){¢ à=¥¼.¢ç(¥½);¯(¢ i=0;i<à.­;i++)à[à[i]]=à[i-1]||¥¾;£ ³($,$1,$2,$3){¤ $1+à[$3]};ª.û(Ó ¢æ(¥¿+à.¢å(¥À)+¥Á,¥¶),³)}};¢ £¹=¤ä;¢ £¸=¤åg;¢ £·=¤æ;¢ £¼=¤çg;¢ £»=¥Â;¢ þ={};£ ¢¶(µ,¦){¢ ¢è=!¦;¢ ¢é=(¦)?(¦.¤§==¤¦)?¦:[¦]:[«];¢ ñ=µ.³(£¼,£»).¢ç(¥½);¢ ¬=[];¯(¢ i=0;i<ñ.­;i++){µ=£º(ñ[i]);if(µ.»(0,3).¢å(¥¨)==¥Ã){µ=µ.»(2);¦=£¶(¢é,µ[1])}Ö ¦=¢é;¢ j=0,ß,®,Á,ò=¥¨;Ê(j<µ.­){ß=µ[j++];®=µ[j++];ò+=ß+®;Á=¥¨;if(µ[j]==¥Ä){Ê(µ[j++]!=¥Á)Á+=µ[j];Á=Á.»(0,-1);ò+=¥Ä+Á+¥Á}¦=(¢è&&þ[ò])?þ[ò]:¢ß(¦,ß,®,Á);if(¢è)þ[ò]=¦}¬=¬.¤¥(¦)}¤ ¬};£ £º(µ){if(£¹.±(µ))µ=¥Å+µ;¤ µ.¬(£¸)};£ ¢ß(¦,ß,®,Á){¢ À=¥¨;if(£·.±(®)){®=®.¢ç(¥À);À=®[0];®=®[1]}¢ ¸=[];if(ñ[ß])ñ[ß](¸,¦,®,À||Á);¤ ¸};£ £¶(¦,id){¢ ¸=[],i,j;¯(i=0;i<¦.­;i++){¢ ¬=¦[i].ì.¢À(id);if(¬){if(¬.­==¤¤)·(¸,¬);Ö ¯(j=0;j<¬.­;j++)·(¸,¬[j])}}¤ ¸};¢ ñ={¥Å:£(¸,¦,®,À){¯(¢ i=0;i<¦.­;i++){¢ ¢¦=(®==¥Æ&&¦[i].ì)?¦[i].ì:¦[i].£µ(®);¯(¢ j=0;j<¢¦.­;j++){if(ï(¢¦[j])&&(!À||¢¦[j].À==À))·(¸,¢¦[j])}}},¥Ç:£(¸,¦,®){¯(¢ i=0;i<¦.­;i++)if(¦[i].id==®)·(¸,¦[i])},¥È:£(¸,¦,®){®=Ó ¢æ(¥É+®+¥Ê);¯(¢ i=0;i<¦.­;i++)if(®.±(¦[i].¤£))·(¸,¦[i])},¥Ë:£(¸,¦,®,Á){®=¢ä[®];if(®)¯(¢ i=0;i<¦.­;i++)if(®(¦[i],Á))·(¸,¦[i])}};¢ ¤¢=¥¨;¢ ¢ä={Õ:£(){¢ Õ=[];¯(¢ ð in ª){if(ð!=¥Ì&&ð!=¥Í){if(ª[ð].­>1)ð+=¥Î;·(Õ,ð)}}¤ Õ.¢å(¥À)},¥Ì:£(¡){¤ ¢£(¡.©[¥Ï]==¥Ì)},¥Í:£(¡){¤ ¢£(¡.©[¥Ï]==¥Í)}};¢ ¤¡={Õ:¢ä.Õ};£ £ÿ(¡,º,À){if(À&&¡.À!=À)¤ Þ;¤(º==¥Æ)?ï(¡):(ë)?(¡.º==º.¢ý()):(¡.º==º)};¢ ¢¾=[];£ £þ(¢¿){¤ ¢».±(¢¿)?¢¾[¢¿.»(1,-1)]:¢¿};¢ £´=£(§){¤ §.³(¤èg,£(¬){¤(¬.¢þ(0)==¥©)?¥¨:¥Ð+(·(¢¾,¬.»(1,-1))-1)+¥Ð}).³(¤ég,¥¨).³(¤êg,¥À).³(¤ëg,¥°)};£ £³(§){¤ §.³(¤æg,¥Ñ).³(¤ìg,£(¬,£²){¤ ¢¾[£²]})};¢ ¢¼=[];£ ö(¡,Ý,Ô){¡.£±(Ý,Ô);·(¢¼,¢¡)};£ £°(¡,Ý,Ô){ÿ{¡.£û(Ý,Ô)}õ(¢à){}};ù.£±(¥Ò,£(){Ê(¢¼.­){¢ Ô=¢½(¢¼);£°(Ô[0],Ô[1],Ô[2])}});¢ ¢³=(Å<6)?£(¡){¤ ¡.Ä}:£(¡){¤ ¡.©.¢³};£ é(¡){if(!¢³(¡)){¡.£ù=Þ;£¯(£«(¡))}};£ £¯(¡){Ê(¡){¡.°.£®=¡.©.£®;¡=¢â(¡)}};¢ ¢»=¤í;£ £ø(¥){¤(¢».±(¥))?¥:¥Ð+¥+¥Ð};£ £÷(¥){¤(¢».±(¥))?¥.»(1,-1):¥};£ £¡(º){¢ ¡=«.£ª(º||¥Ó);¡.Í.§=¥Ô;¤ ¡};£ ï(¢¢){¤ ¢£(¢¢&&¢¢.£ñ==1&&¢¢.º!=¥Õ&&!¢¢.£ð)};£ £ï(¡){Ê(¡&&(¡=¡.£î)&&!ï(¡))£¬;¤ ¡};£ ¢â(¡){Ê(¡&&(¡=¡.Ì)&&!ï(¡))£¬;¤ ¡};£ £«(¡){¡=¡.£í;¤(ï(¡))?¡:¢â(¡)};¢ ¢«=Þ;´.¢´(¥Ö,£(){if(ë)¢¹=Ó £(){¢ Ç=[];£ ¢Þ(¡){¢ ¢¸=«.£ª(¥×+¡.¢µ.»(1));if(¡.¢µ.»(-2)!=¥Ø){¢ £©=¥Ù+¡.º+¥Ú,Ì;Ê((Ì=¡.Ì)&&Ì.¢µ!=£©){¡.¢á.¢Ú(Ì);¢¸.¢Ï(Ì)}if(Ì)¡.¢á.¢Ú(Ì)}¡.¢á.£ë(¢¸,¡);¤ ¢¸};ª.í=£(){·(Ç,¢¡)};ª.¢·=£(){ÿ{if(Å>5)«.£ê.í(¥Û,¥Ü)}õ(¢à){}¢Ë{¯(¢ i=0;i<Ç.­;i++){¢ î=¢¶(Ç[i][0]);¯(¢ j=0;j<î.­;j++)Ç[i][1](î[j])}}};ª.í(¥Ý,£(¡){if(!¡.£§){¢ Ò=¢¶(¥Þ,¡)[0];if(Ò){if(!Ò.id)Ò.id=Ò.ü;¡.£§=Ò.id}}});ª.í(¥ß,£(¡){¢Þ(¡);£¦ þ[¥à]});ª.í(¥á,£(¡){if(¡.º==¥â){¢ ¬=¡.¢µ.¬(¤îi);¡.°.¥=(¬)?¬[1]:¥¨}if(¡.Ý==¥ã){ö(¡,¥ä,£(){¡.°.¢Ý=×;¢ª(¥å+¡.ü+¥æ,1)})}});ª.í(¥ç,£(¡){¢ ££=¤ï;ö(¡,¥è,£(){¯(¢ i=0;i<¡.­;i++){if(££.±(¡[i].Ý)&&!¡[i].ý&&!¡[i].°.¢Ý){¡[i].ý=×;¢ª(¥å+¡[i].ü+¥é,1)}Ö if(¡[i].º==¥â&&¡[i].Ý==¥ã){¢ª(¥å+¡[i].ü+¥ê+¡[i].¥+¥Ð,1);¡[i].¥=¡[i].°.¥}}})})}},×);´.¢´(¥ë,£(){¢ ¢¯=¥ì,¢û=¤ð,¢ñ=¤ñ,¢Ð=¤ò;¢ ¢ÿ=(Å<6)?¤ógi:¤ôgi;¢ ¢ö=(Å<5.5)?¤õ:¤ö;¢ Ã=£¡();·(´.Ë,£ ¢ò(){if(Ã.Î)Ã.Î.¢Ú(Ã)});Ñ.û(¢ÿ,£(¬){¤ ¬.»(0,3)+¬.¢þ(4).¢ý()+¬.»(5)});¢ ¢ü=(è)?«.¢Ù:Ù;£ ¢Ó(¡){¤ ¡.Í.Ü==¥í||¡.©.Ü==¥í};£ ¾(¡){¢ ¾=¡.¢²;Ê(¾&&!¢³(¾))¾=¾.¢²;if(!¾||¢Ó(¡))¾=¢ü;¤ ¾};£ å(¢ó){å=£(¡,¥){if(!¡.°.¿&&(!ë||¡.º!=¥î)){if(!¥)¥=¡.©.¨;¡.°.¿=(¢û.±(¥))?£Þ.ú(0,ê(¡,¥)):¥;¡.°.¨=¡.°.¿;é(¡)}};if(è)Ñ.Ú(¥ï,å);¢ ê=(è)?£(¡,¥){¤ ç(¡,¥)+¢Õ(¡)+¢Ô(¡)}:£(¡,¥){¤ ç(¡,¥)};£ ¢Õ(¡){¤ ¡.¢Ñ-¡.Ä};£ ¢Ô(¡){¤ ç(¡,¡.©.£Ý)+ç(¡,¡.©.£Ü)};£ ¢ô(¡){¤((¡.©.¢ù==¥ð)?0:÷(¡,¡.©.¢ù))+((¡.©.¢ø==¥ð)?0:÷(¡,¡.©.¢ø))};£ ¼(¡){¼[¼.Ï++]=¡;if(¡.©.¢÷==¥ð)¡.°.¢÷=0;å(¡);é(¡);¢®(¡)};¼.Ï=0;Ñ.Ú(¥ñ+¢¯,¼);¢¬(¢Î(¼).³(¤÷g,¥ò));Ð.Ï=0;Ñ.Ú(¥ó+¢¯,Ð);£ ¢®(¡){¢ ¢°=¡.¢õ();¢ ¨=¢°.æ-¢°.Â;if(¡.©.Ð&&¨>=ê(¡,¡.©.Ð))¡.°.¨=ê(¡,¡.©.Ð);Ö if(¡.©.¼&&¨<=ê(¡,¡.©.¼))¡.°.¨=ê(¡,¡.©.¼);Ö ¡.°.¨=¡.°.¿};£ Ø(¡){if((¡.©.Ü==¥ô||¡.©.Ü==¥í)&&¡.©.Â!=¥ð&&¡.©.æ!=¥ð&&¢ö.±(¡.©.¨)){Ø[Ø.Ï++]=¡;é(¡);¢Ò(¡)}};Ø.Ï=0;Ñ.Ú(¥õ+¢¯,Ø);£ ¢Ò(¡){¡.°.¨=¥¨;¢ Î=¾(¡);¢ Â=(¡.°.£Û)?¡.¢õ().Â-2:÷(¡,¡.©.Â);¢ ¨=Î.Ä-÷(¡,¡.©.æ)-Â-¢ô(¡);if(!è)¨-=¢Õ(¡)+¢Ô(¡);if(¨<0)¨=0;if(¢Ó(¡)||¢ó||¡.¢Ñ<¨){¡.°.¿=¨;¡.°.¨=¨}};¢ Ä=Ù.Ä;ö(ù,¥ö,£(){¢ i,ø=(Ä<Ù.Ä);Ä=Ù.Ä;¯(i=0;i<¼.Ï;i++){¢ ¡=¼[i];¢ ¿=(¡.°.¨==¡.©.¼);if(ø&&¿)¡.°.¨=¥¨;if(ø==¿)¢®(¡)}¯(i=0;i<Ð.Ï;i++){¢ ¡=Ð[i];¢ ¿=(¡.°.¨==¡.©.Ð);if(!ø&&¿)¡.°.¨=¥¨;if(ø!=¿)¢®(¡)}¯(i=0;i<Ø.Ï;i++)¢Ò(Ø[i]);¢ò()});£ ç(¡,¥){if(¢Ð.±(¥))¤ ¢­(¥);if(¢ñ.±(¥))¤ ¢­(£Ù(¥)/100*¾(¡).Ä);¢ Î=(¡.£Ø)?¡:¡.Î;Î.¢Ï(Ã);Ã.Í.¨=¥;¤ Ã.¢Ñ};£ ÷(¡,¥){if(¢­(¥)>0)¤ ç(¡,¥);if(¢Ð.±(¥))¤ ¢­(¥);¡.Î.¢Ï(Ã);Ã.Í.Â=¥;¤ Ã.£×}};¢¬(¢Î(å).³(¤øg,¥÷).³(¤ùg,¥ø).³(¤úg,¥ù).³(¤ûg,¥ú).³(¤üg,¥û).³(¤ýg,¥ü));å();£Î(×)});¢«=×;if(«.¢Í==¥®)_ã();Ö ö(«,¥ý,£(){if(!ä&&«.¢Í==¥®)¢ª(_ã,0)})}õ(¢¨){¢©();â(¥þ+¢¨.¢ï)}¢Ë{}}();',340,0,/./,String,95,'element`var`function`return`value`from`cssText`width`currentStyle`this`document`match`length`filter`for`runtimeStyle`test`href`replace`IE7`selector`styleSheet`push`filtered`path`tagName`slice`minWidth`x5cs`layoutParent`fixedWidth`scopeName`filterArgs`left`ie7_tmp`clientWidth`appVersion`ie7`fixes`link`styleSheets`while`recalcs`nextSibling`style`parentElement`count`maxWidth`CSSFixes`input`new`handler`toString`else`true`fixRight`documentElement`addRecalc`auto`position`type`false`token`SIZES`pattern`alert`load`complete`fixWidth`right`getPixelWidth`quirksMode`boxSizing`getFixedWidth`isHTML`all`add`elements`isElement`pseudoClass`selectors`cacheSelector`modules`script`catch`addEventHandler`getPixelLeft`wider`window`max`addFix`uniqueID`disabled`cssCache`try`arguments`node`Boolean`x5c`visited`subset`url`error`unHide`setTimeout`loaded`eval`parseInt`resizeWidth`NUMERIC`rect`min`offsetParent`hasLayout`addModule`outerHTML`cssQuery`apply`fixedElement`HTMLFixes`display`QUOTED`handlers`pop`strings`string`item`small`recalc`getCSSText`getPath`styles`DUMMY`pathname`makePath`array`httpRequest`finally`Error`readyState`String`appendChild`PIXEL`offsetWidth`resizeRight`isFixed`getPaddingWidth`getBorderWidth`fixed`absolute`x5cw`body`removeChild`box`submit`clicked`fix`select`ignore`parentNode`nextElement`x2f`pseudoClasses`join`RegExp`split`useCache`base`large`HEADER`inlineStyles`LINKS`location`description`height`PERCENT`removeTempElement`HEIGHT`getMarginWidth`getBoundingClientRect`AUTO`minHeight`marginRight`marginLeft`x5cd`UNIT`viewport`toUpperCase`charAt`MATCH`tmpElement`BUTTON`UNSUCCESSFUL`button`abbr`delete`htmlFor`HTML`endTag`createElement`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`decode`encode`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`parse`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`name`autoload`mimeType`search`message`onreadystatechange`fixHeight`bottom`Bottom`Right`top`Top`Left`Height`Width`offsetLeft`canHaveChildren`parseFloat`onresize`screenLeft`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`firstChild`previousSibling`previousElement`ie7_anon`nodeType`clip`none`border`padding`object`unquote`quote`contentEditable`onbeforeunload`detachEvent`import`namespace`getString`compareTagName`dynamicPseudoClasses`attributeTests`className`null`concat`Array`constructor`size`font`medium`list`inline`float`relative`content`sizing`lastIndex`exec`successfully`callee`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`Microsoft`ActiveXObject`src`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ms_`ie7_off`MSIE`navigator`ie7_debug`alpha`version`visible`visibility`Function`fromCharCode`¤Ò`¤Ð (\\d\\.\\d)`¤Ï`^¤Î`\\.¤É$`^[\\w\\.]+[^:]*$`(¢§\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¤·\\b|\\¤¶\\b|^$`Æ-È`(¤­\\s*:\\s*(Â|æ))`¢º\\s*:\\s*¤«-¢À`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢ã\\*[^\\*]*\\*+([^\\¢ã][^\\*]*\\*+)*\\¢ã)|(\x27[^\x27]*\x27)|("[^"]*")`@(£ý|£ü)[^;\\n]+[;\\n]|`\\¢¤:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ¥="([^"]*)"`^(¢Ü|£á|£¤)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(¢±|ú)-(¨|¢ð)\\s*:\\s*\\d`\\b(¢±|ú)-¨\\s*:\\s*\\d`^Û|0cm$`^Û$`¢±`£Ö`¨`£Ô`Â`£Ñ`æ`¤Õ`´ ¤Ô 0.7.3 (¤Ó)`\\n\\n`¤Ì`¤Ê`¤È ¤Ç`:È{Æ-È:È}:¢¥{Æ-È:¢¥}`*{¤Æ:0}`ô=``/`¤Ã.¤Â`¤À`¢Ì [1]: ¤½ ¤¼ ã ¤» `Æ-¤º.js`ä`<Í>`$1`$2`Í`¢« ¤³`¢Ì [2]: `([^{}]*)\\¢¤{([^}]*[^\\¢Ø-])?`gi`¢Û-¤°\\½*:\\½*¤¯-¢Û`Ü\\½*:\\½*¢×`¤®`¢º:¤¬;$1`¢º:£­`xx-¢Á,x-¢Á,¢Á,¤ª,¢ê,x-¢ê,xx-¢ê`,`xx-¢Á`(¤©(-¤¨)?\\½*:\\½*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\½)`(\\½|$)`:`È`¢¥`\\¢¤([^)]*\\¢¤)`Æ-È`\x27`\\¢¤:`£ú`£ö`Ü:¢×;£õ:0;¢º:£­;£ô:£ó;£ò:¢°(0 0 0 0);Â:-9999`!`Æ-£ì`<£¨:`/>``£¨`£é://£è.w3.£ç/1999/£æ`£å`Ò,¢ß,£ä`£¥` £¥`£¤,Ò`£¢`¢Ü`£ã`«.ì.`.°.¢Ý=Þ`£â`£à`.ý=Þ`.¥=\x27`Æ-¢Û-£ß`\\½*:\\½*\\¢ú[\\¢Ø%]*`¢Ö`HR`¨\\½*:\\½*\\¢ú\\¢Ø*[^%]`Û`¢±-¨`ú`ú-¨`¢×`æ`£Ú`£Õ`¢ð`£Ó`£Ò`£Ð`£Ï`£Í`¢Ì [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-lite.js b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-lite.js new file mode 100644 index 0000000..88c764f --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-lite.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});loaded=true;if(document.readyState=="complete")_load();else addEventHandler(document,"onreadystatechange",function(){if(!complete&&document.readyState=="complete")setTimeout(_load,0)})}catch(error){unHide();alert("Error [0]: "+error.description)}finally{}}(); diff --git a/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-png.js b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-png.js new file mode 100644 index 0000000..7b8f2cf --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-png.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(window.IE7)IE7.addModule("ie7-png",function(){if(appVersion<5.5)return;var FILTER="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=%1,sizingMethod='scale')";var NULL=(/\bSV1\b/.test(navigator.userAgent))?makePath("blank.gif",path):"javascript:'#define x_width 1\x5cn#define x_height 1\x5cnstatic char x_bits[]={0x00}'";var pngTest=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");function addFilter(element,src){element.runtimeStyle.filter=FILTER.replace(/%1/,src)};var MATCH=/background(-image)?\s*:([^(};]*)url\(([^\)]+)\)([^;}]*)/gi;CSSFixes.addFix(MATCH,function replace(match,image,prefix,url,suffix){url=getString(url);return pngTest.test(url)?"filter:"+FILTER.replace(/scale/,"crop").replace(/%1/,url)+";zoom:1;background"+(image||"")+":"+(prefix||"")+"none"+(suffix||""):match});if(HTMLFixes){function fixImg(element){if(pngTest.test(element.src)){var width=element.width,height=element.height;addFilter(element,element.src);element.src=NULL;element.width=width;element.height=height}else element.runtimeStyle.filter=""};HTMLFixes.add("img,input",function(element){if(element.tagName=="INPUT"&&element.type!="image")return;fixImg(element);addEventHandler(element,"onpropertychange",function(){if(event.propertyName=="src")fixImg(element)})})}}); diff --git a/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-server.css b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-server.css new file mode 100644 index 0000000..47c7edd --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-server.css @@ -0,0 +1,43 @@ +body, td, dd {font: 10pt Verdana, Arial, Helvetica, sans-serif; color: black;} +body {margin: 8px; background: #333;} +h1 {margin: 0;} +h1 a:hover {background-color: transparent;} +h2 {font-size: 1.75em;} +h3 {font-size: 1.1em;} +a:active {color: #ff0000;} +a:link {color: #0a6cce;} +a:visited {color: #0a6cce;} +code, *.code {font-family: monospace; font-size: 100%; font-style: normal; white-space: nowrap; + padding: 0 1px; background: #f2f3f8; border: #d6d9e9 1px solid;} +code.box {display: block; padding: 10px; margin: 0.5em 0;} +ul {list-style-type: square;} +dd {margin: .2em 0 .5em 1em;} +dl.library dt {display: list-item; margin-left: 3em; list-style-type: square;} +dl.library dd {font-style: italic; margin-left: 3em;} +dt {font-weight: bold;} +dt.pack {color: brown;} +a img {border-style: none;} +hr {height: 1px; color: #000; border-style: solid;} +hr.short {height: 2px; width: 100px;} +div.document {background: #eef; padding: 20px 20px 5px 20px; width: 600px; border: 1px solid black;} +hr {border-bottom-width: 0px;} +div.header hr {color: #0a6cce; background-color: #0a6cce;} +div.content {min-height: 100px;} +div.footer hr {color: #898e79; background-color: #898e79; } +div.header, div.header a:link, div.header a:visited, h3 a:link, h3 a:visited {text-decoration: none;} +a:hover {color: #fff; background-color: #0a6cce; text-decoration: none;} +div.footer a:hover {background-color: transparent; text-decoration: none;} +div.header .menu {text-align: right;} +div.footer {font-size: x-small; margin-top: 8px;} +div.footnote {font-family: "times new roman", times; font-style: italic; margin-top: 10px;} +#license {margin-top: 5px; font-size: xx-small;} +table {border-top: 1px solid #000; border-left: 1px solid #000;} +th {background-color: #fff; text-align: left;} +th, td {border-right: 1px solid #000; border-bottom: 1px solid #000;} +th.small {width: 100px;} +th.medium {width: 200px;} +th.large {width: 270px;} +th.x-large {width: 408px;} +table.fixed {table-layout: fixed;} +span.comment {color: #666;} + diff --git a/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-standard-p.js b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-standard-p.js new file mode 100644 index 0000000..73e99ac --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-standard-p.js @@ -0,0 +1,3 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +eval(function(A,r,s,e,n,a,l){s=function(e){return((e=0)A=A.replace(new RegExp(s(r),'g'),l[r]);return A}('if(!¢¡.ª)¶ ¢(){¢Æ{¢¡.ª=¤;£ ¢Ø=¤.¢©=¶ ¤¬;¢ ¢ì(){if(².ß)².ß.Ì.¦²=¦ë};¤.È=¢(){¥ ¦ì};£ ¢¶=(¦´.µ(¢ô.¤ì))?¢(¤í){¢¡.¢¶(ª+¦í+¤í)}:¢Ø;£ á=¤¥.á.§(¦µ)[1];if(¦¶.µ(¢ô.¤ì)||á<5||!¦·.µ(².ù.¢«))¥ ¢ì();£ ¢§=¢ê(².¦«!=¦î);£ ¢±=(¦© ².¤ë==¦ï)?!¦¸i.µ(¢ô.£»):¢ê(².¤ë!=¦ð);£ £ê=¦ñ;£ £¦=£ê;if(!¢±)£¦+=¦ò;£ ¢½;£ ù=².ù;£ ¢Ñ={};¤.¢©=¢(¢Ç,¢Ò,¤ê){if(!¢Ñ)¥;if(¢í)Ü(¦ó+¢ó(¢Ò));if(¤ê){¢Ò();¢Ò=¢Ø}¢Ñ[¢Ç]=¢Ò};£ ¤é=¦¹;¢ ¢À(¾,Á){if(¤é.µ(¾))¾=(Á||¦ô)+¾;¥ ¾};¢ £¹(¾,Á){¾=¢À(¾,Á);¥ ¾.Æ(0,¾.¤å(¦õ)+1)};£ Á=£¹(².¤è[².¤è.¯-1].î);£ £½=¶ ¦£(¦ö);¢ ê(¾,Á){¢Æ{¾=¢À(¾,Á);£½.¦¡(¦÷,¾,ë);£½.¥þ();¥ £½.¥ý}¢·(£¥){¢¶(¦ø+¾);¥ ¦ô}};£ ¸=¢(£¼,£·){¥ £¼.¸(£·)};£ £´=¢(£¼){¥ £¼.£´()};if(á<5.5)Ü(ê(¦ù,Á));if(².£À==¦ú||!¢±)².¥ø();Û ².¥÷(¦û);¤.¿=².é[².é.¯-1];¤.¿.¨=£ê;¤.¿.Î=Ö;£ ¨={};¢ ¤á(¿,Á){£ Ô=¢À(¿.¾,Á);if(¨[Ô])¥ ¦ô;¨[Ô]=(¿.¢ç)?¦ô:¤ç(¢ã(¿,Á),£¹(¿.¾,Á));¥ ¨[Ô]};£ ¢ã=¢(¿){¥ ¿.¨};£ ¤æ=¦ºgi;¢ ¤ç(¨,£»){¥ ¨.¬(¤æ,¦ü+£».Æ(0,£».¤å(¦õ)+1)+¦ý)};¤.ô=[];¤.¢â=¢Ø;£ ¢¸=ë;¢ _ê(){¢Æ{¢¸=Ö;£ ¤ã=¦»i;£ é=².é;£ £é=[];£ £º=².¤Ø(¦þ);®(£ i=£º.¯-1;i>=0;i--){¸(£é,¦¼.µ(£º[i].¤ä)?¦ô:£º[i].¤ä)}¢ ¢ã(¿,Á){£ ¨=¦ô;if(¤ã.µ(¿.¥ô)){®(£ i=0;i<¿.¤â.¯;i++){¨+=í.£ó(¿.¤â[i],£¹(¿.¾,Á))}¨+=((¿.¾)?¤á(¿,Á):£´(£é))}¥ ¨};ª.¨=¦ô;®(i=0;i<é.¯;i++)ª.¨+=¢ã(é[i],¦ô);ª.¨=£©(ª.¨);®(i in ¢Ñ)¢Ñ[i]();£Ö ¢Ñ;if(¢½)¢½.£°();à.£°();ª.¢â();ª.¿.¨=£¦+£§(ª.¨);®(i=0;i<é.¯;i++){if(!é[i].¢ç&&!é[i].Î)é[i].¨=¦ô}ª.Ø();¢¶(¦ÿ)}¢·(¢ë){¢¶(§¡+¢ë.£ë)}£¾{¢ì()}};¤.Ø=¢(){à.Ø();®(£ i=0;i<¤.ô.¯;i++)¤.ô[i]()};£ à=¶ ¢(){£ è=[];¤.¢¿=¢(){¸(è,í)};£ ô=[];¤.ï=¢(¢µ,£ä){£ ¤à=¶ ç(§¢+¢µ,§£);£ ¨=ª.¨;¢µ=[];Ý(§=¤à.¢ß(¨)){¸(¢µ,§[1]);if(á<5.5)¨=¨.Æ(§.¥ò)}if(¢µ.¯){¢µ=¢µ.È();¸(ô,í)}};¤.£°=¢(){®(£ i=0;i<è.¯;i++){ª.¨=ª.¨.¬(è[i][0],è[i][1])}¤.ï(§¤,¢Ê);¤.ï(§¥,¢(¡){if(¡.¢¥.«.³==§¦)¢Ê(¡.¢¥)})};¤.Ø=¢(){®(£ i=0;i<ô.¯;i++){£ ¢Í=ü(ô[i][0]);®(£ j=0;j<¢Í.¯;j++)ô[i][1](¢Í[j])}};¤.¢¿(¦½gi,§§);if(á<6)¤.¢¿(¦¾gi,§¨);if(¢§){£ ¢´=§©.£¨(§ª);®(£ i=0;i<¢´.¯;i++)¢´[¢´[i]]=¢´[i-1]||§«;¢ ¬($,$1,$2,$3){¥ $1+¢´[$3]};¤.¢¿(¶ ç(§¬+¢´.¢Ü(§­)+§®,§£),¬)}};£ ¤Ü=¦¿;£ ¤Û=¦Àg;£ ¤Ú=¦Á;£ ¤ß=¦Âg;£ ¤Þ=§¯;£ ¢è={};¢ ü(´,­){£ £æ=!­;£ £ç=(­)?(­.¥ê==¥é)?­:[­]:[²];£ ò=´.¬(¤ß,¤Þ).£¨(§ª);£ §=[];®(£ i=0;i<ò.¯;i++){´=¤Ý(ò[i]);if(´.Æ(0,3).¢Ü(¦ô)==§°){´=´.Æ(2);­=¤Ù(£ç,´[1])}Û ­=£ç;£ j=0,¢³,±,É,¢Ð=¦ô;Ý(j<´.¯){¢³=´[j++];±=´[j++];¢Ð+=¢³+±;É=¦ô;if(´[j]==§±){Ý(´[j++]!=§®)É+=´[j];É=É.Æ(0,-1);¢Ð+=§±+É+§®}­=(£æ&&¢è[¢Ð])?¢è[¢Ð]:£å(­,¢³,±,É);if(£æ)¢è[¢Ð]=­}§=§.¥è(­)}¥ §};¢ ¤Ý(´){if(¤Ü.µ(´))´=§²+´;¥ ´.§(¤Û)};¢ £å(­,¢³,±,É){£ Ê=¦ô;if(¤Ú.µ(±)){±=±.£¨(§­);Ê=±[0];±=±[1]}£ ¼=[];if(ò[¢³])ò[¢³](¼,­,±,Ê||É);¥ ¼};¢ ¤Ù(­,id){£ ¼=[],i,j;®(i=0;i<­.¯;i++){£ §=­[i].¢Ì.£·(id);if(§){if(§.¯==¢Þ)¸(¼,§);Û ®(j=0;j<§.¯;j++)¸(¼,§[j])}}¥ ¼};£ ò={§²:¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=(±==§³&&­[i].¢Ì)?­[i].¢Ì:­[i].¤Ø(±);®(£ j=0;j<ó.¯;j++){if(¢Î(ó[j])&&(!Ê||ó[j].Ê==Ê))¸(¼,ó[j])}}},§´:¢(¼,­,±){®(£ i=0;i<­.¯;i++)if(­[i].id==±)¸(¼,­[i])},§µ:¢(¼,­,±){±=¶ ç(§¶+±+§·);®(£ i=0;i<­.¯;i++)if(±.µ(­[i].¢Ý))¸(¼,­[i])},§¸:¢(¼,­,±,É){±=¢®[±];if(±)®(£ i=0;i<­.¯;i++)if(±(­[i],É))¸(¼,­[i])}};£ ¢¬=¦ô;£ ¢®={È:¢(){£ È=[];®(£ ¢Ï in ¤){if(¢Ï!=§¹&&¢Ï!=§º){if(¤[¢Ï].¯>1)¢Ï+=§»;¸(È,¢Ï)}}¥ È.¢Ü(§­)},§¹:¢(¡){¥ ¢ê(¡.«[§¼]==§¹)},§º:¢(¡){¥ ¢ê(¡.«[§¼]==§º)}};£ ¢­={È:¢®.È};¢ £Ù(¡,Ï,Ê){if(Ê&&¡.Ê!=Ê)¥ ë;¥(Ï==§³)?¢Î(¡):(¢±)?(¡.Ï==Ï.¤Ç()):(¡.Ï==Ï)};£ £µ=[];¢ ¢ö(£¶){¥ £².µ(£¶)?£µ[£¶.Æ(1,-1)]:£¶};£ £©=¢(¨){¥ ¨.¬(¦Ãg,¢(§){¥(§.¤È(0)==¦õ)?¦ô:§½+(¸(£µ,§.Æ(1,-1))-1)+§½}).¬(¦Äg,¦ô).¬(¦Åg,§­).¬(¦Æg,¦ü)};¢ £§(¨){¥ ¨.¬(¦Ág,§¾).¬(¦Çg,¢(§,¤×){¥ £µ[¤×]})};£ £³=[];¢ Ó(¡,Õ,þ){¡.¤Ö(Õ,þ);¸(£³,í)};¢ ¤Õ(¡,Õ,þ){¢Æ{¡.¥å(Õ,þ)}¢·(£¥){}};¢¡.¤Ö(§¿,¢(){Ý(£³.¯){£ þ=£´(£³);¤Õ(þ[0],þ[1],þ[2])}});£ £®=(á<6)?¢(¡){¥ ¡.Í}:¢(¡){¥ ¡.«.£®};¢ ¢Ê(¡){if(!£®(¡)){¡.¥ã=ë;¤Ô(¤Ð(¡))}};¢ ¤Ô(¡){Ý(¡){¡.¦.¤Ó=¡.«.¤Ó;¡=¢þ(¡)}};£ £²=¦È;¢ ¤ª(©){¥(£².µ(©))?©:§½+©+§½};¢ ¥â(©){¥(£².µ(©))?©.Æ(1,-1):©};¢ £Ï(Ï){£ ¡=².£Û(Ï||§À);¡.Ì.¨=§Á;¥ ¡};¢ ¢Î(¢é){¥ ¢ê(¢é&&¢é.¥Þ==1&&¢é.Ï!=§Â&&!¢é.¢ÿ)};¢ ¤²(¡){Ý(¡&&(¡=¡.¥Ý)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¢þ(¡){Ý(¡&&(¡=¡.õ)&&!¢Î(¡))¤Ñ;¥ ¡};¢ ¤Ð(¡){¡=¡.¤¹;¥(¢Î(¡))?¡:¢þ(¡)};£ ¢í=ë;ª.¢©(§Ã,¢(){if(¢±)¢½=¶ ¢(){£ è=[];¢ £ä(¡){£ £±=².£Û(§Ä+¡.£¯.Æ(1));if(¡.£¯.Æ(-2)!=§Å){£ ¤Ï=§Æ+¡.Ï+§Ç,õ;Ý((õ=¡.õ)&&õ.£¯!=¤Ï){¡.¢ü.¢Õ(õ);£±.¢»(õ)}if(õ)¡.¢ü.¢Õ(õ)}¡.¢ü.¥Û(£±,¡);¥ £±};¤.æ=¢(){¸(è,í)};¤.£°=¢(){¢Æ{if(á>5)².¥Ú.æ(§È,§É)}¢·(£¥){}£¾{®(£ i=0;i<è.¯;i++){£ ¢Í=ü(è[i][0]);®(£ j=0;j<¢Í.¯;j++)è[i][1](¢Í[j])}}};¤.æ(§Ê,¢(¡){if(!¡.¤Í){£ ð=ü(§Ë,¡)[0];if(ð){if(!ð.id)ð.id=ð.¢«;¡.¤Í=ð.id}}});¤.æ(§Ì,¢(¡){£ä(¡);£Ö ¢è[§Í]});¤.æ(§Î,¢(¡){if(¡.Ï==§Ï){£ §=¡.£¯.§(¦Éi);¡.¦.©=(§)?§[1]:¦ô}if(¡.Õ==§Ð){Ó(¡,§Ñ,¢(){¡.¦.£ã=Ö;¢Ó(§Ò+¡.¢«+§Ó,1)})}});¤.æ(§Ô,¢(¡){£ ¤Ê=¦Ê;Ó(¡,§Õ,¢(){®(£ i=0;i<¡.¯;i++){if(¤Ê.µ(¡[i].Õ)&&!¡[i].¢ç&&!¡[i].¦.£ã){¡[i].¢ç=Ö;¢Ó(§Ò+¡[i].¢«+§Ö,1)}Û if(¡[i].Ï==§Ï&&¡[i].Õ==§Ð){¢Ó(§Ò+¡[i].¢«+§×+¡[i].©+§½,1);¡[i].©=¡[i].¦.©}}})})}},Ö);ª.¢©(§Ø,¢(){£ £«=§Ù,¤Æ=¦Ë,¢Ö=¦Ì,£Ý=¦Í;£ ¢¾=(á<6)?¦Îgi:¦Ïgi;£ ¤Ã=(á<5.5)?¦Ð:¦Ñ;£ ¹=£Ï();¸(ª.ô,¢ ¤À(){if(¹.½)¹.½.¢Õ(¹)});à.¢¿(¢¾,¢(§){¥ §.Æ(0,3)+§.¤È(4).¤Ç()+§.Æ(5)});£ Þ=(¢§)?².ß:ù;¢ ö(¡){¥ ¡.Ì.³==§Ú||¡.«.³==§Ú};¢ ã(¡){£ ã=¡.¢¥;Ý(ã&&!£®(ã))ã=ã.¢¥;if(!ã||ö(¡))ã=Þ;¥ ã};¢ ì(¤Á){ì=¢(¡,©){if(!¡.¦.ä&&(!¢±||¡.Ï!=§Û)){if(!©)©=¡.«.°;¡.¦.ä=(¤Æ.µ(©))?¥Î.¢æ(0,¢Ë(¡,©)):©;¡.¦.°=¡.¦.ä;¢Ê(¡)}};if(¢§)à.ï(§Ü,ì);£ ¢Ë=(¢§)?¢(¡,©){¥ ¢É(¡,©)+£à(¡)+£ß(¡)}:¢(¡,©){¥ ¢É(¡,©)};¢ £à(¡){¥ ¡.¢¼-¡.Í};¢ £ß(¡){¥ ¢É(¡,¡.«.¥Í)+¢É(¡,¡.«.¥Ì)};¢ ¤Â(¡){¥((¡.«.¢ï==§Ý)?0:¢ä(¡,¡.«.¢ï))+((¡.«.¤Å==§Ý)?0:¢ä(¡,¡.«.¤Å))};¢ Ú(¡){Ú[Ú.Ë++]=¡;if(¡.«.¤Ä==§Ý)¡.¦.¤Ä=0;ì(¡);¢Ê(¡);£ª(¡)};Ú.Ë=0;à.ï(§Þ+£«,Ú);Ü(¢ó(Ú).¬(¦Òg,§ß));ý.Ë=0;à.ï(§à+£«,ý);¢ £ª(¡){£ £¬=¡.£É();£ °=£¬.×-£¬.À;if(¡.«.ý&&°>=¢Ë(¡,¡.«.ý))¡.¦.°=¢Ë(¡,¡.«.ý);Û if(¡.«.Ú&&°<=¢Ë(¡,¡.«.Ú))¡.¦.°=¢Ë(¡,¡.«.Ú);Û ¡.¦.°=¡.¦.ä};¢ ¢²(¡){if((¡.«.³==§á||¡.«.³==§Ú)&&¡.«.À!=§Ý&&¡.«.×!=§Ý&&¤Ã.µ(¡.«.°)){¢²[¢².Ë++]=¡;¢Ê(¡);£Þ(¡)}};¢².Ë=0;à.ï(§â+£«,¢²);¢ £Þ(¡){¡.¦.°=¦ô;£ ½=ã(¡);£ À=(¡.¦.¢Ô)?¡.£É().À-2:¢ä(¡,¡.«.À);£ °=½.Í-¢ä(¡,¡.«.×)-À-¤Â(¡);if(!¢§)°-=£à(¡)+£ß(¡);if(°<0)°=0;if(ö(¡)||¤Á||¡.¢¼<°){¡.¦.ä=°;¡.¦.°=°}};£ Í=ù.Í;Ó(¢¡,§ã,¢(){£ i,¢å=(Í<ù.Í);Í=ù.Í;®(i=0;i<Ú.Ë;i++){£ ¡=Ú[i];£ ä=(¡.¦.°==¡.«.Ú);if(¢å&&ä)¡.¦.°=¦ô;if(¢å==ä)£ª(¡)}®(i=0;i<ý.Ë;i++){£ ¡=ý[i];£ ä=(¡.¦.°==¡.«.ý);if(!¢å&&ä)¡.¦.°=¦ô;if(¢å!=ä)£ª(¡)}®(i=0;i<¢².Ë;i++)£Þ(¢²[i]);¤À()});¢ ¢É(¡,©){if(£Ý.µ(©))¥ ø(©);if(¢Ö.µ(©))¥ ø(£Æ(©)/100*ã(¡).Í);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);¹.Ì.°=©;¥ ¹.¢¼};¢ ¢ä(¡,©){if(ø(©)>0)¥ ¢É(¡,©);if(£Ý.µ(©))¥ ø(©);¡.½.¢»(¹);¹.Ì.À=©;¥ ¹.¢¤}};Ü(¢ó(ì).¬(¦Óg,§ä).¬(¦Ôg,§å).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦×g,§è).¬(¦Øg,§é));ì();¥É(Ö)});ª.¢©(§ê,¢(){£ ¤§=¦Ùg,¤½=¦Úi;ª.¢á=[];ª.¤¿=¶ ¤¾;ª.·=·;ª.Ò=Ò;ª.Ã=Ã;ª.¢â=¢(){¥Ç(¤.¤¿)¤.¨=£§(¢â(£©(¤.¨)));®(£ i=0;i<ª.¢á.¯;i++)ª.¢á[i].¢ß();®(i=0;i<£¡.¯;i++)£¡[i].¤º()};¢ã=¢(¿,Á){¥ ê(¿.¾,Á)};£ ££=[];¢ ¤¾(){¤.¢â=¢(¨){·.û=¶ ç(§ë+¢®+§ì,§í);·.¤¨=¶ ç(§î+¢®+§­+¢­+§ï,§í);Ò.û=¶ ç(§ð+¢­+§ñ,§í);¥ ¨.¬(Ã.û,Ã.ID).¬(Ò.û,Ò.ID).¬(·.û,·.ID)};¤.£©=¢(¨){ñ.û=¶ ç(§ò+¢¬+§ó+¢¬+§ô,§í);¥ ¨.¬(ñ.û,ñ.ID).¬(¦Ûg,¢($){¥ §õ+(¸(££,$)-1)+§ö}).¬(¦Üg,§¸).¬(¦Ýg,¢(§,À,×){¥ À.£¨(§ª).¢Ü(×)+×})};¤.£§=¢(¨){¥ ¨.¬(¦Þg,¢($,$1){¥ ££[$1]})}};¢ _·(){¤.È=¢(){¥ §µ+¤.¢Ç};¤.æ=¢(¡){¡.¢Ý+=§²+¤.¢Ç};¤.¤©=¢(¡){¡.¢Ý=¡.¢Ý.¬(¤.¢¾,¦ô)};¤.¢ß=¢(){£ §=ü(¤.´);®(£ i=0;i<§.¯;i++)¤.æ(§[i])}};¢ ·(´,¨){¤.id=ª.¢á.¯;¤.¢Ç=·.¢ø+¤.id;¤.´=´;¤.¢¾=¶ ç(§÷+¤.¢Ç+§ø,§í);¸(ª.¢á,¤)};·.£Ú=_·;·.¢ª=¶ _·;·.¢ø=§ù;·.ID=¢(§){¥ £Õ(§)+¶ ·(§)};¢ _Ò(){¤.¢ß=¢(){£ §=ü(¤.¢°);®(£ i=0;i<§.¯;i++){£ º=(¤.º)?ü(¤.º,§[i]):[§[i]];if(º)¤.¢¯(§[i],º,¤)}}};_Ò.¢ª=¶ _·;¢ Ò(´,¢°,¢¯,º){¤.¢°=¢°;¤.¢¯=¢­[¢¯];¤.º=º;¤.£¢=·;¤.£¢(´)};Ò.£Ú=_Ò;Ò.¢ª=¶ _Ò;Ò.ID=¢(§,¢°,¢¯,º){if(¢±&&¢¯!=§ú&&¤½.µ(¢°)&&!¦ß.µ(º))¥ §;¥ £Õ(§)+¶ Ò(§,¢°,¢¯,º)};£¦+=§û;£ ¤·=¦àg;¢ ¤¶(§,£Ü){¥ Ü(§ü+§ý.Æ(£Ü.¯)+£Ü+§½)};£ £¡=[];¢ _Ã(){¤.Å=¢Þ;¤.È=¢(){¥ ¦ô};¤.¥Ã=0;¢ ¤¸(¢Ä,Å,¨){£ ÿ=¥Â(¢(){¢Æ{if(!¢Ä.ê)¥;¢Ä.ê(¢Ä,Å,¨);¤»(ÿ)}¢·(£¥){¤»(ÿ)}},10)};¤.¤º=¢(){if(¤.Å==¢Þ)¥;®(£ i=0;i<¤.§.¯;i++){£ º=¤.§[i];£ ¢Å=º.¦[¤.³];if(¢Å){£ ½=º.£Ì?º:º.½;£ £¤=¦á.µ(¤.Å);£ ¡=².£Û(£¤?Ã.¤³:§Â);¡.¢ÿ=Ö;¡.¦.¨=¢Å.¨;if(!£¤)¡.¥Á=¢Å.Å;if(¤.³==§þ){½.¥À(¡,½.¤¹)}Û{½.¢»(¡)}if(£¤)¤¸(¡,¢Å.Å,¢Å.¨);º.¦[¤.³]=¢Þ}}};¤.¢ß=¢(){¤.§=ü(¤.´);®(£ i=0;i<¤.§.¯;i++){£ ¦=¤.§[i].¦;if(!¦[¤.³])¦[¤.³]={¨:¦ô};¦[¤.³].¨+=§ÿ+¤.¨;if(¤.Å!=¢Þ)¦[¤.³].Å=¤.Å}}};_Ã.¢ª=¶ _·;¢ Ã(´,³,¨){¤.³=³;¤.¨=££[¨].Æ(1,-1);£ Å=¤.¨.§(Ã.¤´);if(Å)¤.Å=¢ö(Å[1]).¬(¤·,¤¶);¤.£¢=·;¤.£¢(´);¸(£¡,¤)};Ã.£Ú=_Ã;Ã.¢ª=¶ _Ã;Ã.ID=¢(§,´,³,¨){¥ ¶ Ã(´,³,¨)};Ã.û=¦âg;Ã.¤´=¦ã;Ã.¤³=¨¡+¢À(¨¢,Á)+¨£;ò[§Ç]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ó=­[i].¥º;®(£ j=0;j<ó.¯;j++)if(£Ù(ó[j],±,Ê))¸(¼,ó[j])}};ò[¨¤]=¢(¼,­,±,Ê){®(£ i=0;i<­.¯;i++){£ ¢ý=¢þ(­[i]);if(¢ý&&£Ù(¢ý,±,Ê))¸(¼,¢ý)}};ò[¨¥]=¢(¼,­,±){±=¢ú[±];®(£ i=0;i<­.¯;i++)if(±(­[i]))¸(¼,­[i])};¢®[¨¦]=¢(¡){¥!¤²(¡)};¢®[¨§]=¢(¡,É){É=¶ ç(¨¨+É,¨©);Ý(¡&&!¡.£×(¨§))¡=¡.¢ü;¥ ¡&&É.µ(¡.£×(¨§))};¢­.¢Ù=¢(¡){£ Â=í;Ó(¡,¨ª,¢(){ª.Ð.¢Ù.¢Û(Â)});Ó(¡,¨«,¢(){ª.Ð.¢Ù.¢Ú(Â)})};¢­.¢÷=¢(¡){£ Â=í;Ó(¡,¨¬,¢(){ª.Ð.¢÷.¢Û(Â)})};¢­.¢Á=¢(¡){£ Â=í;Ó(¡,¨­,¢(){ª.Ð.¢Á.¢Û(Â)});Ó(¡,¨®,¢(){ª.Ð.¢Á.¢Ú(Â)});if(¡==².¥²){ª.Ð.¢Á.¢Û(Â)}};Ó(²,¨¯,¢(){£ ú=ª.Ð.¢÷;£ Ù=ú.Ù,i;®(i in Ù)ú.¢Ú(Ù[i]);ú=ª.Ð.¢Ù;Ù=ú.Ù;®(i in Ù)if(!Ù[i][0].£õ(£ü.¥°))ú.¢Ú(Ù[i])});£ ¢ú=[];£ ¤«=¦äg;¢ ñ(Ä,¢Â,©){©=¢ö(©);¤.id=¢ú.¯;£ò(Ä.¥¯()){¢¦ ¨°:Ä=¨±;¤­;¢¦ ¨²:Ä=¨³;¤­;£ñ:Ä=¨´+Ä+¨µ}¢Â=¢¬[¢Â];¸(¢ú,¶ ¤¬(¨¶,¨·+¢Â(Ä,©)))};ñ.ID=¢(§,Ä,¢Â,©){¥ ¶ ñ(Ä,¢Â,©)};ñ.¢ª.È=¢(){¥ ñ.¢ø+¤.id};¢¬={È:¢(){£ È=[];®(£ i in ¤)if(i&&i!=¨¸)¸(È,i);¥ È.¢Ü(¦ô).¬(¦åg,¦ô)},¢ù:¢(©){¥ ©.¬(¤«,¨¹)},¦ô:¢(Ä){¥ Ä},¨º:¢(Ä,©){¥ Ä+¨»+¤ª(©)},¨¼:¢(Ä,©){¥ ¨½+¢¬.¢ù(©)+¨¾+Ä+§®},¨¿:¢(Ä,©){¥ ¨À+¢¬.¢ù(©)+¨Á+Ä+§®}};ñ.¢ø=¨¥;¢ _ú(){¤.¢Û=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.æ(º[i]);¤.Ù[·.id+¡.¢«]=Â};¤.¢Ú=¢(Â){£ ¡=Â[0];£ º=Â[1];£ ·=Â[2];®(£ i=0;i<º.¯;i++)·.¤©(º[i]);£Ö ¤.Ù[·.id+¡.¢«]}};ª.Ð=¢(Õ){¤.Õ=Õ;¤.Ù={};ª.Ð[Õ]=¤};ª.Ð.¢ª=¶ _ú;¶ ª.Ð(¨Â);¶ ª.Ð(¨Ã);¶ ª.Ð(§ú);¢ £Õ(´){¥ ´.¬(·.¤¨,¦ô).¬(¤§,§²)}},Ö);ª.¢©(¨Ä,¢(){if(á<5.5)¥;£ £Ô=¨Å;£ £ý=(¦æ.µ(¤¥.¥©))?¢À(¨Æ,Á):¨Ç;£ £Ó=¶ ç((¢¡.¤ý||¨È)+¨É,¨©);¢ £þ(¡,î){¡.¦.±=£Ô.¬(¦ç,î)};£ ¢¾=¦ègi;à.¢¿(¢¾,¢ ¬(§,¢õ,¤¡,Ô,£ÿ){Ô=¢ö(Ô);¥ £Ó.µ(Ô)?¨Ê+£Ô.¬(¦é,¨Ë).¬(¦ç,Ô)+¨Ì+(¢õ||¦ô)+§¸+(¤¡||¦ô)+¨Í+(£ÿ||¦ô):§});if(¢½){¢ £Ò(¡){if(£Ó.µ(¡.î)){£ °=¡.°,÷=¡.÷;£þ(¡,¡.î);¡.î=£ý;¡.°=°;¡.÷=÷}Û ¡.¦.±=¦ô};¢½.æ(¨Î,¢(¡){if(¡.Ï==¨Ï&&¡.Õ!=¨Ð)¥;£Ò(¡);Ó(¡,¨Ñ,¢(){if(£ü.£Ê==¨Ò)£Ò(¡)})})}});ª.¢©(¨Ó,¢(){£ ¢Ö=¦Ì;à.ï(¨Ô,¢¢);à.ï(¨Õ,¢£);£ ß=².ß;£ Þ$=(¢§)?¨Ö:¨×;£ Þ=Ü(Þ$);¢ ¢ñ(){if(ß.«.£Î!=§Ú){if(ß.«.£Í==¨Í){ß.¦.£Í=¨Ø+¢ô.¤÷+§®}ß.¦.£Î=§Ú}¢ñ=¢Ø};£ ¹=£Ï(¨Ù);¢ ¢º(£ú){¥ ¢ó(£ú).¬(¦Õg,§æ).¬(¦Ög,§ç).¬(¦Óg,§ä).¬(¦êg,¨Ú)};¢ ¢£(¡){if(¡.«.£Î!=§Ú)¥;if(!¡.£õ(ß)){¢ñ();¢£[¢£.Ë++]=¡;£Ë(¡);¤ö(¡);£Â(¡)}};¢£.Ë=0;¢ £Â(¡){¹.î=¡.«.£Í.Æ(5,-2);£ ½=(¡.£Ì)?¡:¡.½;½.¢»(¹);£È(¡);¤õ(¡);½.¢Õ(¹)};¢ £Ë(¡){¡.Ì.¢×=¡.«.¢×;if(!ö(¡)){£ £ô=¨Û+Þ$+¨Ü;¡.¦.£ð(¨Ý,£ô)}};Ü(¢º(£Ë));¢ £È(¡){£ £Ê=ö(¡)?¨Ý:¨Þ;¡.¦[£Ê]=£Ç(¡,¡.Ì.¢×)-¡.£É().À-¡.¤ô};Ü(¢º(£È));¢ ö(¡){if(!¡)¥ ë;if(¡.Ì.³==§Ú||¡.«.³==§Ú)¥ Ö;¥ í.£ó(¡.½)};¢ £Ç(¡,³){£ò(³){¢¦ ¨ß:¢¦ §ç:¥ 0;¢¦ §â:¢¦ §é:¥ Þ.Í-¹.¢¼;¢¦ ¨à:¥(Þ.Í-¹.¢¼)/2;£ñ:if(¢Ö.µ(³)){¥ ø((Þ.Í-¹.¢¼)*£Æ(³)/100)}¹.Ì.À=³;¥ ¹.¢¤}};Ü(¢º(£Ç));¢ ¢¢(¡){if(¡.«.³!=§Ú)¥;¢ñ();¢¢[¢¢.Ë++]=¡;¡.Ì.³=§Ú;¡.¦.³=§á;£Á(¡)};¢¢.Ë=0;¢ £Á(¡,Ø){£Å(¡,Ø);¤ò(¡,Ø);if(!Ø||¡.¦.¤ñ){if(ø(¡.«.¢î)==0)¡.¦.¤ð++}};¢ £Å(¡,Ø){if(!Ø&&¢Ö.µ(¡.«.°))¡.¦.ì=¡.«.°;if(¡.¦.ì)¡.¦.°=ø(£Æ(¡.¦.ì)/100*Þ.Í);if(Ø){if(!¡.¦.£Ä)¥}Û{¡.¦.£Ä=¡.«.×!=§Ý&&¡.«.À==§Ý}¡.¦.À=¦ô;¡.¦.¢Ô=¢¹(¡);if(¡.«.¢ï!=§Ý){¡.½.¢»(¹);¹.Ì.À=¡.«.¢ï;¡.¦.¢Ô-=¹.¢¤;¡.½.¢Õ(¹)}if(ö(¡.¢¥))¡.¦.£ï=¡.¦.¢Ô;Û if(!Ø)¡.¦.£ð(¨á,¨â+Þ$+¨ã)};Ü(¢º(£Å).¬(¦Øg,§é).¬(¦Ôg,§å));¢ ¢¹(¡){£ ¢¹=¡.¢¤,£Ã=ë;£ Ç=ö(¡.¢¥)&&¡.¦.£Ä;Ý(¡=¡.¢¥){if(!Ç&&¡.«.³!=¨ä)£Ã=Ö;¢¹+=¡.¢¤*(£Ã?-1:1)}¥ ¢¹};Ü(¢º(¢¹));¢ £ì(){®(£ i=0;i<¢£.Ë;i++)£Â(¢£[i]);®(i=0;i<¢¢.Ë;i++)£Á(¢¢[i],Ö);ÿ=0};£ ÿ;Ó(¢¡,§ã,¢(){if(!ÿ)ÿ=¢Ó(£ì,10)})});¢í=Ö;if(².£À==¦ú)_ê();Û Ó(²,¨å,¢(){if(!¢¸&&².£À==¦ú)¢Ó(_ê,0)})}¢·(¢ë){¢ì();¢¶(¨æ+¢ë.£ë)}£¾{}}();',493,0,/./,String,95,'element`function`var`this`return`runtimeStyle`match`cssText`value`IE7`currentStyle`replace`from`for`length`width`filter`document`position`selector`test`new`Class`push`ie7_tmp`target`x5cs`filtered`parentElement`href`styleSheet`left`path`instance`PseudoElement`attribute`content`slice`fixed`toString`filterArgs`scopeName`count`style`clientWidth`ie7`tagName`Event`x5c`DynamicStyle`addEventHandler`url`type`true`right`recalc`instances`minWidth`else`eval`while`viewport`body`CSSFixes`appVersion`link`layoutParent`fixedWidth`auto`add`RegExp`fixes`styleSheets`load`false`fixWidth`arguments`src`addRecalc`input`AttributeSelector`selectors`subset`recalcs`nextSibling`isFixed`height`parseInt`documentElement`ie7Event`ALL`cssQuery`maxWidth`handler`timer`window`positionFixed`backgroundFixed`offsetLeft`offsetParent`case`quirksMode`x5cw`addModule`prototype`uniqueID`attributeTests`dynamicPseudoClasses`pseudoClasses`dynamicPseudoClass`attach`isHTML`fixRight`token`SIZES`pattern`alert`catch`complete`getScreenLeft`topFunction`appendChild`offsetWidth`HTMLFixes`MATCH`addFix`makePath`focus`compare`x5cd`object`pseudoElement`try`name`visited`getPixelWidth`boxSizing`getFixedWidth`all`elements`isElement`pseudoClass`cacheSelector`modules`script`setTimeout`screenLeft`removeChild`PERCENT`backgroundPositionX`DUMMY`hover`unregister`register`join`className`null`exec`display`classes`parse`getCSSText`getPixelLeft`wider`max`disabled`cssCache`node`Boolean`error`unHide`loaded`bottom`marginLeft`absolute`fixBackground`top`String`location`image`getString`active`PREFIX`escape`attributeSelectors`x2f`parentNode`adjacent`nextElement`ie7_anon`pseudoElements`inherit`encoded`isURL`ignore`HEADER`decode`split`encode`resizeWidth`NUMERIC`rect`min`hasLayout`outerHTML`apply`fixedElement`QUOTED`handlers`pop`strings`string`item`small`getPath`styles`pathname`array`httpRequest`finally`Error`readyState`foregroundPosition`backgroundPosition`nested`autoLeft`positionLeft`parseFloat`getOffsetLeft`setOffsetLeft`getBoundingClientRect`propertyName`backgroundLeft`canHaveChildren`backgroundImage`backgroundAttachment`tmpElement`none`background`fixImg`pngTest`FILTER`simpleSelector`delete`getAttribute`lang`compareTagName`ancestor`createElement`code`PIXEL`resizeRight`getPaddingWidth`getBorderWidth`box`submit`clicked`fix`select`useCache`base`large`inlineStyles`LINKS`description`resize`onresize`scrollLeft`pixelLeft`setExpression`default`switch`callee`expression`contains`Height`Width`Top`Left`leftFunction`img`event`NULL`addFilter`suffix`prefix`scale`png`define`navigator`Microsoft`CHILD`COMPLEX`remove`quote`ESCAPE`Function`break`ie7_`x5cb`class`ms_`previousElement`OBJECT`CONTENT`before`unicode`HEX`addTimer`firstChild`create`clearInterval`inline`ANCHOR`Parser`parser`removeTempElement`HEIGHT`getMarginWidth`AUTO`minHeight`marginRight`UNIT`toUpperCase`charAt`BUTTON`UNSUCCESSFUL`button`abbr`htmlFor`HTML`endTag`firstChildElement`continue`block`marginTop`fixMargins`removeEventHandler`attachEvent`key`getElementsByTagName`selectById`NAMESPACE`STREAM`STANDARD_SELECT`toStream`ASTERISK`IMPLIED_SELECTOR`reg`loadStyleSheet`imports`MEDIA`innerHTML`lastIndexOf`URL`fixUrls`scripts`RELATIVE`autoload`mimeType`search`message`onreadystatechange`static`screenTop`autoTop`positionTop`center`clientLeft`setOffsetTop`backgroundTop`protocol`onpropertychange`INPUT`zoom`crop`trans`IE7_PNG_SUFFIX`x00`x_bits`char`x5cnstatic`x_height`x5cn`x_width`javascript`gif`blank`userAgent`bSV1`sizingMethod`AlphaImageLoader`DXImageTransform`progid`toLowerCase`srcElement`onmouseup`activeElement`onblur`onfocus`onmousedown`onmouseout`onmouseover`child`first`children`scriptlet`text`htm`data`after`insertBefore`innerText`setInterval`specificity`x5cu`align`vertical`with`css2`fixHeight`Bottom`Right`paddingRight`paddingLeft`Math`model`onsubmit`reset`form`onclick`textarea`label`xhtml`org`www`http`namespaces`replaceChild`html4`previousSibling`nodeType`clip`border`padding`unquote`contentEditable`onbeforeunload`detachEvent`import`namespace`concat`Array`constructor`size`font`medium`list`float`relative`sizing`lastIndex`successfully`media`ball`bscreen`write`createStyleSheet`ie5`file`not`could`responseText`send`GET`open`XMLHTTP`ActiveXObject`margin`Document`XML`xml`unknown`typeof`CSS1Compat`compatMode`ie7_off`MSIE`ie7_debug`alpha`version`visible`visibility`fromCharCode`¦®`¦­ (\\d\\.\\d)`¦¬`^¤±`\\.¦§$`^[\\w\\.]+[^:]*$`(Ô\\([\x27"]?)([\\w\\.]+[^:\\)]*[\x27"]?\\))`\\¥ö\\b|\\¥õ\\b|^$`Î-â`(¥ï\\s*:\\s*(À|×))`¢à\\s*:\\s*¥î-£·`^[^>\\+~\\s]`[\\s>\\+~:@#\\.\\(\\)]|[^\\s>\\+~:@#\\.\\(\\)]+`\\|`([\\s>~\\,]|[^(]\\+|^)([\\.:#@])`(\\¢û\\*[^\\*]*\\*+([^\\¢û][^\\*]*\\*+)*\\¢û)|(\x27[^\x27]*\x27)|("[^"]*")`@(¥ç|¥æ)[^;\\n]+[;\\n]|`\\Ñ:`^\\s+|\\s*([\\{\\}\\+\\,>~\\s;])\\s*|\\s+$`\x27(\\d+)\x27`(\x27[^\x27]*\x27)|("[^"]*")` ©="([^"]*)"`^(£â|¥Ñ|¤Ë)$`^\\d\\w*$`^\\d+%$`^\\d+(px)?$`\\b(£­|¢æ)-(°|÷)\\s*:\\s*\\d`\\b(£­|¢æ)-°\\s*:\\s*\\d`^å|0cm$`^å$`£­`£÷`°`£ù`À`¥Ë`×`>`(\\ba(\\.[\\w-]+)?)$`\\{[^\\}]*\\}`::`([^\\}\\s]*\\,[^\\{]*)(\\{\\d+\\})`\\{(\\d+)\\}`[+>~]`\\Ñ([a-fA-F\\d]+)`^Ô\\(.*\\)$`([^}]*):(¤µ|¥¿)[^{]*\\{([^}]*)\\}`Å\\s*:\\s*([^;]*)(;|$)`([\\¢û()[\\]?{}|*+])`=`\\¥ª\\b`%1`£Ñ(-¢õ)?\\s*:([^(};]*)Ô\\(([^\\)]+)\\)([^;}]*)`¤¢`X`¦±`ª ¦° 0.7.3 (¦¯)`\\n\\n`¦ª`¦¨`¦¦ ¦¥`:â{Î-â:â}:¢È{Î-â:¢È}`*{¦¤:0}`¢Ò=``/`¤¦.¦¢`¥ÿ`£¿ [1]: ¥ü ¥û ê ¥ú `Î-¥ù.js`¢¸`<Ì>`$1`$2`Ì`¢í ¥ó`£¿ [2]: `([^{}]*)\\Ñ{([^}]*[^\\¢¨-])?`gi`£á-¥ñ\\»*:\\»*Å-£á`³\\»*:\\»*¢ð`¥ð`¢à:¤¼;$1`¢à:¤Ò`xx-£¸,x-£¸,£¸,¥í,£è,x-£è,xx-£è`,`xx-£¸`(¥ì(-¥ë)?\\»*:\\»*)(`|`)`$1*$2` *#`(` `*`#`.`(^|\\»)`(\\»|$)`:`â`¢È`\\Ñ([^)]*\\Ñ)`Î-â`\x27`\\Ñ:`¥ä`¢Ä`³:¢ð;¥á:0;¢à:¤Ò;¥à:£Ð;¥ß:£¬(0 0 0 0);À:-9999`!`Î-¥Ü`<¤Î:`/>``¤Î`¥Ù://¥Ø.w3.¥×/1999/¥Ö`¥Õ`ð,£å,¥Ô`¤Ì` ¤Ì`¤Ë,ð`¤É`£â`¥Ó`².¢Ì.`.¦.£ã=ë`¥Ò`¥Ð`.¢ç=ë`.©=\x27`Î-£á-¥Ï`\\»*:\\»*\\¢Ã[\\¢¨%]*`Ç`HR`°\\»*:\\»*\\¢Ã\\¢¨*[^%]`å`£­-°`¢æ`¢æ-°`¢ð`×`£í`£ö`÷`£ø`¢ò`¥Ê`¢î`Î-¥È`[^},\\»]*([>+~][^:@,\\»{]+|:(`)|\\Ñ.[\\¢¨-]+\\Ñ.[\\¢¨-.]+|@[@\\¢Ã]+)`g`[^\\»(]+[+~]|@\\¢Ã+|:(â|¢È|`)|\\Ñ.[\\¢¨-.]+`([^}]*):(`)([^{]*)`\\Ñ[([^`=\\Ñ]]+)([`]?=?)([^\\Ñ]]+)?\\Ñ]`{`}`\\»`\\¤¯`¤®`¢Á`.¢ÿ{¥Æ-¥Å:¢ò;¢à:¤¼}`\x27\\¥Ä`0000`¤µ`;`<¢Ä ¤°=¢ÿ ¥¾=\x27`Î-Å.¥½`\x27 °=100% ÷=0 Õ=¥¼/x-¥»>`+`@`¥¹-¥¸`£Ø`^`i`¥·`¥¶`¥µ`¥´`¥³`¥±`id`¡.id.¬(/¤±\\¢Ã+/g,\x27\x27)`¤°`¡.¢Ý.¬(/\\¤¯\\»*¤®\\¢Ã+/g,\x27\x27)`¡.£×(\x27`\x27)`¡`¥ `¢ù`\\Ñ$1`=`==`~=`/(^|\\»)`(\\»|$)/.µ(`|=`/^`(-|$)/.µ(`¢Ù`¢÷`Î-¤£`¥®:¥­.¤¦.¥¬(î=%1,¥«=\x27¤¢\x27)`¥¨.¥§`¥¦:\x27#¤¤ ¥¥ 1\\¥¤#¤¤ ¥£ 1\\¥¢ ¥¡ ¤ÿ[]={0¤þ}\x27`-¤ü.¤£`$`±:`¤û`;¤ú:1;£Ñ`£Ð`£û,ð`¤ù`¢õ`¤ø`î`Î-Ç`³\\»*:\\»*Ç`£Ñ[\\¢¨\\»-]*:[^};]*Ç`ß`ù`Ô(`£û`Y`(ø(¦.¢¤)+².`.£î)||0`¢×`¢¤`À`¤ó`£ï`¦.¢Ô+².`.£î`¤ï`¤î`£¿ [0]: '.split('\x60'))); +/* packed with http://dean.edwards.name/packer/ */ diff --git a/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-standard.js b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-standard.js new file mode 100644 index 0000000..2109905 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/ie7/ie7-standard.js @@ -0,0 +1,2 @@ +/* IE7 version 0.7.3 (alpha) 2004/09/18 */ +if(!window.IE7)new function(){try{window.IE7=this;var DUMMY=this.addModule=new Function;function unHide(){if(document.body)document.body.style.visibility="visible"};this.toString=function(){return "IE7 version 0.7.3 (alpha)"};var alert=(/ie7_debug/.test(location.search))?function(message){window.alert(IE7+"\n\n"+message)}:DUMMY;var appVersion=navigator.appVersion.match(/MSIE (\d\.\d)/)[1];if(/ie7_off/.test(location.search)||appVersion<5||!/^ms_/.test(document.documentElement.uniqueID))return unHide();var quirksMode=Boolean(document.compatMode!="CSS1Compat");var isHTML=(typeof document.mimeType=="unknown")?!/\.xml$/i.test(location.pathname):Boolean(document.mimeType!="XML Document");var LINKS=":link{ie7-link:link}:visited{ie7-link:visited}";var HEADER=LINKS;if(!isHTML)HEADER+="*{margin:0}";var HTMLFixes;var documentElement=document.documentElement;var modules={};this.addModule=function(name,script,autoload){if(!modules)return;if(loaded)eval("script="+String(script));if(autoload){script();script=DUMMY}modules[name]=script};var RELATIVE=/^[\w\.]+[^:]*$/;function makePath(href,path){if(RELATIVE.test(href))href=(path||"")+href;return href};function getPath(href,path){href=makePath(href,path);return href.slice(0,href.lastIndexOf("/")+1)};var path=getPath(document.scripts[document.scripts.length-1].src);var httpRequest=new ActiveXObject("Microsoft.XMLHTTP");function load(href,path){try{href=makePath(href,path);httpRequest.open("GET",href,false);httpRequest.send();return httpRequest.responseText}catch(ignore){alert("Error [1]: could not load file "+href);return ""}};var push=function(array,item){return array.push(item)};var pop=function(array){return array.pop()};if(appVersion<5.5)eval(load("ie7-ie5.js",path));if(document.readyState=="complete"||!isHTML)document.createStyleSheet();else document.write("");this.styleSheet=document.styleSheets[document.styleSheets.length-1];this.styleSheet.cssText=LINKS;this.styleSheet.ie7=true;var cssText={};function loadStyleSheet(styleSheet,path){var url=makePath(styleSheet.href,path);if(cssText[url])return "";cssText[url]=(styleSheet.disabled)?"":fixUrls(getCSSText(styleSheet,path),getPath(styleSheet.href,path));return cssText[url]};var getCSSText=function(styleSheet){return styleSheet.cssText};var URL=/(url\(['"]?)([\w\.]+[^:\)]*['"]?\))/gi;function fixUrls(cssText,pathname){return cssText.replace(URL,"$1"+pathname.slice(0,pathname.lastIndexOf("/")+1)+"$2")};this.recalcs=[];this.parse=DUMMY;var complete=false;function _load(){try{complete=true;var MEDIA=/\bscreen\b|\ball\b|^$/i;var styleSheets=document.styleSheets;var inlineStyles=[];var styles=document.getElementsByTagName("style");for(var i=styles.length-1;i>=0;i--){push(inlineStyles,/ie7-link/.test(styles[i].innerHTML)?"":styles[i].innerHTML)}function getCSSText(styleSheet,path){var cssText="";if(MEDIA.test(styleSheet.media)){for(var i=0;i\+~\s]/;var STREAM=/[\s>\+~:@#\.\(\)]|[^\s>\+~:@#\.\(\)]+/g;var NAMESPACE=/\|/;var IMPLIED_SELECTOR=/([\s>~\,]|[^(]\+|^)([\.:#@])/g;var ASTERISK="$1*$2";var cssCache={};function cssQuery(selector,from){var useCache=!from;var base=(from)?(from.constructor==Array)?from:[from]:[document];var selectors=selector.replace(IMPLIED_SELECTOR,ASTERISK).split(",");var match=[];for(var i=0;i1)pseudoClass+="\x5c([^)]*\x5c)";push(toString,pseudoClass)}}return toString.join("|")},"link":function(element){return Boolean(element.currentStyle["ie7-link"]=="link")},"visited":function(element){return Boolean(element.currentStyle["ie7-link"]=="visited")}};var dynamicPseudoClasses={toString:pseudoClasses.toString};function compareTagName(element,tagName,scopeName){if(scopeName&&element.scopeName!=scopeName)return false;return(tagName=="*")?isElement(element):(isHTML)?(element.tagName==tagName.toUpperCase()):(element.tagName==tagName)};var strings=[];function getString(string){return QUOTED.test(string)?strings[string.slice(1,-1)]:string};var encode=function(cssText){return cssText.replace(/(\x2f\*[^\*]*\*+([^\x2f][^\*]*\*+)*\x2f)|('[^']*')|("[^"]*")/g,function(match){return(match.charAt(0)=="/")?"":"'"+(push(strings,match.slice(1,-1))-1)+"'"}).replace(/@(namespace|import)[^;\n]+[;\n]|/g,"").replace(/\x5c:/g,"|").replace(/^\s+|\s*([\{\}\+\,>~\s;])\s*|\s+$/g,"$1")};function decode(cssText){return cssText.replace(/\|/g,"\x5c:").replace(/'(\d+)'/g,function(match,key){return strings[key]})};var handlers=[];function addEventHandler(element,type,handler){element.attachEvent(type,handler);push(handlers,arguments)};function removeEventHandler(element,type,handler){try{element.detachEvent(type,handler)}catch(ignore){}};window.attachEvent("onbeforeunload",function(){while(handlers.length){var handler=pop(handlers);removeEventHandler(handler[0],handler[1],handler[2])}});var hasLayout=(appVersion<6)?function(element){return element.clientWidth}:function(element){return element.currentStyle.hasLayout};function boxSizing(element){if(!hasLayout(element)){element.contentEditable=false;fixMargins(firstChildElement(element))}};function fixMargins(element){while(element){element.runtimeStyle.marginTop=element.currentStyle.marginTop;element=nextElement(element)}};var QUOTED=/('[^']*')|("[^"]*")/;function quote(value){return(QUOTED.test(value))?value:"'"+value+"'"};function unquote(value){return(QUOTED.test(value))?value.slice(1,-1):value};function tmpElement(tagName){var element=document.createElement(tagName||"object");element.style.cssText="position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";return element};function isElement(node){return Boolean(node&&node.nodeType==1&&node.tagName!="!"&&!node.ie7_anon)};function previousElement(element){while(element&&(element=element.previousSibling)&&!isElement(element))continue;return element};function nextElement(element){while(element&&(element=element.nextSibling)&&!isElement(element))continue;return element};function firstChildElement(element){element=element.firstChild;return(isElement(element))?element:nextElement(element)};var loaded=false;IE7.addModule("ie7-html4",function(){if(isHTML)HTMLFixes=new function(){var fixes=[];function fix(element){var fixedElement=document.createElement(""){var endTag="",nextSibling;while((nextSibling=element.nextSibling)&&nextSibling.outerHTML!=endTag){element.parentNode.removeChild(nextSibling);fixedElement.appendChild(nextSibling)}if(nextSibling)element.parentNode.removeChild(nextSibling)}element.parentNode.replaceChild(fixedElement,element);return fixedElement};this.add=function(){push(fixes,arguments)};this.apply=function(){try{if(appVersion>5)document.namespaces.add("HTML","http://www.w3.org/1999/xhtml")}catch(ignore){}finally{for(var i=0;i=getFixedWidth(element,element.currentStyle.maxWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.maxWidth);else if(element.currentStyle.minWidth&&width<=getFixedWidth(element,element.currentStyle.minWidth))element.runtimeStyle.width=getFixedWidth(element,element.currentStyle.minWidth);else element.runtimeStyle.width=element.runtimeStyle.fixedWidth};function fixRight(element){if((element.currentStyle.position=="absolute"||element.currentStyle.position=="fixed")&&element.currentStyle.left!="auto"&&element.currentStyle.right!="auto"&&AUTO.test(element.currentStyle.width)){fixRight[fixRight.count++]=element;boxSizing(element);resizeRight(element)}};fixRight.count=0;CSSFixes.addRecalc("right"+NUMERIC,fixRight);function resizeRight(element){element.runtimeStyle.width="";var parentElement=layoutParent(element);var left=(element.runtimeStyle.screenLeft)?element.getBoundingClientRect().left-2:getPixelLeft(element,element.currentStyle.left);var width=parentElement.clientWidth-getPixelLeft(element,element.currentStyle.right)-left-getMarginWidth(element);if(!quirksMode)width-=getBorderWidth(element)+getPaddingWidth(element);if(width<0)width=0;if(isFixed(element)||HEIGHT||element.offsetWidth0)return getPixelWidth(element,value);if(PIXEL.test(value))return parseInt(value);element.parentElement.appendChild(ie7_tmp);ie7_tmp.style.left=value;return ie7_tmp.offsetLeft}};eval(String(fixWidth).replace(/Width/g,"Height").replace(/width/g,"height").replace(/Left/g,"Top").replace(/left/g,"top").replace(/Right/g,"Bottom").replace(/right/g,"bottom"));fixWidth();fixHeight(true)});IE7.addModule("ie7-css2",function(){var CHILD=/>/g,ANCHOR=/(\ba(\.[\w-]+)?)$/i;IE7.classes=[];IE7.parser=new Parser;IE7.Class=Class;IE7.DynamicStyle=DynamicStyle;IE7.PseudoElement=PseudoElement;IE7.parse=function(){with(this.parser)this.cssText=decode(parse(encode(this.cssText)));for(var i=0;i+~][^:@,\x5cs{]+|:("+pseudoClasses+")|\x5c.[\x5cw-]+\x5c.[\x5cw-.]+|@[@\x5cd]+)","g");Class.COMPLEX=new RegExp("[^\x5cs(]+[+~]|@\x5cd+|:(link|visited|"+pseudoClasses+"|"+dynamicPseudoClasses+")|\x5c.[\x5cw-.]+","g");DynamicStyle.ALL=new RegExp("([^}]*):("+dynamicPseudoClasses+")([^{]*)","g");return cssText.replace(PseudoElement.ALL,PseudoElement.ID).replace(DynamicStyle.ALL,DynamicStyle.ID).replace(Class.ALL,Class.ID)};this.encode=function(cssText){AttributeSelector.ALL=new RegExp("\x5c[([^"+attributeTests+"=\x5c]]+)(["+attributeTests+"]?=?)([^\x5c]]+)?\x5c]","g");return cssText.replace(AttributeSelector.ALL,AttributeSelector.ID).replace(/\{[^\}]*\}/g,function($){return "{"+(push(encoded,$)-1)+"}"}).replace(/::/g,":").replace(/([^\}\s]*\,[^\{]*)(\{\d+\})/g,function(match,left,right){return left.split(",").join(right)+right})};this.decode=function(cssText){return cssText.replace(/\{(\d+)\}/g,function($,$1){return encoded[$1]})}};function _Class(){this.toString=function(){return "."+this.name};this.add=function(element){element.className+=" "+this.name};this.remove=function(element){element.className=element.className.replace(this.MATCH,"")};this.exec=function(){var match=cssQuery(this.selector);for(var i=0;i~]/.test(target))return match;return simpleSelector(match)+new DynamicStyle(match,attach,dynamicPseudoClass,target)};HEADER+=".ie7_anon{vertical-align:top;display:inline}";var HEX=/\x5c([a-fA-F\d]+)/g;function unicode(match,code){return eval("'\x5cu"+"0000".slice(code.length)+code+"'")};var pseudoElements=[];function _PseudoElement(){this.content=null;this.toString=function(){return ""};this.specificity=0;function addTimer(object,content,cssText){var timer=setInterval(function(){try{if(!object.load)return;object.load(object,content,cssText);clearInterval(timer)}catch(ignore){clearInterval(timer)}},10)};this.create=function(){if(this.content==null)return;for(var i=0;i";selectors[">"]=function(filtered,from,filter,scopeName){for(var i=0;i=0){ + var optar=opt.split(" "); + for(i=0;i=0) ecolor=optar[i]; + if(ecolor=="") ecolor="#666"; + cn+="e"; + edges=true; + } +else if(opt && opt.indexOf("smooth")>=0){ + cn+="a"; + ecolor=Mix(bk,color); + } +if(opt && opt.indexOf("small")>=0) cn+="s"; +prefixt=cn; +prefixb=cn; +if(wich.indexOf("all")>=0){t=true;b=true;} +else if(wich.indexOf("top")>=0) t="true"; +else if(wich.indexOf("tl")>=0){ + t="true"; + if(wich.indexOf("tr")<0) prefixt+="l"; + } +else if(wich.indexOf("tr")>=0){ + t="true"; + prefixt+="r"; + } +if(wich.indexOf("bottom")>=0) b=true; +else if(wich.indexOf("bl")>=0){ + b="true"; + if(wich.indexOf("br")<0) prefixb+="l"; + } +else if(wich.indexOf("br")>=0){ + b="true"; + prefixb+="r"; + } +var v=getElementsBySelector(selector); +var l=v.length; +for(i=0;i=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=1;i<=lim;i++){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingTop=0; +el.insertBefore(d,el.firstChild); +} + +function AddBottom(el,bk,color,bc,cn){ +var i,lim=4,d=CreateEl("b"); + +if(cn.indexOf("s")>=0) lim=2; +if(bc) d.className="artop"; +else d.className="rtop"; +d.style.backgroundColor=bk; +for(i=lim;i>0;i--){ + var x=CreateEl("b"); + x.className=cn + i; + x.style.backgroundColor=color; + if(bc) x.style.borderColor=bc; + d.appendChild(x); + } +el.style.paddingBottom=0; +el.appendChild(d); +} + +function CreateEl(x){ +if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x)); +else return(document.createElement(x)); +} + +function getElementsBySelector(selector){ +var i,selid="",selclass="",tag=selector,f,s=[],objlist=[]; + +if(selector.indexOf(" ")>0){ //descendant selector like "tag#id tag" + s=selector.split(" "); + var fs=s[0].split("#"); + if(fs.length==1) return(objlist); + f=document.getElementById(fs[1]); + if(f) return(f.getElementsByTagName(s[1])); + return(objlist); + } +if(selector.indexOf("#")>0){ //id selector like "tag#id" + s=selector.split("#"); + tag=s[0]; + selid=s[1]; + } +if(selid!=""){ + f=document.getElementById(selid); + if(f) objlist.push(f); + return(objlist); + } +if(selector.indexOf(".")>0){ //class selector like "tag.class" + s=selector.split("."); + tag=s[0]; + selclass=s[1]; + } +var v=document.getElementsByTagName(tag); // tag selector like "tag" +if(selclass=="") + return(v); +for(i=0;i=0){ + objlist.push(v[i]); + } + } +return(objlist); +} + +function Mix(c1,c2){ +var i,step1,step2,x,y,r=new Array(3); +if(c1.length==4)step1=1; +else step1=2; +if(c2.length==4) step2=1; +else step2=2; +for(i=0;i<3;i++){ + x=parseInt(c1.substr(1+step1*i,step1),16); + if(step1==1) x=16*x+x; + y=parseInt(c2.substr(1+step2*i,step2),16); + if(step2==1) y=16*y+y; + r[i]=Math.floor((x*50+y*50)/100); + } +return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16)); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/the_wall/javascript/transmenu-body.php b/src/usr/local/www/themes/the_wall/javascript/transmenu-body.php new file mode 100644 index 0000000..eea9235 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/transmenu-body.php @@ -0,0 +1,51 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +function nervecenterTransmenuGetBodyJS() { + global $rootmenu; + + if (isset($rootmenu)) { + return $rootmenu->getMenuJScript(); + } else if (empty($rootmenu)) { + return "alert('No rootmenu object found.');"; + } else { + return "alert('No JavaScript attached to rootmenu object.');"; + } +} + +?> diff --git a/src/usr/local/www/themes/the_wall/javascript/transmenu-head.php b/src/usr/local/www/themes/the_wall/javascript/transmenu-head.php new file mode 100644 index 0000000..66e1952 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/transmenu-head.php @@ -0,0 +1,85 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +function nervecenterTransmenuGetHeadJS() { + global $g, $rootmenu; + + $transmenu_stub =<<getChildren() as $component) { + $id = "mnua_" . str_replace(" ", "", strtolower($component->getID())); + + $childJScript .=<< diff --git a/src/usr/local/www/themes/the_wall/javascript/transmenu.org b/src/usr/local/www/themes/the_wall/javascript/transmenu.org new file mode 100644 index 0000000..6c9e353 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/transmenu.org @@ -0,0 +1,785 @@ +/* ================================================================================================= + * TransMenu + * March, 2003 + * + * Customizable multi-level animated DHTML menus with transparency. + * + * Copyright 2003-2004, Aaron Boodman (www.youngpup.net) + * ================================================================================================= + * "Can I use this?" + * + * Use of this library is governed by the Creative Commons Attribution 2.0 License. You can check it + * out at: http://creativecommons.org/licenses/by/2.0/ + * + * Basically: You may copy, distribute, and eat this code as you wish. But you must give me credit + * for writing it. You may not misrepresent yourself as the author of this code. + * ================================================================================================= + * "It's kinda hard to read, though" + * + * The uncompressed, commented version of this script can be found at: + * http://youngpup.net/projects/transMenus + * ================================================================================================= + * updates: + * 04.19.04 fixed cascade problem with menus nested greater than two levels. + * 12.23.03 added hideCurrent for menu actuators with no menus. renamed to TransMenu. + * 04.18.03 fixed render bug in IE 5.0 Mac by removing that browser from compatibility table ;) + * also made gecko check a little more strict by specifying build no. + * ============================================================================================== */ + + + +//================================================================================================== +// Configuration properties +//================================================================================================== +TransMenu.spacerGif = "themes/nervecenter/javascript/img/x.gif"; // path to a transparent spacer gif +TransMenu.dingbatOn = "themes/nervecenter/javascript/img/submenu-on.gif"; // path to the active sub menu dingbat +TransMenu.dingbatOff = "themes/nervecenter/javascript/img/submenu-off.gif"; // path to the inactive sub menu dingbat +TransMenu.dingbatSize = 14; // size of the dingbat (square shape assumed) +TransMenu.menuPadding = 5; // padding between menu border and items grid +TransMenu.itemPadding = 3; // additional padding around each item +TransMenu.shadowSize = 2; // size of shadow under menu +TransMenu.shadowOffset = 3; // distance shadow should be offset from leading edge +TransMenu.shadowColor = "#FF0000"; // color of shadow (transparency is set in CSS) +TransMenu.shadowPng = "themes/nervecenter/javascript/img/grey-40.png"; // a PNG graphic to serve as the shadow for mac IE5 +TransMenu.backgroundColor = "#990000"; // color of the background (transparency set in CSS) +TransMenu.backgroundPng = "themes/nervecenter/javascript/img/white-90.png"; // a PNG graphic to server as the background for mac IE5 +TransMenu.hideDelay = 1000; // number of milliseconds to wait before hiding a menu +TransMenu.slideTime = 400; // number of milliseconds it takes to open and close a menu + + +//================================================================================================== +// Internal use properties +//================================================================================================== +TransMenu.reference = {topLeft:1,topRight:2,bottomLeft:3,bottomRight:4}; +TransMenu.direction = {down:1,right:2}; +TransMenu.registry = []; +TransMenu._maxZ = 100; + + + +//================================================================================================== +// Static methods +//================================================================================================== +// supporting win ie5+, mac ie5.1+ and gecko >= mozilla 1.0 +TransMenu.isSupported = function() { + var ua = navigator.userAgent.toLowerCase(); + var pf = navigator.platform.toLowerCase(); + var an = navigator.appName; + var r = false; + + if (ua.indexOf("gecko") > -1 && navigator.productSub >= 20020605) r = true; // gecko >= moz 1.0 + else if (an == "Microsoft Internet Explorer") { + if (document.getElementById) { // ie5.1+ mac,win + if (pf.indexOf("mac") == 0) { + r = /msie (\d(.\d*)?)/.test(ua) && Number(RegExp.$1) >= 5.1; + } + else r = true; + } + } + + return r; +} + +// call this in onload once menus have been created +TransMenu.initialize = function() { + for (var i = 0, menu = null; menu = this.registry[i]; i++) { + menu.initialize(); + } +} + +// call this in document body to write out menu html +TransMenu.renderAll = function() { + var aMenuHtml = []; + for (var i = 0, menu = null; menu = this.registry[i]; i++) { + aMenuHtml[i] = menu.toString(); + } + document.write(aMenuHtml.join("")); +} + +//================================================================================================== +// TransMenu constructor (only called internally) +//================================================================================================== +// oActuator : The thing that causes the menu to be shown when it is mousedover. Either a +// reference to an HTML element, or a TransMenuItem from an existing menu. +// iDirection : The direction to slide out. One of TransMenu.direction. +// iLeft : Left pixel offset of menu from actuator +// iTop : Top pixel offset of menu from actuator +// iReferencePoint : Corner of actuator to measure from. One of TransMenu.referencePoint. +// parentMenuSet : Menuset this menu will be added to. +//================================================================================================== +function TransMenu(oActuator, iDirection, iLeft, iTop, iReferencePoint, parentMenuSet) { + // public methods + this.addItem = addItem; + this.addMenu = addMenu; + this.toString = toString; + this.initialize = initialize; + this.isOpen = false; + this.show = show; + this.hide = hide; + this.items = []; + + // events + this.onactivate = new Function(); // when the menu starts to slide open + this.ondeactivate = new Function(); // when the menu finishes sliding closed + this.onmouseover = new Function(); // when the menu has been moused over + this.onqueue = new Function(); // hack .. when the menu sets a timer to be closed a little while in the future + this.ondequeue = new Function(); + + // initialization + this.index = TransMenu.registry.length; + TransMenu.registry[this.index] = this; + + var id = "TransMenu" + this.index; + var contentHeight = null; + var contentWidth = null; + var childMenuSet = null; + var animating = false; + var childMenus = []; + var slideAccel = -1; + var elmCache = null; + var ready = false; + var _this = this; + var a = null; + + var pos = iDirection == TransMenu.direction.down ? "top" : "left"; + var dim = null; + + // private and public method implimentations + function addItem(sText, sUrl) { + var item = new TransMenuItem(sText, sUrl, this); + item._index = this.items.length; + this.items[item._index] = item; + } + + function addMenu(oMenuItem) { + if (!oMenuItem.parentMenu == this) throw new Error("Cannot add a menu here"); + + if (childMenuSet == null) childMenuSet = new TransMenuSet(TransMenu.direction.right, -5, 2, TransMenu.reference.topRight); + + var m = childMenuSet.addMenu(oMenuItem); + + childMenus[oMenuItem._index] = m; + m.onmouseover = child_mouseover; + m.ondeactivate = child_deactivate; + m.onqueue = child_queue; + m.ondequeue = child_dequeue; + + return m; + } + + function initialize() { + initCache(); + initEvents(); + initSize(); + ready = true; + } + + function show() { + //dbg_dump("show"); + if (ready) { + _this.isOpen = true; + animating = true; + setContainerPos(); + elmCache["clip"].style.visibility = "visible"; + elmCache["clip"].style.zIndex = TransMenu._maxZ++; + //dbg_dump("maxZ: " + TransMenu._maxZ); + slideStart(); + _this.onactivate(); + } + } + + function hide() { + if (ready) { + _this.isOpen = false; + animating = true; + + for (var i = 0, item = null; item = elmCache.item[i]; i++) + dehighlight(item); + + if (childMenuSet) childMenuSet.hide(); + + slideStart(); + _this.ondeactivate(); + } + } + + function setContainerPos() { + var sub = oActuator.constructor == TransMenuItem; + var act = sub ? oActuator.parentMenu.elmCache["item"][oActuator._index] : oActuator; + var el = act; + + var x = 0; + var y = 0; + + + var minX = 0; + var maxX = (window.innerWidth ? window.innerWidth : document.body.clientWidth) - parseInt(elmCache["clip"].style.width); + var minY = 0; + var maxY = (window.innerHeight ? window.innerHeight : document.body.clientHeight) - parseInt(elmCache["clip"].style.height); + + // add up all offsets... subtract any scroll offset + while (sub ? el.parentNode.className.indexOf("transMenu") == -1 : el.offsetParent) { + x += el.offsetLeft; + y += el.offsetTop; + + if (el.scrollLeft) x -= el.scrollLeft; + if (el.scrollTop) y -= el.scrollTop; + + el = el.offsetParent; + } + + if (oActuator.constructor == TransMenuItem) { + x += parseInt(el.parentNode.style.left); + y += parseInt(el.parentNode.style.top); + } + + switch (iReferencePoint) { + case TransMenu.reference.topLeft: + break; + case TransMenu.reference.topRight: + x += act.offsetWidth; + break; + case TransMenu.reference.bottomLeft: + y += act.offsetHeight; + break; + case TransMenu.reference.bottomRight: + x += act.offsetWidth; + y += act.offsetHeight; + break; + } + + x += iLeft; + y += iTop; + + x = Math.max(Math.min(x, maxX), minX); + y = Math.max(Math.min(y, maxY), minY); + + elmCache["clip"].style.left = x + "px"; + elmCache["clip"].style.top = y + "px"; + } + + function slideStart() { + var x0 = parseInt(elmCache["content"].style[pos]); + var x1 = _this.isOpen ? 0 : -dim; + + if (a != null) a.stop(); + a = new Accelimation(x0, x1, TransMenu.slideTime, slideAccel); + + a.onframe = slideFrame; + a.onend = slideEnd; + + a.start(); + } + + function slideFrame(x) { + elmCache["content"].style[pos] = x + "px"; + } + + function slideEnd() { + if (!_this.isOpen) elmCache["clip"].style.visibility = "hidden"; + animating = false; + } + + function initSize() { + // everything is based off the size of the items table... + var ow = elmCache["items"].offsetWidth; + var oh = elmCache["items"].offsetHeight; + var ua = navigator.userAgent.toLowerCase(); + + // clipping container should be ow/oh + the size of the shadow + elmCache["clip"].style.width = ow + TransMenu.shadowSize + 2 + "px"; + elmCache["clip"].style.height = oh + TransMenu.shadowSize + 2 + "px"; + + // same with content... + elmCache["content"].style.width = ow + TransMenu.shadowSize + "px"; + elmCache["content"].style.height = oh + TransMenu.shadowSize + "px"; + + contentHeight = oh + TransMenu.shadowSize; + contentWidth = ow + TransMenu.shadowSize; + + dim = iDirection == TransMenu.direction.down ? contentHeight : contentWidth; + + // set initially closed + elmCache["content"].style[pos] = -dim - TransMenu.shadowSize + "px"; + elmCache["clip"].style.visibility = "hidden"; + + // if *not* mac/ie 5 + if (ua.indexOf("mac") == -1 || ua.indexOf("gecko") > -1) { + // set background div to offset size + elmCache["background"].style.width = ow + "px"; + elmCache["background"].style.height = oh + "px"; + elmCache["background"].style.backgroundColor = TransMenu.backgroundColor; + + // shadow left starts at offset left and is offsetHeight pixels high + elmCache["shadowRight"].style.left = ow + "px"; + elmCache["shadowRight"].style.height = oh - (TransMenu.shadowOffset - TransMenu.shadowSize) + "px"; + elmCache["shadowRight"].style.backgroundColor = TransMenu.shadowColor; + + // shadow bottom starts at offset height and is offsetWidth - shadowOffset + // pixels wide (we don't want the bottom and right shadows to overlap or we + // get an extra bright bottom-right corner) + elmCache["shadowBottom"].style.top = oh + "px"; + elmCache["shadowBottom"].style.width = ow - TransMenu.shadowOffset + "px"; + elmCache["shadowBottom"].style.backgroundColor = TransMenu.shadowColor; + } + // mac ie is a little different because we use a PNG for the transparency + else { + // set background div to offset size + elmCache["background"].firstChild.src = TransMenu.backgroundPng; + elmCache["background"].firstChild.width = ow; + elmCache["background"].firstChild.height = oh; + + // shadow left starts at offset left and is offsetHeight pixels high + elmCache["shadowRight"].firstChild.src = TransMenu.shadowPng; + elmCache["shadowRight"].style.left = ow + "px"; + elmCache["shadowRight"].firstChild.width = TransMenu.shadowSize; + elmCache["shadowRight"].firstChild.height = oh - (TransMenu.shadowOffset - TransMenu.shadowSize); + + // shadow bottom starts at offset height and is offsetWidth - shadowOffset + // pixels wide (we don't want the bottom and right shadows to overlap or we + // get an extra bright bottom-right corner) + elmCache["shadowBottom"].firstChild.src = TransMenu.shadowPng; + elmCache["shadowBottom"].style.top = oh + "px"; + elmCache["shadowBottom"].firstChild.height = TransMenu.shadowSize; + elmCache["shadowBottom"].firstChild.width = ow - TransMenu.shadowOffset; + } + } + + function initCache() { + var menu = document.getElementById(id); + var all = menu.all ? menu.all : menu.getElementsByTagName("*"); // IE/win doesn't support * syntax, but does have the document.all thing + + elmCache = {}; + elmCache["clip"] = menu; + elmCache["item"] = []; + + for (var i = 0, elm = null; elm = all[i]; i++) { + switch (elm.className) { + case "items": + case "content": + case "background": + case "shadowRight": + case "shadowBottom": + elmCache[elm.className] = elm; + break; + case "item": + elm._index = elmCache["item"].length; + elmCache["item"][elm._index] = elm; + break; + } + } + + // hack! + _this.elmCache = elmCache; + } + + function initEvents() { + // hook item mouseover + for (var i = 0, item = null; item = elmCache.item[i]; i++) { + item.onmouseover = item_mouseover; + item.onmouseout = item_mouseout; + item.onclick = item_click; + } + + // hook actuation + if (typeof oActuator.tagName != "undefined") { + oActuator.onmouseover = actuator_mouseover; + oActuator.onmouseout = actuator_mouseout; + } + + // hook menu mouseover + elmCache["content"].onmouseover = content_mouseover; + elmCache["content"].onmouseout = content_mouseout; + } + + function highlight(oRow) { + oRow.className = "item hover"; + if (childMenus[oRow._index]) + oRow.lastChild.firstChild.src = TransMenu.dingbatOn; + } + + function dehighlight(oRow) { + oRow.className = "item"; + if (childMenus[oRow._index]) + oRow.lastChild.firstChild.src = TransMenu.dingbatOff; + } + + function item_mouseover() { + if (!animating) { + highlight(this); + + if (childMenus[this._index]) + childMenuSet.showMenu(childMenus[this._index]); + else if (childMenuSet) childMenuSet.hide(); + } + } + + function item_mouseout() { + if (!animating) { + if (childMenus[this._index]) + childMenuSet.hideMenu(childMenus[this._index]); + else // otherwise child_deactivate will do this + dehighlight(this); + } + } + + function item_click() { + if (!animating) { + if (_this.items[this._index].url) + location.href = _this.items[this._index].url; + } + } + + function actuator_mouseover() { + parentMenuSet.showMenu(_this); + } + + function actuator_mouseout() { + parentMenuSet.hideMenu(_this); + } + + function content_mouseover() { + if (!animating) { + parentMenuSet.showMenu(_this); + _this.onmouseover(); + } + } + + function content_mouseout() { + if (!animating) { + parentMenuSet.hideMenu(_this); + } + } + + function child_mouseover() { + if (!animating) { + parentMenuSet.showMenu(_this); + } + } + + function child_deactivate() { + for (var i = 0; i < childMenus.length; i++) { + if (childMenus[i] == this) { + dehighlight(elmCache["item"][i]); + break; + } + } + } + + function child_queue() { + parentMenuSet.hideMenu(_this); + } + + function child_dequeue() { + parentMenuSet.showMenu(_this); + } + + function toString() { + var aHtml = []; + var sClassName = "transMenu" + (oActuator.constructor != TransMenuItem ? " top" : ""); + + for (var i = 0, item = null; item = this.items[i]; i++) { + aHtml[i] = item.toString(childMenus[i]); + } + + return '
                            ' + + '
                            ' + + '' + + aHtml.join('') + + '
                            ' + + '
                            ' + + '
                            ' + + '
                            ' + + '
                            '; + } +} + + +//================================================================================================== +// TransMenuSet +//================================================================================================== +// iDirection : The direction to slide out. One of TransMenu.direction. +// iLeft : Left pixel offset of menus from actuator +// iTop : Top pixel offset of menus from actuator +// iReferencePoint : Corner of actuator to measure from. One of TransMenu.referencePoint. +//================================================================================================== +TransMenuSet.registry = []; + +function TransMenuSet(iDirection, iLeft, iTop, iReferencePoint) { + // public methods + this.addMenu = addMenu; + this.showMenu = showMenu; + this.hideMenu = hideMenu; + this.hide = hide; + this.hideCurrent = hideCurrent; + + // initialization + var menus = []; + var _this = this; + var current = null; + + this.index = TransMenuSet.registry.length; + TransMenuSet.registry[this.index] = this; + + // method implimentations... + function addMenu(oActuator) { + var m = new TransMenu(oActuator, iDirection, iLeft, iTop, iReferencePoint, this); + menus[menus.length] = m; + return m; + } + + function showMenu(oMenu) { + if (oMenu != current) { + // close currently open menu + if (current != null) hide(current); + + // set current menu to this one + current = oMenu; + + // if this menu is closed, open it + oMenu.show(); + } + else { + // hide pending calls to close this menu + cancelHide(oMenu); + } + } + + function hideMenu(oMenu) { + //dbg_dump("hideMenu a " + oMenu.index); + if (current == oMenu && oMenu.isOpen) { + //dbg_dump("hideMenu b " + oMenu.index); + if (!oMenu.hideTimer) scheduleHide(oMenu); + } + } + + function scheduleHide(oMenu) { + //dbg_dump("scheduleHide " + oMenu.index); + oMenu.onqueue(); + oMenu.hideTimer = window.setTimeout("TransMenuSet.registry[" + _this.index + "].hide(TransMenu.registry[" + oMenu.index + "])", TransMenu.hideDelay); + } + + function cancelHide(oMenu) { + //dbg_dump("cancelHide " + oMenu.index); + if (oMenu.hideTimer) { + oMenu.ondequeue(); + window.clearTimeout(oMenu.hideTimer); + oMenu.hideTimer = null; + } + } + + function hide(oMenu) { + if (!oMenu && current) oMenu = current; + + if (oMenu && current == oMenu && oMenu.isOpen) { + hideCurrent(); + } + } + + function hideCurrent() { + if (null != current) { + cancelHide(current); + current.hideTimer = null; + current.hide(); + current = null; + } + } +} + +//================================================================================================== +// TransMenuItem (internal) +// represents an item in a dropdown +//================================================================================================== +// sText : The item display text +// sUrl : URL to load when the item is clicked +// oParent : Menu this item is a part of +//================================================================================================== +function TransMenuItem(sText, sUrl, oParent) { + this.toString = toString; + this.text = sText; + this.url = sUrl; + this.parentMenu = oParent; + + function toString(bDingbat) { + var sDingbat = bDingbat ? TransMenu.dingbatOff : TransMenu.spacerGif; + var iEdgePadding = TransMenu.itemPadding + TransMenu.menuPadding; + var sPaddingLeft = "padding:" + TransMenu.itemPadding + "px; padding-left:" + iEdgePadding + "px;" + var sPaddingRight = "padding:" + TransMenu.itemPadding + "px; padding-right:" + iEdgePadding + "px;" + + return '' + + sText + '' + + ''; + } +} + + + + + + +//===================================================================== +// Accel[erated] [an]imation object +// change a property of an object over time in an accelerated fashion +//===================================================================== +// obj : reference to the object whose property you'd like to animate +// prop : property you would like to change eg: "left" +// to : final value of prop +// time : time the animation should take to run +// zip : optional. specify the zippiness of the acceleration. pick a +// number between -1 and 1 where -1 is full decelerated, 1 is +// full accelerated, and 0 is linear (no acceleration). default +// is 0. +// unit : optional. specify the units for use with prop. default is +// "px". +//===================================================================== +// bezier functions lifted from the lib_animation.js file in the +// 13th Parallel API. www.13thparallel.org +//===================================================================== + +function Accelimation(from, to, time, zip) { + if (typeof zip == "undefined") zip = 0; + if (typeof unit == "undefined") unit = "px"; + + this.x0 = from; + this.x1 = to; + this.dt = time; + this.zip = -zip; + this.unit = unit; + this.timer = null; + this.onend = new Function(); + this.onframe = new Function(); +} + + + +//===================================================================== +// public methods +//===================================================================== + +// after you create an accelimation, you call this to start it-a runnin' +Accelimation.prototype.start = function() { + this.t0 = new Date().getTime(); + this.t1 = this.t0 + this.dt; + var dx = this.x1 - this.x0; + this.c1 = this.x0 + ((1 + this.zip) * dx / 3); + this.c2 = this.x0 + ((2 + this.zip) * dx / 3); + Accelimation._add(this); +} + +// and if you need to stop it early for some reason... +Accelimation.prototype.stop = function() { + Accelimation._remove(this); +} + + + +//===================================================================== +// private methods +//===================================================================== + +// paints one frame. gets called by Accelimation._paintAll. +Accelimation.prototype._paint = function(time) { + if (time < this.t1) { + var elapsed = time - this.t0; + this.onframe(Accelimation._getBezier(elapsed/this.dt,this.x0,this.x1,this.c1,this.c2)); + } + else this._end(); +} + +// ends the animation +Accelimation.prototype._end = function() { + Accelimation._remove(this); + this.onframe(this.x1); + this.onend(); +} + + + + +//===================================================================== +// static methods (all private) +//===================================================================== + +// add a function to the list of ones to call periodically +Accelimation._add = function(o) { + var index = this.instances.length; + this.instances[index] = o; + // if this is the first one, start the engine + if (this.instances.length == 1) { + this.timerID = window.setInterval("Accelimation._paintAll()", this.targetRes); + } +} + +// remove a function from the list +Accelimation._remove = function(o) { + for (var i = 0; i < this.instances.length; i++) { + if (o == this.instances[i]) { + this.instances = this.instances.slice(0,i).concat( this.instances.slice(i+1) ); + break; + } + } + // if that was the last one, stop the engine + if (this.instances.length == 0) { + window.clearInterval(this.timerID); + this.timerID = null; + } +} + +// "engine" - call each function in the list every so often +Accelimation._paintAll = function() { + var now = new Date().getTime(); + for (var i = 0; i < this.instances.length; i++) { + this.instances[i]._paint(now); + } +} + + +// Bezier functions: +Accelimation._B1 = function(t) { return t*t*t } +Accelimation._B2 = function(t) { return 3*t*t*(1-t) } +Accelimation._B3 = function(t) { return 3*t*(1-t)*(1-t) } +Accelimation._B4 = function(t) { return (1-t)*(1-t)*(1-t) } + + +//Finds the coordinates of a point at a certain stage through a bezier curve +Accelimation._getBezier = function(percent,startPos,endPos,control1,control2) { + return endPos * this._B1(percent) + control2 * this._B2(percent) + control1 * this._B3(percent) + startPos * this._B4(percent); +} + + +//===================================================================== +// static properties +//===================================================================== + +Accelimation.instances = []; +Accelimation.targetRes = 10; +Accelimation.timerID = null; + + +//===================================================================== +// IE win memory cleanup +//===================================================================== + +if (window.attachEvent) { + var cearElementProps = [ + 'data', + 'onmouseover', + 'onmouseout', + 'onmousedown', + 'onmouseup', + 'ondblclick', + 'onclick', + 'onselectstart', + 'oncontextmenu' + ]; + + window.attachEvent("onunload", function() { + var el; + for(var d = document.all.length;d--;){ + el = document.all[d]; + for(var c = cearElementProps.length;c--;){ + el[cearElementProps[c]] = null; + } + } + }); +} \ No newline at end of file diff --git a/src/usr/local/www/themes/the_wall/javascript/transmenuC.js b/src/usr/local/www/themes/the_wall/javascript/transmenuC.js new file mode 100644 index 0000000..88626c7 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/javascript/transmenuC.js @@ -0,0 +1,86 @@ +/* ================================================================================================= + * TransMenu + * March, 2003 + * Customizable multi-level animated DHTML menus with transparency. + * ================================================================================================= + * "Can I use this?" + * + * Use of this library is governed by the Creative Commons Attribution 2.0 License. You can check it + * out at: http://creativecommons.org/licenses/by/2.0/ + * + * Basically: You may copy, distribute, and eat this code as you wish. But you must give me credit + * for writing it. You may not misrepresent yourself as the author of this code. + * ================================================================================================= + * "It's kinda hard to read, though" + * + * The uncompressed, commented version of this script can be found at: + * http://youngpup.net/projects/transMenus + * ============================================================================================== */ +TransMenu.spacerGif="themes/nervecenter/javascript/img/x.gif";TransMenu.dingbatOn="themes/nervecenter/javascript/img/submenu-on.gif";TransMenu.dingbatOff="themes/nervecenter/javascript/img/submenu-off.gif";TransMenu.dingbatSize=14;TransMenu.menuPadding=5;TransMenu.itemPadding=3;TransMenu.shadowSize=2;TransMenu.shadowOffset=3;TransMenu.shadowColor="#000000";TransMenu.shadowPng="themes/nervecenter/javascript/img/grey-40.png";TransMenu.backgroundColor="#990000";TransMenu.backgroundPng="themes/nervecenter/javascript/img/white-90.png";TransMenu.hideDelay=1000;TransMenu.slideTime=400;TransMenu.reference={topLeft:1,topRight:2,bottomLeft:3,bottomRight:4};TransMenu.direction={down:1,right:2};TransMenu.registry=[];TransMenu._maxZ=100;TransMenu.isSupported=function(){var ua=navigator.userAgent.toLowerCase();var pf=navigator.platform.toLowerCase();var an=navigator.appName;var r=false;if(ua.indexOf("gecko")>-1&&navigator.productSub>=20020605)r=true;else if(an=="Microsoft Internet Explorer"){if(document.getElementById){if(pf.indexOf("mac")==0){r=/msie (\d(.\d*)?)/.test(ua)&&Number(RegExp.$1)>=5.1;} +else r=true;}} +return r;} +TransMenu.initialize=function(){for(var i=0,menu=null;menu=this.registry[i];i++){menu.initialize();}} +TransMenu.renderAll=function(){var aMenuHtml=[];for(var i=0,menu=null;menu=this.registry[i];i++){aMenuHtml[i]=menu.toString();} +document.write(aMenuHtml.join(""));} +function TransMenu(oActuator,iDirection,iLeft,iTop,iReferencePoint,parentMenuSet){this.addItem=addItem;this.addMenu=addMenu;this.toString=toString;this.initialize=initialize;this.isOpen=false;this.show=show;this.hide=hide;this.items=[];this.onactivate=new Function();this.ondeactivate=new Function();this.onmouseover=new Function();this.onqueue=new Function();this.ondequeue=new Function();this.index=TransMenu.registry.length;TransMenu.registry[this.index]=this;var id="TransMenu"+this.index;var contentHeight=null;var contentWidth=null;var childMenuSet=null;var animating=false;var childMenus=[];var slideAccel=-1;var elmCache=null;var ready=false;var _this=this;var a=null;var pos=iDirection==TransMenu.direction.down?"top":"left";var dim=null;function addItem(sText,sUrl){var item=new TransMenuItem(sText,sUrl,this);item._index=this.items.length;this.items[item._index]=item;} +function addMenu(oMenuItem){if(!oMenuItem.parentMenu==this)throw new Error("Cannot add a menu here");if(childMenuSet==null)childMenuSet=new TransMenuSet(TransMenu.direction.right,-5,2,TransMenu.reference.topRight);var m=childMenuSet.addMenu(oMenuItem);childMenus[oMenuItem._index]=m;m.onmouseover=child_mouseover;m.ondeactivate=child_deactivate;m.onqueue=child_queue;m.ondequeue=child_dequeue;return m;} +function initialize(){initCache();initEvents();initSize();ready=true;} +function show(){if(ready){_this.isOpen=true;animating=true;setContainerPos();elmCache["clip"].style.visibility="visible";elmCache["clip"].style.zIndex=TransMenu._maxZ++;slideStart();_this.onactivate();}} +function hide(){if(ready){_this.isOpen=false;animating=true;for(var i=0,item=null;item=elmCache.item[i];i++)dehighlight(item);if(childMenuSet)childMenuSet.hide();slideStart();_this.ondeactivate();}} +function setContainerPos(){var sub=oActuator.constructor==TransMenuItem;var act=sub?oActuator.parentMenu.elmCache["item"][oActuator._index]:oActuator;var el=act;var x=0;var y=0;var minX=0;var maxX=(window.innerWidth?window.innerWidth:document.body.clientWidth)-parseInt(elmCache["clip"].style.width);var minY=0;var maxY=(window.innerHeight?window.innerHeight:document.body.clientHeight)-parseInt(elmCache["clip"].style.height);while(sub?el.parentNode.className.indexOf("transMenu")==-1:el.offsetParent){x+=el.offsetLeft;y+=el.offsetTop;if(el.scrollLeft)x-=el.scrollLeft;if(el.scrollTop)y-=el.scrollTop;el=el.offsetParent;} +if(oActuator.constructor==TransMenuItem){x+=parseInt(el.parentNode.style.left);y+=parseInt(el.parentNode.style.top);} +switch(iReferencePoint){case TransMenu.reference.topLeft:break;case TransMenu.reference.topRight:x+=act.offsetWidth;break;case TransMenu.reference.bottomLeft:y+=act.offsetHeight;break;case TransMenu.reference.bottomRight:x+=act.offsetWidth;y+=act.offsetHeight;break;} +x+=iLeft;y+=iTop;x=Math.max(Math.min(x,maxX),minX);y=Math.max(Math.min(y,maxY),minY);elmCache["clip"].style.left=x+"px";elmCache["clip"].style.top=y+"px";} +function slideStart(){var x0=parseInt(elmCache["content"].style[pos]);var x1=_this.isOpen?0:-dim;if(a!=null)a.stop();a=new Accelimation(x0,x1,TransMenu.slideTime,slideAccel);a.onframe=slideFrame;a.onend=slideEnd;a.start();} +function slideFrame(x){elmCache["content"].style[pos]=x+"px";} +function slideEnd(){if(!_this.isOpen)elmCache["clip"].style.visibility="hidden";animating=false;} +function initSize(){var ow=elmCache["items"].offsetWidth;var oh=elmCache["items"].offsetHeight;var ua=navigator.userAgent.toLowerCase();elmCache["clip"].style.width=ow+TransMenu.shadowSize+2+"px";elmCache["clip"].style.height=oh+TransMenu.shadowSize+2+"px";elmCache["content"].style.width=ow+TransMenu.shadowSize+"px";elmCache["content"].style.height=oh+TransMenu.shadowSize+"px";contentHeight=oh+TransMenu.shadowSize;contentWidth=ow+TransMenu.shadowSize;dim=iDirection==TransMenu.direction.down?contentHeight:contentWidth;elmCache["content"].style[pos]=-dim-TransMenu.shadowSize+"px";elmCache["clip"].style.visibility="hidden";if(ua.indexOf("mac")==-1||ua.indexOf("gecko")>-1){elmCache["background"].style.width=ow+"px";elmCache["background"].style.height=oh+"px";elmCache["background"].style.backgroundColor=TransMenu.backgroundColor;elmCache["shadowRight"].style.left=ow+"px";elmCache["shadowRight"].style.height=oh-(TransMenu.shadowOffset-TransMenu.shadowSize)+"px";elmCache["shadowRight"].style.backgroundColor=TransMenu.shadowColor;elmCache["shadowBottom"].style.top=oh+"px";elmCache["shadowBottom"].style.width=ow-TransMenu.shadowOffset+"px";elmCache["shadowBottom"].style.backgroundColor=TransMenu.shadowColor;} +else{elmCache["background"].firstChild.src=TransMenu.backgroundPng;elmCache["background"].firstChild.width=ow;elmCache["background"].firstChild.height=oh;elmCache["shadowRight"].firstChild.src=TransMenu.shadowPng;elmCache["shadowRight"].style.left=ow+"px";elmCache["shadowRight"].firstChild.width=TransMenu.shadowSize;elmCache["shadowRight"].firstChild.height=oh-(TransMenu.shadowOffset-TransMenu.shadowSize);elmCache["shadowBottom"].firstChild.src=TransMenu.shadowPng;elmCache["shadowBottom"].style.top=oh+"px";elmCache["shadowBottom"].firstChild.height=TransMenu.shadowSize;elmCache["shadowBottom"].firstChild.width=ow-TransMenu.shadowOffset;}} +function initCache(){var menu=document.getElementById(id);var all=menu.all?menu.all:menu.getElementsByTagName("*");elmCache={};elmCache["clip"]=menu;elmCache["item"]=[];for(var i=0,elm=null;elm=all[i];i++){switch(elm.className){case"items":case"content":case"background":case"shadowRight":case"shadowBottom":elmCache[elm.className]=elm;break;case"item":elm._index=elmCache["item"].length;elmCache["item"][elm._index]=elm;break;}} +_this.elmCache=elmCache;} +function initEvents(){for(var i=0,item=null;item=elmCache.item[i];i++){item.onmouseover=item_mouseover;item.onmouseout=item_mouseout;item.onclick=item_click;} +if(typeof oActuator.tagName!="undefined"){oActuator.onmouseover=actuator_mouseover;oActuator.onmouseout=actuator_mouseout;} +elmCache["content"].onmouseover=content_mouseover;elmCache["content"].onmouseout=content_mouseout;} +function highlight(oRow){oRow.className="item hover";if(childMenus[oRow._index])oRow.lastChild.firstChild.src=TransMenu.dingbatOn;} +function dehighlight(oRow){oRow.className="item";if(childMenus[oRow._index])oRow.lastChild.firstChild.src=TransMenu.dingbatOff;} +function item_mouseover(){if(!animating){highlight(this);if(childMenus[this._index])childMenuSet.showMenu(childMenus[this._index]);else if(childMenuSet)childMenuSet.hide();}} +function item_mouseout(){if(!animating){if(childMenus[this._index])childMenuSet.hideMenu(childMenus[this._index]);else dehighlight(this);}} +function item_click(){if(!animating){if(_this.items[this._index].url)location.href=_this.items[this._index].url;}} +function actuator_mouseover(){parentMenuSet.showMenu(_this);} +function actuator_mouseout(){parentMenuSet.hideMenu(_this);} +function content_mouseover(){if(!animating){parentMenuSet.showMenu(_this);_this.onmouseover();}} +function content_mouseout(){if(!animating){parentMenuSet.hideMenu(_this);}} +function child_mouseover(){if(!animating){parentMenuSet.showMenu(_this);}} +function child_deactivate(){for(var i=0;i'+'
                            '+''+aHtml.join('')+'
                            '+'
                            '+'
                            '+'
                            '+'
                            ';}} +TransMenuSet.registry=[];function TransMenuSet(iDirection,iLeft,iTop,iReferencePoint){this.addMenu=addMenu;this.showMenu=showMenu;this.hideMenu=hideMenu;this.hide=hide;this.hideCurrent=hideCurrent;var menus=[];var _this=this;var current=null;this.index=TransMenuSet.registry.length;TransMenuSet.registry[this.index]=this;function addMenu(oActuator){var m=new TransMenu(oActuator,iDirection,iLeft,iTop,iReferencePoint,this);menus[menus.length]=m;return m;} +function showMenu(oMenu){if(oMenu!=current){if(current!=null)hide(current);current=oMenu;oMenu.show();} +else{cancelHide(oMenu);}} +function hideMenu(oMenu){if(current==oMenu&&oMenu.isOpen){if(!oMenu.hideTimer)scheduleHide(oMenu);}} +function scheduleHide(oMenu){oMenu.onqueue();oMenu.hideTimer=window.setTimeout("TransMenuSet.registry["+_this.index+"].hide(TransMenu.registry["+oMenu.index+"])",TransMenu.hideDelay);} +function cancelHide(oMenu){if(oMenu.hideTimer){oMenu.ondequeue();window.clearTimeout(oMenu.hideTimer);oMenu.hideTimer=null;}} +function hide(oMenu){if(!oMenu&¤t)oMenu=current;if(oMenu&¤t==oMenu&&oMenu.isOpen){hideCurrent();}} +function hideCurrent(){if (null != current){cancelHide(current);current.hideTimer=null;current.hide();current=null;}}} +function TransMenuItem(sText,sUrl,oParent){this.toString=toString;this.text=sText;this.url=sUrl;this.parentMenu=oParent;function toString(bDingbat){var sDingbat=bDingbat?TransMenu.dingbatOff:TransMenu.spacerGif;var iEdgePadding=TransMenu.itemPadding+TransMenu.menuPadding;var sPaddingLeft="padding:"+TransMenu.itemPadding+"px; padding-left:"+iEdgePadding+"px;" +var sPaddingRight="padding:"+TransMenu.itemPadding+"px; padding-right:"+iEdgePadding+"px;" +return''+sText+''+'';}} +function Accelimation(from,to,time,zip){if(typeof zip=="undefined")zip=0;if(typeof unit=="undefined")unit="px";this.x0=from;this.x1=to;this.dt=time;this.zip=-zip;this.unit=unit;this.timer=null;this.onend=new Function();this.onframe=new Function();} +Accelimation.prototype.start=function(){this.t0=new Date().getTime();this.t1=this.t0+this.dt;var dx=this.x1-this.x0;this.c1=this.x0+((1+this.zip)*dx/3);this.c2=this.x0+((2+this.zip)*dx/3);Accelimation._add(this);} +Accelimation.prototype.stop=function(){Accelimation._remove(this);} +Accelimation.prototype._paint=function(time){if(time= !,... +# where: forbidden pages are those pages that should *not* use +# the particular JavaScript function within the JS event +# specified below. +# $Id$ +# +onload=tmenuinit(); !wizard.php \ No newline at end of file diff --git a/src/usr/local/www/themes/the_wall/loader.js b/src/usr/local/www/themes/the_wall/loader.js new file mode 100644 index 0000000..20ecfbb --- /dev/null +++ b/src/usr/local/www/themes/the_wall/loader.js @@ -0,0 +1,30 @@ +//'); +} + +document.write(''); + +//]]> diff --git a/src/usr/local/www/themes/the_wall/login.css b/src/usr/local/www/themes/the_wall/login.css new file mode 100644 index 0000000..3c97a9a --- /dev/null +++ b/src/usr/local/www/themes/the_wall/login.css @@ -0,0 +1,1159 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.infoboxnptd2 { + width:100%; + color:white; + background-color:#990000; + padding-right: 10px; +} + +.infoboxnptd { + width:8%; + background-color:#990000; +} + +.infoboxnptable { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnptable2 { + height:32px; + width:100%; + background-color:#990000; +} + +.infoboxnp { + background-color:#990000; + width:100%; +} + +.infoboxnpimg { + vertical-align:middle; + width:28px; + height:32px; + background-color:#990000; +} + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background: url('images/background.jpg') repeat-x; background-attachment:fixed; + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 20px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; + text-align: center; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { +/* background: #cccccc; */ + background-color: transparent; + border: 0px solid #cccccc; + margin: 5em auto; + padding: 0em; + width: 400px; +/* filter:alpha(opacity=60); + -moz-opacity:0.6; + -khtml-opacity: 0.6; + opacity: 0.6; */ +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; +/* background: #ffffff; */ + margin-top: 0; + display: block; + text-indent: -1000px; + height: 400px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -420px; + left: 70px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + top: -300px; */ +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +/* text-indent: 10px; + position: relative; + left: 10px; + top: -300px; */ +} + +#login #submit { + font-size: 1em; + font-weight: bold; + text-align: center; + padding: 3px; + margin: 0em; +/* text-indent: 10px; */ + position: relative; + top: -20px; + left: 170px; +} + +/* loginerror box follows */ + +#login #inputerrors { + background-color: transparent; + border: 0px solid #666666; + margin: 5em auto; + vertical-align: middle; + padding: 0em; + width: 330px; + height: 50px; + position: relative; + top: -370px; +} +/* +#login #errortext { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 330px; + position: relative; + top: -350px; +} + +#login #errordesc { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 330px; + position: relative; + top: -350px; +} +#login #errordesc h1 { + background: url(/images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +// position: relative; +// top: -300px; +} +*/ \ No newline at end of file diff --git a/src/usr/local/www/themes/the_wall/menu.inc b/src/usr/local/www/themes/the_wall/menu.inc new file mode 100644 index 0000000..a274410 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/menu.inc @@ -0,0 +1,177 @@ + + All rights reserved. + */ +/* ========================================================================== */ +/* + Originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + +require("menu.inc"); + +define("TMENU_STUB", " + // set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. + // but you can experiment with effect on loadtime. + if (TransMenu.isSupported()) { + + //================================================================================================== + // create a set of dropdowns + //================================================================================================== + // the first param should always be down, as it is here + // + // The second and third param are the top and left offset positions of the menus from their actuators + // respectively. To make a menu appear a little to the left and bottom of an actuator, you could use + // something like -5, 5 + // + // The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner + // of the actuator from which to measure the offset positions above. Here we are saying we want the + // menu to appear directly below the bottom left corner of the actuator + //================================================================================================== + var ms = new TransMenuSet(TransMenu.direction.down, 1, 0, TransMenu.reference.bottomLeft); + + //================================================================================================== + // create a dropdown menu + //================================================================================================== + // the first parameter should be the HTML element which will act actuator for the menu + //================================================================================================== + + @@MENU_DEFINITIONS@@ + + //================================================================================================== + // write drop downs into page + //================================================================================================== + // this method writes all the HTML for the menus into the page with document.write(). It must be + // called within the body of the HTML page. + //================================================================================================== + TransMenu.renderAll(); + } +"); + +class NervecenterMenu extends Menu { + private $menuJScript = "NOT-SET"; + private $menuJScriptEvents = "NOT-SET"; + private $menuID = "NOT-SET"; + + public function __construct($identification = "", $filename = "", Component $c = NULL) { + parent::__construct($identification, $filename, $c); + + $id = "mnua_" . str_replace(" ", "", strtolower($this->getID())); + $this->menuID = $id; + + if ($this->hasParent()) { + $this->menuJScript = "\tvar {$id} = ms.addMenu(document.getElementById('{$id}'));\n"; + } + } // end __construct + + public function getMenuID() { + return $this->menuID; + } + + public function setMenuID($myMenuID) { + $this->menuID = $myMenuID; + } + + public function getMenuJScript() { + $childJScript = ""; + foreach ($this->getChildren() as $component) { + $childJScript .= $component->getMenuJScript(); + } + + if (! $this->hasParent()) { + $this->menuJScript = str_replace("@@MENU_DEFINITIONS@@", $childJScript, TMENU_STUB); + } else { + $this->menuJScript .= "\n$childJScript\n"; + } + + return $this->menuJScript; + } + + public function getMenuJScriptEvents() { + return $this->menuJScriptEvents; + } + + public function __toString() { + if (! $this->hasParent()) { + $menuMarkup =<< + @@CHILD_ELEMENTS@@ + + +EOD; + } else { + $name = gettext($this->getID()); + $id = "mnua_" . str_replace(" ", "", strtolower($this->getID())); + + $menuMarkup =<<{$name} + @@CHILD_ELEMENTS@@ +EOD; + } + + $childMarkup = ""; + foreach ($this->getChildren() as $component) { + $childMarkup .= $component; + } + + $menuMarkup = str_replace("@@CHILD_ELEMENTS@@", $childMarkup, $menuMarkup); + + return $menuMarkup; + } +} + +class NervecenterMenuItem extends MenuItem { + private $menuJScript = "NOT-SET"; + private $menuJScriptEvents = "NOT-SET"; + + public function __construct($identification = "", $filename = "", $href = "", Component $c = NULL) { + parent::__construct($identification, $filename, $href, $c); + + $href = $this->getHref() <> "" ? $this->getHref() : "{$this->getFile()}"; + $name = gettext($this->getID()); + $file = $this->getFile(); + + $this->menuJScript = $this->check_access("{$file}", "\t{$this->getParent()->getMenuID()}.addItem('{$name}', '{$href}');\n"); + } + + public function getMenuJScript() { + return $this->menuJScript; + } + + public function getMenuJScriptEvents() { + return $this->menuJScriptEvents; + } + + public function __toString() { + return ""; + } +} + +?> diff --git a/src/usr/local/www/themes/the_wall/new_tab_menu.css b/src/usr/local/www/themes/the_wall/new_tab_menu.css new file mode 100644 index 0000000..04c4cf2 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/new_tab_menu.css @@ -0,0 +1,101 @@ +/* + new_tab_menu.css + part of pfSense + Copyright (C) 2010-2011 Robert Zelaya + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + + + Replace your old tab menu with the following code. To add a second tab menu line just cut and paste again. + The following code is dependent on new_tab_menu.css and images/new_tab_menu.png. + + + + + + + +*/ + +.newtabmenu ul, li{border:0; margin:0; padding:0; list-style:none;} + +.newtabmenu li{float:left; margin-right:2px; text-align: center;} +.newtabmenu a:link, .newtabmenu a:visited{ + background:url(images/new_tab_menu.png) right 45px; + color:#ffffff; /* noactive font */ + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + font-weight:bold; + font-size:.9em; + height:20px; + line-height:20px; + text-decoration:none; +} +.newtabmenu a span{ + background:url(images/new_tab_menu.png) left 45px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + height:20px; + margin-right:7px; + padding-left:7px; +} +.newtabmenu a:hover{ + background:url(images/new_tab_menu.png) right 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ + color:#ffffff; /* hover over font */ +} +.newtabmenu a:hover span{ + background:url(images/new_tab_menu.png) left 23px; + display:block; + /* fix for IE6 */ + display: inline-block; + /* END */ +} + +/* -------------------------------- */ +/* ACTIVE ELEMENTS */ +.newtabmenu_active a:link, .newtabmenu_active a:visited, .newtabmenu_active a:visited, .newtabmenu_active a:hover{ + color:#000000; /* active font */ + background:url(images/new_tab_menu.png) right 0 no-repeat; +} +.newtabmenu_active a span, .newtabmenu_active a:hover span{ + background:url(images/new_tab_menu.png) left 0 no-repeat; +} \ No newline at end of file diff --git a/src/usr/local/www/themes/the_wall/no_big_logo b/src/usr/local/www/themes/the_wall/no_big_logo new file mode 100644 index 0000000..6e5c70d --- /dev/null +++ b/src/usr/local/www/themes/the_wall/no_big_logo @@ -0,0 +1 @@ +NO! DONT! \ No newline at end of file diff --git a/src/usr/local/www/themes/the_wall/rrdcolors.inc.php b/src/usr/local/www/themes/the_wall/rrdcolors.inc.php new file mode 100644 index 0000000..dcb7a39 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/rrdcolors.inc.php @@ -0,0 +1,89 @@ + + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* This file is included by the RRD graphing page and sets the colors */ + +/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Traffic Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colortrafficdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* Packets Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */ +$colorpacketsup = array('666666', 'CCCCCC', '2217AA', '625AE7'); + +/* Packets Inbound In-P-4, In-B-4, In-P-6, In-B-6 */ +$colorpacketsdown = array('990000', 'CC0000', 'FFC875', 'FF9900'); + +/* 95th Percentile Lines Out, In */ +$colortraffic95 = array('660000', 'FF0000'); + +/* State Table pfrate, pfstates, pfnat, srcip, dstip */ +$colorstates = array('00AA00','990000','0000FF','000000','DD9B00'); + +/* Processor Usage user, nice, system, int, processes */ +$colorprocessor = array('00AA00','990000','0000FF','DD9B00','000000'); + +/* Memory Usage active, inact, free, cache, wire */ +$colormemory = array('00AA00','990000','0000FF','666666','DD9B00'); + +/* MBUF Usage current, cache, total, max */ +$colormbuf = array('0080FF','00E344','FF0000','000000'); + +/* Traffic Shaper Queues q1, q2, q3, q4, q5, q6, q7, q8, q9 */ +$colorqueuesup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +$colorqueuesdropup = array('000000','7B0000','0080FF','00E344','FF0000','2217AA','FFC875','FF9900','CC0000'); +$colorqueuesdropdown = array('000000','7B7B7B','999999','BBBBBB','CCCCCC','D9D9D9','EEEEEE','FFFFFF','CCCCCC'); + +/* Quality Graph Delay >420, 180-420, 60-180, 20-60, <20, Delay Avg */ +$colorqualityrtt = array('990000','a83c3c','b36666','bd9090','cccccc','000000'); +/* Quality Graph Loss */ +$colorqualityloss = 'ee0000'; + +/* Wireless Graph SNR, Rate, Channel*/ +/* Cellular Graph RSSI, */ +$colorwireless = array('333333','a83c3c','999999'); + +/* SPAMD Times min area, avg area, max area, Time line */ +$colorspamdtime = array('DDDDFF', 'AAAAFF', 'DDDDFF', '000066'); +/* SPAMD Connections max area, min area, min line, max line, avg line */ +$colorspamdconn = array('AA00BB', 'FFFFFF', '660088', 'FFFF88', '006600'); + +/* OpenVPN Users Online Users */ +$colorvpnusers = array('990000'); + +/* Captive Portal Total Users Total Users */ +/* Captive Portal Concurrent Concurrent Users */ +$colorcaptiveportalusers = array('990000'); + +?> diff --git a/src/usr/local/www/themes/the_wall/styles/jquery-ui-1.11.1.css b/src/usr/local/www/themes/the_wall/styles/jquery-ui-1.11.1.css new file mode 100644 index 0000000..8a8c54f --- /dev/null +++ b/src/usr/local/www/themes/the_wall/styles/jquery-ui-1.11.1.css @@ -0,0 +1,1226 @@ +/*! jQuery UI - v1.11.1 - 2014-09-22 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2C%20Helvetica%2C%20Arial%2C%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=glass&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=inset_soft&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=glass&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=bbbbbb&fcHover=599fcf&iconColorHover=3383bb&bgColorActive=999999&bgTextureActive=inset_hard&bgImgOpacityActive=75&borderColorActive=999999&fcActive=ffffff&iconColorActive=454545&bgColorHighlight=eeeeee&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=ffffff&fcHighlight=444444&iconColorHighlight=3383bb&bgColorError=c0402a&bgTextureError=flat&bgImgOpacityError=55&borderColorError=c0402a&fcError=ffffff&iconColorError=fbc856&bgColorOverlay=eeeeee&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0pxdow +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 1em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; + background-color: #990000; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #c9c9c9 url("../../../javascript/jquery/images/ui-bg_inset-soft_50_c9c9c9_1x100.png") 50% bottom repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #bbbbbb; + /* background: #dddddd url("../../../javascript/jquery/images/ui-bg_glass_35_dddddd_1x400.png") 50% 50% repeat-x; */ + color: #444444; + font-weight: bold; +} +.ui-widget-header a { + color: #444444; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_glass_60_eeeeee_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #3383bb; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #3383bb; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #bbbbbb; + background: #f8f8f8 url("../../../javascript/jquery/images/ui-bg_glass_100_f8f8f8_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #599fcf; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #599fcf; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #999999; + background: #999999 url("../../../javascript/jquery/images/ui-bg_inset-hard_75_999999_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #ffffff; + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_55_eeeeee_40x100.png") 50% 50% repeat-x; + color: #444444; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #444444; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #c0402a; + background: #c0402a url("../../../javascript/jquery/images/ui-bg_flat_55_c0402a_40x100.png") 50% 50% repeat-x; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_999999_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_70b2e1_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_454545_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_3383bb_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("../../../javascript/jquery/images/ui-icons_fbc856_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #eeeeee url("../../../javascript/jquery/images/ui-bg_flat_0_eeeeee_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -4px 0 0 -4px; + padding: 4px; + background: #aaaaaa url("../../../javascript/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 0pxdow; +} diff --git a/src/usr/local/www/themes/the_wall/styles/menustyles.css b/src/usr/local/www/themes/the_wall/styles/menustyles.css new file mode 100644 index 0000000..06b3c7a --- /dev/null +++ b/src/usr/local/www/themes/the_wall/styles/menustyles.css @@ -0,0 +1,44 @@ +#navigation { + /* border:1px solid black; */ + width: 98%; + vertical-align: middle; + height: 16px; + padding-top: 4px; + } + +#menu { + /* background: #990000; */ + /* border-bottom:1px solid white; */ + padding: 0 0 0 0; + width: 98%; + vertical-align: middle; + height: 16px; + } +#menu a { + padding: 2px 28px 4px 28px; + text-decoration: none; + font-weight: bold; + font-size: 1.0em; + color: #FFFFFF; + width: 08%; + height: 16px; + } +#menu a.hover { + background: #AF2020; + } +#menu span { + display: none; + } + +#subnav { + font-size: 10px; + margin-bottom: 2em; + } +#subnav a { + color: #FF0000; /* #FB3B00; */ + margin-right: 1em; + } +#subnav span { + color: silver; + margin-right: 1em; + } diff --git a/src/usr/local/www/themes/the_wall/styles/transmenu.css b/src/usr/local/www/themes/the_wall/styles/transmenu.css new file mode 100644 index 0000000..f683574 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/styles/transmenu.css @@ -0,0 +1,75 @@ +/* this is the clipping region for the menu. it's width and height get set by script, depending on the size of the items table */ +.transMenu { + position:absolute; + overflow:hidden; + left:-1000px; + top:-1000px; + } + +/* this is the main container for the menu itself. it's width and height get set by script, depending on the size of the items table */ +.transMenu .content { + position:absolute; + } + +/* this table comprises all menu items. each TR is one item. It is relatively positioned so that the shadow and background transparent divs can be positioned underneath it */ +.transMenu .items { + position:relative; + left:0px; top:0px; + z-index:2; + } + +.transMenu.top .items { + border-top:none; + } + +/* each TR.item is one menu item */ +.transMenu .item { + color: #FFFFFF; /* #336; */ + font-size: 1.1em; + font-weight: normal; + font-family:sans-serif; + text-decoration:none; + /* this is a hack for mac/ie5, whom incorrectly cascades the border properties of the parent table to each row */ + border:none; + cursor:pointer; + cursor:hand; + } + +/* this DIV is the semi-transparent white background of each menu. the -moz-opacity is a proprietary way to get transparency in mozilla, the filter is for IE/windows 5.0+. */ +/* we set the background color in script because ie mac does not use it; that browser only uses a semi-transparent white PNG that the spacer gif inside this DIV is replaced by */ +.transMenu .background { + position:absolute; + left:0px; top:0px; + z-index:1; + -moz-opacity:.8; + filter:alpha(opacity=80); + } + +/* same concept as .background, but this is the sliver of shadow on the right of the menu. It's left, height, and background are set by script. In IE5/mac, it uses a PNG */ +.transMenu .shadowRight { + position:absolute; + z-index:3; + top:3px; width:2px; + -moz-opacity:.4; + filter:alpha(opacity=40); + } + +/* same concept as .background, but this is the sliver of shadow on the bottom of the menu. It's top, width, and background are set by script. In IE5/mac, it uses a PNG */ +.transMenu .shadowBottom { + position:absolute; + z-index:1; + left:3px; height:2px; + -moz-opacity:.4; + filter:alpha(opacity=40); + } + +/* this is the class that is used when the mouse is over an item. script sets the row to this class when required. */ +.transMenu .item.hover { + background:#fdfdfd; + color:black; + } + +/* this is either the dingbat that indicates there is a submenu, or a spacer gif in it's place. We give it extra margin to create some space between the text and the dingbat */ +.transMenu .item img { + margin-left:10px; + } \ No newline at end of file diff --git a/src/usr/local/www/themes/the_wall/wizard.css b/src/usr/local/www/themes/the_wall/wizard.css new file mode 100644 index 0000000..a2d31d5 --- /dev/null +++ b/src/usr/local/www/themes/the_wall/wizard.css @@ -0,0 +1,1060 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +.nowrap { white-space: nowrap; } + +/* please adjust the bgcolor to be used together with niftycorners! */ +.rtop, .artop { + background-color: #999999; +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 250px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 9px; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + /* background: url('images/background.png') no-repeat; */ + background-position : center 0px; + background-color: #999999; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #cccccc; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -15px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #ffffff; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -25px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 1; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + padding-left: 19px; + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #FFFFFF; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + + + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #username, #password { + font-size: 1em; + width: 60%; + padding: 3px; + margin: 0em; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} diff --git a/src/usr/local/www/tree-images/empty.gif b/src/usr/local/www/tree-images/empty.gif new file mode 100755 index 0000000..b501ceb Binary files /dev/null and b/src/usr/local/www/tree-images/empty.gif differ diff --git a/src/usr/local/www/tree-images/join.gif b/src/usr/local/www/tree-images/join.gif new file mode 100755 index 0000000..976ba7e Binary files /dev/null and b/src/usr/local/www/tree-images/join.gif differ diff --git a/src/usr/local/www/tree-images/joinbottom.gif b/src/usr/local/www/tree-images/joinbottom.gif new file mode 100755 index 0000000..8552b66 Binary files /dev/null and b/src/usr/local/www/tree-images/joinbottom.gif differ diff --git a/src/usr/local/www/tree-images/line.gif b/src/usr/local/www/tree-images/line.gif new file mode 100755 index 0000000..976beda Binary files /dev/null and b/src/usr/local/www/tree-images/line.gif differ diff --git a/src/usr/local/www/tree-images/minus_.gif b/src/usr/local/www/tree-images/minus_.gif new file mode 100755 index 0000000..7c3a143 Binary files /dev/null and b/src/usr/local/www/tree-images/minus_.gif differ diff --git a/src/usr/local/www/tree-images/minus_up.gif b/src/usr/local/www/tree-images/minus_up.gif new file mode 100755 index 0000000..16915d4 Binary files /dev/null and b/src/usr/local/www/tree-images/minus_up.gif differ diff --git a/src/usr/local/www/tree-images/page.gif b/src/usr/local/www/tree-images/page.gif new file mode 100755 index 0000000..531f133 Binary files /dev/null and b/src/usr/local/www/tree-images/page.gif differ diff --git a/src/usr/local/www/tree-images/plus_.gif b/src/usr/local/www/tree-images/plus_.gif new file mode 100755 index 0000000..34c1a5e Binary files /dev/null and b/src/usr/local/www/tree-images/plus_.gif differ diff --git a/src/usr/local/www/tree-images/plus_up.gif b/src/usr/local/www/tree-images/plus_up.gif new file mode 100755 index 0000000..d095e07 Binary files /dev/null and b/src/usr/local/www/tree-images/plus_up.gif differ diff --git a/src/usr/local/www/tree-images/plus_updown.gif b/src/usr/local/www/tree-images/plus_updown.gif new file mode 100755 index 0000000..afc1753 Binary files /dev/null and b/src/usr/local/www/tree-images/plus_updown.gif differ diff --git a/src/usr/local/www/tree-images/zone.gif b/src/usr/local/www/tree-images/zone.gif new file mode 100755 index 0000000..f49d647 Binary files /dev/null and b/src/usr/local/www/tree-images/zone.gif differ diff --git a/src/usr/local/www/tree/i-bottom.gif b/src/usr/local/www/tree/i-bottom.gif new file mode 100755 index 0000000..f07fa99 Binary files /dev/null and b/src/usr/local/www/tree/i-bottom.gif differ diff --git a/src/usr/local/www/tree/i-repeater.gif b/src/usr/local/www/tree/i-repeater.gif new file mode 100755 index 0000000..d5ab089 Binary files /dev/null and b/src/usr/local/www/tree/i-repeater.gif differ diff --git a/src/usr/local/www/tree/index.html b/src/usr/local/www/tree/index.html new file mode 100644 index 0000000..f2c45d4 --- /dev/null +++ b/src/usr/local/www/tree/index.html @@ -0,0 +1,228 @@ + + + + + SilverStripe Tree Control + + + + + + + +

                            SilverStripe Tree Control

                            +

                            This tree control was put together by Sam Minnée at + SilverStripe in New Zealand. We've put it out there + for everyone to enjoy. Check out our blog if you're + wondering what we're up to.

                            +

                            This file came from http://www.silverstripe.com/downloads/tree/. + If you found this file elsewhere, check out that page: we might have posted an updated version.

                            + +

                            + Quick-links: + Demo | Usage | Download | How it Works +

                            + +

                            Demo

                            +

                            Here's a basic demo of the tree control. Our styling is fairly basic, but with updated CSS and + images you can do whatever you like. Just for fun, try changing the text size.

                            + + + +

                            Download

                            + +

                            Download everything you need here - tree.zip, 11kb

                            + +

                            Usage

                            + +

                            The first thing to do is include the appropriate JavaScript and CSS files:

                            + + + <link rel="stylesheet" type="text/css" media="all" href="tree.css" />
                            + <script type="text/javascript" src="tree.js"></script> +
                            + +

                            Then, create the HTML for you tree. This is basically a nested set of bullet pointed links. The + "tree" class at the top is what the script will look for. Note that you can make a tree ndoe closed + to begin with by adding class="closed".

                            + +

                            Here's the HTML code that I inserted to create the demo tree above.

                            + + + <ul class="tree">
                            + <li><a href="#">item 1</a>
                            + <ul>
                            + <li><a href="#">item 1.1</a></li>
                            + <li class="closed"><a href="#">item 1.2</a>
                            + <ul>
                            + <li><a href="#">item 1.2.1</a></li>
                            + <li><a href="#">item 1.2.2</a></li>
                            + <li><a href="#">item 1.2.3</a></li>
                            + </ul>
                            + </li>
                            + <li><a href="#">item 1.3</a></li>
                            + </ul>
                            + </li>
                            + <li><a href="#">item 2</a>
                            + <ul>
                            + <li><a href="#">item 2.1</a></li>
                            + <li><a href="#">item 2.2</a></li>
                            + <li><a href="#">item 2.3</a></li>
                            + </ul>
                            + </li>
                            + </ul> +
                            + +

                            Your tree is now complete!

                            + +

                            How it works

                            +
                            +
                            Starting the script
                            +
                            In simple situations, creating an auto-loading script is a simple matter of setting window.onload + to a function. But what if there's more than one script? To this end, we created an appendLoader() + function that will execute multiple loader functions, including a previously defined loader function
                            + +
                            Finding the tree content
                            +
                            Rather than write a piece of script to define we're your tree is, we've tried to make the script + as automatic as possible - it finds all ULs with a class name containing "tree".
                            + +
                            Augmenting the HTML
                            +
                            Unfortunately, an LI containing an A isn't sufficient for doing all of the necessary tree styling. + Rather than force people to put non-semantic HTML into their file, the script generates extra <span> tags. + So, the following HTML: + + + <li><a href="#">My item</a></li> + + + Is turned into the more ungainly, and yet more easily styled: + + + <li><span class="a"><span class="b"><span class="c"><a href="#">My item</a></span></span></span></li> + + + Additionally, some helper classes are applied to the <li> and <span class="a"> elements: +
                              +
                            • "last" is applied to the last node of any subtree.
                            • +
                            • "children" is applied to any node that has children.
                            • +
                            +
                            + +
                            Styling it up
                            +
                            Why the heck do we need 5 styling elements? Basically, because there are 5 background-images to apply: +
                              +
                            • li: A repeating vertical line is shown. Nested <li> tags + give us the multiple vertical lines that we need.
                            • +
                            • span.a: We overlay the vertical line with 'L' and 'T' elements as needed.
                            • +
                            • span.b: We overlay '+' or '-' signs on nodes with children.
                            • +
                            • span.c: This is needed to fix up the vertical line.
                            • +
                            • a: Finally, we apply the page icon.
                            • +
                            +
                            + +
                            Opening / closing nodes
                            +
                            Having come this far, the "dynamic" aspect of the tree control is very trivial. We set a "closed" + class on the <li> and <span class="a"> elements, and our CSS takes care of hiding the + children, changing the - to a + and changing the folder icon.
                            +
                            + + + + diff --git a/src/usr/local/www/tree/l.gif b/src/usr/local/www/tree/l.gif new file mode 100755 index 0000000..1e8c707 Binary files /dev/null and b/src/usr/local/www/tree/l.gif differ diff --git a/src/usr/local/www/tree/minus.gif b/src/usr/local/www/tree/minus.gif new file mode 100755 index 0000000..7a7fd3b Binary files /dev/null and b/src/usr/local/www/tree/minus.gif differ diff --git a/src/usr/local/www/tree/page-file.png b/src/usr/local/www/tree/page-file.png new file mode 100755 index 0000000..d3bb119 Binary files /dev/null and b/src/usr/local/www/tree/page-file.png differ diff --git a/src/usr/local/www/tree/page-file_play.gif b/src/usr/local/www/tree/page-file_play.gif new file mode 100755 index 0000000..0c8e9ff Binary files /dev/null and b/src/usr/local/www/tree/page-file_play.gif differ diff --git a/src/usr/local/www/tree/page-file_x.gif b/src/usr/local/www/tree/page-file_x.gif new file mode 100755 index 0000000..504f06e Binary files /dev/null and b/src/usr/local/www/tree/page-file_x.gif differ diff --git a/src/usr/local/www/tree/page-foldericon.png b/src/usr/local/www/tree/page-foldericon.png new file mode 100755 index 0000000..d26f2dc Binary files /dev/null and b/src/usr/local/www/tree/page-foldericon.png differ diff --git a/src/usr/local/www/tree/page-openfoldericon.png b/src/usr/local/www/tree/page-openfoldericon.png new file mode 100755 index 0000000..8d00c39 Binary files /dev/null and b/src/usr/local/www/tree/page-openfoldericon.png differ diff --git a/src/usr/local/www/tree/plus.gif b/src/usr/local/www/tree/plus.gif new file mode 100755 index 0000000..3530f59 Binary files /dev/null and b/src/usr/local/www/tree/plus.gif differ diff --git a/src/usr/local/www/tree/t.gif b/src/usr/local/www/tree/t.gif new file mode 100755 index 0000000..a92da2a Binary files /dev/null and b/src/usr/local/www/tree/t.gif differ diff --git a/src/usr/local/www/tree/tree.css b/src/usr/local/www/tree/tree.css new file mode 100644 index 0000000..31b7979 --- /dev/null +++ b/src/usr/local/www/tree/tree.css @@ -0,0 +1,136 @@ +/* + * CSS for Standard tree layout + * Copyright (C) 2005 SilverStripe Limited + * Feel free to use this on your websites, but please leave this message in the fies + * http://www.silverstripe.com/blog + */ + +ul.tree{ + width: auto; + padding-left : 0px; + margin-left : 0px; +} + +ul.tree img{ + border : none; +} + + +ul.tree, ul.tree ul { + padding-left: 0; +} + +ul.tree ul { + margin-left: 16px; + +} +ul.tree li.closed ul { + display: none; +} + + +ul.tree li { + list-style: none; + background: url(i-repeater.gif) 0 0 repeat-y; + display: block; + width: auto; + /* background-color:#FFFFFF; */ +} + + + +ul.tree li.last { + list-style: none; + background-image: none; +} + + + +/* Span-A: I/L/I glpyhs */ +ul.tree span.a { + background: url(t.gif) 0 50% no-repeat; + display: block; +} +ul.tree span.a.last { + background: url(l.gif) 0 50% no-repeat; +} + +/* Span-B: Plus/Minus icon */ +ul.tree span.b { +} +ul.tree span.a.children span.b { + background: url(minus.gif) 0 50% no-repeat; + cursor: pointer; +} +ul.tree li.closed span.a.children span.b { + background: url(plus.gif) 0 50% no-repeat; + cursor: pointer; +} + +/* Span-C: Spacing and extending tree line below the icon */ +ul.tree span.c { + margin-left: 16px; +} +ul.tree span.a.children span.c { + background: url(i-bottom.gif) 0 50% no-repeat; +} +ul.tree span.a.spanClosed span.c { + background-image: none; +} + + +/* Anchor tag: Page icon */ +ul.tree a { + white-space: nowrap; + overflow: hidden; + +/* padding: 10px 0px 10px 18px; */ + padding: 3px 0px 3px 18px; + line-height: 16px; + +/* background: url(page-file.png) 0 50% no-repeat; */ + background: url(page-file.png) 0 0 no-repeat; +} +ul.tree span.a.children a { + background-image: url(page-openfoldericon.png); +} +ul.tree span.a.children.spanClosed a { + background-image: url(page-foldericon.png); +} + +/* Unformatted tree */ +ul.tree.unformatted li { + background-image: none; + padding-left: 16px; +} +ul.tree.unformatted li li { + background-image: none; + padding-left: 0px; +} + +/* + * Divs, by default store vertically aligned data + */ + +ul.tree li div { + float: right; + clear: right; + height: 1em; + margin-top: -26px; +} +/* As inside DIVs should be treated normally */ +ul.tree div a { + padding: 0; + background-image: none; + min-height: auto; + height: auto; +} + +ul.tree li A:link, ul.tree li A:hover, ul.tree li A:visited { + color : #111111; +} + + +ul.tree li .over{ + background-color : pink; +} diff --git a/src/usr/local/www/tree/tree.js b/src/usr/local/www/tree/tree.js new file mode 100644 index 0000000..8e9651e --- /dev/null +++ b/src/usr/local/www/tree/tree.js @@ -0,0 +1,195 @@ +/* + * Content-separated javascript tree widget + * Copyright (C) 2005 SilverStripe Limited + * Feel free to use this on your websites, but please leave this message in the fies + * http://www.silverstripe.com/blog +*/ + +/* + * Initialise all trees identified by
                              + */ +function autoInit_trees() { + var candidates = document.getElementsByTagName('ul'); + for(var i=0;i startingPoint) li.insertBefore(spanA, li.childNodes[startingPoint]); + else li.appendChild(spanA); + + // Process the children + if(childUL != null) { + if(initTree(childUL)) { + addClass(li, 'children', 'closed'); + addClass(spanA, 'children', 'spanClosed'); + } + } + } + } + + if(li) { + // li and spanA will still be set to the last item + + addClass(li, 'last', 'closed'); + addClass(spanA, 'last', 'spanClosed'); + return true; + } else { + return false; + } + +} + + +/* + * +/- toggle the tree, where el is the node + * force, will force it to "open" or "close" + */ +function treeToggle(el, force) { + el = this; + + while(el != null && (!el.tagName || el.tagName.toLowerCase() != "li")) el = el.parentNode; + + // Get UL within the LI + var childSet = findChildWithTag(el, 'ul'); + var topSpan = findChildWithTag(el, 'span'); + + if( force != null ){ + + if( force == "open"){ + treeOpen( topSpan, el ); + } + else if( force == "close" ){ + treeClose( topSpan, el ); + } + + } + + else if( childSet != null) { + // Is open, close it + if(!el.className.match(/(^| )closed($| )/)) { + treeClose( topSpan, el ); + // Is closed, open it + } else { + treeOpen( topSpan, el ); + } + } +} + + +function treeOpen( a, b ){ + removeClass(a,'spanClosed'); + removeClass(b,'closed'); +} + + +function treeClose( a, b ){ + addClass(a,'spanClosed'); + addClass(b,'closed'); +} + +/* + * Find the a child of el of type tag + */ +function findChildWithTag(el, tag) { + for(var i=0;i. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-hidden-uploadconfiguration +##|*NAME=Hidden: Upload Configuration page +##|*DESCR=Allow access to the 'Hidden: Upload Configuration' page. +##|*MATCH=uploadconfig.php* +##|-PRIV + + +require("guiconfig.inc"); + +header("Content-Type: text/plain"); + +/* get config.xml in POST variable "config" */ +if ($_POST['config']) { + $fd = @fopen("{$g['tmp_path']}/config.xml", "w"); + if (!$fd) { + echo gettext("ERR Could not save configuration.")."\n"; + exit(0); + } + fwrite($fd, $_POST['config']); + fclose($fd); + if (config_install("{$g['tmp_path']}/config.xml") == 0) { + echo gettext("OK")."\n"; + system_reboot(); + } else { + echo gettext("ERR Could not install configuration.")."\n"; + } +} else { + echo gettext("ERR Invalid configuration received.")."\n"; +} + +exit(0); +?> diff --git a/src/usr/local/www/vpn_ipsec.php b/src/usr/local/www/vpn_ipsec.php new file mode 100644 index 0000000..6ef6040 --- /dev/null +++ b/src/usr/local/www/vpn_ipsec.php @@ -0,0 +1,704 @@ +. + Copyright (C) 2008 Shrew Soft Inc + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-vpn-ipsec +##|*NAME=VPN: IPsec page +##|*DESCR=Allow access to the 'VPN: IPsec' page. +##|*MATCH=vpn_ipsec.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("ipsec.inc"); +require_once("vpn.inc"); + +if (!is_array($config['ipsec']['phase1'])) { + $config['ipsec']['phase1'] = array(); +} + +if (!is_array($config['ipsec']['phase2'])) { + $config['ipsec']['phase2'] = array(); +} + +$a_phase1 = &$config['ipsec']['phase1']; +$a_phase2 = &$config['ipsec']['phase2']; + +$pconfig['enable'] = isset($config['ipsec']['enable']); + +if ($_POST) { + if ($_POST['apply']) { + $retval = 0; + $retval = vpn_ipsec_configure(); + /* reload the filter in the background */ + filter_configure(); + $savemsg = get_std_save_message($retval); + if ($retval >= 0) { + if (is_subsystem_dirty('ipsec')) { + clear_subsystem_dirty('ipsec'); + } + } + } else if ($_POST['submit']) { + $pconfig = $_POST; + + $config['ipsec']['enable'] = $_POST['enable'] ? true : false; + + write_config(); + + $retval = vpn_ipsec_configure(); + } else if (isset($_POST['del_x'])) { + /* delete selected p1 entries */ + if (is_array($_POST['p1entry']) && count($_POST['p1entry'])) { + foreach ($_POST['p1entry'] as $p1entrydel) { + unset($a_phase1[$p1entrydel]); + } + if (write_config()) { + mark_subsystem_dirty('ipsec'); + } + } + } else if (isset($_POST['delp2_x'])) { + /* delete selected p2 entries */ + if (is_array($_POST['p2entry']) && count($_POST['p2entry'])) { + foreach ($_POST['p2entry'] as $p2entrydel) { + unset($a_phase2[$p2entrydel]); + } + if (write_config()) { + mark_subsystem_dirty('ipsec'); + } + } + } else { + /* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */ + unset($delbtn, $delbtnp2, $movebtn, $movebtnp2, $togglebtn, $togglebtnp2); + foreach ($_POST as $pn => $pd) { + if (preg_match("/del_(\d+)_x/", $pn, $matches)) { + $delbtn = $matches[1]; + } else if (preg_match("/delp2_(\d+)_x/", $pn, $matches)) { + $delbtnp2 = $matches[1]; + } else if (preg_match("/move_(\d+)_x/", $pn, $matches)) { + $movebtn = $matches[1]; + } else if (preg_match("/movep2_(\d+)_x/", $pn, $matches)) { + $movebtnp2 = $matches[1]; + } else if (preg_match("/toggle_(\d+)_x/", $pn, $matches)) { + $togglebtn = $matches[1]; + } else if (preg_match("/togglep2_(\d+)_x/", $pn, $matches)) { + $togglebtnp2 = $matches[1]; + } + } + + $save = 1; + + /* move selected p1 entries before this */ + if (isset($movebtn) && is_array($_POST['p1entry']) && count($_POST['p1entry'])) { + $a_phase1_new = array(); + + /* copy all p1 entries < $movebtn and not selected */ + for ($i = 0; $i < $movebtn; $i++) { + if (!in_array($i, $_POST['p1entry'])) { + $a_phase1_new[] = $a_phase1[$i]; + } + } + + /* copy all selected p1 entries */ + for ($i = 0; $i < count($a_phase1); $i++) { + if ($i == $movebtn) { + continue; + } + if (in_array($i, $_POST['p1entry'])) { + $a_phase1_new[] = $a_phase1[$i]; + } + } + + /* copy $movebtn p1 entry */ + if ($movebtn < count($a_phase1)) { + $a_phase1_new[] = $a_phase1[$movebtn]; + } + + /* copy all p1 entries > $movebtn and not selected */ + for ($i = $movebtn+1; $i < count($a_phase1); $i++) { + if (!in_array($i, $_POST['p1entry'])) { + $a_phase1_new[] = $a_phase1[$i]; + } + } + if (count($a_phase1_new) > 0) { + $a_phase1 = $a_phase1_new; + } + + } else if (isset($movebtnp2) && is_array($_POST['p2entry']) && count($_POST['p2entry'])) { + /* move selected p2 entries before this */ + $a_phase2_new = array(); + + /* copy all p2 entries < $movebtnp2 and not selected */ + for ($i = 0; $i < $movebtnp2; $i++) { + if (!in_array($i, $_POST['p2entry'])) { + $a_phase2_new[] = $a_phase2[$i]; + } + } + + /* copy all selected p2 entries */ + for ($i = 0; $i < count($a_phase2); $i++) { + if ($i == $movebtnp2) { + continue; + } + if (in_array($i, $_POST['p2entry'])) { + $a_phase2_new[] = $a_phase2[$i]; + } + } + + /* copy $movebtnp2 p2 entry */ + if ($movebtnp2 < count($a_phase2)) { + $a_phase2_new[] = $a_phase2[$movebtnp2]; + } + + /* copy all p2 entries > $movebtnp2 and not selected */ + for ($i = $movebtnp2+1; $i < count($a_phase2); $i++) { + if (!in_array($i, $_POST['p2entry'])) { + $a_phase2_new[] = $a_phase2[$i]; + } + } + if (count($a_phase2_new) > 0) { + $a_phase2 = $a_phase2_new; + } + + } else if (isset($togglebtn)) { + if (isset($a_phase1[$togglebtn]['disabled'])) { + unset($a_phase1[$togglebtn]['disabled']); + } else { + $a_phase1[$togglebtn]['disabled'] = true; + } + } else if (isset($togglebtnp2)) { + if (isset($a_phase2[$togglebtnp2]['disabled'])) { + unset($a_phase2[$togglebtnp2]['disabled']); + } else { + $a_phase2[$togglebtnp2]['disabled'] = true; + } + } else if (isset($delbtn)) { + /* remove static route if interface is not WAN */ + if ($a_phase1[$delbtn]['interface'] <> "wan") { + mwexec("/sbin/route delete -host {$a_phase1[$delbtn]['remote-gateway']}"); + } + + /* remove all phase2 entries that match the ikeid */ + $ikeid = $a_phase1[$delbtn]['ikeid']; + foreach ($a_phase2 as $p2index => $ph2tmp) { + if ($ph2tmp['ikeid'] == $ikeid) { + unset($a_phase2[$p2index]); + } + } + unset($a_phase1[$delbtn]); + + } else if (isset($delbtnp2)) { + unset($a_phase2[$delbtnp2]); + + } else { + $save = 0; + } + + if ($save === 1) { + if (write_config()) { + mark_subsystem_dirty('ipsec'); + } + } + } +} + +$pgtitle = array(gettext("VPN"), gettext("IPsec")); +$shortcut_section = "ipsec"; + +include("head.inc"); + +?> + + + +
                              + +" . gettext("You must apply the changes in order for them to take effect.")); + } +?> + + + + + + + +
                              + +
                              +
                              + + + + + + + +
                              + + + + + +
                              + /> + + +
                              +
                              + " /> +
                              + + + + + + + + + + + + +"; + $spane = ""; + $iconfn .= "_d"; + } +?> + + + + + + + + + + + + + + + + + + + + + + + + +
                                 +
                              + + + " + type="image" style="height:11;width:11;border:0" /> + + + + + + + $carpip) { + $iflabels[$cif] = $carpip." (".get_vip_descr($carpip).")"; + } + + $aliaslist = get_configured_ip_aliases_list(); + foreach ($aliaslist as $aliasip => $aliasif) { + $iflabels[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")"; + } + + $grouplist = return_gateway_groups_array(); + foreach ($grouplist as $name => $group) { + if ($group[0]['vip'] <> "") { + $vipif = $group[0]['vip']; + } else { + $vipif = $group[0]['int']; + } + $iflabels[$name] = "GW Group {$name}"; + } + $if = htmlspecialchars($iflabels[$ph1ent['interface']]); + } else { + $if = "WAN"; + } + + if (!isset($ph1ent['mobile'])) { + echo $if."
                              ".$ph1ent['remote-gateway']; + } else { + echo $if."
                              " . gettext("Mobile Client") . ""; + } +?> + +
                              + + + + + + + + + + + + + + +   + + + + + + + + + + + +
                              + " + type="image" style="height:17;width:17;border:0" /> + + + " width="17" height="17" border="0" alt="edit" /> + +
                              + " + type="image" style="height:17;width:17;border:0" + onclick="return confirm('')" /> + + + + " width="17" height="17" border="0" alt="add" /> + + +
                              +
                                 + + +
                              > + + - +
                              +
                              > + + + + + + + + + + + + + $ph2ent): + if ($ph2ent['ikeid'] != $ph1ent['ikeid']) { + continue; + } + + $fr_c = $fr_prefix . "c" . $j; + $fr_d = $fr_prefix . "d" . $j; + + $iconfn = "pass"; + $spans = $spane = ""; + if (isset($ph2ent['disabled']) || isset($ph1ent['disabled'])) { + $spans = ""; + $spane = ""; + $iconfn .= "_d"; + } +?> + + + + + + + + "; + endif; +?> + + + + + + + + + + +
                                 
                              + + + " + type="image" style="height:11;width:11;border:0" /> + + + + + + + + + + + + +   + + + + + + $ph2ea) { + if ($k) { + echo ", "; + } + echo $p2_ealgos[$ph2ea['name']]['name']; + if ($ph2ea['keylen']) { + if ($ph2ea['keylen'] == "auto") { + echo " (" . gettext("auto") . ")"; + } else { + echo " ({$ph2ea['keylen']} " . gettext("bits") . ")"; + } + } + } +?> + + + + $ph2ha) { + if ($k) { + echo ", "; + } + echo $p2_halgos[$ph2ha]; + } + } +?> + + + " + type="image" style="height:17;width:17;border:0" /> + + " width="17" height="17" border="0" alt="edit" /> + + " + type="image" style="height:17;width:17;border:0" + onclick="return confirm('')" /> + + " width="17" height="17" border="0" alt="add" /> + +
                              + + " border="0" alt="move" /> + + " /> + + "> + " width="17" height="17" border="0" alt="add" /> + + + " border="0" alt="delete" /> + + " onclick="return confirm('')" /> + +
                              +
                              +
                              + + + + + + + + +
                              + + " border="0" alt="move" /> + + " /> + + + + " alt="add" /> + +
                              + + " border="0" alt="delete" /> + + " onclick="return confirm('')" /> + +
                              +
                              +

                              + + + :
                              +
                              + .
                              + .
                              + . +
                              +

                              +
                              +
                              +
                              +
                              + + + + diff --git a/src/usr/local/www/vpn_ipsec_keys.php b/src/usr/local/www/vpn_ipsec_keys.php new file mode 100644 index 0000000..8c30d6b --- /dev/null +++ b/src/usr/local/www/vpn_ipsec_keys.php @@ -0,0 +1,230 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-vpn-ipsec-listkeys +##|*NAME=VPN: IPsec: Pre-Shared Keys List +##|*DESCR=Allow access to the 'VPN: IPsec: Pre-Shared Keys List' page. +##|*MATCH=vpn_ipsec_keys.php* +##|-PRIV + +require("functions.inc"); +require("guiconfig.inc"); +require_once("ipsec.inc"); +require_once("vpn.inc"); +require_once("filter.inc"); + +if (!is_array($config['ipsec']['mobilekey'])) { + $config['ipsec']['mobilekey'] = array(); +} +ipsec_mobilekey_sort(); +$a_secret = &$config['ipsec']['mobilekey']; + +$userkeys = array(); +foreach ($config['system']['user'] as $id => $user) { + if (!empty($user['ipsecpsk'])) { + $userkeys[] = array('ident' => $user['name'], 'type' => 'PSK', 'pre-shared-key' => $user['ipsecpsk'], 'id' => $id);; + } +} + +if (isset($_POST['apply'])) { + $retval = vpn_ipsec_configure(); + /* reload the filter in the background */ + filter_configure(); + $savemsg = get_std_save_message($retval); + if (is_subsystem_dirty('ipsec')) { + clear_subsystem_dirty('ipsec'); + } +} + +if ($_GET['act'] == "del") { + if ($a_secret[$_GET['id']]) { + unset($a_secret[$_GET['id']]); + write_config(gettext("Deleted IPsec Pre-Shared Key")); + mark_subsystem_dirty('ipsec'); + header("Location: vpn_ipsec_keys.php"); + exit; + } +} + +$pgtitle = gettext("VPN: IPsec: Keys"); +$shortcut_section = "ipsec"; + +include("head.inc"); + +?> + + + +
                              +" . gettext("You must apply the changes in order for them to take effect.")); +} +?> +
                              + + + + + + + + +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + + + + + +
                              + " width="17" height="17" border="0" alt="add" /> +
                              +
                              + + + + + + +
                              + + + " /> +
                              +   +
                              + + + + + + " width="17" height="17" border="0" alt="edit" /> +  ')">" width="17" height="17" border="0" alt="delete" /> +
                              + + + + + +
                              + " width="17" height="17" border="0" alt="add" /> +
                              +
                              +
                              +
                              +

                              + + + :
                              +
                              + +
                              +

                              +
                              + + + diff --git a/src/usr/local/www/vpn_ipsec_keys_edit.php b/src/usr/local/www/vpn_ipsec_keys_edit.php new file mode 100644 index 0000000..6419a6b --- /dev/null +++ b/src/usr/local/www/vpn_ipsec_keys_edit.php @@ -0,0 +1,199 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-vpn-ipsec-editkeys +##|*NAME=VPN: IPsec: Edit Pre-Shared Keys +##|*DESCR=Allow access to the 'VPN: IPsec: Edit Pre-Shared Keys' page. +##|*MATCH=vpn_ipsec_keys_edit.php* +##|-PRIV + +require("functions.inc"); +require("guiconfig.inc"); +require_once("ipsec.inc"); +require_once("vpn.inc"); + +if (!is_array($config['ipsec']['mobilekey'])) { + $config['ipsec']['mobilekey'] = array(); +} +ipsec_mobilekey_sort(); +$a_secret = &$config['ipsec']['mobilekey']; + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +if (isset($id) && $a_secret[$id]) { + $pconfig['ident'] = $a_secret[$id]['ident']; + $pconfig['type'] = $a_secret[$id]['type']; + $pconfig['psk'] = $a_secret[$id]['pre-shared-key']; +} + +if ($_POST) { + $userids = array(); + foreach ($config['system']['user'] as $uid => $user) { + $userids[$user['name']] = $uid; + } + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + $reqdfields = explode(" ", "ident psk"); + $reqdfieldsn = array(gettext("Identifier"), gettext("Pre-Shared Key")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (preg_match("/[^a-zA-Z0-9@\.\-]/", $_POST['ident'])) { + $input_errors[] = gettext("The identifier contains invalid characters."); + } + + if (array_key_exists($_POST['ident'], $userids)) { + $input_errors[] = gettext("A user with this name already exists. Add the key to the user instead."); + } + unset($userids); + + if (isset($_POST['psk']) && !preg_match('/^[[:ascii:]]*$/', $_POST['psk'])) { + $input_errors[] = gettext("Pre-Shared Key contains invalid characters."); + } + + if (!$input_errors && !(isset($id) && $a_secret[$id])) { + /* make sure there are no dupes */ + foreach ($a_secret as $secretent) { + if ($secretent['ident'] == $_POST['ident']) { + $input_errors[] = gettext("Another entry with the same identifier already exists."); + break; + } + } + } + + if (!$input_errors) { + + if (isset($id) && $a_secret[$id]) { + $secretent = $a_secret[$id]; + } + + $secretent['ident'] = $_POST['ident']; + $secretent['type'] = $_POST['type']; + $secretent['pre-shared-key'] = $_POST['psk']; + $text = ""; + + if (isset($id) && $a_secret[$id]) { + $a_secret[$id] = $secretent; + $text = gettext("Edited"); + } else { + $a_secret[] = $secretent; + $text = gettext("Added"); + } + + write_config("{$text} IPsec Pre-Shared Keys"); + mark_subsystem_dirty('ipsec'); + + header("Location: vpn_ipsec_keys.php"); + exit; + } +} + +$pgtitle = gettext("VPN: IPsec: Edit Pre-Shared Key"); +$shortcut_section = "ipsec"; + +include("head.inc"); + +?> + + + + +
                              + + + + + + + + + + + + + + + + + + + + + + + +
                              Edit pre-shared secret
                              + +
                              + . +
                              + +
                              + +
                                + " /> + + + +
                              +

                              + + + :
                              +
                              + +
                              +

                              +
                              +
                              + + + diff --git a/src/usr/local/www/vpn_ipsec_mobile.php b/src/usr/local/www/vpn_ipsec_mobile.php new file mode 100644 index 0000000..bb1ef75 --- /dev/null +++ b/src/usr/local/www/vpn_ipsec_mobile.php @@ -0,0 +1,740 @@ += 0) { + if (is_subsystem_dirty('ipsec')) { + clear_subsystem_dirty('ipsec'); + } + } +} + +if ($_POST['submit']) { + + unset($input_errors); + $pconfig = $_POST; + + /* input consolidation */ + + /* input validation */ + + $reqdfields = explode(" ", "user_source group_source"); + $reqdfieldsn = array(gettext("User Authentication Source"), gettext("Group Authentication Source")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if ($pconfig['pool_enable']) { + if (!is_ipaddr($pconfig['pool_address'])) { + $input_errors[] = gettext("A valid IP address for 'Virtual Address Pool Network' must be specified."); + } + } + if ($pconfig['dns_domain_enable']) { + if (!is_domain($pconfig['dns_domain'])) { + $input_errors[] = gettext("A valid value for 'DNS Default Domain' must be specified."); + } + } + if ($pconfig['dns_split_enable']) { + if (!empty($pconfig['dns_split'])) { + /* Replace multiple spaces by single */ + $pconfig['dns_split'] = preg_replace('/\s+/', ' ', trim($pconfig['dns_split'])); + $domain_array = explode(' ', $pconfig['dns_split']); + foreach ($domain_array as $curdomain) { + if (!is_domain($curdomain)) { + $input_errors[] = gettext("A valid split DNS domain list must be specified."); + break; + } + } + } + } + + if ($pconfig['dns_server_enable']) { + if (!$pconfig['dns_server1'] && !$pconfig['dns_server2'] && + !$pconfig['dns_server3'] && !$pconfig['dns_server4']) { + $input_errors[] = gettext("At least one DNS server must be specified to enable the DNS Server option."); + } + if ($pconfig['dns_server1'] && !is_ipaddr($pconfig['dns_server1'])) { + $input_errors[] = gettext("A valid IP address for 'DNS Server #1' must be specified."); + } + if ($pconfig['dns_server2'] && !is_ipaddr($pconfig['dns_server2'])) { + $input_errors[] = gettext("A valid IP address for 'DNS Server #2' must be specified."); + } + if ($pconfig['dns_server3'] && !is_ipaddr($pconfig['dns_server3'])) { + $input_errors[] = gettext("A valid IP address for 'DNS Server #3' must be specified."); + } + if ($pconfig['dns_server4'] && !is_ipaddr($pconfig['dns_server4'])) { + $input_errors[] = gettext("A valid IP address for 'DNS Server #4' must be specified."); + } + } + + if ($pconfig['wins_server_enable']) { + if (!$pconfig['wins_server1'] && !$pconfig['wins_server2']) { + $input_errors[] = gettext("At least one WINS server must be specified to enable the DNS Server option."); + } + if ($pconfig['wins_server1'] && !is_ipaddr($pconfig['wins_server1'])) { + $input_errors[] = gettext("A valid IP address for 'WINS Server #1' must be specified."); + } + if ($pconfig['wins_server2'] && !is_ipaddr($pconfig['wins_server2'])) { + $input_errors[] = gettext("A valid IP address for 'WINS Server #2' must be specified."); + } + } + + if ($pconfig['login_banner_enable']) { + if (!strlen($pconfig['login_banner'])) { + $input_errors[] = gettext("A valid value for 'Login Banner' must be specified."); + } + } + + if (!$input_errors) { + $client = array(); + + if ($pconfig['enable']) { + $client['enable'] = true; + } + + if (!empty($pconfig['user_source'])) { + $client['user_source'] = implode(",", $pconfig['user_source']); + } + $client['group_source'] = $pconfig['group_source']; + + if ($pconfig['pool_enable']) { + $client['pool_address'] = $pconfig['pool_address']; + $client['pool_netbits'] = $pconfig['pool_netbits']; + } + + if ($pconfig['net_list_enable']) { + $client['net_list'] = true; + } + + if ($pconfig['save_passwd_enable']) { + $client['save_passwd'] = true; + } + + if ($pconfig['dns_domain_enable']) { + $client['dns_domain'] = $pconfig['dns_domain']; + } + + if ($pconfig['dns_split_enable']) { + $client['dns_split'] = $pconfig['dns_split']; + } + + if ($pconfig['dns_server_enable']) { + $client['dns_server1'] = $pconfig['dns_server1']; + $client['dns_server2'] = $pconfig['dns_server2']; + $client['dns_server3'] = $pconfig['dns_server3']; + $client['dns_server4'] = $pconfig['dns_server4']; + } + + if ($pconfig['wins_server_enable']) { + $client['wins_server1'] = $pconfig['wins_server1']; + $client['wins_server2'] = $pconfig['wins_server2']; + } + + if ($pconfig['pfs_group_enable']) { + $client['pfs_group'] = $pconfig['pfs_group']; + } + + if ($pconfig['login_banner_enable']) { + $client['login_banner'] = $pconfig['login_banner']; + } + + $a_client = $client; + + write_config(); + mark_subsystem_dirty('ipsec'); + + header("Location: vpn_ipsec_mobile.php"); + exit; + } +} + +$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Mobile")); +$shortcut_section = "ipsec"; + +include("head.inc"); +?> + + + + + + +
                              + +" . gettext("You must apply the changes in order for them to take effect.")); + } + foreach ($a_phase1 as $ph1ent) { + if (isset($ph1ent['mobile'])) { + $ph1found = true; + } + } + if ($pconfig['enable'] && !$ph1found) { + print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".
                              " . gettext("Please click Create to define one."), gettext("create"), gettext("Create Phase1")); + } + if ($input_errors) { + print_input_errors($input_errors); + } +?> + + + + + + + + +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + + + + + +
                              + + /> + + +
                              +
                              + +
                              + :   + +
                              + :   + +
                              + +
                              + + + + + +
                              + + onclick="pool_change()" /> + +
                              +
                              + + + + +
                              + :  + + / + +
                              +
                              + + + + + +
                              + + /> + +
                              +
                              +
                              + + + + + +
                              + + /> + +
                              +
                              +
                              +
                              + + + + + +
                              + + onclick="dns_domain_change()" /> + +
                              +
                              + + + + +
                              + +
                              +
                              + + + + + +
                              + + onclick="dns_split_change()" /> + +
                              + +
                              + + + + +
                              + +
                              +
                              + + + + + +
                              + + onclick="dns_server_change()" /> + +
                              +
                              + + + + + + + + + + + + + +
                              + #1:  + +
                              + #2:  + +
                              + #3:  + +
                              + #4:  + +
                              +
                              + + + + + +
                              + + onclick="wins_server_change()" /> + +
                              +
                              + + + + + + + +
                              + #1:  + +
                              + #2:  + +
                              +
                              + + + + + +
                              + + onclick="pfs_group_change()" /> + +
                              +
                              + + + + +
                              + :   + +
                              +
                              + + + + + +
                              + + onclick="login_banner_change()" /> + +
                              +
                              + + + + +
                              + + +
                              +
                                + " /> +
                              +
                              +
                              +
                              + + + + + + diff --git a/src/usr/local/www/vpn_ipsec_phase1.php b/src/usr/local/www/vpn_ipsec_phase1.php new file mode 100644 index 0000000..11a2e90 --- /dev/null +++ b/src/usr/local/www/vpn_ipsec_phase1.php @@ -0,0 +1,1092 @@ +. + Copyright (C) 2014 Ermal Luçi + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-vpn-ipsec-editphase1 +##|*NAME=VPN: IPsec: Edit Phase 1 page +##|*DESCR=Allow access to the 'VPN: IPsec: Edit Phase 1' page. +##|*MATCH=vpn_ipsec_phase1.php* +##|-PRIV + +require("functions.inc"); +require("guiconfig.inc"); +require_once("ipsec.inc"); +require_once("vpn.inc"); +require_once("filter.inc"); + +if (!is_array($config['ipsec']['phase1'])) { + $config['ipsec']['phase1'] = array(); +} + +if (!is_array($config['ipsec']['phase2'])) { + $config['ipsec']['phase2'] = array(); +} + +$a_phase1 = &$config['ipsec']['phase1']; +$a_phase2 = &$config['ipsec']['phase2']; + +if (is_numericint($_GET['p1index'])) { + $p1index = $_GET['p1index']; +} +if (isset($_POST['p1index']) && is_numericint($_POST['p1index'])) { + $p1index = $_POST['p1index']; +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + $p1index = $_GET['dup']; +} + +if (isset($p1index) && $a_phase1[$p1index]) { + // don't copy the ikeid on dup + if (!isset($_GET['dup']) || !is_numericint($_GET['dup'])) { + $pconfig['ikeid'] = $a_phase1[$p1index]['ikeid']; + } + + $old_ph1ent = $a_phase1[$p1index]; + + $pconfig['disabled'] = isset($a_phase1[$p1index]['disabled']); + + if ($a_phase1[$p1index]['interface']) { + $pconfig['interface'] = $a_phase1[$p1index]['interface']; + } else { + $pconfig['interface'] = "wan"; + } + + list($pconfig['remotenet'], $pconfig['remotebits']) = explode("/", $a_phase1[$p1index]['remote-subnet']); + + if (isset($a_phase1[$p1index]['mobile'])) { + $pconfig['mobile'] = 'true'; + } else { + $pconfig['remotegw'] = $a_phase1[$p1index]['remote-gateway']; + } + + if (empty($a_phase1[$p1index]['iketype'])) { + $pconfig['iketype'] = "ikev1"; + } else { + $pconfig['iketype'] = $a_phase1[$p1index]['iketype']; + } + $pconfig['mode'] = $a_phase1[$p1index]['mode']; + $pconfig['protocol'] = $a_phase1[$p1index]['protocol']; + $pconfig['myid_type'] = $a_phase1[$p1index]['myid_type']; + $pconfig['myid_data'] = $a_phase1[$p1index]['myid_data']; + $pconfig['peerid_type'] = $a_phase1[$p1index]['peerid_type']; + $pconfig['peerid_data'] = $a_phase1[$p1index]['peerid_data']; + $pconfig['ealgo'] = $a_phase1[$p1index]['encryption-algorithm']; + $pconfig['halgo'] = $a_phase1[$p1index]['hash-algorithm']; + $pconfig['dhgroup'] = $a_phase1[$p1index]['dhgroup']; + $pconfig['lifetime'] = $a_phase1[$p1index]['lifetime']; + $pconfig['authentication_method'] = $a_phase1[$p1index]['authentication_method']; + + if (($pconfig['authentication_method'] == "pre_shared_key") || + ($pconfig['authentication_method'] == "xauth_psk_server")) { + $pconfig['pskey'] = $a_phase1[$p1index]['pre-shared-key']; + } else { + $pconfig['certref'] = $a_phase1[$p1index]['certref']; + $pconfig['caref'] = $a_phase1[$p1index]['caref']; + } + + $pconfig['descr'] = $a_phase1[$p1index]['descr']; + $pconfig['nat_traversal'] = $a_phase1[$p1index]['nat_traversal']; + $pconfig['mobike'] = $a_phase1[$p1index]['mobike']; + + if (isset($a_phase1[$p1index]['reauth_enable'])) { + $pconfig['reauth_enable'] = true; + } + if (isset($a_phase1[$p1index]['rekey_enable'])) { + $pconfig['rekey_enable'] = true; + } + if (isset($a_phase1[$p1index]['responderonly'])) { + $pconfig['responderonly'] = true; + } + + if ($a_phase1[$p1index]['dpd_delay'] && $a_phase1[$p1index]['dpd_maxfail']) { + $pconfig['dpd_enable'] = true; + $pconfig['dpd_delay'] = $a_phase1[$p1index]['dpd_delay']; + $pconfig['dpd_maxfail'] = $a_phase1[$p1index]['dpd_maxfail']; + } +} else { + /* defaults */ + $pconfig['interface'] = "wan"; + if ($config['interfaces']['lan']) { + $pconfig['localnet'] = "lan"; + } + $pconfig['mode'] = "main"; + $pconfig['protocol'] = "inet"; + $pconfig['myid_type'] = "myaddress"; + $pconfig['peerid_type'] = "peeraddress"; + $pconfig['authentication_method'] = "pre_shared_key"; + $pconfig['ealgo'] = array(name => "aes"); + $pconfig['halgo'] = "sha1"; + $pconfig['dhgroup'] = "2"; + $pconfig['lifetime'] = "28800"; + $pconfig['nat_traversal'] = 'on'; + $pconfig['mobike'] = 'off'; + $pconfig['dpd_enable'] = true; + $pconfig['iketype'] = "ikev1"; + + /* mobile client */ + if ($_GET['mobile']) { + $pconfig['mobile'] = true; + $pconfig['mode'] = "aggressive"; + } +} + +if (isset($_GET['dup']) && is_numericint($_GET['dup'])) { + unset($p1index); +} + +if ($_POST) { + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + + $method = $pconfig['authentication_method']; + // Unset ca and cert if not required to avoid storing in config + if ($method == "pre_shared_key" || $method == "xauth_psk_server") { + unset($pconfig['caref']); + unset($pconfig['certref']); + } + + // Only require PSK here for normal PSK tunnels (not mobile) or xauth. + // For RSA methods, require the CA/Cert. + switch ($method) { + case 'eap-mschapv2': + if ($pconfig['iketype'] != 'ikev2') { + $input_errors[] = gettext("EAP-MSChapv2 can only be used with IKEv2 type VPNs."); + } + break; + case "eap-tls": + if ($pconfig['iketype'] != 'ikev2') { + $input_errors[] = gettext("EAP-TLS can only be used with IKEv2 type VPNs."); + } + break; + case "eap-radius": + if ($pconfig['iketype'] != 'ikev2') { + $input_errors[] = gettext("EAP-RADIUS can only be used with IKEv2 type VPNs."); + } + break; + case "pre_shared_key": + // If this is a mobile PSK tunnel the user PSKs go on + // the PSK tab, not here, so skip the check. + if ($pconfig['mobile']) { + break; + } + case "xauth_psk_server": + $reqdfields = explode(" ", "pskey"); + $reqdfieldsn = array(gettext("Pre-Shared Key")); + $validate_pskey = true; + break; + case "hybrid_rsa_server": + case "xauth_rsa_server": + case "rsasig": + $reqdfields = explode(" ", "caref certref"); + $reqdfieldsn = array(gettext("Certificate Authority"), gettext("Certificate")); + break; + } + if (!$pconfig['mobile']) { + $reqdfields[] = "remotegw"; + $reqdfieldsn[] = gettext("Remote gateway"); + } + + do_input_validation($pconfig, $reqdfields, $reqdfieldsn, $input_errors); + + if (isset($validate_pskey) && isset($pconfig['pskey']) && !preg_match('/^[[:ascii:]]*$/', $pconfig['pskey'])) { + unset($validate_pskey); + $input_errors[] = gettext("Pre-Shared Key contains invalid characters."); + } + + if (($pconfig['lifetime'] && !is_numeric($pconfig['lifetime']))) { + $input_errors[] = gettext("The P1 lifetime must be an integer."); + } + + if ($pconfig['remotegw']) { + if (!is_ipaddr($pconfig['remotegw']) && !is_domain($pconfig['remotegw'])) { + $input_errors[] = gettext("A valid remote gateway address or host name must be specified."); + } elseif (is_ipaddrv4($pconfig['remotegw']) && ($pconfig['protocol'] != "inet")) { + $input_errors[] = gettext("A valid remote gateway IPv4 address must be specified or you need to change protocol to IPv6"); + } elseif (is_ipaddrv6($pconfig['remotegw']) && ($pconfig['protocol'] != "inet6")) { + $input_errors[] = gettext("A valid remote gateway IPv6 address must be specified or you need to change protocol to IPv4"); + } + } + + if ($pconfig['remotegw'] && is_ipaddr($pconfig['remotegw']) && !isset($pconfig['disabled'])) { + $t = 0; + foreach ($a_phase1 as $ph1tmp) { + if ($p1index <> $t) { + $tremotegw = $pconfig['remotegw']; + if (($ph1tmp['remote-gateway'] == $tremotegw) && !isset($ph1tmp['disabled'])) { + $input_errors[] = sprintf(gettext('The remote gateway "%1$s" is already used by phase1 "%2$s".'), $tremotegw, $ph1tmp['descr']); + } + } + $t++; + } + } + + if (is_array($a_phase2) && (count($a_phase2))) { + foreach ($a_phase2 as $phase2) { + if ($phase2['ikeid'] == $pconfig['ikeid']) { + if (($pconfig['protocol'] == "inet") && ($phase2['mode'] == "tunnel6")) { + $input_errors[] = gettext("There is a Phase 2 using IPv6, you cannot use IPv4."); + break; + } + if (($pconfig['protocol'] == "inet6") && ($phase2['mode'] == "tunnel")) { + $input_errors[] = gettext("There is a Phase 2 using IPv4, you cannot use IPv6."); + break; + } + } + } + } + + /* My identity */ + + if ($pconfig['myid_type'] == "myaddress") { + $pconfig['myid_data'] = ""; + } + + if ($pconfig['myid_type'] == "address" and $pconfig['myid_data'] == "") { + $input_errors[] = gettext("Please enter an address for 'My Identifier'"); + } + + if ($pconfig['myid_type'] == "keyid tag" and $pconfig['myid_data'] == "") { + $input_errors[] = gettext("Please enter a keyid tag for 'My Identifier'"); + } + + if ($pconfig['myid_type'] == "fqdn" and $pconfig['myid_data'] == "") { + $input_errors[] = gettext("Please enter a fully qualified domain name for 'My Identifier'"); + } + + if ($pconfig['myid_type'] == "user_fqdn" and $pconfig['myid_data'] == "") { + $input_errors[] = gettext("Please enter a user and fully qualified domain name for 'My Identifier'"); + } + + if ($pconfig['myid_type'] == "dyn_dns" and $pconfig['myid_data'] == "") { + $input_errors[] = gettext("Please enter a dynamic domain name for 'My Identifier'"); + } + + if (($pconfig['myid_type'] == "address") && !is_ipaddr($pconfig['myid_data'])) { + $input_errors[] = gettext("A valid IP address for 'My identifier' must be specified."); + } + + if (($pconfig['myid_type'] == "fqdn") && !is_domain($pconfig['myid_data'])) { + $input_errors[] = gettext("A valid domain name for 'My identifier' must be specified."); + } + + if ($pconfig['myid_type'] == "fqdn") { + if (is_domain($pconfig['myid_data']) == false) { + $input_errors[] = gettext("A valid FQDN for 'My identifier' must be specified."); + } + } + + if ($pconfig['myid_type'] == "user_fqdn") { + $user_fqdn = explode("@", $pconfig['myid_data']); + if (is_domain($user_fqdn[1]) == false) { + $input_errors[] = gettext("A valid User FQDN in the form of user@my.domain.com for 'My identifier' must be specified."); + } + } + + if ($pconfig['myid_type'] == "dyn_dns") { + if (is_domain($pconfig['myid_data']) == false) { + $input_errors[] = gettext("A valid Dynamic DNS address for 'My identifier' must be specified."); + } + } + + /* Peer identity */ + + if ($pconfig['myid_type'] == "peeraddress") { + $pconfig['peerid_data'] = ""; + } + + // Only enforce peer ID if we are not dealing with a pure-psk mobile config. + if (!(($pconfig['authentication_method'] == "pre_shared_key") && ($pconfig['mobile']))) { + if ($pconfig['peerid_type'] == "address" and $pconfig['peerid_data'] == "") { + $input_errors[] = gettext("Please enter an address for 'Peer Identifier'"); + } + + if ($pconfig['peerid_type'] == "keyid tag" and $pconfig['peerid_data'] == "") { + $input_errors[] = gettext("Please enter a keyid tag for 'Peer Identifier'"); + } + + if ($pconfig['peerid_type'] == "fqdn" and $pconfig['peerid_data'] == "") { + $input_errors[] = gettext("Please enter a fully qualified domain name for 'Peer Identifier'"); + } + + if ($pconfig['peerid_type'] == "user_fqdn" and $pconfig['peerid_data'] == "") { + $input_errors[] = gettext("Please enter a user and fully qualified domain name for 'Peer Identifier'"); + } + + if ((($pconfig['peerid_type'] == "address") && !is_ipaddr($pconfig['peerid_data']))) { + $input_errors[] = gettext("A valid IP address for 'Peer identifier' must be specified."); + } + + if ((($pconfig['peerid_type'] == "fqdn") && !is_domain($pconfig['peerid_data']))) { + $input_errors[] = gettext("A valid domain name for 'Peer identifier' must be specified."); + } + + if ($pconfig['peerid_type'] == "fqdn") { + if (is_domain($pconfig['peerid_data']) == false) { + $input_errors[] = gettext("A valid FQDN for 'Peer identifier' must be specified."); + } + } + + if ($pconfig['peerid_type'] == "user_fqdn") { + $user_fqdn = explode("@", $pconfig['peerid_data']); + if (is_domain($user_fqdn[1]) == false) { + $input_errors[] = gettext("A valid User FQDN in the form of user@my.domain.com for 'Peer identifier' must be specified."); + } + } + } + + if ($pconfig['dpd_enable']) { + if (!is_numeric($pconfig['dpd_delay'])) { + $input_errors[] = gettext("A numeric value must be specified for DPD delay."); + } + + if (!is_numeric($pconfig['dpd_maxfail'])) { + $input_errors[] = gettext("A numeric value must be specified for DPD retries."); + } + } + + if (!empty($pconfig['iketype']) && $pconfig['iketype'] != "ikev1" && $pconfig['iketype'] != "ikev2") { + $input_errors[] = gettext("Valid arguments for IKE type is v1 or v2"); + } + + if (!empty($_POST['ealgo']) && isset($config['system']['crypto_hardware'])) { + if ($config['system']['crypto_hardware'] == "glxsb") { + if ($_POST['ealgo'] == "aes" && $_POST['ealgo_keylen'] != "128") { + $input_errors[] = gettext("Only 128 bit AES can be used where the glxsb crypto accelerator is enabled."); + } + } + } + + /* build our encryption algorithms array */ + $pconfig['ealgo'] = array(); + $pconfig['ealgo']['name'] = $_POST['ealgo']; + if ($pconfig['ealgo_keylen']) { + $pconfig['ealgo']['keylen'] = $_POST['ealgo_keylen']; + } + + if (!$input_errors) { + $ph1ent['ikeid'] = $pconfig['ikeid']; + $ph1ent['iketype'] = $pconfig['iketype']; + if ($pconfig['iketype'] != 'ikev1') { + unset($ph1ent['mode']); + } else { + $ph1ent['mode'] = $pconfig['mode']; + } + $ph1ent['disabled'] = $pconfig['disabled'] ? true : false; + $ph1ent['interface'] = $pconfig['interface']; + /* if the remote gateway changed and the interface is not WAN then remove route */ + /* the vpn_ipsec_configure() handles adding the route */ + if ($pconfig['interface'] <> "wan") { + if ($old_ph1ent['remote-gateway'] <> $pconfig['remotegw']) { + mwexec("/sbin/route delete -host {$old_ph1ent['remote-gateway']}"); + } + } + + if ($pconfig['mobile']) { + $ph1ent['mobile'] = true; + } else { + $ph1ent['remote-gateway'] = $pconfig['remotegw']; + } + + $ph1ent['protocol'] = $pconfig['protocol']; + + $ph1ent['myid_type'] = $pconfig['myid_type']; + $ph1ent['myid_data'] = $pconfig['myid_data']; + $ph1ent['peerid_type'] = $pconfig['peerid_type']; + $ph1ent['peerid_data'] = $pconfig['peerid_data']; + + $ph1ent['encryption-algorithm'] = $pconfig['ealgo']; + $ph1ent['hash-algorithm'] = $pconfig['halgo']; + $ph1ent['dhgroup'] = $pconfig['dhgroup']; + $ph1ent['lifetime'] = $pconfig['lifetime']; + $ph1ent['pre-shared-key'] = $pconfig['pskey']; + $ph1ent['private-key'] = base64_encode($pconfig['privatekey']); + $ph1ent['certref'] = $pconfig['certref']; + $ph1ent['caref'] = $pconfig['caref']; + $ph1ent['authentication_method'] = $pconfig['authentication_method']; + $ph1ent['descr'] = $pconfig['descr']; + $ph1ent['nat_traversal'] = $pconfig['nat_traversal']; + $ph1ent['mobike'] = $pconfig['mobike']; + + if (isset($pconfig['reauth_enable'])) { + $ph1ent['reauth_enable'] = true; + } else { + unset($ph1ent['reauth_enable']); + } + if (isset($pconfig['rekey_enable'])) { + $ph1ent['rekey_enable'] = true; + } else { + unset($ph1ent['rekey_enable']); + } + + if (isset($pconfig['responderonly'])) { + $ph1ent['responderonly'] = true; + } else { + unset($ph1ent['responderonly']); + } + + if (isset($pconfig['dpd_enable'])) { + $ph1ent['dpd_delay'] = $pconfig['dpd_delay']; + $ph1ent['dpd_maxfail'] = $pconfig['dpd_maxfail']; + } + + /* generate unique phase1 ikeid */ + if ($ph1ent['ikeid'] == 0) { + $ph1ent['ikeid'] = ipsec_ikeid_next(); + } + + if (isset($p1index) && $a_phase1[$p1index]) { + $a_phase1[$p1index] = $ph1ent; + } else { + $a_phase1[] = $ph1ent; + } + + write_config(); + mark_subsystem_dirty('ipsec'); + + header("Location: vpn_ipsec.php"); + exit; + } +} + +if ($pconfig['mobile']) { + $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Edit Phase 1"), gettext("Mobile Client")); +} else { + $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Edit Phase 1")); +} +$shortcut_section = "ipsec"; + + +include("head.inc"); + +?> + + + + + +
                              + + + + + + + + + + +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + /> +
                              + + . + +
                              + +
                              + . +
                              + +
                              + . +
                              + +
                              + . +
                              + +
                              + +
                              + +
                              + + . + +
                              + +
                              + +
                              + + . + +
                              +
                              . +
                              + + +
                              + + + +

                              . + +
                              + + + +
                              + . +
                              +
                              + +
                              + + . + +
                              + +
                              + + . + +
                              + +
                              + + +
                              + +
                              + + . + +
                              + +
                              + + . + +
                              + + +
                              + /> +
                              +
                              + /> +
                              +
                              + /> +
                              +
                              + +
                              + + . + +
                              + +
                              + + . + +
                              + onclick="dpdchkbox_change()" /> +
                              +
                              +
                              + +
                              + + . +
                              +
                              + +
                              + + . + +
                              +
                              +
                                + + + + + + + + " /> +
                              +
                              +
                              +
                              + + + + + diff --git a/src/usr/local/www/vpn_ipsec_phase2.php b/src/usr/local/www/vpn_ipsec_phase2.php new file mode 100644 index 0000000..f9a9805 --- /dev/null +++ b/src/usr/local/www/vpn_ipsec_phase2.php @@ -0,0 +1,983 @@ +. + Copyright (C) 2008 Shrew Soft Inc + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-vpn-ipsec-editphase2 +##|*NAME=VPN: IPsec: Edit Phase 2 page +##|*DESCR=Allow access to the 'VPN: IPsec: Edit Phase 2' page. +##|*MATCH=vpn_ipsec_phase2.php* +##|-PRIV + +require("functions.inc"); +require("guiconfig.inc"); +require_once("ipsec.inc"); +require_once("vpn.inc"); + +if (!is_array($config['ipsec']['client'])) { + $config['ipsec']['client'] = array(); +} + +$a_client = &$config['ipsec']['client']; + +if (!is_array($config['ipsec']['phase1'])) { + $config['ipsec']['phase1'] = array(); +} + +if (!is_array($config['ipsec']['phase2'])) { + $config['ipsec']['phase2'] = array(); +} + +$a_phase1 = &$config['ipsec']['phase1']; +$a_phase2 = &$config['ipsec']['phase2']; + +if (!empty($_GET['p2index'])) { + $uindex = $_GET['p2index']; +} +if (!empty($_POST['uniqid'])) { + $uindex = $_POST['uniqid']; +} + +if (!empty($_GET['dup'])) { + $uindex = $_GET['dup']; +} + +$ph2found = false; +if (isset($uindex)) { + foreach ($a_phase2 as $p2index => $ph2) { + if ($ph2['uniqid'] == $uindex) { + $ph2found = true; + break; + } + } +} + +if ($ph2found === true) { + $pconfig['ikeid'] = $ph2['ikeid']; + $pconfig['disabled'] = isset($ph2['disabled']); + $pconfig['mode'] = $ph2['mode']; + $pconfig['descr'] = $ph2['descr']; + $pconfig['uniqid'] = $ph2['uniqid']; + + if (!empty($ph2['natlocalid'])) { + idinfo_to_pconfig("natlocal", $ph2['natlocalid'], $pconfig); + } + idinfo_to_pconfig("local", $ph2['localid'], $pconfig); + idinfo_to_pconfig("remote", $ph2['remoteid'], $pconfig); + + $pconfig['proto'] = $ph2['protocol']; + ealgos_to_pconfig($ph2['encryption-algorithm-option'], $pconfig); + $pconfig['halgos'] = $ph2['hash-algorithm-option']; + $pconfig['pfsgroup'] = $ph2['pfsgroup']; + $pconfig['lifetime'] = $ph2['lifetime']; + $pconfig['pinghost'] = $ph2['pinghost']; + $pconfig['reqid'] = $ph2['reqid']; + + if (isset($ph2['mobile'])) { + $pconfig['mobile'] = true; + } +} else { + $pconfig['ikeid'] = $_GET['ikeid']; + + /* defaults */ + $pconfig['localid_type'] = "lan"; + $pconfig['remoteid_type'] = "network"; + $pconfig['proto'] = "esp"; + $pconfig['ealgos'] = explode(",", "aes"); + $pconfig['halgos'] = explode(",", "hmac_sha1"); + $pconfig['pfsgroup'] = "0"; + $pconfig['lifetime'] = "3600"; + $pconfig['uniqid'] = uniqid(); + + /* mobile client */ + if ($_GET['mobile']) { + $pconfig['mobile']=true; + } +} + +unset($ph2); +if (!empty($_GET['dup'])) { + unset($uindex); + unset($p2index); + $pconfig['uniqid'] = uniqid(); + $pconfig['reqid'] = ipsec_new_reqid(); +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + if (!isset($_POST['ikeid'])) { + $input_errors[] = gettext("A valid ikeid must be specified."); + } + + /* input validation */ + $reqdfields = explode(" ", "localid_type uniqid"); + $reqdfieldsn = array(gettext("Local network type"), gettext("Unique Identifier")); + if (!isset($pconfig['mobile'])) { + $reqdfields[] = "remoteid_type"; + $reqdfieldsn[] = gettext("Remote network type"); + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (($pconfig['mode'] == "tunnel") || ($pconfig['mode'] == "tunnel6")) { + switch ($pconfig['localid_type']) { + case "network": + if (($pconfig['localid_netbits'] != 0 && !$pconfig['localid_netbits']) || !is_numeric($pconfig['localid_netbits'])) { + $input_errors[] = gettext("A valid local network bit count must be specified."); + } + case "address": + if (!$pconfig['localid_address'] || !is_ipaddr($pconfig['localid_address'])) { + $input_errors[] = gettext("A valid local network IP address must be specified."); + } elseif (is_ipaddrv4($pconfig['localid_address']) && ($pconfig['mode'] != "tunnel")) { + $input_errors[] = gettext("A valid local network IPv4 address must be specified or you need to change Mode to IPv6"); + } elseif (is_ipaddrv6($pconfig['localid_address']) && ($pconfig['mode'] != "tunnel6")) { + $input_errors[] = gettext("A valid local network IPv6 address must be specified or you need to change Mode to IPv4"); + } + break; + } + /* Check if the localid_type is an interface, to confirm if it has a valid subnet. */ + if (is_array($config['interfaces'][$pconfig['localid_type']])) { + // Don't let an empty subnet into racoon.conf, it can cause parse errors. Ticket #2201. + $address = get_interface_ip($pconfig['localid_type']); + $netbits = get_interface_subnet($pconfig['localid_type']); + + if (empty($address) || empty($netbits)) { + $input_errors[] = gettext("Invalid Local Network.") . " " . convert_friendly_interface_to_friendly_descr($pconfig['localid_type']) . " " . gettext("has no subnet."); + } + } + + if (!empty($pconfig['natlocalid_address'])) { + switch ($pconfig['natlocalid_type']) { + case "network": + if (($pconfig['natlocalid_netbits'] != 0 && !$pconfig['natlocalid_netbits']) || !is_numeric($pconfig['natlocalid_netbits'])) { + $input_errors[] = gettext("A valid NAT local network bit count must be specified."); + } + if ($pconfig['localid_type'] == "address") { + $input_errors[] = gettext("You cannot configure a network type address for NAT while only an address type is selected for local source."); + } + case "address": + if (!empty($pconfig['natlocalid_address']) && !is_ipaddr($pconfig['natlocalid_address'])) { + $input_errors[] = gettext("A valid NAT local network IP address must be specified."); + } elseif (is_ipaddrv4($pconfig['natlocalid_address']) && ($pconfig['mode'] != "tunnel")) { + $input_errors[] = gettext("A valid NAT local network IPv4 address must be specified or you need to change Mode to IPv6"); + } elseif (is_ipaddrv6($pconfig['natlocalid_address']) && ($pconfig['mode'] != "tunnel6")) { + $input_errors[] = gettext("A valid NAT local network IPv6 address must be specified or you need to change Mode to IPv4"); + } + break; + } + + if (is_array($config['interfaces'][$pconfig['natlocalid_type']])) { + // Don't let an empty subnet into racoon.conf, it can cause parse errors. Ticket #2201. + $address = get_interface_ip($pconfig['natlocalid_type']); + $netbits = get_interface_subnet($pconfig['natlocalid_type']); + + if (empty($address) || empty($netbits)) { + $input_errors[] = gettext("Invalid Local Network.") . " " . convert_friendly_interface_to_friendly_descr($pconfig['natlocalid_type']) . " " . gettext("has no subnet."); + } + } + } + + switch ($pconfig['remoteid_type']) { + case "network": + if (($pconfig['remoteid_netbits'] != 0 && !$pconfig['remoteid_netbits']) || !is_numeric($pconfig['remoteid_netbits'])) { + $input_errors[] = gettext("A valid remote network bit count must be specified."); + } + case "address": + if (!$pconfig['remoteid_address'] || !is_ipaddr($pconfig['remoteid_address'])) { + $input_errors[] = gettext("A valid remote network IP address must be specified."); + } elseif (is_ipaddrv4($pconfig['remoteid_address']) && ($pconfig['mode'] != "tunnel")) { + $input_errors[] = gettext("A valid remote network IPv4 address must be specified or you need to change Mode to IPv6"); + } elseif (is_ipaddrv6($pconfig['remoteid_address']) && ($pconfig['mode'] != "tunnel6")) { + $input_errors[] = gettext("A valid remote network IPv6 address must be specified or you need to change Mode to IPv4"); + } + break; + } + } + /* Validate enabled phase2's are not duplicates */ + if (isset($pconfig['mobile'])) { + /* User is adding phase 2 for mobile phase1 */ + foreach ($a_phase2 as $key => $name) { + if (isset($name['mobile']) && $name['uniqid'] != $pconfig['uniqid']) { + /* check duplicate localids only for mobile clents */ + $localid_data = ipsec_idinfo_to_cidr($name['localid'], false, $name['mode']); + $entered = array(); + $entered['type'] = $pconfig['localid_type']; + if (isset($pconfig['localid_address'])) $entered['address'] = $pconfig['localid_address']; + if (isset($pconfig['localid_netbits'])) $entered['netbits'] = $pconfig['localid_netbits']; + $entered_localid_data = ipsec_idinfo_to_cidr($entered, false, $pconfig['mode']); + if ($localid_data == $entered_localid_data) { + /* adding new p2 entry */ + $input_errors[] = gettext("Phase2 with this Local Network is already defined for mobile clients."); + break; + } + } + } + } else { + /* User is adding phase 2 for site-to-site phase1 */ + $input_error = 0; + foreach ($a_phase2 as $key => $name) { + if (!isset($name['mobile']) && $pconfig['ikeid'] == $name['ikeid'] && $pconfig['uniqid'] != $name['uniqid']) { + /* check duplicate subnets only for given phase1 */ + $localid_data = ipsec_idinfo_to_cidr($name['localid'], false, $name['mode']); + $remoteid_data = ipsec_idinfo_to_cidr($name['remoteid'], false, $name['mode']); + $entered_local = array(); + $entered_local['type'] = $pconfig['localid_type']; + if (isset($pconfig['localid_address'])) { + $entered_local['address'] = $pconfig['localid_address']; + } + if (isset($pconfig['localid_netbits'])) { + $entered_local['netbits'] = $pconfig['localid_netbits']; + } + $entered_localid_data = ipsec_idinfo_to_cidr($entered_local, false, $pconfig['mode']); + $entered_remote = array(); + $entered_remote['type'] = $pconfig['remoteid_type']; + if (isset($pconfig['remoteid_address'])) { + $entered_remote['address'] = $pconfig['remoteid_address']; + } + if (isset($pconfig['remoteid_netbits'])) { + $entered_remote['netbits'] = $pconfig['remoteid_netbits']; + } + $entered_remoteid_data = ipsec_idinfo_to_cidr($entered_remote, false, $pconfig['mode']); + if ($localid_data == $entered_localid_data && $remoteid_data == $entered_remoteid_data) { + /* adding new p2 entry */ + $input_errors[] = gettext("Phase2 with this Local/Remote networks combination is already defined for this Phase1."); + break; + } + } + } + foreach ($a_phase1 as $phase1) { + if ($phase1['ikeid'] == $pconfig['ikeid']) { + /* This is the P1 for this entry, validate its remote-gateway and local interface isn't within tunnel */ + $entered_local = array(); + $entered_local['type'] = $pconfig['localid_type']; + if (isset($pconfig['localid_address'])) { + $entered_local['address'] = $pconfig['localid_address']; + } + if (isset($pconfig['localid_netbits'])) { + $entered_local['netbits'] = $pconfig['localid_netbits']; + } + $entered_localid_data = ipsec_idinfo_to_cidr($entered_local, false, $pconfig['mode']); + list($entered_local_network, $entered_local_mask) = explode('/', $entered_localid_data); + $entered_remote = array(); + $entered_remote['type'] = $pconfig['remoteid_type']; + if (isset($pconfig['remoteid_address'])) { + $entered_remote['address'] = $pconfig['remoteid_address']; + } + if (isset($pconfig['remoteid_netbits'])) { + $entered_remote['netbits'] = $pconfig['remoteid_netbits']; + } + $entered_remoteid_data = ipsec_idinfo_to_cidr($entered_remote, false, $pconfig['mode']); + list($entered_remote_network, $entered_remote_mask) = explode('/', $entered_remoteid_data); + if ($phase1['protocol'] == "inet6") { + $if = get_failover_interface($phase1['interface'], "inet6"); + $interfaceip = get_interface_ipv6($if); + } else { + $if = get_failover_interface($phase1['interface']); + $interfaceip = get_interface_ip($if); + } + /* skip validation for hostnames, they're subject to change anyway */ + if (is_ipaddr($phase1['remote-gateway'])) { + if ($pconfig['mode'] == "tunnel") { + if (check_subnets_overlap($interfaceip, 32, $entered_local_network, $entered_local_mask) && check_subnets_overlap($phase1['remote-gateway'], 32, $entered_remote_network, $entered_remote_mask)) { + $input_errors[] = gettext("The local and remote networks of a phase 2 entry cannot overlap the outside of the tunnel (interface and remote gateway) configured in its phase 1."); + break; + } + } else if ($pconfig['mode'] == "tunnel6") { + if (check_subnetsv6_overlap($interfaceip, 128, $entered_local_network, $entered_local_mask) && check_subnets_overlap($phase1['remote-gateway'], 128, $entered_remote_network, $entered_remote_mask)) { + $input_errors[] = gettext("The local and remote networks of a phase 2 entry cannot overlap the outside of the tunnel (interface and remote gateway) configured in its phase 1."); + break; + } + } + } + } + } + } + + /* For ESP protocol, handle encryption algorithms */ + if ($pconfig['proto'] == "esp") { + $ealgos = pconfig_to_ealgos($pconfig); + + if (!count($ealgos)) { + $input_errors[] = gettext("At least one encryption algorithm must be selected."); + } else { + foreach ($ealgos as $ealgo) { + if (isset($config['system']['crypto_hardware'])) { + if ($config['system']['crypto_hardware'] == "glxsb") { + if ($ealgo['name'] == "aes" && $ealgo['keylen'] != "128") { + $input_errors[] = gettext("Only 128 bit AES can be used where the glxsb crypto accelerator is enabled."); + } + } + } + if (empty($pconfig['halgos'])) { + if (!strpos($ealgo['name'], "gcm")) { + $input_errors[] = gettext("At least one hashing algorithm needs to be selected."); + break; + } + } + } + } + } + if (($_POST['lifetime'] && !is_numeric($_POST['lifetime']))) { + $input_errors[] = gettext("The P2 lifetime must be an integer."); + } + + if (!$input_errors) { + + $ph2ent = array(); + $ph2ent['ikeid'] = $pconfig['ikeid']; + $ph2ent['uniqid'] = $pconfig['uniqid']; + $ph2ent['mode'] = $pconfig['mode']; + $ph2ent['disabled'] = $pconfig['disabled'] ? true : false; + if (!isset($pconfig['reqid'])) { + $ph2ent['reqid'] = ipsec_new_reqid(); + } else { + $ph2ent['reqid'] = $pconfig['reqid']; + } + + if (($ph2ent['mode'] == "tunnel") || ($ph2ent['mode'] == "tunnel6")) { + if (!empty($pconfig['natlocalid_address'])) { + $ph2ent['natlocalid'] = pconfig_to_idinfo("natlocal", $pconfig); + } + $ph2ent['localid'] = pconfig_to_idinfo("local", $pconfig); + $ph2ent['remoteid'] = pconfig_to_idinfo("remote", $pconfig); + } + + $ph2ent['protocol'] = $pconfig['proto']; + $ph2ent['encryption-algorithm-option'] = $ealgos; + if (!empty($pconfig['halgos'])) { + $ph2ent['hash-algorithm-option'] = $pconfig['halgos']; + } else { + unset($ph2ent['hash-algorithm-option']); + } + $ph2ent['pfsgroup'] = $pconfig['pfsgroup']; + $ph2ent['lifetime'] = $pconfig['lifetime']; + $ph2ent['pinghost'] = $pconfig['pinghost']; + $ph2ent['descr'] = $pconfig['descr']; + + if (isset($pconfig['mobile'])) { + $ph2ent['mobile'] = true; + } + + if ($ph2found === true && $a_phase2[$p2index]) { + $a_phase2[$p2index] = $ph2ent; + } else { + $a_phase2[] = $ph2ent; + } + + write_config(); + mark_subsystem_dirty('ipsec'); + + header("Location: vpn_ipsec.php"); + exit; + } +} + +if ($pconfig['mobile']) { + $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Edit Phase 2"), gettext("Mobile Client")); +} else { + $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Edit Phase 2")); +} +$shortcut_section = "ipsec"; + +include("head.inc"); + +?> + + + + + + +
                              + + + + + + + + + + +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + /> + +
                              + + . + +
                              + +
                              + + + + + + + + + + + + + + + + + + + + + + + + +
                              :   + +
                                 + + / + +
                              +
                              + +
                              :   + +
                                 + + / + +
                              +
                              + + + + + + + + + + + +
                              :   + +
                              :   + + / + +
                              +
                              + +
                              + + . + +
                              + +
                              + +
                              + + + +
                              + + $algodata): + $checked = ''; + if (is_array($pconfig['ealgos']) && in_array($algo, $pconfig['ealgos'])) { + $checked = " checked=\"checked\""; + } + ?> + + + + + + + + +
                              + /> + + + + +    + + +
                              +
                              + . +
                              + $algoname): ?> + /> + +
                              + +
                              + + +
                              + + + + +
                              + + +
                              + + +
                              + + +
                                + + + + + " /> + + + + + +
                              +
                              +
                              +
                              + + + + + + $algo_data) { + if (in_array($algo_name, $pconfig['ealgos'])) { + $ealg = array(); + $ealg['name'] = $algo_name; + if (is_array($algo_data['keysel'])) { + $ealg['keylen'] = $_POST["keylen_".$algo_name]; + } + $ealgos[] = $ealg; + } + } + } + + return $ealgos; +} + +function ealgos_to_pconfig(& $ealgos,& $pconfig) { + + $pconfig['ealgos'] = array(); + foreach ($ealgos as $algo_data) { + $pconfig['ealgos'][] = $algo_data['name']; + if (isset($algo_data['keylen'])) { + $pconfig["keylen_".$algo_data['name']] = $algo_data['keylen']; + } + } + + return $ealgos; +} + +function pconfig_to_idinfo($prefix,& $pconfig) { + + $type = $pconfig[$prefix."id_type"]; + $address = $pconfig[$prefix."id_address"]; + $netbits = $pconfig[$prefix."id_netbits"]; + + switch ($type) { + case "address": + return array('type' => $type, 'address' => $address); + case "network": + return array('type' => $type, 'address' => $address, 'netbits' => $netbits); + default: + return array('type' => $type); + } +} + +function idinfo_to_pconfig($prefix,& $idinfo,& $pconfig) { + + switch ($idinfo['type']) { + case "address": + $pconfig[$prefix."id_type"] = $idinfo['type']; + $pconfig[$prefix."id_address"] = $idinfo['address']; + break; + case "network": + $pconfig[$prefix."id_type"] = $idinfo['type']; + $pconfig[$prefix."id_address"] = $idinfo['address']; + $pconfig[$prefix."id_netbits"] = $idinfo['netbits']; + break; + default: + $pconfig[$prefix."id_type"] = $idinfo['type']; + break; + } +} + +?> diff --git a/src/usr/local/www/vpn_ipsec_settings.php b/src/usr/local/www/vpn_ipsec_settings.php new file mode 100644 index 0000000..ac3fde9 --- /dev/null +++ b/src/usr/local/www/vpn_ipsec_settings.php @@ -0,0 +1,445 @@ + $ldescr) { + if (!empty($config['ipsec']["ipsec_{$lkey}"])) { + $pconfig["ipsec_{$lkey}"] = $config['ipsec']["ipsec_{$lkey}"]; + } +} +$pconfig['unityplugin'] = isset($config['ipsec']['unityplugin']); +$pconfig['strictcrlpolicy'] = isset($config['ipsec']['strictcrlpolicy']); +$pconfig['makebeforebreak'] = isset($config['ipsec']['makebeforebreak']); +$pconfig['noshuntlaninterfaces'] = isset($config['ipsec']['noshuntlaninterfaces']); +$pconfig['compression'] = isset($config['ipsec']['compression']); +$pconfig['enableinterfacesuse'] = isset($config['ipsec']['enableinterfacesuse']); +$pconfig['acceptunencryptedmainmode'] = isset($config['ipsec']['acceptunencryptedmainmode']); +$pconfig['maxmss_enable'] = isset($config['system']['maxmss_enable']); +$pconfig['maxmss'] = $config['system']['maxmss']; +$pconfig['uniqueids'] = $config['ipsec']['uniqueids']; + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + if (!in_array($pconfig['ipsec_dmn'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for Daemon debug."; + } + if (!in_array($pconfig['ipsec_mgr'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for SA Manager debug."; + } + if (!in_array($pconfig['ipsec_ike'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for IKE SA debug."; + } + if (!in_array($pconfig['ipsec_chd'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for IKE Child SA debug."; + } + if (!in_array($pconfig['ipsec_job'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for Job Processing debug."; + } + if (!in_array($pconfig['ipsec_cfg'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for Configuration backend debug."; + } + if (!in_array($pconfig['ipsec_knl'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for Kernel Interface debug."; + } + if (!in_array($pconfig['ipsec_net'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for Networking debug."; + } + if (!in_array($pconfig['ipsec_asn'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for ASN Encoding debug."; + } + if (!in_array($pconfig['ipsec_enc'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for Message encoding debug."; + } + if (!in_array($pconfig['ipsec_imc'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for Integrity checker debug."; + } + if (!in_array($pconfig['ipsec_imv'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for Integrity Verifier debug."; + } + if (!in_array($pconfig['ipsec_pts'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for Platform Trust Service debug."; + } + if (!in_array($pconfig['ipsec_tls'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for TLS Handler debug."; + } + if (!in_array($pconfig['ipsec_esp'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for IPsec Traffic debug."; + } + if (!in_array($pconfig['ipsec_lib'], array('0', '1', '2', '3', '4', '5'), true)) { + $input_errors[] = "A valid value must be specified for StrongSwan Lib debug."; + } + if (isset($pconfig['maxmss'])) { + if (!is_numericint($pconfig['maxmss']) && $pconfig['maxmss'] <> '') { + $input_errors[] = "An integer must be specified for Maximum MSS."; + } + if ($pconfig['maxmss'] <> '' && $pconfig['maxmss'] < 576 || $pconfig['maxmss'] > 65535) { + $input_errors[] = "An integer between 576 and 65535 must be specified for Maximum MSS"; + } + } + + if (!$input_errors) { + + foreach ($ipsec_loglevels as $lkey => $ldescr) { + if (empty($_POST["ipsec_{$lkey}"])) { + if (isset($config['ipsec']["ipsec_{$lkey}"])) { + unset($config['ipsec']["ipsec_{$lkey}"]); + } + } else { + $config['ipsec']["ipsec_{$lkey}"] = $_POST["ipsec_{$lkey}"]; + } + } + + $needsrestart = false; + + if ($_POST['compression'] == "yes") { + if (!isset($config['ipsec']['compression'])) { + $needsrestart = true; + } + $config['ipsec']['compression'] = true; + } elseif (isset($config['ipsec']['compression'])) { + $needsrestart = true; + unset($config['ipsec']['compression']); + } + + if ($_POST['enableinterfacesuse'] == "yes") { + if (!isset($config['ipsec']['enableinterfacesuse'])) { + $needsrestart = true; + } + $config['ipsec']['enableinterfacesuse'] = true; + } elseif (isset($config['ipsec']['enableinterfacesuse'])) { + $needsrestart = true; + unset($config['ipsec']['enableinterfacesuse']); + } + + if ($_POST['unityplugin'] == "yes") { + if (!isset($config['ipsec']['unityplugin'])) { + $needsrestart = true; + } + $config['ipsec']['unityplugin'] = true; + } elseif (isset($config['ipsec']['unityplugin'])) { + $needsrestart = true; + unset($config['ipsec']['unityplugin']); + } + + if ($_POST['strictcrlpolicy'] == "yes") { + $config['ipsec']['strictcrlpolicy'] = true; + } elseif (isset($config['ipsec']['strictcrlpolicy'])) { + unset($config['ipsec']['strictcrlpolicy']); + } + + if ($_POST['makebeforebreak'] == "yes") { + $config['ipsec']['makebeforebreak'] = true; + } elseif (isset($config['ipsec']['makebeforebreak'])) { + unset($config['ipsec']['makebeforebreak']); + } + + if ($_POST['noshuntlaninterfaces'] == "yes") { + if (isset($config['ipsec']['noshuntlaninterfaces'])) { + unset($config['ipsec']['noshuntlaninterfaces']); + } + } else { + $config['ipsec']['noshuntlaninterfaces'] = true; + } + + if ($_POST['acceptunencryptedmainmode'] == "yes") { + if (!isset($config['ipsec']['acceptunencryptedmainmode'])) { + $needsrestart = true; + } + $config['ipsec']['acceptunencryptedmainmode'] = true; + } elseif (isset($config['ipsec']['acceptunencryptedmainmode'])) { + $needsrestart = true; + unset($config['ipsec']['acceptunencryptedmainmode']); + } + + if (!empty($_POST['uniqueids'])) { + $config['ipsec']['uniqueids'] = $_POST['uniqueids']; + } else if (isset($config['ipsec']['uniqueids'])) { + unset($config['ipsec']['uniqueids']); + } + + if ($_POST['maxmss_enable'] == "yes") { + $config['system']['maxmss_enable'] = true; + $config['system']['maxmss'] = $_POST['maxmss']; + } else { + if (isset($config['system']['maxmss_enable'])) { + unset($config['system']['maxmss_enable']); + } + if (isset($config['system']['maxmss'])) { + unset($config['system']['maxmss']); + } + } + + write_config(); + + $retval = 0; + $retval = filter_configure(); + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message(gettext($retval)); + } else { + $savemsg = gettext($retval); + } + + vpn_ipsec_configure($needsrestart); + vpn_ipsec_configure_loglevels(); + + header("Location: vpn_ipsec_settings.php"); + return; + } + + // The logic value sent by $POST is opposite to the way it is stored in the config. + // Reset the $pconfig value so it reflects the opposite of what was $POSTed. + if ($_POST['noshuntlaninterfaces'] == "yes") { + $pconfig['noshuntlaninterfaces'] = false; + } else { + $pconfig['noshuntlaninterfaces'] = true; + } +} + +$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Settings")); +$shortcut_section = "ipsec"; + +include("head.inc"); +?> + + + + + + +
                              + + + + + + + + + + +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + +
                              + + $ldescr): ?> + + + + + + + + +
                              + \n"; + foreach (array("Silent", "Audit", "Control", "Diag", "Raw", "Highest") as $lidx => $lvalue) { + echo "\n"; + } + ?> + +
                              +
                              +
                              + + \n"; + foreach ($ipsec_idhandling as $value => $lvalue) { + echo "\n"; + } + ?> + +
                              + no and never is that the old IKE_SAs will be replaced when receiving an " . + "INITIAL_CONTACT notify if the option is no but will ignore these notifies if never is configured. " . + "The daemon also accepts the value keep to reject " . + "new IKE_SA setups and keep the duplicate established earlier. Defaults to Yes."); ?> +
                              + /> + +
                              + +
                              + /> + +
                              + +
                              + /> + +
                              + +
                              + onclick="maxmss_checked(this)" /> + +
                              + " class="formfld unknown" /> +
                              + +
                              + /> + +
                              + +
                              + /> + +
                              + +
                              + /> + +
                              + +
                              + /> + +
                              + +
                                + " /> +
                              +
                              +
                              +
                              + + + diff --git a/src/usr/local/www/vpn_l2tp.php b/src/usr/local/www/vpn_l2tp.php new file mode 100644 index 0000000..88f4eae --- /dev/null +++ b/src/usr/local/www/vpn_l2tp.php @@ -0,0 +1,493 @@ += $subnet_start) && + (ip2ulong($_POST['localip']) <= $subnet_end)) { + $input_errors[] = gettext("The specified server address lies in the remote subnet."); + } + if ($_POST['localip'] == get_interface_ip("lan")) { + $input_errors[] = gettext("The specified server address is equal to the LAN interface address."); + } + } + } + + /* if this is an AJAX caller then handle via JSON */ + if (isAjax() && is_array($input_errors)) { + input_errors2Ajax($input_errors); + exit; + } + + if (!$input_errors) { + $l2tpcfg['remoteip'] = $_POST['remoteip']; + $l2tpcfg['localip'] = $_POST['localip']; + $l2tpcfg['l2tp_subnet'] = $_POST['l2tp_subnet']; + $l2tpcfg['mode'] = $_POST['mode']; + $l2tpcfg['interface'] = $_POST['interface']; + $l2tpcfg['n_l2tp_units'] = $_POST['n_l2tp_units']; + + $l2tpcfg['radius']['server'] = $_POST['radiusserver']; + $l2tpcfg['radius']['secret'] = $_POST['radiussecret']; + $l2tpcfg['secret'] = $_POST['secret']; + + if ($_POST['wins']) { + $l2tpcfg['wins'] = $_POST['wins']; + } else { + unset($l2tpcfg['wins']); + } + + $l2tpcfg['paporchap'] = $_POST['paporchap']; + + + if ($_POST['l2tp_dns1'] == "") { + if (isset($l2tpcfg['dns1'])) { + unset($l2tpcfg['dns1']); + } + } else { + $l2tpcfg['dns1'] = $_POST['l2tp_dns1']; + } + + if ($_POST['l2tp_dns2'] == "") { + if (isset($l2tpcfg['dns2'])) { + unset($l2tpcfg['dns2']); + } + } else { + $l2tpcfg['dns2'] = $_POST['l2tp_dns2']; + } + + if ($_POST['radiusenable'] == "yes") { + $l2tpcfg['radius']['enable'] = true; + } else { + unset($l2tpcfg['radius']['enable']); + } + + if ($_POST['radacct_enable'] == "yes") { + $l2tpcfg['radius']['accounting'] = true; + } else { + unset($l2tpcfg['radius']['accounting']); + } + + if ($_POST['radiusissueips'] == "yes") { + $l2tpcfg['radius']['radiusissueips'] = true; + } else { + unset($l2tpcfg['radius']['radiusissueips']); + } + + write_config(); + + $retval = 0; + $retval = vpn_l2tp_configure(); + $savemsg = get_std_save_message($retval); + + /* if ajax is calling, give them an update message */ + if (isAjax()) { + print_info_box_np($savemsg); + } + } +} + +include("head.inc"); +?> + +"> + + + +
                              + + +
                              + + + + + +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                + /> + +
                                + /> + +
                              + +
                              + +
                              + +
                              + . +
                              + . +
                              +
                              + . +
                              + +
                              +
                              +
                              + +
                              24 255.255.255.0 +
                              + +
                              10 +
                              + +
                              +
                              +
                              + + +
                              +
                              +
                              + +
                              + +
                              +
                              +
                              + +
                              + /> +
                              +
                              +
                              + /> +
                              + +
                              + +
                              + +
                              + +
                              + +
                              + /> +
                              + +
                                + " onclick="enable_change(true)" /> +
                              + +
                              + +
                              +
                              +
                              +
                              +
                              + + + + + + diff --git a/src/usr/local/www/vpn_l2tp_users.php b/src/usr/local/www/vpn_l2tp_users.php new file mode 100644 index 0000000..7ffc969 --- /dev/null +++ b/src/usr/local/www/vpn_l2tp_users.php @@ -0,0 +1,146 @@ + + +"> + +
                              +
                              + + +
                              +" . gettext("You must apply the changes in order for them to take effect") . ".
                              " . gettext("Warning: this will terminate all current l2tp sessions!") . "");?>
                              + + + + + + +
                              + +
                              + +
                              +
                              + + + + diff --git a/src/usr/local/www/vpn_l2tp_users_edit.php b/src/usr/local/www/vpn_l2tp_users_edit.php new file mode 100644 index 0000000..6cedc02 --- /dev/null +++ b/src/usr/local/www/vpn_l2tp_users_edit.php @@ -0,0 +1,212 @@ + + +"> + + + +
                              +
                              +
                              + + + + + + + + + + + + + + + + + +
                              + +
                              + +
                              +  () + +
                              + + +
                              + +
                              +
                                + + " onclick="window.location.href=''" /> + + + + +
                              +
                              +
                              + + + + diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php new file mode 100644 index 0000000..7a06c70 --- /dev/null +++ b/src/usr/local/www/vpn_openvpn_client.php @@ -0,0 +1,1271 @@ +"; +} + +if ($_GET['act'] == "new") { + $pconfig['autokey_enable'] = "yes"; + $pconfig['tlsauth_enable'] = "yes"; + $pconfig['autotls_enable'] = "yes"; + $pconfig['interface'] = "wan"; + $pconfig['server_port'] = 1194; + $pconfig['verbosity_level'] = 1; // Default verbosity is 1 + // OpenVPN Defaults to SHA1 + $pconfig['digest'] = "SHA1"; +} + +global $simplefields; +$simplefields = array('auth_user', 'auth_pass'); + +if ($_GET['act'] == "edit") { + + if (isset($id) && $a_client[$id]) { + foreach ($simplefields as $stat) { + $pconfig[$stat] = $a_client[$id][$stat]; + } + + $pconfig['disable'] = isset($a_client[$id]['disable']); + $pconfig['mode'] = $a_client[$id]['mode']; + $pconfig['protocol'] = $a_client[$id]['protocol']; + $pconfig['interface'] = $a_client[$id]['interface']; + if (!empty($a_client[$id]['ipaddr'])) { + $pconfig['interface'] = $pconfig['interface'] . '|' . $a_client[$id]['ipaddr']; + } + $pconfig['local_port'] = $a_client[$id]['local_port']; + $pconfig['server_addr'] = $a_client[$id]['server_addr']; + $pconfig['server_port'] = $a_client[$id]['server_port']; + $pconfig['resolve_retry'] = $a_client[$id]['resolve_retry']; + $pconfig['proxy_addr'] = $a_client[$id]['proxy_addr']; + $pconfig['proxy_port'] = $a_client[$id]['proxy_port']; + $pconfig['proxy_user'] = $a_client[$id]['proxy_user']; + $pconfig['proxy_passwd'] = $a_client[$id]['proxy_passwd']; + $pconfig['proxy_authtype'] = $a_client[$id]['proxy_authtype']; + $pconfig['description'] = $a_client[$id]['description']; + $pconfig['custom_options'] = $a_client[$id]['custom_options']; + $pconfig['ns_cert_type'] = $a_client[$id]['ns_cert_type']; + $pconfig['dev_mode'] = $a_client[$id]['dev_mode']; + + if ($pconfig['mode'] != "p2p_shared_key") { + $pconfig['caref'] = $a_client[$id]['caref']; + $pconfig['certref'] = $a_client[$id]['certref']; + if ($a_client[$id]['tls']) { + $pconfig['tlsauth_enable'] = "yes"; + $pconfig['tls'] = base64_decode($a_client[$id]['tls']); + } + } else { + $pconfig['shared_key'] = base64_decode($a_client[$id]['shared_key']); + } + $pconfig['crypto'] = $a_client[$id]['crypto']; + // OpenVPN Defaults to SHA1 if unset + $pconfig['digest'] = !empty($a_client[$id]['digest']) ? $a_client[$id]['digest'] : "SHA1"; + $pconfig['engine'] = $a_client[$id]['engine']; + + $pconfig['tunnel_network'] = $a_client[$id]['tunnel_network']; + $pconfig['tunnel_networkv6'] = $a_client[$id]['tunnel_networkv6']; + $pconfig['remote_network'] = $a_client[$id]['remote_network']; + $pconfig['remote_networkv6'] = $a_client[$id]['remote_networkv6']; + $pconfig['use_shaper'] = $a_client[$id]['use_shaper']; + $pconfig['compression'] = $a_client[$id]['compression']; + $pconfig['passtos'] = $a_client[$id]['passtos']; + + // just in case the modes switch + $pconfig['autokey_enable'] = "yes"; + $pconfig['autotls_enable'] = "yes"; + + $pconfig['no_tun_ipv6'] = $a_client[$id]['no_tun_ipv6']; + $pconfig['route_no_pull'] = $a_client[$id]['route_no_pull']; + $pconfig['route_no_exec'] = $a_client[$id]['route_no_exec']; + if (isset($a_client[$id]['verbosity_level'])) { + $pconfig['verbosity_level'] = $a_client[$id]['verbosity_level']; + } else { + $pconfig['verbosity_level'] = 1; // Default verbosity is 1 + } + } +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + if (isset($id) && $a_client[$id]) { + $vpnid = $a_client[$id]['vpnid']; + } else { + $vpnid = 0; + } + + list($iv_iface, $iv_ip) = explode ("|", $pconfig['interface']); + if (is_ipaddrv4($iv_ip) && (stristr($pconfig['protocol'], "6") !== false)) { + $input_errors[] = gettext("Protocol and IP address families do not match. You cannot select an IPv6 protocol and an IPv4 IP address."); + } elseif (is_ipaddrv6($iv_ip) && (stristr($pconfig['protocol'], "6") === false)) { + $input_errors[] = gettext("Protocol and IP address families do not match. You cannot select an IPv4 protocol and an IPv6 IP address."); + } elseif ((stristr($pconfig['protocol'], "6") === false) && !get_interface_ip($iv_iface) && ($pconfig['interface'] != "any")) { + $input_errors[] = gettext("An IPv4 protocol was selected, but the selected interface has no IPv4 address."); + } elseif ((stristr($pconfig['protocol'], "6") !== false) && !get_interface_ipv6($iv_iface) && ($pconfig['interface'] != "any")) { + $input_errors[] = gettext("An IPv6 protocol was selected, but the selected interface has no IPv6 address."); + } + + if ($pconfig['mode'] != "p2p_shared_key") { + $tls_mode = true; + } else { + $tls_mode = false; + } + + /* input validation */ + if ($pconfig['local_port']) { + + if ($result = openvpn_validate_port($pconfig['local_port'], 'Local port')) { + $input_errors[] = $result; + } + + $portused = openvpn_port_used($pconfig['protocol'], $pconfig['interface'], $pconfig['local_port'], $vpnid); + if (($portused != $vpnid) && ($portused != 0)) { + $input_errors[] = gettext("The specified 'Local port' is in use. Please select another value"); + } + } + + if ($result = openvpn_validate_host($pconfig['server_addr'], 'Server host or address')) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_port($pconfig['server_port'], 'Server port')) { + $input_errors[] = $result; + } + + if ($pconfig['proxy_addr']) { + + if ($result = openvpn_validate_host($pconfig['proxy_addr'], 'Proxy host or address')) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_port($pconfig['proxy_port'], 'Proxy port')) { + $input_errors[] = $result; + } + + if ($pconfig['proxy_authtype'] != "none") { + if (empty($pconfig['proxy_user']) || empty($pconfig['proxy_passwd'])) { + $input_errors[] = gettext("User name and password are required for proxy with authentication."); + } + } + } + + if ($pconfig['tunnel_network']) { + if ($result = openvpn_validate_cidr($pconfig['tunnel_network'], 'IPv4 Tunnel Network', false, "ipv4")) { + $input_errors[] = $result; + } + } + + if ($pconfig['tunnel_networkv6']) { + if ($result = openvpn_validate_cidr($pconfig['tunnel_networkv6'], 'IPv6 Tunnel Network', false, "ipv6")) { + $input_errors[] = $result; + } + } + + if ($result = openvpn_validate_cidr($pconfig['remote_network'], 'IPv4 Remote Network', true, "ipv4")) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['remote_networkv6'], 'IPv6 Remote Network', true, "ipv6")) { + $input_errors[] = $result; + } + + if (!empty($pconfig['use_shaper']) && (!is_numeric($pconfig['use_shaper']) || ($pconfig['use_shaper'] <= 0))) { + $input_errors[] = gettext("The bandwidth limit must be a positive numeric value."); + } + + if ($pconfig['autokey_enable']) { + $pconfig['shared_key'] = openvpn_create_key(); + } + + if (!$tls_mode && !$pconfig['autokey_enable']) { + if (!strstr($pconfig['shared_key'], "-----BEGIN OpenVPN Static key V1-----") || + !strstr($pconfig['shared_key'], "-----END OpenVPN Static key V1-----")) { + $input_errors[] = gettext("The field 'Shared Key' does not appear to be valid"); + } + } + + if ($tls_mode && $pconfig['tlsauth_enable'] && !$pconfig['autotls_enable']) { + if (!strstr($pconfig['tls'], "-----BEGIN OpenVPN Static key V1-----") || + !strstr($pconfig['tls'], "-----END OpenVPN Static key V1-----")) { + $input_errors[] = gettext("The field 'TLS Authentication Key' does not appear to be valid"); + } + } + + /* If we are not in shared key mode, then we need the CA/Cert. */ + if ($pconfig['mode'] != "p2p_shared_key") { + $reqdfields = explode(" ", "caref"); + $reqdfieldsn = array(gettext("Certificate Authority")); + } elseif (!$pconfig['autokey_enable']) { + /* We only need the shared key filled in if we are in shared key mode and autokey is not selected. */ + $reqdfields = array('shared_key'); + $reqdfieldsn = array(gettext('Shared key')); + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (($pconfig['mode'] != "p2p_shared_key") && empty($pconfig['certref']) && empty($pconfig['auth_user']) && empty($pconfig['auth_pass'])) { + $input_errors[] = gettext("If no Client Certificate is selected, a username and/or password must be entered."); + } + + if (!$input_errors) { + + $client = array(); + + foreach ($simplefields as $stat) { + update_if_changed($stat, $client[$stat], $_POST[$stat]); + } + + if ($vpnid) { + $client['vpnid'] = $vpnid; + } else { + $client['vpnid'] = openvpn_vpnid_next(); + } + + if ($_POST['disable'] == "yes") { + $client['disable'] = true; + } + $client['protocol'] = $pconfig['protocol']; + $client['dev_mode'] = $pconfig['dev_mode']; + list($client['interface'], $client['ipaddr']) = explode ("|", $pconfig['interface']); + $client['local_port'] = $pconfig['local_port']; + $client['server_addr'] = $pconfig['server_addr']; + $client['server_port'] = $pconfig['server_port']; + $client['resolve_retry'] = $pconfig['resolve_retry']; + $client['proxy_addr'] = $pconfig['proxy_addr']; + $client['proxy_port'] = $pconfig['proxy_port']; + $client['proxy_authtype'] = $pconfig['proxy_authtype']; + $client['proxy_user'] = $pconfig['proxy_user']; + $client['proxy_passwd'] = $pconfig['proxy_passwd']; + $client['description'] = $pconfig['description']; + $client['mode'] = $pconfig['mode']; + $client['custom_options'] = str_replace("\r\n", "\n", $pconfig['custom_options']); + + if ($tls_mode) { + $client['caref'] = $pconfig['caref']; + $client['certref'] = $pconfig['certref']; + if ($pconfig['tlsauth_enable']) { + if ($pconfig['autotls_enable']) { + $pconfig['tls'] = openvpn_create_key(); + } + $client['tls'] = base64_encode($pconfig['tls']); + } + } else { + $client['shared_key'] = base64_encode($pconfig['shared_key']); + } + $client['crypto'] = $pconfig['crypto']; + $client['digest'] = $pconfig['digest']; + $client['engine'] = $pconfig['engine']; + + $client['tunnel_network'] = $pconfig['tunnel_network']; + $client['tunnel_networkv6'] = $pconfig['tunnel_networkv6']; + $client['remote_network'] = $pconfig['remote_network']; + $client['remote_networkv6'] = $pconfig['remote_networkv6']; + $client['use_shaper'] = $pconfig['use_shaper']; + $client['compression'] = $pconfig['compression']; + $client['passtos'] = $pconfig['passtos']; + + $client['no_tun_ipv6'] = $pconfig['no_tun_ipv6']; + $client['route_no_pull'] = $pconfig['route_no_pull']; + $client['route_no_exec'] = $pconfig['route_no_exec']; + $client['verbosity_level'] = $pconfig['verbosity_level']; + + if (isset($id) && $a_client[$id]) { + $a_client[$id] = $client; + } else { + $a_client[] = $client; + } + + openvpn_resync('client', $client); + write_config(); + + header("Location: vpn_openvpn_client.php"); + exit; + } +} + +include("head.inc"); + +?> + +"> + + + + + + + + + + +
                              + +
                              + + + +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + + + + + +
                              + + /> + +   + +
                              +
                              +
                              + . +
                              + +
                              + +
                              + +
                              +
                              +
                              + +
                              + +
                              + +
                              + +
                              + +
                              + +
                              + + + + + +
                              + +   :  + + + +
                              +
                              + + + + + + + + + + +
                              + + + + + +
                              + + /> + + + + +
                              + . +
                              + +
                              + . +
                              + +
                              + + + + + + + + + +
                              + +   :  + + + +
                              + +   :  + + + +
                              +
                              + + + + + +
                              + + onclick="tlsauth_change()" /> + + + . + +
                              + + + + + + +
                              + + onclick="autotls_change()" /> + + + . + +
                              + + + + + +
                              + +
                              + . +
                              +
                              + + + + No Certificate Authorities defined.
                              Create one under System > Cert Manager. + +
                              + + + No Certificates defined.
                              Create one under System > Cert Manager if one is required for this connection. + +
                              + + + + + + +
                              + + onclick="autokey_change()" /> + + + . + +
                              + + + + + +
                              + +
                              + . +
                              +
                              + +
                              + +
                              +
                              + +
                              + +
                              + . +
                              + +
                              + . +
                              + +
                              + . +
                              + +
                              + . +
                              + +
                              + . +
                              + +
                              + . +
                              + + + + + +
                              + + /> + + + . + +
                              +
                              + + + + + +
                              + + /> + + + . + +
                              +
                              + + + + + +
                              + + /> + + + . + +
                              +
                              + + + + + +
                              + + /> + + + --route-up . + +
                              +
                              + + + + + + + + + + + + + + + + + + +
                              + + + + +
                              +
                              +
                              + remote server.example.com 1194; or remote 1.2.3.4 1194; +
                              +
                              + +
                              + .

                              + none -- .
                              + default-4 -- .
                              + 5 -- .
                              + 6-11 -- . +
                              + +
                              + + + + + +
                                + " /> + + + + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + " width="17" height="17" border="0" alt="add" /> + +
                              +

                              + +

                              +
                              + + + + + + + + + + " width="17" height="17" border="0" alt="edit" /> + +   + ')"> + " width="17" height="17" border="0" alt="delete" /> + +
                              + + + +
                              + + + + + + diff --git a/src/usr/local/www/vpn_openvpn_csc.php b/src/usr/local/www/vpn_openvpn_csc.php new file mode 100644 index 0000000..356db7f --- /dev/null +++ b/src/usr/local/www/vpn_openvpn_csc.php @@ -0,0 +1,868 @@ +"; +} + +if ($_GET['act'] == "edit") { + + if (isset($id) && $a_csc[$id]) { + $pconfig['custom_options'] = $a_csc[$id]['custom_options']; + $pconfig['disable'] = isset($a_csc[$id]['disable']); + $pconfig['common_name'] = $a_csc[$id]['common_name']; + $pconfig['block'] = $a_csc[$id]['block']; + $pconfig['description'] = $a_csc[$id]['description']; + + $pconfig['tunnel_network'] = $a_csc[$id]['tunnel_network']; + $pconfig['local_network'] = $a_csc[$id]['local_network']; + $pconfig['local_networkv6'] = $a_csc[$id]['local_networkv6']; + $pconfig['remote_network'] = $a_csc[$id]['remote_network']; + $pconfig['remote_networkv6'] = $a_csc[$id]['remote_networkv6']; + $pconfig['gwredir'] = $a_csc[$id]['gwredir']; + + $pconfig['push_reset'] = $a_csc[$id]['push_reset']; + + $pconfig['dns_domain'] = $a_csc[$id]['dns_domain']; + if ($pconfig['dns_domain']) { + $pconfig['dns_domain_enable'] = true; + } + + $pconfig['dns_server1'] = $a_csc[$id]['dns_server1']; + $pconfig['dns_server2'] = $a_csc[$id]['dns_server2']; + $pconfig['dns_server3'] = $a_csc[$id]['dns_server3']; + $pconfig['dns_server4'] = $a_csc[$id]['dns_server4']; + if ($pconfig['dns_server1'] || + $pconfig['dns_server2'] || + $pconfig['dns_server3'] || + $pconfig['dns_server4']) { + $pconfig['dns_server_enable'] = true; + } + + $pconfig['ntp_server1'] = $a_csc[$id]['ntp_server1']; + $pconfig['ntp_server2'] = $a_csc[$id]['ntp_server2']; + if ($pconfig['ntp_server1'] || + $pconfig['ntp_server2']) { + $pconfig['ntp_server_enable'] = true; + } + + $pconfig['netbios_enable'] = $a_csc[$id]['netbios_enable']; + $pconfig['netbios_ntype'] = $a_csc[$id]['netbios_ntype']; + $pconfig['netbios_scope'] = $a_csc[$id]['netbios_scope']; + + $pconfig['wins_server1'] = $a_csc[$id]['wins_server1']; + $pconfig['wins_server2'] = $a_csc[$id]['wins_server2']; + if ($pconfig['wins_server1'] || + $pconfig['wins_server2']) { + $pconfig['wins_server_enable'] = true; + } + + $pconfig['nbdd_server1'] = $a_csc[$id]['nbdd_server1']; + if ($pconfig['nbdd_server1']) { + $pconfig['nbdd_server_enable'] = true; + } + } +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if ($result = openvpn_validate_cidr($pconfig['tunnel_network'], 'Tunnel network')) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['local_network'], 'IPv4 Local Network', true, "ipv4")) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['local_networkv6'], 'IPv6 Local Network', true, "ipv6")) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['remote_network'], 'IPv4 Remote Network', true, "ipv4")) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['remote_networkv6'], 'IPv6 Remote Network', true, "ipv6")) { + $input_errors[] = $result; + } + + if ($pconfig['dns_server_enable']) { + if (!empty($pconfig['dns_server1']) && !is_ipaddr(trim($pconfig['dns_server1']))) { + $input_errors[] = gettext("The field 'DNS Server #1' must contain a valid IP address"); + } + if (!empty($pconfig['dns_server2']) && !is_ipaddr(trim($pconfig['dns_server2']))) { + $input_errors[] = gettext("The field 'DNS Server #2' must contain a valid IP address"); + } + if (!empty($pconfig['dns_server3']) && !is_ipaddr(trim($pconfig['dns_server3']))) { + $input_errors[] = gettext("The field 'DNS Server #3' must contain a valid IP address"); + } + if (!empty($pconfig['dns_server4']) && !is_ipaddr(trim($pconfig['dns_server4']))) { + $input_errors[] = gettext("The field 'DNS Server #4' must contain a valid IP address"); + } + } + + if ($pconfig['ntp_server_enable']) { + if (!empty($pconfig['ntp_server1']) && !is_ipaddr(trim($pconfig['ntp_server1']))) { + $input_errors[] = gettext("The field 'NTP Server #1' must contain a valid IP address"); + } + if (!empty($pconfig['ntp_server2']) && !is_ipaddr(trim($pconfig['ntp_server2']))) { + $input_errors[] = gettext("The field 'NTP Server #2' must contain a valid IP address"); + } + if (!empty($pconfig['ntp_server3']) && !is_ipaddr(trim($pconfig['ntp_server3']))) { + $input_errors[] = gettext("The field 'NTP Server #3' must contain a valid IP address"); + } + if (!empty($pconfig['ntp_server4']) && !is_ipaddr(trim($pconfig['ntp_server4']))) { + $input_errors[] = gettext("The field 'NTP Server #4' must contain a valid IP address"); + } + } + + if ($pconfig['netbios_enable']) { + if ($pconfig['wins_server_enable']) { + if (!empty($pconfig['wins_server1']) && !is_ipaddr(trim($pconfig['wins_server1']))) { + $input_errors[] = gettext("The field 'WINS Server #1' must contain a valid IP address"); + } + if (!empty($pconfig['wins_server2']) && !is_ipaddr(trim($pconfig['wins_server2']))) { + $input_errors[] = gettext("The field 'WINS Server #2' must contain a valid IP address"); + } + } + if ($pconfig['nbdd_server_enable']) { + if (!empty($pconfig['nbdd_server1']) && !is_ipaddr(trim($pconfig['nbdd_server1']))) { + $input_errors[] = gettext("The field 'NetBIOS Data Distribution Server #1' must contain a valid IP address"); + } + } + } + + $reqdfields[] = 'common_name'; + $reqdfieldsn[] = 'Common name'; + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (!$input_errors) { + + $csc = array(); + + $csc['custom_options'] = $pconfig['custom_options']; + if ($_POST['disable'] == "yes") { + $csc['disable'] = true; + } + $csc['common_name'] = $pconfig['common_name']; + $csc['block'] = $pconfig['block']; + $csc['description'] = $pconfig['description']; + + $csc['tunnel_network'] = $pconfig['tunnel_network']; + $csc['local_network'] = $pconfig['local_network']; + $csc['local_networkv6'] = $pconfig['local_networkv6']; + $csc['remote_network'] = $pconfig['remote_network']; + $csc['remote_networkv6'] = $pconfig['remote_networkv6']; + $csc['gwredir'] = $pconfig['gwredir']; + + $csc['push_reset'] = $pconfig['push_reset']; + + if ($pconfig['dns_domain_enable']) { + $csc['dns_domain'] = $pconfig['dns_domain']; + } + + if ($pconfig['dns_server_enable']) { + $csc['dns_server1'] = $pconfig['dns_server1']; + $csc['dns_server2'] = $pconfig['dns_server2']; + $csc['dns_server3'] = $pconfig['dns_server3']; + $csc['dns_server4'] = $pconfig['dns_server4']; + } + + if ($pconfig['ntp_server_enable']) { + $csc['ntp_server1'] = $pconfig['ntp_server1']; + $csc['ntp_server2'] = $pconfig['ntp_server2']; + } + + $csc['netbios_enable'] = $pconfig['netbios_enable']; + $csc['netbios_ntype'] = $pconfig['netbios_ntype']; + $csc['netbios_scope'] = $pconfig['netbios_scope']; + + if ($pconfig['netbios_enable']) { + + if ($pconfig['wins_server_enable']) { + $csc['wins_server1'] = $pconfig['wins_server1']; + $csc['wins_server2'] = $pconfig['wins_server2']; + } + + if ($pconfig['dns_server_enable']) { + $csc['nbdd_server1'] = $pconfig['nbdd_server1']; + } + } + + if (isset($id) && $a_csc[$id]) { + $old_csc_cn = $a_csc[$id]['common_name']; + $a_csc[$id] = $csc; + } else { + $a_csc[] = $csc; + } + + if (!empty($old_csc_cn)) { + openvpn_cleanup_csc($old_csc_cn); + } + openvpn_resync_csc($csc); + write_config(); + + header("Location: vpn_openvpn_csc.php"); + exit; + } +} + +include("head.inc"); + +?> + +"> + + + + + + + + + + +
                              + +
                              + + + +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + + + + + +
                              + + /> + +   + +
                              +
                              +
                              + . +
                              + +
                              + . +
                              + +
                              + . +
                              + + + + + +
                              + + /> + + + . + +
                              + . +
                              + +
                              + . +
                              + +
                              + +
                              +
                              + +
                              + +
                              +
                              + +
                              + . +
                              +
                              + +
                              + . +
                              +
                              + + + + + +
                              + + /> + + + . + +
                              +
                              + + + + + +
                              + + /> + + + . + +
                              +
                              + + + + + +
                              + + onclick="dns_domain_change()" /> + + +
                              +
                              +
                              + + + + +
                              + +
                              +
                              + + + + + +
                              + + onclick="dns_server_change()" /> + + +
                              +
                              +
                              + + + + + + + + + + + + + +
                              + + #1:  + + +
                              + + #2:  + + +
                              + + #3:  + + +
                              + + #4:  + + +
                              +
                              + + + + + +
                              + + onclick="ntp_server_change()" /> + + +
                              +
                              +
                              + + + + + + + +
                              + + #1:  + + +
                              + + #2:  + + +
                              +
                              + + + + + +
                              + + onclick="netbios_change()" /> + + +
                              +
                              +
                              + . +
                              + + + + + + + +
                              +
                              + + :  + + +
                              + . +
                              +
                              + + Scope ID:  + + +
                              + . +
                              +
                              + + + + + +
                              + + onclick="wins_server_change()" /> + + +
                              +
                              +
                              + + + + + + + +
                              + + #1:  + + +
                              + + #2:  + + +
                              +
                              + + + + +
                              +
                              +
                              + ; +
                              +
                                + " /> + + + + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + + + + + + + + " width="17" height="17" border="0" alt="edit" /> + +   + ')"> + " width="17" height="17" border="0" alt="delete" /> + +
                              + " width="17" height="17" border="0" alt="add" /> + +
                              +

                              + +

                              +
                              + + + +
                              + + + + + + diff --git a/src/usr/local/www/vpn_openvpn_server.php b/src/usr/local/www/vpn_openvpn_server.php new file mode 100644 index 0000000..a7ff4ce --- /dev/null +++ b/src/usr/local/www/vpn_openvpn_server.php @@ -0,0 +1,2042 @@ + $acrl) { + if (!isset($acrl['refid'])) { + unset ($a_crl[$cid]); + } +} + +if (is_numericint($_GET['id'])) { + $id = $_GET['id']; +} +if (isset($_POST['id']) && is_numericint($_POST['id'])) { + $id = $_POST['id']; +} + +$act = $_GET['act']; +if (isset($_POST['act'])) { + $act = $_POST['act']; +} + +if (isset($id) && $a_server[$id]) { + $vpnid = $a_server[$id]['vpnid']; +} else { + $vpnid = 0; +} + +if ($_GET['act'] == "del") { + + if (!isset($a_server[$id])) { + pfSenseHeader("vpn_openvpn_server.php"); + exit; + } + if (!empty($a_server[$id])) { + openvpn_delete('server', $a_server[$id]); + } + unset($a_server[$id]); + write_config(); + $savemsg = gettext("Server successfully deleted")."
                              "; +} + +if ($_GET['act'] == "new") { + $pconfig['autokey_enable'] = "yes"; + $pconfig['tlsauth_enable'] = "yes"; + $pconfig['autotls_enable'] = "yes"; + $pconfig['dh_length'] = 1024; + $pconfig['dev_mode'] = "tun"; + $pconfig['interface'] = "wan"; + $pconfig['local_port'] = openvpn_port_next('UDP'); + $pconfig['pool_enable'] = "yes"; + $pconfig['cert_depth'] = 1; + $pconfig['verbosity_level'] = 1; // Default verbosity is 1 + // OpenVPN Defaults to SHA1 + $pconfig['digest'] = "SHA1"; +} + +if ($_GET['act'] == "edit") { + + if (isset($id) && $a_server[$id]) { + $pconfig['disable'] = isset($a_server[$id]['disable']); + $pconfig['mode'] = $a_server[$id]['mode']; + $pconfig['protocol'] = $a_server[$id]['protocol']; + $pconfig['authmode'] = $a_server[$id]['authmode']; + $pconfig['dev_mode'] = $a_server[$id]['dev_mode']; + $pconfig['interface'] = $a_server[$id]['interface']; + if (!empty($a_server[$id]['ipaddr'])) { + $pconfig['interface'] = $pconfig['interface'] . '|' . $a_server[$id]['ipaddr']; + } + $pconfig['local_port'] = $a_server[$id]['local_port']; + $pconfig['description'] = $a_server[$id]['description']; + $pconfig['custom_options'] = $a_server[$id]['custom_options']; + + if ($pconfig['mode'] != "p2p_shared_key") { + if ($a_server[$id]['tls']) { + $pconfig['tlsauth_enable'] = "yes"; + $pconfig['tls'] = base64_decode($a_server[$id]['tls']); + } + $pconfig['caref'] = $a_server[$id]['caref']; + $pconfig['crlref'] = $a_server[$id]['crlref']; + $pconfig['certref'] = $a_server[$id]['certref']; + $pconfig['dh_length'] = $a_server[$id]['dh_length']; + if (isset($a_server[$id]['cert_depth'])) { + $pconfig['cert_depth'] = $a_server[$id]['cert_depth']; + } else { + $pconfig['cert_depth'] = 1; + } + if ($pconfig['mode'] == "server_tls_user") { + $pconfig['strictusercn'] = $a_server[$id]['strictusercn']; + } + } else { + $pconfig['shared_key'] = base64_decode($a_server[$id]['shared_key']); + } + $pconfig['crypto'] = $a_server[$id]['crypto']; + // OpenVPN Defaults to SHA1 if unset + $pconfig['digest'] = !empty($a_server[$id]['digest']) ? $a_server[$id]['digest'] : "SHA1"; + $pconfig['engine'] = $a_server[$id]['engine']; + + $pconfig['tunnel_network'] = $a_server[$id]['tunnel_network']; + $pconfig['tunnel_networkv6'] = $a_server[$id]['tunnel_networkv6']; + + $pconfig['remote_network'] = $a_server[$id]['remote_network']; + $pconfig['remote_networkv6'] = $a_server[$id]['remote_networkv6']; + $pconfig['gwredir'] = $a_server[$id]['gwredir']; + $pconfig['local_network'] = $a_server[$id]['local_network']; + $pconfig['local_networkv6'] = $a_server[$id]['local_networkv6']; + $pconfig['maxclients'] = $a_server[$id]['maxclients']; + $pconfig['compression'] = $a_server[$id]['compression']; + $pconfig['passtos'] = $a_server[$id]['passtos']; + $pconfig['client2client'] = $a_server[$id]['client2client']; + + $pconfig['dynamic_ip'] = $a_server[$id]['dynamic_ip']; + $pconfig['pool_enable'] = $a_server[$id]['pool_enable']; + $pconfig['topology_subnet'] = $a_server[$id]['topology_subnet']; + + $pconfig['serverbridge_dhcp'] = $a_server[$id]['serverbridge_dhcp']; + $pconfig['serverbridge_interface'] = $a_server[$id]['serverbridge_interface']; + $pconfig['serverbridge_dhcp_start'] = $a_server[$id]['serverbridge_dhcp_start']; + $pconfig['serverbridge_dhcp_end'] = $a_server[$id]['serverbridge_dhcp_end']; + + $pconfig['dns_domain'] = $a_server[$id]['dns_domain']; + if ($pconfig['dns_domain']) { + $pconfig['dns_domain_enable'] = true; + } + + $pconfig['dns_server1'] = $a_server[$id]['dns_server1']; + $pconfig['dns_server2'] = $a_server[$id]['dns_server2']; + $pconfig['dns_server3'] = $a_server[$id]['dns_server3']; + $pconfig['dns_server4'] = $a_server[$id]['dns_server4']; + if ($pconfig['dns_server1'] || + $pconfig['dns_server2'] || + $pconfig['dns_server3'] || + $pconfig['dns_server4']) { + $pconfig['dns_server_enable'] = true; + } + + $pconfig['ntp_server1'] = $a_server[$id]['ntp_server1']; + $pconfig['ntp_server2'] = $a_server[$id]['ntp_server2']; + if ($pconfig['ntp_server1'] || + $pconfig['ntp_server2']) { + $pconfig['ntp_server_enable'] = true; + } + + $pconfig['netbios_enable'] = $a_server[$id]['netbios_enable']; + $pconfig['netbios_ntype'] = $a_server[$id]['netbios_ntype']; + $pconfig['netbios_scope'] = $a_server[$id]['netbios_scope']; + + $pconfig['wins_server1'] = $a_server[$id]['wins_server1']; + $pconfig['wins_server2'] = $a_server[$id]['wins_server2']; + if ($pconfig['wins_server1'] || + $pconfig['wins_server2']) { + $pconfig['wins_server_enable'] = true; + } + + $pconfig['client_mgmt_port'] = $a_server[$id]['client_mgmt_port']; + if ($pconfig['client_mgmt_port']) { + $pconfig['client_mgmt_port_enable'] = true; + } + + $pconfig['nbdd_server1'] = $a_server[$id]['nbdd_server1']; + if ($pconfig['nbdd_server1']) { + $pconfig['nbdd_server_enable'] = true; + } + + // just in case the modes switch + $pconfig['autokey_enable'] = "yes"; + $pconfig['autotls_enable'] = "yes"; + + $pconfig['duplicate_cn'] = isset($a_server[$id]['duplicate_cn']); + + $pconfig['no_tun_ipv6'] = $a_server[$id]['no_tun_ipv6']; + if (isset($a_server[$id]['verbosity_level'])) { + $pconfig['verbosity_level'] = $a_server[$id]['verbosity_level']; + } else { + $pconfig['verbosity_level'] = 1; // Default verbosity is 1 + } + + $pconfig['push_register_dns'] = $a_server[$id]['push_register_dns']; + } +} +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + if (isset($id) && $a_server[$id]) { + $vpnid = $a_server[$id]['vpnid']; + } else { + $vpnid = 0; + } + + list($iv_iface, $iv_ip) = explode ("|", $pconfig['interface']); + if (is_ipaddrv4($iv_ip) && (stristr($pconfig['protocol'], "6") !== false)) { + $input_errors[] = gettext("Protocol and IP address families do not match. You cannot select an IPv6 protocol and an IPv4 IP address."); + } elseif (is_ipaddrv6($iv_ip) && (stristr($pconfig['protocol'], "6") === false)) { + $input_errors[] = gettext("Protocol and IP address families do not match. You cannot select an IPv4 protocol and an IPv6 IP address."); + } elseif ((stristr($pconfig['protocol'], "6") === false) && !get_interface_ip($iv_iface) && ($pconfig['interface'] != "any")) { + $input_errors[] = gettext("An IPv4 protocol was selected, but the selected interface has no IPv4 address."); + } elseif ((stristr($pconfig['protocol'], "6") !== false) && !get_interface_ipv6($iv_iface) && ($pconfig['interface'] != "any")) { + $input_errors[] = gettext("An IPv6 protocol was selected, but the selected interface has no IPv6 address."); + } + + if ($pconfig['mode'] != "p2p_shared_key") { + $tls_mode = true; + } else { + $tls_mode = false; + } + + if (empty($pconfig['authmode']) && (($pconfig['mode'] == "server_user") || ($pconfig['mode'] == "server_tls_user"))) { + $input_errors[] = gettext("You must select a Backend for Authentication if the server mode requires User Auth."); + } + + /* input validation */ + if ($result = openvpn_validate_port($pconfig['local_port'], 'Local port')) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['tunnel_network'], 'IPv4 Tunnel Network', false, "ipv4")) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['tunnel_networkv6'], 'IPv6 Tunnel Network', false, "ipv6")) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['remote_network'], 'IPv4 Remote Network', true, "ipv4")) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['remote_networkv6'], 'IPv6 Remote Network', true, "ipv6")) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['local_network'], 'IPv4 Local Network', true, "ipv4")) { + $input_errors[] = $result; + } + + if ($result = openvpn_validate_cidr($pconfig['local_networkv6'], 'IPv6 Local Network', true, "ipv6")) { + $input_errors[] = $result; + } + + $portused = openvpn_port_used($pconfig['protocol'], $pconfig['interface'], $pconfig['local_port'], $vpnid); + if (($portused != $vpnid) && ($portused != 0)) { + $input_errors[] = gettext("The specified 'Local port' is in use. Please select another value"); + } + + if ($pconfig['autokey_enable']) { + $pconfig['shared_key'] = openvpn_create_key(); + } + + if (!$tls_mode && !$pconfig['autokey_enable']) { + if (!strstr($pconfig['shared_key'], "-----BEGIN OpenVPN Static key V1-----") || + !strstr($pconfig['shared_key'], "-----END OpenVPN Static key V1-----")) { + $input_errors[] = gettext("The field 'Shared Key' does not appear to be valid"); + } + } + + if ($tls_mode && $pconfig['tlsauth_enable'] && !$pconfig['autotls_enable']) { + if (!strstr($pconfig['tls'], "-----BEGIN OpenVPN Static key V1-----") || + !strstr($pconfig['tls'], "-----END OpenVPN Static key V1-----")) { + $input_errors[] = gettext("The field 'TLS Authentication Key' does not appear to be valid"); + } + } + + if ($pconfig['dns_server_enable']) { + if (!empty($pconfig['dns_server1']) && !is_ipaddr(trim($pconfig['dns_server1']))) { + $input_errors[] = gettext("The field 'DNS Server #1' must contain a valid IP address"); + } + if (!empty($pconfig['dns_server2']) && !is_ipaddr(trim($pconfig['dns_server2']))) { + $input_errors[] = gettext("The field 'DNS Server #2' must contain a valid IP address"); + } + if (!empty($pconfig['dns_server3']) && !is_ipaddr(trim($pconfig['dns_server3']))) { + $input_errors[] = gettext("The field 'DNS Server #3' must contain a valid IP address"); + } + if (!empty($pconfig['dns_server4']) && !is_ipaddr(trim($pconfig['dns_server4']))) { + $input_errors[] = gettext("The field 'DNS Server #4' must contain a valid IP address"); + } + } + + if ($pconfig['ntp_server_enable']) { + if (!empty($pconfig['ntp_server1']) && !is_ipaddr(trim($pconfig['ntp_server1']))) { + $input_errors[] = gettext("The field 'NTP Server #1' must contain a valid IP address"); + } + if (!empty($pconfig['ntp_server2']) && !is_ipaddr(trim($pconfig['ntp_server2']))) { + $input_errors[] = gettext("The field 'NTP Server #2' must contain a valid IP address"); + } + if (!empty($pconfig['ntp_server3']) && !is_ipaddr(trim($pconfig['ntp_server3']))) { + $input_errors[] = gettext("The field 'NTP Server #3' must contain a valid IP address"); + } + if (!empty($pconfig['ntp_server4']) && !is_ipaddr(trim($pconfig['ntp_server4']))) { + $input_errors[] = gettext("The field 'NTP Server #4' must contain a valid IP address"); + } + } + + if ($pconfig['netbios_enable']) { + if ($pconfig['wins_server_enable']) { + if (!empty($pconfig['wins_server1']) && !is_ipaddr(trim($pconfig['wins_server1']))) { + $input_errors[] = gettext("The field 'WINS Server #1' must contain a valid IP address"); + } + if (!empty($pconfig['wins_server2']) && !is_ipaddr(trim($pconfig['wins_server2']))) { + $input_errors[] = gettext("The field 'WINS Server #2' must contain a valid IP address"); + } + } + if ($pconfig['nbdd_server_enable']) { + if (!empty($pconfig['nbdd_server1']) && !is_ipaddr(trim($pconfig['nbdd_server1']))) { + $input_errors[] = gettext("The field 'NetBIOS Data Distribution Server #1' must contain a valid IP address"); + } + } + } + + if ($pconfig['client_mgmt_port_enable']) { + if ($result = openvpn_validate_port($pconfig['client_mgmt_port'], 'Client management port')) { + $input_errors[] = $result; + } + } + + if ($pconfig['maxclients'] && !is_numeric($pconfig['maxclients'])) { + $input_errors[] = gettext("The field 'Concurrent connections' must be numeric."); + } + + /* If we are not in shared key mode, then we need the CA/Cert. */ + if ($pconfig['mode'] != "p2p_shared_key") { + $reqdfields = explode(" ", "caref certref"); + $reqdfieldsn = array(gettext("Certificate Authority"), gettext("Certificate")); + } elseif (!$pconfig['autokey_enable']) { + /* We only need the shared key filled in if we are in shared key mode and autokey is not selected. */ + $reqdfields = array('shared_key'); + $reqdfieldsn = array(gettext('Shared key')); + } + + if ($pconfig['dev_mode'] != "tap") { + $reqdfields[] = 'tunnel_network'; + $reqdfieldsn[] = gettext('Tunnel network'); + } else { + if ($pconfig['serverbridge_dhcp'] && $pconfig['tunnel_network']) { + $input_errors[] = gettext("Using a tunnel network and server bridge settings together is not allowed."); + } + if (($pconfig['serverbridge_dhcp_start'] && !$pconfig['serverbridge_dhcp_end']) || + (!$pconfig['serverbridge_dhcp_start'] && $pconfig['serverbridge_dhcp_end'])) { + $input_errors[] = gettext("Server Bridge DHCP Start and End must both be empty, or defined."); + } + if (($pconfig['serverbridge_dhcp_start'] && !is_ipaddrv4($pconfig['serverbridge_dhcp_start']))) { + $input_errors[] = gettext("Server Bridge DHCP Start must be an IPv4 address."); + } + if (($pconfig['serverbridge_dhcp_end'] && !is_ipaddrv4($pconfig['serverbridge_dhcp_end']))) { + $input_errors[] = gettext("Server Bridge DHCP End must be an IPv4 address."); + } + if (ip2ulong($pconfig['serverbridge_dhcp_start']) > ip2ulong($pconfig['serverbridge_dhcp_end'])) { + $input_errors[] = gettext("The Server Bridge DHCP range is invalid (start higher than end)."); + } + } + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (!$input_errors) { + + $server = array(); + + if ($id && $pconfig['dev_mode'] <> $a_server[$id]['dev_mode']) { + openvpn_delete('server', $a_server[$id]);// delete(rename) old interface so a new TUN or TAP interface can be created. + } + + if ($vpnid) { + $server['vpnid'] = $vpnid; + } else { + $server['vpnid'] = openvpn_vpnid_next(); + } + + if ($_POST['disable'] == "yes") { + $server['disable'] = true; + } + $server['mode'] = $pconfig['mode']; + if (!empty($pconfig['authmode']) && (($pconfig['mode'] == "server_user") || ($pconfig['mode'] == "server_tls_user"))) { + $server['authmode'] = implode(",", $pconfig['authmode']); + } + $server['protocol'] = $pconfig['protocol']; + $server['dev_mode'] = $pconfig['dev_mode']; + list($server['interface'], $server['ipaddr']) = explode ("|", $pconfig['interface']); + $server['local_port'] = $pconfig['local_port']; + $server['description'] = $pconfig['description']; + $server['custom_options'] = str_replace("\r\n", "\n", $pconfig['custom_options']); + + if ($tls_mode) { + if ($pconfig['tlsauth_enable']) { + if ($pconfig['autotls_enable']) { + $pconfig['tls'] = openvpn_create_key(); + } + $server['tls'] = base64_encode($pconfig['tls']); + } + $server['caref'] = $pconfig['caref']; + $server['crlref'] = $pconfig['crlref']; + $server['certref'] = $pconfig['certref']; + $server['dh_length'] = $pconfig['dh_length']; + $server['cert_depth'] = $pconfig['cert_depth']; + if ($pconfig['mode'] == "server_tls_user") { + $server['strictusercn'] = $pconfig['strictusercn']; + } + } else { + $server['shared_key'] = base64_encode($pconfig['shared_key']); + } + $server['crypto'] = $pconfig['crypto']; + $server['digest'] = $pconfig['digest']; + $server['engine'] = $pconfig['engine']; + + $server['tunnel_network'] = $pconfig['tunnel_network']; + $server['tunnel_networkv6'] = $pconfig['tunnel_networkv6']; + $server['remote_network'] = $pconfig['remote_network']; + $server['remote_networkv6'] = $pconfig['remote_networkv6']; + $server['gwredir'] = $pconfig['gwredir']; + $server['local_network'] = $pconfig['local_network']; + $server['local_networkv6'] = $pconfig['local_networkv6']; + $server['maxclients'] = $pconfig['maxclients']; + $server['compression'] = $pconfig['compression']; + $server['passtos'] = $pconfig['passtos']; + $server['client2client'] = $pconfig['client2client']; + + $server['dynamic_ip'] = $pconfig['dynamic_ip']; + $server['pool_enable'] = $pconfig['pool_enable']; + $server['topology_subnet'] = $pconfig['topology_subnet']; + + $server['serverbridge_dhcp'] = $pconfig['serverbridge_dhcp']; + $server['serverbridge_interface'] = $pconfig['serverbridge_interface']; + $server['serverbridge_dhcp_start'] = $pconfig['serverbridge_dhcp_start']; + $server['serverbridge_dhcp_end'] = $pconfig['serverbridge_dhcp_end']; + + if ($pconfig['dns_domain_enable']) { + $server['dns_domain'] = $pconfig['dns_domain']; + } + + if ($pconfig['dns_server_enable']) { + $server['dns_server1'] = $pconfig['dns_server1']; + $server['dns_server2'] = $pconfig['dns_server2']; + $server['dns_server3'] = $pconfig['dns_server3']; + $server['dns_server4'] = $pconfig['dns_server4']; + } + + if ($pconfig['push_register_dns']) { + $server['push_register_dns'] = $pconfig['push_register_dns']; + } + + if ($pconfig['ntp_server_enable']) { + $server['ntp_server1'] = $pconfig['ntp_server1']; + $server['ntp_server2'] = $pconfig['ntp_server2']; + } + + $server['netbios_enable'] = $pconfig['netbios_enable']; + $server['netbios_ntype'] = $pconfig['netbios_ntype']; + $server['netbios_scope'] = $pconfig['netbios_scope']; + + $server['no_tun_ipv6'] = $pconfig['no_tun_ipv6']; + $server['verbosity_level'] = $pconfig['verbosity_level']; + + if ($pconfig['netbios_enable']) { + + if ($pconfig['wins_server_enable']) { + $server['wins_server1'] = $pconfig['wins_server1']; + $server['wins_server2'] = $pconfig['wins_server2']; + } + + if ($pconfig['dns_server_enable']) { + $server['nbdd_server1'] = $pconfig['nbdd_server1']; + } + } + + if ($pconfig['client_mgmt_port_enable']) { + $server['client_mgmt_port'] = $pconfig['client_mgmt_port']; + } + + if ($_POST['duplicate_cn'] == "yes") { + $server['duplicate_cn'] = true; + } + + if (isset($id) && $a_server[$id]) { + $a_server[$id] = $server; + } else { + $a_server[] = $server; + } + + openvpn_resync('server', $server); + write_config(); + + header("Location: vpn_openvpn_server.php"); + exit; + } + if (!empty($pconfig['authmode'])) { + $pconfig['authmode'] = implode(",", $pconfig['authmode']); + } +} +$pgtitle = array(gettext("OpenVPN"), gettext("Server")); +$shortcut_section = "openvpn"; + +include("head.inc"); + +?> + +"> + + + + + + + + + + +
                              + +
                              + + + +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + + + + + +
                              + + /> + +   + +
                              +
                              +
                              + . +
                              + +
                              + +
                              + +
                              +
                              +
                              + +
                              + +
                              + . +
                              + + + + + +
                              + + onclick="tlsauth_change()" /> + + + . + +
                              + + + + + + +
                              + + onclick="autotls_change()" /> + + + . + +
                              + + + + + +
                              + +
                              + . +
                              +
                              + + + + No Certificate Authorities defined.
                              Create one under System > Cert Manager. + +
                              + + + + No Certificate Revocation Lists (CRLs) defined.
                              Create one under System > Cert Manager. + +
                              + + + + No Certificates defined.
                              Create one under System > Cert Manager. + +
                              + + + + +
                              + + + + + + +
                              + + onclick="autokey_change()" /> + + + . + +
                              + + + + + +
                              + +
                              + . +
                              +
                              + +
                              + +
                              +
                              + +
                              + + + + + + + +
                              + +
                              + + + +
                              +
                              + + + + + +
                              + + /> + + + + +
                              +
                              + +
                              + +
                              + +
                              + +
                              + + + + + +
                              + + onchange="tuntap_change()" /> + + +
                              +
                              +
                              +
                              +
                              + +
                              + +
                              + +
                              + +
                              +
                              + + + + + +
                              + + onclick="gwredir_change()" /> + + + . + +
                              +
                              + +
                              + . +
                              + +
                              + . +
                              + +
                              + . +
                              + +
                              + . +
                              + +
                              + . +
                              + +
                              + . +
                              + + + + + +
                              + + /> + + + . + +
                              +
                              + + + + + +
                              + + /> + + + + +
                              +
                              + + + + + +
                              + + /> + + + NOTE: This is not generally recommended, but may be needed for some scenarios."); ?> + +
                              +
                              + + + + + +
                              + + /> + + + . + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + + + + + +
                              + + /> + + + .
                              +
                              +
                              +
                              + + + + + +
                              + + /> + + +
                              +
                              +
                              +
                              + + + + + + + + + +
                              + + /> + + +
                              +
                              +
                                +
                              +
                              +
                              +
                              + + + + + +
                              + + onclick="dns_domain_change()" /> + + +
                              +
                              +
                              + + + + +
                              + +
                              +
                              + + + + + +
                              + + onclick="dns_server_change()" /> + + +
                              +
                              +
                              + + + + + + + + + + + + + +
                              + + #1:  + + +
                              + + #2:  + + +
                              + + #3:  + + +
                              + + #4:  + + +
                              +
                              + + + + + +
                              + + /> + + +
                              +
                              +
                              +
                              + + + + + +
                              + + onclick="ntp_server_change()" /> + + +
                              +
                              +
                              + + + + + + + +
                              + + #1:  + + +
                              + + #2:  + + +
                              +
                              + + + + + +
                              + + onclick="netbios_change()" /> + + +
                              +
                              +
                              + . +
                              + + + + + + + +
                              +
                              + + :  + + +
                              + . +
                              +
                              + + :  + + +
                              + . +
                              +
                              + + + + + +
                              + + onclick="wins_server_change()" /> + + +
                              +
                              +
                              + + + + + + + +
                              + + #1:  + + +
                              + + #2:  + + +
                              +
                              + + + + + +
                              + + onclick="client_mgmt_port_change()" /> + + +
                              +
                              +
                              + + + + +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + +
                              + + + + +
                              +
                              +
                              + ; +
                              +
                              + +
                              + .

                              + none -- .
                              + default-4 -- .
                              + 5 -- .
                              + 6-11 -- . +
                              + +
                              + + + + + +
                                + " /> + + + + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + " width="17" height="17" border="0" alt="add" /> + +
                              + + + / + +
                              +
                              +
                              + + + + " width="17" height="17" border="0" alt="edit" /> + +   + ')"> + " width="17" height="17" border="0" alt="delete" /> + +
                              + + + + + +
                              + + + + + diff --git a/src/usr/local/www/vpn_pppoe.php b/src/usr/local/www/vpn_pppoe.php new file mode 100644 index 0000000..4ad8d72 --- /dev/null +++ b/src/usr/local/www/vpn_pppoe.php @@ -0,0 +1,167 @@ + + + + +
                              + +
                              +" . gettext("You must apply the changes in order for them to take effect."));?> + + + + + + + + + + + + + + + + + + + + + + + +
                              + + + + + +
                               " alt="add" />
                              +
                              + + + + + + +   + + + + + + +
                              " alt="edit" />')">" alt="delete" />
                              +
                              + + + + + +
                               " alt="add" />
                              +
                              +
                              + + + diff --git a/src/usr/local/www/vpn_pppoe_edit.php b/src/usr/local/www/vpn_pppoe_edit.php new file mode 100644 index 0000000..343c1f9 --- /dev/null +++ b/src/usr/local/www/vpn_pppoe_edit.php @@ -0,0 +1,671 @@ += $subnet_start) && + (ip2ulong($_POST['localip']) <= $subnet_end)) { + $input_errors[] = gettext("The specified server address lies in the remote subnet."); + } + if ($_POST['localip'] == get_interface_ip($_POST['interface'])) { + $input_errors[] = gettext("The specified server address is equal to an interface ip address."); + } + + for ($x = 0; $x < 4999; $x++) { + if ($_POST["username{$x}"]) { + if (empty($_POST["password{$x}"])) { + $input_errors[] = sprintf(gettext("No password specified for username %s"), $_POST["username{$x}"]); + } + if ($_POST["ip{$x}"] <> "" && !is_ipaddr($_POST["ip{$x}"])) { + $input_errors[] = sprintf(gettext("Incorrect ip address specified for username %s"), $_POST["username{$x}"]); + } + } + } + } + + if ($_POST['pppoeid'] && !is_numeric($_POST['pppoeid'])) { + $input_errors[] = gettext("Wrong data submitted"); + } + + if (!$input_errors) { + $pppoecfg = array(); + + $pppoecfg['remoteip'] = $_POST['remoteip']; + $pppoecfg['localip'] = $_POST['localip']; + $pppoecfg['mode'] = $_POST['mode']; + $pppoecfg['interface'] = $_POST['interface']; + $pppoecfg['n_pppoe_units'] = $_POST['n_pppoe_units']; + $pppoecfg['pppoe_subnet'] = $_POST['pppoe_subnet']; + $pppoecfg['descr'] = $_POST['descr']; + if ($_POST['radiusserver'] || $_POST['radiusserver2']) { + $pppoecfg['radius'] = array(); + + $pppoecfg['radius']['nasip'] = $_POST['radius_nasip']; + $pppoecfg['radius']['acct_update'] = $_POST['radius_acct_update']; + } + if ($_POST['radiusserver']) { + $pppoecfg['radius']['server'] = array(); + + $pppoecfg['radius']['server']['ip'] = $_POST['radiusserver']; + $pppoecfg['radius']['server']['secret'] = $_POST['radiussecret']; + $pppoecfg['radius']['server']['port'] = $_POST['radiusserverport']; + $pppoecfg['radius']['server']['acctport'] = $_POST['radiusserveracctport']; + } + if ($_POST['radiusserver2']) { + $pppoecfg['radius']['server2'] = array(); + + $pppoecfg['radius']['server2']['ip'] = $_POST['radiusserver2']; + $pppoecfg['radius']['server2']['secret2'] = $_POST['radiussecret2']; + $pppoecfg['radius']['server2']['port'] = $_POST['radiusserver2port']; + $pppoecfg['radius']['server2']['acctport'] = $_POST['radiusserver2acctport']; + } + + if ($_POST['pppoe_dns1'] <> "") { + $pppoecfg['dns1'] = $_POST['pppoe_dns1']; + } + + if ($_POST['pppoe_dns2'] <> "") { + $pppoecfg['dns2'] = $_POST['pppoe_dns2']; + } + + if ($_POST['radiusenable'] == "yes") { + $pppoecfg['radius']['server']['enable'] = true; + } + + if ($_POST['radiussecenable'] == "yes") { + $pppoecfg['radius']['server2']['enable'] = true; + } + + if ($_POST['radacct_enable'] == "yes") { + $pppoecfg['radius']['accounting'] = true; + } + + if ($_POST['radiusissueips'] == "yes") { + $pppoecfg['radius']['radiusissueips'] = true; + } + + if ($_POST['pppoeid']) { + $pppoecfg['pppoeid'] = $_POST['pppoeid']; + } else { + $pppoecfg['pppoeid'] = vpn_pppoe_get_id(); + } + + $users = array(); + for ($x = 0; $x < 4999; $x++) { + if ($_POST["username{$x}"]) { + $usernam = $_POST["username{$x}"] . ":" . base64_encode($_POST["password{$x}"]); + if ($_POST["ip{$x}"]) { + $usernam .= ":" . $_POST["ip{$x}"]; + } + $users[] = $usernam; + } + } + if (count($users) > 0) { + $pppoecfg['username'] = implode(" ", $users); + } + + if (!isset($id)) { + $id = count($a_pppoes); + } + if (file_exists("{$g['tmp_path']}/.vpn_pppoe.apply")) { + $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.vpn_pppoe.apply")); + } else { + $toapplylist = array(); + } + + $toapplylist[] = $pppoecfg['pppoeid']; + $a_pppoes[$id] = $pppoecfg; + + write_config(); + mark_subsystem_dirty('vpnpppoe'); + file_put_contents("{$g['tmp_path']}/.vpn_pppoe.apply", serialize($toapplylist)); + header("Location: vpn_pppoe.php"); + exit; + } +} + +$pgtitle = array(gettext("Services"), gettext("PPPoE Server"), gettext("Edit")); +$shortcut_section = "pppoes"; +include("head.inc"); + +?> + + + + + + + + + + + + +
                              + + + + + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                + /> + +
                                + /> + +
                              + +
                              + +
                              + +
                              : 24 255.255.255.0 +
                              + +
                              +
                              + +
                              + . +
                              + . +
                              +
                              + . +
                              + +
                              + .
                              +
                              + +
                              +
                              + +
                              + +
                              +
                              +
                              + /> +
                              +
                              .
                              +
                              + /> +
                              +
                              +
                              .
                              + /> +
                              + +
                              + +

                              +
                              + +
                              +
                              + /> +
                              . +
                              + + + +

                              +
                              +
                              + +
                              . +
                              + + + +

                              +
                              +
                              + +
                              + . +
                              + + + + + + + + ""): + $item = explode(" ", $usernames); + foreach ($item as $ww): + $wws = explode(":", $ww); + $user = $wws[0]; + $passwd = base64_decode($wws[1]); + $ip = $wws[2]; + $tracker = $counter; +?> + + + + + + + + +
                              + + + + + + + delete +
                              + + " /> + +
                                +"; + } +?> +"; + } +?> + " onclick="enable_change(true)" /> + " /> +
                                + + :
                              + ! +
                              +
                              +
                              +
                              +
                              + + + + diff --git a/src/usr/local/www/vpn_pptp.php b/src/usr/local/www/vpn_pptp.php new file mode 100644 index 0000000..b6ded68 --- /dev/null +++ b/src/usr/local/www/vpn_pptp.php @@ -0,0 +1,504 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-vpn-vpnpptp +##|*NAME=VPN: VPN PPTP page +##|*DESCR=Allow access to the 'VPN: VPN PPTP' page. +##|*MATCH=vpn_pptp.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("functions.inc"); +require_once("filter.inc"); +require_once("shaper.inc"); +require_once("vpn.inc"); + +if (!is_array($config['pptpd']['radius'])) { + $config['pptpd']['radius'] = array(); +} +$pptpcfg = &$config['pptpd']; + +$pconfig['remoteip'] = $pptpcfg['remoteip']; +$pconfig['localip'] = $pptpcfg['localip']; +$pconfig['redir'] = $pptpcfg['redir']; +$pconfig['mode'] = $pptpcfg['mode']; +$pconfig['wins'] = $pptpcfg['wins']; +$pconfig['req128'] = isset($pptpcfg['req128']); +$pconfig['n_pptp_units'] = $pptpcfg['n_pptp_units']; +$pconfig['pptp_dns1'] = $pptpcfg['dns1']; +$pconfig['pptp_dns2'] = $pptpcfg['dns2']; +$pconfig['radiusenable'] = isset($pptpcfg['radius']['server']['enable']); +$pconfig['radiusissueips'] = isset($pptpcfg['radius']['radiusissueips']); +$pconfig['radiussecenable'] = isset($pptpcfg['radius']['server2']['enable']); +$pconfig['radacct_enable'] = isset($pptpcfg['radius']['accounting']); +$pconfig['radiusserver'] = $pptpcfg['radius']['server']['ip']; +$pconfig['radiusserverport'] = $pptpcfg['radius']['server']['port']; +$pconfig['radiusserveracctport'] = $pptpcfg['radius']['server']['acctport']; +$pconfig['radiussecret'] = $pptpcfg['radius']['server']['secret']; +$pconfig['radiusserver2'] = $pptpcfg['radius']['server2']['ip']; +$pconfig['radiusserver2port'] = $pptpcfg['radius']['server2']['port']; +$pconfig['radiusserver2acctport'] = $pptpcfg['radius']['server2']['acctport']; +$pconfig['radiussecret2'] = $pptpcfg['radius']['server2']['secret2']; +$pconfig['radius_acct_update'] = $pptpcfg['radius']['acct_update']; +$pconfig['radius_nasip'] = $pptpcfg['radius']['nasip']; + +if ($_POST) { + + if (isset($input_errors)) + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if ($_POST['mode'] == "server") { + $reqdfields = explode(" ", "localip remoteip"); + $reqdfieldsn = array(gettext("Server address"),gettext("Remote start address")); + + if ($_POST['radiusenable']) { + $reqdfields = array_merge($reqdfields, explode(" ", "radiusserver radiussecret")); + $reqdfieldsn = array_merge($reqdfieldsn, + array(gettext("RADIUS server address"),gettext("RADIUS shared secret"))); + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (($_POST['localip'] && !is_ipaddr($_POST['localip']))) { + $input_errors[] = gettext("A valid server address must be specified."); + } + if (is_ipaddr_configured($_POST['localip'])) { + $input_errors[] = gettext("'Server address' parameter should NOT be set to any IP address currently in use on this firewall."); + } + if (!is_ipaddr($_POST['remoteip'])) { + $input_errors[] = gettext("A valid remote start address must be specified."); + } + if (($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver']))) { + $input_errors[] = gettext("A valid RADIUS server address must be specified."); + } + + if (!$input_errors) { + $subnet_start = ip2ulong($_POST['remoteip']); + $subnet_end = ip2ulong($_POST['remoteip']) + $_POST['n_pptp_units'] - 1; + + if ((ip2ulong($_POST['localip']) >= $subnet_start) && + (ip2ulong($_POST['localip']) <= $subnet_end)) { + $input_errors[] = gettext("The specified server address lies in the remote subnet."); + } + // TODO: Should this check be for any local IP address? + if ($_POST['localip'] == $config['interfaces']['lan']['ipaddr']) { + $input_errors[] = gettext("The specified server address is equal to the LAN interface address."); + } + } + } else if ($_POST['mode'] == "redir") { + $reqdfields = explode(" ", "redir"); + $reqdfieldsn = array(gettext("PPTP redirection target address")); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (($_POST['redir'] && !is_ipaddr($_POST['redir']))) { + $input_errors[] = gettext("A valid target address must be specified."); + } + } else if (isset($config['pptpd']['mode'])) { + unset($config['pptpd']['mode']); + } + + if (!$input_errors) { + $pptpcfg['remoteip'] = $_POST['remoteip']; + $pptpcfg['redir'] = $_POST['redir']; + $pptpcfg['localip'] = $_POST['localip']; + $pptpcfg['mode'] = $_POST['mode']; + $pptpcfg['wins'] = $_POST['wins']; + $pptpcfg['n_pptp_units'] = $_POST['n_pptp_units']; + $pptpcfg['radius']['server']['ip'] = $_POST['radiusserver']; + $pptpcfg['radius']['server']['port'] = $_POST['radiusserverport']; + $pptpcfg['radius']['server']['acctport'] = $_POST['radiusserveracctport']; + $pptpcfg['radius']['server']['secret'] = $_POST['radiussecret']; + $pptpcfg['radius']['server2']['ip'] = $_POST['radiusserver2']; + $pptpcfg['radius']['server2']['port'] = $_POST['radiusserver2port']; + $pptpcfg['radius']['server2']['acctport'] = $_POST['radiusserver2acctport']; + $pptpcfg['radius']['server2']['secret2'] = $_POST['radiussecret2']; + $pptpcfg['radius']['nasip'] = $_POST['radius_nasip']; + $pptpcfg['radius']['acct_update'] = $_POST['radius_acct_update']; + + if ($_POST['pptp_dns1'] == "") { + if (isset($pptpcfg['dns1'])) + unset($pptpcfg['dns1']); + } else + $pptpcfg['dns1'] = $_POST['pptp_dns1']; + + if ($_POST['pptp_dns2'] == "") { + if (isset($pptpcfg['dns2'])) + unset($pptpcfg['dns2']); + } else + $pptpcfg['dns2'] = $_POST['pptp_dns2']; + + if($_POST['req128'] == "yes") + $pptpcfg['req128'] = true; + else if (isset($pptpcfg['req128'])) + unset($pptpcfg['req128']); + + if($_POST['radiusenable'] == "yes") + $pptpcfg['radius']['server']['enable'] = true; + else if (isset($pptpcfg['radius']['server']['enable'])) + unset($pptpcfg['radius']['server']['enable']); + + if($_POST['radiussecenable'] == "yes") + $pptpcfg['radius']['server2']['enable'] = true; + else if (isset($pptpcfg['radius']['server2']['enable'])) + unset($pptpcfg['radius']['server2']['enable']); + + if($_POST['radacct_enable'] == "yes") + $pptpcfg['radius']['accounting'] = true; + else if (isset($pptpcfg['radius']['accounting'])) + unset($pptpcfg['radius']['accounting']); + + if($_POST['radiusissueips'] == "yes") { + $pptpcfg['radius']['radiusissueips'] = true; + } else if (isset($pptpcfg['radius']['radiusissueips'])) + unset($pptpcfg['radius']['radiusissueips']); + + write_config(); + + $retval = 0; + $retval = vpn_pptpd_configure(); + $savemsg = get_std_save_message($retval); + + filter_configure(); + } +} + +$pgtitle = array(gettext("VPN"),gettext("VPN PPTP")); +$shortcut_section = "pptps"; +include("head.inc"); + +?> + + + + +
                              + + +
                              Read More")); ?> + + + + + +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                + /> +
                                + + /> + :
                              + +
                              + .
                                + /> +
                              + +
                              +
                              + +
                              + . +
                              + . +
                              +
                              + .
                              + +
                              + .
                              +
                              + +
                              + +
                              +
                              +
                              + +
                              + /> +
                              + .
                              +
                              + /> +
                              +
                              .
                              +
                              + /> +
                              +
                              +
                              + /> + +
                              . +
                              + +
                              + +
                              + + + +
                              + .
                              + +
                              + .
                              + + + +
                              + .
                              + +
                              + .
                                + /> +
                              + .
                                + " onclick="enable_change(true)" /> +
                               :
                              +
                              !
                              +
                              +
                              +
                              + + + + diff --git a/src/usr/local/www/vpn_pptp_users.php b/src/usr/local/www/vpn_pptp_users.php new file mode 100644 index 0000000..553888f --- /dev/null +++ b/src/usr/local/www/vpn_pptp_users.php @@ -0,0 +1,142 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-vpn-vpnpptp-users +##|*NAME=VPN: VPN PPTP: Users page +##|*DESCR=Allow access to the 'VPN: VPN PPTP: Users' page. +##|*MATCH=vpn_pptp_users.php* +##|-PRIV + +require("guiconfig.inc"); +require_once("vpn.inc"); + +if (!is_array($config['pptpd']['user'])) { + $config['pptpd']['user'] = array(); +} +$a_secret = &$config['pptpd']['user']; + +if ($_POST) { + + $pconfig = $_POST; + + if ($_POST['apply']) { + $retval = 0; + $retval = vpn_setup(); + $savemsg = get_std_save_message($retval); + if ($retval == 0) { + if (is_subsystem_dirty('pptpusers')) + clear_subsystem_dirty('pptpusers'); + } + } +} + +if ($_GET['act'] == "del") { + if ($a_secret[$_GET['id']]) { + unset($a_secret[$_GET['id']]); + write_config(); + mark_subsystem_dirty('pptpusers'); + header("Location: vpn_pptp_users.php"); + exit; + } +} + +$pgtitle = array(gettext("VPN"),gettext("VPN PPTP"),gettext("Users")); +$shortcut_section = "pptps"; +include("head.inc"); + +?> + + + +
                              + + +
                              +".gettext("You must apply the changes in order for them to take effect").".
                              ".gettext("Warning: this will terminate all current PPTP sessions")."!");?>
                              + + + + + + +
                              +
                              + +
                              + + + + diff --git a/src/usr/local/www/vpn_pptp_users_edit.php b/src/usr/local/www/vpn_pptp_users_edit.php new file mode 100644 index 0000000..8b09a7f --- /dev/null +++ b/src/usr/local/www/vpn_pptp_users_edit.php @@ -0,0 +1,184 @@ +. + Copyright (C) 2013-2015 Electric Sheep Fencing, LP + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +##|+PRIV +##|*IDENT=page-vpn-vpnpptp-user-edit +##|*NAME=VPN: VPN PPTP: User: Edit page +##|*DESCR=Allow access to the 'VPN: VPN PPTP: User: Edit' page. +##|*MATCH=vpn_pptp_users_edit.php* +##|-PRIV + +function pptpusercmp($a, $b) { + return strcasecmp($a['name'], $b['name']); +} + +function pptpd_users_sort() { + global $config; + + if (!is_array($config['ppptpd']['user'])) + return; + + usort($config['pptpd']['user'], "pptpusercmp"); +} + +require("guiconfig.inc"); +require_once("vpn.inc"); + +if (!is_array($config['pptpd']['user'])) { + $config['pptpd']['user'] = array(); +} +$a_secret = &$config['pptpd']['user']; + +if (is_numericint($_GET['id'])) + $id = $_GET['id']; +if (isset($_POST['id']) && is_numericint($_POST['id'])) + $id = $_POST['id']; + +if (isset($id) && $a_secret[$id]) { + $pconfig['username'] = $a_secret[$id]['name']; + $pconfig['ip'] = $a_secret[$id]['ip']; +} + +if ($_POST) { + + unset($input_errors); + $pconfig = $_POST; + + /* input validation */ + if (isset($id) && ($a_secret[$id])) { + $reqdfields = explode(" ", "username"); + $reqdfieldsn = array(gettext("Username")); + } else { + $reqdfields = explode(" ", "username passwordfld1"); + $reqdfieldsn = array(gettext("Username"),gettext("Password")); + } + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors); + + if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['username'])) + $input_errors[] = gettext("The username contains invalid characters."); + + if (preg_match("/^!/", $_POST['passwordfld1'])) + $input_errors[] = gettext("The password cannot start with '!'."); + + if (!preg_match("/^[\x20-\x7E]*$/", $_POST['passwordfld1'])) + $input_errors[] = gettext("The password contains invalid characters."); + + if (($_POST['passwordfld1']) && ($_POST['passwordfld1'] != $_POST['passwordfld2'])) { + $input_errors[] = gettext("The passwords do not match."); + } + if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) { + $input_errors[] = gettext("The IP address entered is not valid."); + } + + if (!$input_errors && !(isset($id) && $a_secret[$id])) { + /* make sure there are no dupes */ + foreach ($a_secret as $secretent) { + if ($secretent['name'] == $_POST['username']) { + $input_errors[] = gettext("Another entry with the same username already exists."); + break; + } + } + } + + if (!$input_errors) { + + if (isset($id) && $a_secret[$id]) + $secretent = $a_secret[$id]; + + $secretent['name'] = $_POST['username']; + $secretent['ip'] = $_POST['ip']; + + if ($_POST['passwordfld1']) + $secretent['password'] = $_POST['passwordfld1']; + + if (isset($id) && $a_secret[$id]) + $a_secret[$id] = $secretent; + else + $a_secret[] = $secretent; + pptpd_users_sort(); + + write_config(); + mark_subsystem_dirty('pptpusers'); + + header("Location: vpn_pptp_users.php"); + exit; + } +} + +$pgtitle = array(gettext("VPN"),gettext("VPN PPTP"),gettext("User"),gettext("Edit")); +$shortcut_section = "pptps"; +include("head.inc"); + +?> + + + +
                              +
                              + + + + + + + + + + + + + + + + + +
                              + +
                              + +
                              +  ()
                              +
                              + +
                                + " /> + + + +
                              +
                              +
                              + + + diff --git a/src/usr/local/www/widgets/include/captiveportal.inc b/src/usr/local/www/widgets/include/captiveportal.inc new file mode 100644 index 0000000..3714209 --- /dev/null +++ b/src/usr/local/www/widgets/include/captiveportal.inc @@ -0,0 +1,4 @@ + diff --git a/src/usr/local/www/widgets/include/carp_status.inc b/src/usr/local/www/widgets/include/carp_status.inc new file mode 100644 index 0000000..79d3c03 --- /dev/null +++ b/src/usr/local/www/widgets/include/carp_status.inc @@ -0,0 +1,7 @@ + diff --git a/src/usr/local/www/widgets/include/dyn_dns_status.inc b/src/usr/local/www/widgets/include/dyn_dns_status.inc new file mode 100644 index 0000000..8116fe7 --- /dev/null +++ b/src/usr/local/www/widgets/include/dyn_dns_status.inc @@ -0,0 +1,7 @@ + diff --git a/src/usr/local/www/widgets/include/gateways.inc b/src/usr/local/www/widgets/include/gateways.inc new file mode 100644 index 0000000..4666689 --- /dev/null +++ b/src/usr/local/www/widgets/include/gateways.inc @@ -0,0 +1,5 @@ + diff --git a/src/usr/local/www/widgets/include/gmirror_status.inc b/src/usr/local/www/widgets/include/gmirror_status.inc new file mode 100644 index 0000000..6547d4d --- /dev/null +++ b/src/usr/local/www/widgets/include/gmirror_status.inc @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/src/usr/local/www/widgets/include/installed_packages.inc b/src/usr/local/www/widgets/include/installed_packages.inc new file mode 100644 index 0000000..a978191 --- /dev/null +++ b/src/usr/local/www/widgets/include/installed_packages.inc @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/src/usr/local/www/widgets/include/interface_statistics.inc b/src/usr/local/www/widgets/include/interface_statistics.inc new file mode 100644 index 0000000..c789418 --- /dev/null +++ b/src/usr/local/www/widgets/include/interface_statistics.inc @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/usr/local/www/widgets/include/interfaces.inc b/src/usr/local/www/widgets/include/interfaces.inc new file mode 100644 index 0000000..6c19a6b --- /dev/null +++ b/src/usr/local/www/widgets/include/interfaces.inc @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/src/usr/local/www/widgets/include/ipsec.inc b/src/usr/local/www/widgets/include/ipsec.inc new file mode 100644 index 0000000..6df0a7c --- /dev/null +++ b/src/usr/local/www/widgets/include/ipsec.inc @@ -0,0 +1,4 @@ + diff --git a/src/usr/local/www/widgets/include/load_balancer.inc b/src/usr/local/www/widgets/include/load_balancer.inc new file mode 100644 index 0000000..367ea46 --- /dev/null +++ b/src/usr/local/www/widgets/include/load_balancer.inc @@ -0,0 +1,4 @@ + diff --git a/src/usr/local/www/widgets/include/log.inc b/src/usr/local/www/widgets/include/log.inc new file mode 100644 index 0000000..7ad453a --- /dev/null +++ b/src/usr/local/www/widgets/include/log.inc @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/src/usr/local/www/widgets/include/ntp_status.inc b/src/usr/local/www/widgets/include/ntp_status.inc new file mode 100644 index 0000000..1115095 --- /dev/null +++ b/src/usr/local/www/widgets/include/ntp_status.inc @@ -0,0 +1,5 @@ + diff --git a/src/usr/local/www/widgets/include/openvpn.inc b/src/usr/local/www/widgets/include/openvpn.inc new file mode 100644 index 0000000..075d0e5 --- /dev/null +++ b/src/usr/local/www/widgets/include/openvpn.inc @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/src/usr/local/www/widgets/include/services_status.inc b/src/usr/local/www/widgets/include/services_status.inc new file mode 100644 index 0000000..685aee4 --- /dev/null +++ b/src/usr/local/www/widgets/include/services_status.inc @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/src/usr/local/www/widgets/include/smart_status.inc b/src/usr/local/www/widgets/include/smart_status.inc new file mode 100644 index 0000000..bbfa274 --- /dev/null +++ b/src/usr/local/www/widgets/include/smart_status.inc @@ -0,0 +1,5 @@ + diff --git a/src/usr/local/www/widgets/include/thermal_sensors.inc b/src/usr/local/www/widgets/include/thermal_sensors.inc new file mode 100644 index 0000000..a6e727a --- /dev/null +++ b/src/usr/local/www/widgets/include/thermal_sensors.inc @@ -0,0 +1,27 @@ +> Advanced >> Miscellaneous tab >> Thermal Sensors section. +function getThermalSensorsData() { + + $_gb = exec("/sbin/sysctl -a | grep temperature", $dfout); + $thermalSensorsData = join("|", $dfout); + return $thermalSensorsData; + +} +?> diff --git a/src/usr/local/www/widgets/include/traffic_graph.inc b/src/usr/local/www/widgets/include/traffic_graph.inc new file mode 100644 index 0000000..3901db6 --- /dev/null +++ b/src/usr/local/www/widgets/include/traffic_graph.inc @@ -0,0 +1,4 @@ + diff --git a/src/usr/local/www/widgets/include/wake_on_lan.inc b/src/usr/local/www/widgets/include/wake_on_lan.inc new file mode 100644 index 0000000..af3229c --- /dev/null +++ b/src/usr/local/www/widgets/include/wake_on_lan.inc @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/src/usr/local/www/widgets/javascript/cpu_graphs.js b/src/usr/local/www/widgets/javascript/cpu_graphs.js new file mode 100644 index 0000000..1fc690a --- /dev/null +++ b/src/usr/local/www/widgets/javascript/cpu_graphs.js @@ -0,0 +1,245 @@ +/****************************************************************************** + $Id: graphlink.js,v 1.1 2006/12/21 17:10:25 dberlin Exp $ + + This file is part of the GraphLink software. + GraphLink is distributed under the MIT License. + Copyright (C) 2005-2006 Max Khitrov + ******************************************************************************/ + +/***** Global data ************************************************************/ + +var gl_graphCount = 0; // Number of graphs on the current page + +/***** Constants **************************************************************/ + +var GL_START = 0; +var GL_END = 1; +var GL_STATIC = 0; +var GL_DYNAMIC = 1; + +/***** Public functions *******************************************************/ + +/** + * Creates a graph and returns the graph data structure which can later be + * manipulated using the other graph functions. + * + * element_id - DOM element id (should be a DIV) that will contain the graph. + * width - The width of the graph in pixels. + * height - Height of the graph in pixels. + * bar_width - Width of each bar on the graph. This number should divide width + * evenly, or else width will be adjusted to meet this requirement. + * General formula to keep in mind: + * Smaller bar width = more bars = higher CPU usage on client-side. + * + * Returns graph data structure on success, false on error. + */ +function GraphInitialize(element_id, width, height, bar_width) { + // Find the page element which will contain the graph + var owner; + if((owner = jQuery('#' + element_id)) == null) { + alert("GraphLink Error: Element ID '" + element_id + "' not found."); + return false; + } + + // Make sure width is divisible by bar_width + if(width / bar_width != Math.floor(width / bar_width)) + width = Math.floor(width / bar_width) * bar_width; + + var bar_count = width / bar_width; + + // Create the graph data structure + var graph = new Array(); + graph['id'] = gl_graphCount; // ID used to separate elements of one graph from those of another + graph['width'] = width; // Graph width + graph['height'] = height; // Graph height + graph['bar_count'] = bar_count; // Number of bars on the graph + graph['scale_type'] = GL_STATIC; // How the graph is scaled + graph['scale'] = 1; // Multiplier for the bar height + graph['max'] = 0; // Largest value currently on the graph + graph['vmax'] = height; // Virtual graph maximum + graph['spans'] = new Array(bar_count); // References to all the spans for each graph + graph['vals'] = new Array(bar_count); // The height of each bar on the graph, actually it's (graph height - bar height) + gl_graphCount++; + + // Build the graph (x)html + var graph_html = ''; + graph_html += '
                              '; + + for(var i = 0; i < bar_count; i++) { + graph['vals'][i] = height; + graph_html += ''; + } + + graph_html += '
                              '; + owner.html(graph_html); + graph['element_id'] = jQuery('#GraphLinkData' + graph['id']); + + for(i = 0; i < bar_count; i++) { + graph['spans'][i] = jQuery('#GraphLinkBar' + graph['id'] + '_' + i); + graph['spans'][i].css('width',bar_width + 'px'); + graph['spans'][i].css('margin-top',height + 'px'); + } + + return graph; +} + +/** + * Adds a new value to a graph. + * + * graph - Graph object to which to add the new value. + * value - Value to add. + * where - (optional) GL_START (0) or GL_END (1), depending on where you want + * the new value to appear. GL_START will add the value on the left + * of the graph, GL_END will add it on the right (default). + */ +function GraphValue(graph, value, where) { + if(typeof(where) == 'undefined') + where = GL_END; + + var rescale = false; + var lost = 0; + + if(value < 0) + value = 0; + + if(graph['scale_type'] == GL_DYNAMIC && value > graph['max']) + rescale = true; + + if(graph['scale_type'] == GL_STATIC) { + if(value > graph['vmax']) + value = graph['vmax']; + value = Math.round(value * graph['scale']); + } + + if(where == GL_START) { + graph['vals'].unshift(graph['height'] - value); + lost = graph['vals'].pop(); + } + else { + graph['vals'].push(graph['height'] - value); + lost = graph['vals'].shift(); + } + + if(graph['scale_type'] == GL_DYNAMIC && (graph['height'] - lost) == graph['max']) + rescale = true; + + if(rescale) + GraphAdjustScale(graph) + + GraphDraw(graph); +} + +/** + * Sets a virtual maximum for the graph allowing you to have non-scaled graphs + * that can show a value greater then the graph height. This function will + * automatically set the graph to a static scale mode, meaning that no values + * above the maximum will be permitted. If you need to have a graph with no + * pre-defined maximum, make it dynamic. Also note that if you set a vmax on a + * graph that has data larger than vmax, that data will be reduced. + * + * graph - Graph object for which to set virtual max. + * vmax - The virtual maximum value for the graph. + */ +function GraphSetVMax(graph, vmax) { + graph['scale_type'] = GL_STATIC; + graph['vmax'] = vmax; + + GraphAdjustScale(graph); + GraphDraw(graph); +} + +/** + * This function instructs the graph to be scaled according to what the maximum + * value is. That value is used as the graph maximum and is reevaluated whenever + * a new value is added, or the current maximum is removed. Dynamic scaling is a + * good way of showing data for which you don't know what the maximum will be, + * but it also is a bit more resource-intensive then statically scaled graphs. + * + * graph - Graph object for which to enable dynamic scaling. + */ +function GraphDynamicScale(graph) { + graph['scale_type'] = GL_DYNAMIC; + + GraphAdjustScale(graph); + GraphDraw(graph); +} + +/***** Private functions ******************************************************/ + +/** + * Checks if the current scale of the graph is still valid, or needs to be + * adjusted. + * + * graph - Graph object for which to check the scale. + */ +function GraphAdjustScale(graph) { + var limit = graph['bar_count']; + var new_max = 0; + var new_scale = 0; + var val = 0; + + if(graph['scale_type'] == GL_STATIC) { + new_max = graph['vmax']; + new_scale = graph['height'] / new_max; + + if(new_scale == graph['scale']) + return; + } + + for(var i = 0; i < limit; i++) { + if(graph['scale_type'] == GL_STATIC) { + val = (graph['height'] - graph['vals'][i]) * graph['scale']; + val = val * new_scale; + + if(val > new_max) + val = new_max; + + graph['vals'][i] = graph['height'] - Math.round(val * new_scale); + + } + else if((graph['height'] - graph['vals'][i]) > new_max) { + new_max = graph['height'] - graph['vals'][i]; + } + } + + + if(graph['scale_type'] == GL_STATIC) { + graph['scale'] = new_scale; + } + else { + if(new_max == 0) + graph['scale'] = 1; + else + graph['scale'] = graph['height'] / new_max; + + graph['max'] = new_max; + } +} + +/** + * Redraws the graph on the screen. + * + * graph - Graph object which needs to be re-drawn. + */ +function GraphDraw(graph) { + var count = graph['bar_count']; + + if(graph['scale_type'] == GL_STATIC) + var getMargin = function(i) { + return graph['vals'][i] + 'px'; + }; + else + var getMargin = function(i) { + var h = graph['height']; + var s = graph['scale']; + var v = graph['vals'][i]; + return (h - Math.round((h - v) * s)) + 'px'; + }; + + graph['spans'][count - 1].css("display", "none"); + + for(var i = 0; i < count; i++) + graph['spans'][i].css("marginTop", getMargin(i)); + +// jQuery('#' + graph['spans'][count - 1]).fadeIn(500); +} diff --git a/src/usr/local/www/widgets/javascript/ipsec.js b/src/usr/local/www/widgets/javascript/ipsec.js new file mode 100644 index 0000000..d38f6cd --- /dev/null +++ b/src/usr/local/www/widgets/javascript/ipsec.js @@ -0,0 +1,9 @@ +function updateIpsec() { + selectIntLink = "ipsecDetailed"; + ipsecsettings = "ipsecDetail="; + ipsecsettings += d.getElementById(selectIntLink).checked; + + selectIntLink = "ipsec-config"; + textlink = d.getElementById(selectIntLink); + textlink.value = ipsecsettings; +} \ No newline at end of file diff --git a/src/usr/local/www/widgets/javascript/thermal_sensors.js b/src/usr/local/www/widgets/javascript/thermal_sensors.js new file mode 100644 index 0000000..7415b01 --- /dev/null +++ b/src/usr/local/www/widgets/javascript/thermal_sensors.js @@ -0,0 +1,296 @@ +/* + $Id: thermal_sensors.js + Description: + Javascript functions to get and show thermal sensors data in thermal_sensors.widget.php. + NOTE: depends on proper config in System >> Advanced >> Miscellaneous tab >> Thermal Sensors section. + File location: + \usr\local\www\widgets\javascript\ + Used by: + \usr\local\www\widgets\widgets\thermal_sensors.widget.php + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + + + +//should be called from "thermal_sensors.widget.php" +function showThermalSensorsData() { + + //get data from thermal_sensors.widget.php + url = "/widgets/widgets/thermal_sensors.widget.php?getThermalSensorsData=1" + //IE fix to disable cache when using http:// , just append timespan + + new Date().getTime(); + + jQuery.ajax(url, { + type: 'get', + success: function(data) { + var thermalSensorsData = data || ""; + buildThermalSensorsData(thermalSensorsData); + }, + error: function(jqXHR, status, error) { + buildThermalSensorsDataRaw( + "Error getting data from [thermal_sensors.widget.php] - |" + + "status: [" + (status || "") + "]|" + + "error: [" + (error || "") + "]"); + } + }); + + //call itself in 11 seconds + window.setTimeout(showThermalSensorsData, 11000); +} + +function buildThermalSensorsData(thermalSensorsData) { + //NOTE: variable thermal_sensors_widget_showRawOutput is declared/set in "thermal_sensors.widget.php" + if (thermal_sensors_widget_showRawOutput) { + buildThermalSensorsDataRaw(thermalSensorsData); + } else { + buildThermalSensorsDataGraph(thermalSensorsData); + } +} + +function buildThermalSensorsDataRaw(thermalSensorsData) { + + var thermalSensorsContent = ""; + + if (thermalSensorsData && thermalSensorsData != "") { + thermalSensorsContent = thermalSensorsData.replace(/\|/g, "
                              "); + //rawData = thermalSensorsData.split("|").join("
                              "); + } + + loadThermalSensorsContainer(thermalSensorsContent); +} + +function loadThermalSensorsContainer (thermalSensorsContent) { + + if (thermalSensorsContent && thermalSensorsContent != "") { + //load generated graph (or raw data) into thermalSensorsContainer (thermalSensorsContainer DIV defined in "thermal_sensors.widget.php") + jQuery('#thermalSensorsContainer').html(thermalSensorsContent); + } else { + jQuery('#thermalSensorsContainer').html("No Thermal Sensors data available.

                              "); + jQuery('
                              ').html( + "* You can configure a proper Thermal Sensor / Module under
                              " + + "   System > Advanced > Miscellaneous : Thermal Sensors section.
                              " + ).appendTo('#thermalSensorsContainer'); + } +} + +function buildThermalSensorsDataGraph(thermalSensorsData) { + + //local constants + var normalColor = "LimeGreen"; + var normalColorShadowTop = "Lime"; + var normalColorShadowBottom = "Green"; + + var warningColor = "Orange"; + var warningColorShadowBottom = "Chocolate"; + + var criticalColor = "Red"; + var criticalColorShadowBottom = "DarkRed"; + + //local variables + var barBgColor = normalColor; //green/normal as default + var barBgColorShadowTop = normalColorShadowTop; //green/normal as default + var barBgColorShadowBottom = normalColorShadowBottom; //green/normal as default + + var thermalSensorsArray = new Array(); + + if (thermalSensorsData && thermalSensorsData != "") { + thermalSensorsArray = thermalSensorsData.split("|"); + } + + var thermalSensorsHTMLContent = ""; + var itemsToPulsate = new Array(); + + //generate graph for each temperature sensor and append to thermalSensorsHTMLContent string + for (var i = 0; i < thermalSensorsArray.length; i++) { + + var sensorDataArray = thermalSensorsArray[i].split(":"); + var sensorName = sensorDataArray[0].trim(); + var thermalSensorValue = getThermalSensorValue(sensorDataArray[1]); + + var pulsateTimes = 0; + var pulsateDuration = 0; + + var warningTempThresholdPosition = 0; + var criticalTempThresholdPosition = 0; + + //NOTE: the following variables are declared/set in "thermal_sensors.widget.php": + // thermal_sensors_widget_coreWarningTempThreshold, thermal_sensors_widget_coreCriticalTempThreshold, + // thermal_sensors_widget_zoneWarningTempThreshold, thermal_sensors_widget_zoneCriticalTempThreshold + // thermal_sensors_widget_pulsateWarning, thermal_sensors_widget_pulsateCritical + + //set graph color and pulsate parameters + if (sensorName.indexOf("cpu") > -1) { //check CPU Threshold config settings + + warningTempThresholdPosition = thermal_sensors_widget_coreWarningTempThreshold; + criticalTempThresholdPosition = thermal_sensors_widget_coreCriticalTempThreshold; + + if (thermalSensorValue < thermal_sensors_widget_coreWarningTempThreshold) { + barBgColor = normalColor; + barBgColorShadowTop = normalColorShadowTop; + barBgColorShadowBottom = normalColorShadowBottom; + pulsateTimes = 0; + pulsateDuration = 0; + } else if (thermalSensorValue >= thermal_sensors_widget_coreWarningTempThreshold && thermalSensorValue < thermal_sensors_widget_coreCriticalTempThreshold) { + barBgColor = warningColor; + barBgColorShadowTop = warningColor; + barBgColorShadowBottom = warningColorShadowBottom; + pulsateTimes = thermal_sensors_widget_pulsateWarning ? 4 : 0; + pulsateDuration = thermal_sensors_widget_pulsateWarning ? 900 : 0; + } else { // thermalSensorValue > thermal_sensors_widget_coreCriticalTempThreshold + barBgColor = criticalColor; + barBgColorShadowTop = criticalColor; + barBgColorShadowBottom = criticalColorShadowBottom; + pulsateTimes = thermal_sensors_widget_pulsateCritical ? 7 : 0; + pulsateDuration = thermal_sensors_widget_pulsateCritical ? 900 : 0; + } + } else { //assuming sensor is for a zone, check Zone Threshold config settings + + warningTempThresholdPosition = thermal_sensors_widget_zoneWarningTempThreshold; + criticalTempThresholdPosition = thermal_sensors_widget_zoneCriticalTempThreshold; + + if (thermalSensorValue < thermal_sensors_widget_zoneWarningTempThreshold) { + + barBgColor = normalColor; + barBgColorShadowTop = normalColorShadowTop; + barBgColorShadowBottom = normalColorShadowBottom; + pulsateTimes = 0; + pulsateDuration = 0; + + } else if (thermalSensorValue >= thermal_sensors_widget_zoneWarningTempThreshold && + thermalSensorValue < thermal_sensors_widget_zoneCriticalTempThreshold) { + + barBgColor = warningColor; + barBgColorShadowTop = warningColor; + barBgColorShadowBottom = warningColorShadowBottom; + pulsateTimes = thermal_sensors_widget_pulsateWarning ? 4 : 0; + pulsateDuration = thermal_sensors_widget_pulsateWarning ? 900 : 0; + + } else { // thermalSensorValue > thermal_sensors_widget_zoneCriticalTempThreshold + + barBgColor = criticalColor; + barBgColorShadowTop = criticalColor; + barBgColorShadowBottom = criticalColorShadowBottom; + pulsateTimes = thermal_sensors_widget_pulsateCritical ? 7 : 0; + pulsateDuration = thermal_sensors_widget_pulsateCritical ? 900 : 0; + } + } + + //NOTE: variable thermal_sensors_widget_showFullSensorName is declared/set in "thermal_sensors.widget.php" + if (!thermal_sensors_widget_showFullSensorName) { + sensorName = getSensorFriendlyName(sensorName); + } + + //build temperature item/row for a sensor + //NOTE: additional styles are set in 'thermal_sensors.widget.php' + var thermalSensorRow = "
                              " + + //sensor name and temperature value + "
                              " + sensorName + ":
                              " + thermalSensorValue + " °C
                              " + + //temperature bar + "
                              " + + "
                              " + + //threshold targets (warning and critical) + "
                              " + + "
                              " + + //temperature scale (max 100 C) + "
                              " + + "
                              " + + "
                              " + + "
                              " + + "
                              " + + "
                              " + + "
                              " + + "
                              " + + "
                              " + + "
                              " + + "
                              " + + "
                              100°
                              " + + "
                              " + + "
                              "; + + //collect parameters for warning/critical items we need to pulsate + if (pulsateTimes > 0) { + var params = i + "|" + barBgColor + "|" + pulsateTimes + "|" + pulsateDuration; + itemsToPulsate.push(params); + } + + //append HTML item + thermalSensorsHTMLContent = thermalSensorsHTMLContent + thermalSensorRow; + } + + //load generated graph into thermalSensorsContainer (DIV defined in "thermal_sensors.widget.php") + loadThermalSensorsContainer(thermalSensorsHTMLContent); + + if (itemsToPulsate.length > 0) { + //pulsate/flash warning/critical items we collected + pulsateThermalSensorsItems(itemsToPulsate); + } +} + +function pulsateThermalSensorsItems(itemsToPulsate) { + + //pulsate/flash warning/critical items we collected + for (var i = 0; i < itemsToPulsate.length; i++) { + + var pulsateParams = itemsToPulsate[i].split("|"); + var rowNum = parseInt(pulsateParams[0]); + //var textColor = pulsateParams[1]; + var pulsateTimes = parseInt(pulsateParams[2]); + var pulsateDuration = parseInt(pulsateParams[3]); + + //pulsate temp Value + var divThermalSensorValue = jQuery("#thermalSensorValue" + rowNum); //get temp value by id + divThermalSensorValue.effect("pulsate", { + times: pulsateTimes, + easing: 'linear' //'easeInExpo' + }, pulsateDuration); + ////set Temp Value color + //divThermalSensorValue.css({ color: textColor }); + + //pulsate temp Bar + var divThermalSensorBar = jQuery("#thermalSensorBar" + rowNum); //get temp bar by id + divThermalSensorBar.effect("pulsate", { + times: pulsateTimes, + easing: 'linear' //'easeInExpo' + }, pulsateDuration); + + } +} + +function getSensorFriendlyName(sensorFullName) { + var rzone = /^hw\.acpi\.thermal\.tz([0-9]+)\.temperature$/; + var rcore = /^dev\.cpu\.([0-9]+)\.temperature$/; + + if (rzone.test(sensorFullName)) { + return "Zone " + rzone.exec(sensorFullName)[1]; + } + + if (rcore.test(sensorFullName)) { + return "Core " + rcore.exec(sensorFullName)[1]; + } + + return sensorFullName; +} + +function getThermalSensorValue(stringValue) { + return (+parseFloat(stringValue) || 0).toFixed(1); +} diff --git a/src/usr/local/www/widgets/javascript/traffic_graph.js b/src/usr/local/www/widgets/javascript/traffic_graph.js new file mode 100644 index 0000000..383a549 --- /dev/null +++ b/src/usr/local/www/widgets/javascript/traffic_graph.js @@ -0,0 +1,41 @@ +function trafficshowDiv(incDiv,ifDescription,refreshIntervalSec,swapButtons) { + // put the graph object HTML in the element and make it appear + selectedDiv = incDiv + "graphdiv"; + jQuery('#' + selectedDiv).html( + '' + + '' + + '' + + '' + + ''); + jQuery('#' + selectedDiv).effect('blind',{mode:'show'},1000); + d = document; + if (swapButtons) { + selectIntLink = selectedDiv + "-min"; + textlink = d.getElementById(selectIntLink); + textlink.style.display = "inline"; + + selectIntLink = selectedDiv + "-open"; + textlink = d.getElementById(selectIntLink); + textlink.style.display = "none"; + } + document.traffic_graphs_widget_iform["shown[" + incDiv + "]"].value = "show"; +} + +function trafficminimizeDiv(incDiv,swapButtons) { + // remove the graph object HTML from the element (so it does not keep using CPU) and fade + selectedDiv = incDiv + "graphdiv"; + jQuery('#' + selectedDiv).html(''); + jQuery('#' + selectedDiv).effect('blind',{mode:'hide'},1000); + d = document; + if (swapButtons) { + selectIntLink = selectedDiv + "-open"; + textlink = d.getElementById(selectIntLink); + textlink.style.display = "inline"; + + selectIntLink = selectedDiv + "-min"; + textlink = d.getElementById(selectIntLink); + textlink.style.display = "none"; + } + document.traffic_graphs_widget_iform["shown[" + incDiv + "]"].value = "hide"; +} + diff --git a/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php b/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php new file mode 100644 index 0000000..21c44e3 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php @@ -0,0 +1,146 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +$nocsrf = true; + +require_once("globals.inc"); +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); +require_once("functions.inc"); +require_once("captiveportal.inc"); + +?> + + $cp) { + $cpdb = captiveportal_read_db(); + foreach ($cpdb as $cpent) { + $cpent[10] = $cpzone; + if ($showact == 1) { + $cpent[11] = captiveportal_get_last_activity($cpent[2], $cpentry[3]); + } + $cpdb_all[] = $cpent; + } +} + +if ($_GET['order']) { + if ($_GET['order'] == "ip") { + $order = 2; + } else if ($_GET['order'] == "mac") { + $order = 3; + } else if ($_GET['order'] == "user") { + $order = 4; + } else if ($_GET['order'] == "lastact") { + $order = 5; + } else if ($_GET['order'] == "zone") { + $order = 10; + } else { + $order = 0; + } + usort($cpdb_all, "clientcmp"); +} +?> + + + + + + + + + + + + + + + + + + + + + + +
                              IP addressMAC address
                                 0)) echo htmlspecialchars(date("m/d/Y H:i:s", $cpent[11]));?> + + x + +
                              diff --git a/src/usr/local/www/widgets/widgets/carp_status.widget.php b/src/usr/local/www/widgets/widgets/carp_status.widget.php new file mode 100644 index 0000000..bb68dbd --- /dev/null +++ b/src/usr/local/www/widgets/widgets/carp_status.widget.php @@ -0,0 +1,85 @@ + + + + + + + + +
                              + cablenic  + + + +"; + } else { + if($status == "MASTER") { + echo "\"$status\""; + } else if($status == "BACKUP") { + echo "\"$status\""; + } else if($status == "INIT") { + echo "\"$status\""; + } + } + if ($ipaddress){ ?>   +   + +
                              No CARP Interfaces Defined. Click here to configure CARP.
                              diff --git a/src/usr/local/www/widgets/widgets/deactivated/cpu_graphs.widget.php b/src/usr/local/www/widgets/widgets/deactivated/cpu_graphs.widget.php new file mode 100644 index 0000000..09723d7 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/deactivated/cpu_graphs.widget.php @@ -0,0 +1,76 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); +require_once("functions.inc"); +?> + + + + + diff --git a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php new file mode 100644 index 0000000..c2eee76 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php @@ -0,0 +1,174 @@ + $cached_ip) { + echo ""; + } else { + echo ""; + } + echo htmlspecialchars($cached_ip); + echo ""; + } else { + echo "N/A " . date("H:i:s"); + } + } + exit; +} + +?> + + + + + + + + + + + + + + + + +
                              + $ifdesc) { + if ($dyndns['interface'] == $if) { + if (!isset($dyndns['enable'])) { + echo "{$ifdesc}"; + } else { + echo "{$ifdesc}"; + } + break; + } + } + $groupslist = return_gateway_groups_array(); + foreach ($groupslist as $if => $group) { + if ($dyndns['interface'] == $if) { + if (!isset($dyndns['enable'])) { + echo "{$if}"; + } else { + echo "{$if}"; + } + break; + } + } + ?> + + ".htmlspecialchars($types[$j]).""; + } else { + echo htmlspecialchars($types[$j]); + } + break; + } + } + ?> + + ".htmlspecialchars($dyndns['host']).""; + } else { + echo htmlspecialchars($dyndns['host']); + } + ?> + +
                              +
                              + diff --git a/src/usr/local/www/widgets/widgets/gateways.widget.php b/src/usr/local/www/widgets/widgets/gateways.widget.php new file mode 100644 index 0000000..26a6f4d --- /dev/null +++ b/src/usr/local/www/widgets/widgets/gateways.widget.php @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + $gateway) { ?> + + + + + + + + $online\n"; + ?> + + + + +
                              NameRTTLossStatus
                              + + + + + +
                              + +
                              +
                              + + + + + + + +
                              diff --git a/src/usr/local/www/widgets/widgets/gmirror_status.widget.php b/src/usr/local/www/widgets/widgets/gmirror_status.widget.php new file mode 100644 index 0000000..59e7f16 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/gmirror_status.widget.php @@ -0,0 +1,52 @@ + + + + + +
                              + + diff --git a/src/usr/local/www/widgets/widgets/installed_packages.widget.php b/src/usr/local/www/widgets/widgets/installed_packages.widget.php new file mode 100644 index 0000000..3190e1b --- /dev/null +++ b/src/usr/local/www/widgets/widgets/installed_packages.widget.php @@ -0,0 +1,126 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +$nocsrf = true; + +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); +require_once("functions.inc"); +require_once("/usr/local/www/widgets/include/installed_packages.inc"); +require_once("pkg-utils.inc"); + +if (is_array($config['installedpackages']['package'])) { + foreach ($config['installedpackages']['package'] as $instpkg) { + $tocheck[] = $instpkg['name']; + } + $currentvers = get_pkg_info($tocheck, array('version', 'xmlver')); +} + +$updateavailable = false; +?> + + + + + + + + $pkgname){ + + $pkg = $config['installedpackages']['package'][$index]; + if ($pkg['name'] <> "") { ?> + + + + + + "; + } + ?> +
                              Package NameCategoryPackage Version
                              + + + + + Installed: " . $pkg['version']; + } elseif (strcmp($pkg['version'], $latest_package) > 0) { + /* we're running a newer version of the package */ + echo "Current: {$latest_package}"; + echo "
                              Installed: {$pkg['version']}"; + } elseif (strcmp($pkg['version'], $latest_package) < 0) { + /* our package is out of date */ + $updateavailable = true; + ?> +
                              + Update Available!
                              + Current:
                              + Installed:
                              + reinstall +
                              + +
                              There are no packages currently installed.
                              + + + + diff --git a/src/usr/local/www/widgets/widgets/interface_statistics.widget.php b/src/usr/local/www/widgets/widgets/interface_statistics.widget.php new file mode 100644 index 0000000..a124ea3 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/interface_statistics.widget.php @@ -0,0 +1,216 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +$nocsrf = true; + +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); +require_once("functions.inc"); +require_once("/usr/local/www/widgets/include/interface_statistics.inc"); + +$ifdescrs = get_configured_interface_with_descr(); + +$array_in_packets = array(); +$array_out_packets = array(); +$array_in_bytes = array(); +$array_out_bytes = array(); +$array_in_errors = array(); +$array_out_errors = array(); +$array_collisions = array(); +$array_interrupt = array(); +$interfacecounter = 0; + +//build data arrays +foreach ($ifdescrs as $ifdescr => $ifname) { + $ifinfo = get_interface_info($ifdescr); + $interfacecounter++; + if ($ifinfo['status'] != "down") { + $array_in_packets[] = $ifinfo['inpkts']; + $array_out_packets[] = $ifinfo['outpkts']; + $array_in_bytes[] = format_bytes($ifinfo['inbytes']); + $array_out_bytes[] = format_bytes($ifinfo['outbytes']); + if (isset($ifinfo['inerrs'])) { + $array_in_errors[] = $ifinfo['inerrs']; + $array_out_errors[] = $ifinfo['outerrs']; + } else { + $array_in_errors[] = "n/a"; + $array_out_errors[] = "n/a"; + } + if (isset($ifinfo['collisions'])) { + $array_collisions[] = htmlspecialchars($ifinfo['collisions']); + } else { + $array_collisions[] = "n/a"; + } + } +} //end for + + + + +?> +
                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                 
                              Packets In
                              Packets Out
                              Bytes In
                              Bytes Out
                              Errors In
                              Errors Out
                              Collisions
                              +
                              +
                              + + + $ifname): + $ifinfo = get_interface_info($ifdescr); + if ($ifinfo['status'] != "down") { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + +
                              + +
                              + +
                              + +
                              + +
                              + +
                              + +
                              + +
                              +
                              diff --git a/src/usr/local/www/widgets/widgets/interfaces.widget.php b/src/usr/local/www/widgets/widgets/interfaces.widget.php new file mode 100644 index 0000000..e49a030 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/interfaces.widget.php @@ -0,0 +1,126 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +$nocsrf = true; + +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); +require_once("functions.inc"); +require_once("/usr/local/www/widgets/include/interfaces.inc"); + +$ifdescrs = get_configured_interface_with_descr(); +?> + + + $ifname): + $ifinfo = get_interface_info($ifdescr); + + if ($ifinfo['ppplink']) { + $icon = '3g'; + } else if (is_interface_wireless($ifdescr)) { + if ($ifinfo['status'] == "associated") { + $icon = 'wlan'; + } else { + $icon = 'wlan_d'; + } + } else { + $icon = 'cablenic'; + } + + if ($ifinfo['status'] == "up" || $ifinfo['status'] == "associated") { + $known_status = true; + $up_display = "inline"; + $down_display = "none"; + $block_display = "none"; + } elseif ($ifinfo['status'] == "no carrier") { + $known_status = true; + $up_display = "none"; + $down_display = "inline"; + $block_display = "none"; + } elseif ($ifinfo['status'] == "down") { + $known_status = true; + $up_display = "none"; + $down_display = "none"; + $block_display = "inline"; + } else { + $known_status = false; + } +?> + + + + + + + + + + + +
                              + + <?=$icon;?> + + +(DHCP)"; + } +?> + +
                              " style="display:" > + up +
                              +
                              " style="display:" > + down +
                              +
                              " style="display:" > + block +
                              +
                              +
                              +
                              +
                              ";?>
                              +
                              +
                              diff --git a/src/usr/local/www/widgets/widgets/ipsec.widget.php b/src/usr/local/www/widgets/widgets/ipsec.widget.php new file mode 100644 index 0000000..49250ce --- /dev/null +++ b/src/usr/local/www/widgets/widgets/ipsec.widget.php @@ -0,0 +1,265 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +$nocsrf = true; + +require_once("guiconfig.inc"); +require_once("functions.inc"); +require_once("ipsec.inc"); + +if (isset($config['ipsec']['phase1'])) { +?> +
                               
                              + convert_friendly_interface_to_friendly_descr($ph1ent['interface']), + 'dest' => $ph1ent['remote-gateway'], + 'remote-subnet' => ipsec_idinfo_to_text($ph2ent['remoteid']), + 'descr' => $ph2ent['descr'], + 'status' => $iconfn); + } + } + unset($ikenum); +} + +if (isset($config['ipsec']['phase2'])) { +?> + +
                              +
                              + + + + + + + + + + + +
                              Active TunnelsInactive TunnelsMobile Users
                              +
                              +
                              + + + + +
                              + + + + +
                              + + + + Note: There are no configured IPsec Tunnels
                              +
                              +
                              + You can configure your IPsec here. +
                              +
                              +
                              + diff --git a/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php b/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php new file mode 100644 index 0000000..f5ddda9 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php @@ -0,0 +1,155 @@ +. + Copyright (C) 2005-2008 Bill Marquette + + Part of pfSense widgets (https://www.pfsense.org) + originally based on m0n0wall (http://m0n0.ch/wall) + + Copyright (C) 2004-2005 T. Lechat , Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +$nocsrf = true; + +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); +require_once("functions.inc"); +require_once("vslb.inc"); + +$now = time(); +$year = date("Y"); + +if (!is_array($config['load_balancer']['lbpool'])) { + $config['load_balancer']['lbpool'] = array(); +} +if (!is_array($config['load_balancer']['virtual_server'])) { + $config['load_balancer']['virtual_server'] = array(); +} +$a_vs = &$config['load_balancer']['virtual_server']; +$a_pool = &$config['load_balancer']['lbpool']; +$rdr_a = get_lb_redirects(); +$relay_hosts = get_lb_summary(); + +$lb_logfile = "{$g['varlog_path']}/relayd.log"; +$nentries = $config['syslog']['nentries']; +if (!$nentries) { + $nentries = 50; +} + +?> + + + + + + + + + + + + + + + +
                              ServerPoolDescription
                              +
                              + +
                              +
                              + + "; + echo ""; + } + } + } + } + ?> +
                               {$server['ip']['addr']}:{$pool['port']}  "; + if ($server['ip']['avail']) { + echo " ({$server['ip']['avail']}) "; + } + echo " 
                              +
                              + +
                              diff --git a/src/usr/local/www/widgets/widgets/log.widget.php b/src/usr/local/www/widgets/widgets/log.widget.php new file mode 100644 index 0000000..45205a4 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/log.widget.php @@ -0,0 +1,281 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +$nocsrf = true; + +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); +require_once("functions.inc"); + +/* In an effort to reduce duplicate code, many shared functions have been moved here. */ +require_once("filter_log.inc"); + +if (is_numeric($_POST['filterlogentries'])) { + $config['widgets']['filterlogentries'] = $_POST['filterlogentries']; + + $acts = array(); + if ($_POST['actpass']) { + $acts[] = "Pass"; + } + if ($_POST['actblock']) { + $acts[] = "Block"; + } + if ($_POST['actreject']) { + $acts[] = "Reject"; + } + + if (!empty($acts)) { + $config['widgets']['filterlogentriesacts'] = implode(" ", $acts); + } else { + unset($config['widgets']['filterlogentriesacts']); + } + unset($acts); + + if (($_POST['filterlogentriesinterfaces']) and ($_POST['filterlogentriesinterfaces'] != "All")) { + $config['widgets']['filterlogentriesinterfaces'] = trim($_POST['filterlogentriesinterfaces']); + } else { + unset($config['widgets']['filterlogentriesinterfaces']); + } + + write_config("Saved Filter Log Entries via Dashboard"); + Header("Location: /"); + exit(0); +} + +$nentries = isset($config['widgets']['filterlogentries']) ? $config['widgets']['filterlogentries'] : 5; + +//set variables for log + +$nentriesacts = isset($config['widgets']['filterlogentriesacts']) ? $config['widgets']['filterlogentriesacts'] : 'All'; +$nentriesinterfaces = isset($config['widgets']['filterlogentriesinterfaces']) ? $config['widgets']['filterlogentriesinterfaces'] : 'All'; + +$filterfieldsarray = array( + "act" => $nentriesacts, + "interface" => $nentriesinterfaces +); + +$filter_logfile = "{$g['varlog_path']}/filter.log"; +$filterlog = conv_log_filter($filter_logfile, $nentries, 50, $filterfieldsarray); //Get log entries + +/* AJAX related routines */ +handle_ajax($nentries, $nentries + 20); + +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + ', outputrule);"> + <?php echo $filterent['act'];?> + + + " title=""> + + " title=""> +
                              + + + diff --git a/src/usr/local/www/widgets/widgets/ntp_status.widget.php b/src/usr/local/www/widgets/widgets/ntp_status.widget.php new file mode 100644 index 0000000..64522be --- /dev/null +++ b/src/usr/local/www/widgets/widgets/ntp_status.widget.php @@ -0,0 +1,515 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +$nocsrf = true; + +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); +require_once("functions.inc"); + +require_once("/usr/local/www/widgets/include/ntp_status.inc"); + +if ($_REQUEST['updateme']) { +//this block displays only on ajax refresh + if (isset($config['system']['ipv6allow'])) { + $inet_version = ""; + } else { + $inet_version = " -4"; + } + + exec("/usr/local/sbin/ntpq -pn $inet_version | /usr/bin/tail +3", $ntpq_output); + $ntpq_counter = 0; + foreach ($ntpq_output as $line) { + if (substr($line, 0, 1) == "*") { + //Active NTP Peer + $line = substr($line, 1); + $peerinfo = preg_split("/[\s\t]+/", $line); + if ($peerinfo[2] == "1") { + $syncsource = $peerinfo[0] . " (stratum " . $peerinfo[2] . ", " . $peerinfo[1] . ")"; + } else { + $syncsource = $peerinfo[0] . " (stratum " . $peerinfo[2] . ")"; + } + $ntpq_counter++; + } elseif (substr($line, 0, 1) == "o") { + //Local PPS Peer + $line = substr($line, 1); + $peerinfo = preg_split("/[\s\t]+/", $line); + $syncsource = $peerinfo[1] . " (stratum " . $peerinfo[2] . ", PPS)"; + $ntpq_counter++; + } + } + + exec("/usr/local/sbin/ntpq -c clockvar $inet_version", $ntpq_clockvar_output); + foreach ($ntpq_clockvar_output as $line) { + if (substr($line, 0, 9) == "timecode=") { + $tmp = explode('"', $line); + $tmp = $tmp[1]; + if (substr($tmp, 0, 6) == '$GPRMC') { + $gps_vars = explode(",", $tmp); + $gps_ok = ($gps_vars[2] == "A"); + $gps_lat_deg = substr($gps_vars[3], 0, 2); + $gps_lat_min = substr($gps_vars[3], 2) / 60.0; + $gps_lon_deg = substr($gps_vars[5], 0, 3); + $gps_lon_min = substr($gps_vars[5], 3) / 60.0; + $gps_lat = $gps_lat_deg + $gps_lat_min; + $gps_lat = $gps_lat * (($gps_vars[4] == "N") ? 1 : -1); + $gps_lon = $gps_lon_deg + $gps_lon_min; + $gps_lon = $gps_lon * (($gps_vars[6] == "E") ? 1 : -1); + $gps_la = $gps_vars[4]; + $gps_lo = $gps_vars[6]; + } elseif (substr($tmp, 0, 6) == '$GPGGA') { + $gps_vars = explode(",", $tmp); + $gps_ok = $gps_vars[6]; + $gps_lat_deg = substr($gps_vars[2], 0, 2); + $gps_lat_min = substr($gps_vars[2], 2) / 60.0; + $gps_lon_deg = substr($gps_vars[4], 0, 3); + $gps_lon_min = substr($gps_vars[4], 3) / 60.0; + $gps_lat = $gps_lat_deg + $gps_lat_min; + $gps_lat = $gps_lat * (($gps_vars[3] == "N") ? 1 : -1); + $gps_lon = $gps_lon_deg + $gps_lon_min; + $gps_lon = $gps_lon * (($gps_vars[5] == "E") ? 1 : -1); + $gps_alt = $gps_vars[9]; + $gps_alt_unit = $gps_vars[10]; + $gps_sat = $gps_vars[7]; + $gps_la = $gps_vars[3]; + $gps_lo = $gps_vars[5]; + } elseif (substr($tmp, 0, 6) == '$GPGLL') { + $gps_vars = explode(",", $tmp); + $gps_ok = ($gps_vars[6] == "A"); + $gps_lat_deg = substr($gps_vars[1], 0, 2); + $gps_lat_min = substr($gps_vars[1], 2) / 60.0; + $gps_lon_deg = substr($gps_vars[3], 0, 3); + $gps_lon_min = substr($gps_vars[3], 3) / 60.0; + $gps_lat = $gps_lat_deg + $gps_lat_min; + $gps_lat = $gps_lat * (($gps_vars[2] == "N") ? 1 : -1); + $gps_lon = $gps_lon_deg + $gps_lon_min; + $gps_lon = $gps_lon * (($gps_vars[4] == "E") ? 1 : -1); + $gps_la = $gps_vars[2]; + $gps_lo = $gps_vars[4]; + } + } + } + + if (isset($config['ntpd']['gps']['type']) && ($config['ntpd']['gps']['type'] == 'SureGPS') && (isset($gps_ok))) { + //GSV message is only enabled by init commands in services_ntpd_gps.php for SureGPS board + $gpsport = fopen("/dev/gps0", "r+"); + while ($gpsport) { + $buffer = fgets($gpsport); + if (substr($buffer, 0, 6)=='$GPGSV') { + //echo $buffer."\n"; + $gpgsv = explode(',',$buffer); + $gps_satview = $gpgsv[3]; + break; + } + } + } +?> + + + + + + + + + + + + + + + + + + + + +
                              Sync Source + + No active peers available + + + +
                              Clock location + + + + +
                              Satellites + +
                              +. ***/ + +/* Prevent this page from being cached (though some browsers still + cache the page anyway, which is why we use cookies). This is + only important if the cookie is deleted while the page is still + cached (and for ancient browsers that don't know about Cache-Control). + If that's not an issue, you may be able to get away with + "Cache-Control: private" instead. */ + +/* Grab the current server time. */ +$gDate = time(); +/* Are the seconds shown by default? When changing this, also change the + JavaScript client code's definition of clockShowsSeconds below to match. */ +$gClockShowsSeconds = true; + +function getServerDateItems($inDate) { + return date('Y,n,j,G,',$inDate).intval(date('i',$inDate)).','.intval(date('s',$inDate)); + // year (4-digit),month,day,hours (0-23),minutes,seconds + // use intval to strip leading zero from minutes and seconds + // so JavaScript won't try to interpret them in octal + // (use intval instead of ltrim, which translates '00' to '') +} + +function clockDateString($inDate) { + return date('Y. F j l',$inDate); // eg "Monday, January 1, 2002" +} + +function clockTimeString($inDate, $showSeconds) { + return date($showSeconds ? 'G:i:s' : 'g:i',$inDate).' '; +} +/*** Clock -- end of server-side support code ***/ +?> + + + + + + + + + + + + + + +
                              Server Time +
                              + +
                              +
                              + +
                              + + + + + + +
                              + Updating... +
                              +
                              + + diff --git a/src/usr/local/www/widgets/widgets/openvpn.widget.php b/src/usr/local/www/widgets/widgets/openvpn.widget.php new file mode 100644 index 0000000..6f813c5 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/openvpn.widget.php @@ -0,0 +1,290 @@ + + +
                              + + + + + + + + + + + +
                              + Client connections +
                              + + + + + + + ' class=""> + + + + + ' class=""> + + + + + + + + + + +
                              Name/TimeReal/Virtual IP
                              + + + + + /images/icons/icon_x.gif' height='17' width='17' border='0' + onclick="killClient('', '');" style='cursor:pointer;' + name='' + title='Kill client connection from ' alt='' /> +
                              + + + +
                              +
                              + + + + + + + + +
                              + Peer to Peer Server Instance Statistics +
                              + + + + + + + '> + + + + + '> + + + + +
                              Name/TimeRemote/Virtual IP
                              + + + + + "; + ?> +
                              + + + +
                              + + + + + + + + + + +
                              + Client Instance Statistics +
                              + + + + + + + '> + + + + + '> + + + + +
                              Name/TimeRemote/Virtual IP
                              + + + + + "; + ?> +
                              + + + +
                              + + + +NOTE: You need to bind each OpenVPN client to enable its management daemon: use 'Local port' setting in the OpenVPN client screen"; +} + +if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) { + echo "No OpenVPN instances defined"; +} +?> diff --git a/src/usr/local/www/widgets/widgets/picture.widget.php b/src/usr/local/www/widgets/widgets/picture.widget.php new file mode 100644 index 0000000..02a002a --- /dev/null +++ b/src/usr/local/www/widgets/widgets/picture.widget.php @@ -0,0 +1,96 @@ + + + + + + + + + + diff --git a/src/usr/local/www/widgets/widgets/rss.widget.php b/src/usr/local/www/widgets/widgets/rss.widget.php new file mode 100644 index 0000000..0850039 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/rss.widget.php @@ -0,0 +1,198 @@ + + + + + + +
                              + $length) { + return (preg_match('/^(.*)\W.*$/', substr($string, 0, $length+1), $matches) ? $matches[1] : substr($string, 0, $length)) . $replacer; + } + return $string; + } + $feed = new SimplePie(); + $feed->set_cache_location("/tmp/simplepie/"); + $feed->set_feed_url($rss_feed_s); + $feed->init(); + $feed->handle_content_type(); + $counter = 1; + foreach ($feed->get_items() as $item) { + $feed = $item->get_feed(); + $feed->strip_htmltags(); + echo "" . $item->get_title() . "
                              "; + $content = $item->get_content(); + $content = strip_tags($content); + echo textLimit($content, $rsswidgettextlength) . "
                              "; + echo "Source: " . $feed->get_title() . "
                              "; + $counter++; + if ($counter > $max_items) { + break; + } + echo "
                              "; + } +?> +
                              + + + diff --git a/src/usr/local/www/widgets/widgets/services_status.widget.php b/src/usr/local/www/widgets/widgets/services_status.widget.php new file mode 100644 index 0000000..f4c3542 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/services_status.widget.php @@ -0,0 +1,105 @@ + + + + + + + + + + + + 0) { + uasort($services, "service_name_compare"); + foreach ($services as $service) { + if ((!$service['name']) || (in_array($service['name'], $skipservices)) || (!is_service_enabled($service['name']))) { + continue; + } + if (empty($service['description'])) { + $service['description'] = get_pkg_descr($service['name']); + } + $service_desc = explode(".",$service['description']); + echo "\n"; + echo "\n"; + // if service is running then listr else listbg + $bgclass = null; + if (get_service_status($service)) { + $bgclass = "listr"; + } else { + $bgclass = "listbg"; + } + echo "\n"; + echo "\n"; + } +} else { + echo "\n"; +} +?> +
                              ServiceDescriptionStatus 
                              " . $service['name'] . "" . $service_desc[0] . "" . get_service_status_icon($service, false, true) . "" . get_service_control_links($service) . "
                              " . gettext("No services found") . " .
                              + + + diff --git a/src/usr/local/www/widgets/widgets/smart_status.widget.php b/src/usr/local/www/widgets/widgets/smart_status.widget.php new file mode 100644 index 0000000..87f0605 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/smart_status.widget.php @@ -0,0 +1,76 @@ + + + + + + + + + + 0) { + foreach ($devs as $dev) { ## for each found drive do + $dev_ident = exec("diskinfo -v /dev/$dev | grep ident | awk '{print $1}'"); ## get identifier from drive + $dev_state = trim(exec("smartctl -H /dev/$dev | awk -F: '/^SMART overall-health self-assessment test result/ {print $2;exit} +/^SMART Health Status/ {print $2;exit}'")); ## get SMART state from drive + switch ($dev_state) { + case "PASSED": + case "OK": + $color = "#90EE90"; + break; + case "": + $dev_state = "Unknown"; + $color = "#C0B788"; + break; + default: + $color = "#F08080"; + break; + } +?> + + + + + + +
                                
                              diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php new file mode 100644 index 0000000..231f2ee --- /dev/null +++ b/src/usr/local/www/widgets/widgets/system_information.widget.php @@ -0,0 +1,322 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +require_once("functions.inc"); +require_once("guiconfig.inc"); +require_once('notices.inc'); +include_once("includes/functions.inc.php"); + +if ($_REQUEST['getupdatestatus']) { + if (isset($config['system']['firmware']['disablecheck'])) { + exit; + } + if (isset($config['system']['firmware']['alturl']['enable'])) { + $updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}"; + } else { + $updater_url = $g['update_url']; + } + + $nanosize = ""; + if ($g['platform'] == "nanobsd") { + if (file_exists("/etc/nano_use_vga.txt")) { + $nanosize = "-nanobsd-vga-"; + } else { + $nanosize = "-nanobsd-"; + } + $nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt"))); + } + + @unlink("/tmp/{$g['product_name']}_version"); + if (download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5) === true) { + $remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version")); + } + + if (empty($remote_version)) { + echo "

                              Unable to check for updates."; + } else { + $current_installed_buildtime = trim(file_get_contents("/etc/version.buildtime")); + + if (!$remote_version) { + echo "

                              Unable to check for updates."; + } else { + $needs_system_upgrade = false; + if (pfs_version_compare($current_installed_buildtime, $g['product_version'], $remote_version) == -1) { + echo "
                              Update available. Click Here to view update."; + echo "\n\n"; + } else { + echo "
                              You are on the latest version."; + } + } + } + exit; +} + +$curcfg = $config['system']['firmware']; + +$filesystems = get_mounted_filesystems(); + +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              + + () +
                              + built on + +
                              +
                              + + +

                              ...
                              + +
                              + + +
                              + / + +

                              Next Boot:
                              + / + +
                              + +
                              + 1): ?> +
                              + CPUs:
                              + +
                              +
                              +
                              + "; + } + ?> +
                              + +
                              + () +
                              + +
                              + +
                              + () +
                              + +
                              + +
                              +
                              +
                              +
                              + (Updating in 10 seconds) +
                              + +
                              + of MB +
                              + +
                              + of MB +
                              + + +
                              + + : of +
                              + +
                              + diff --git a/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php b/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php new file mode 100644 index 0000000..0dac0cb --- /dev/null +++ b/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php @@ -0,0 +1,279 @@ +> Advanced >> Miscellaneous tab >> Thermal Sensors section. + + File location: + \usr\local\www\widgets\widgets\ + Depends on: + \usr\local\www\widgets\javascript\thermal_sensors.js + \usr\local\www\widgets\include\thermal_sensors.inc + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ + +require_once("guiconfig.inc"); +require_once("/usr/local/www/widgets/include/thermal_sensors.inc"); + +//========================================================================= +//called by showThermalSensorsData() (jQuery Ajax call) in thermal_sensors.js +if (isset($_GET["getThermalSensorsData"])) { + //get Thermal Sensors data and return + echo getThermalSensorsData(); + return; +} +//========================================================================= + + +const WIDGETS_CONFIG_SECTION_KEY = "widgets"; +const THERMAL_SENSORS_WIDGET_SUBSECTION_KEY = "thermal_sensors_widget"; + +//default constants +const DEFAULT_WARNING_THRESHOLD = 60; //60 C +const DEFAULT_CRITICAL_THRESHOLD = 70; //70 C +const MIN_THRESHOLD_VALUE = 1; //deg C +const MAX_THRESHOLD_VALUE = 100; //deg C + +//NOTE: keys used in $_POST and $config should match text and checkbox inputs' IDs/names in HTML code section +//========================================================================= +//save widget config settings on POST +if ($_POST) { + saveThresholdSettings($config, $_POST, "thermal_sensors_widget_zone_warning_threshold", "thermal_sensors_widget_zone_critical_threshold"); + saveThresholdSettings($config, $_POST, "thermal_sensors_widget_core_warning_threshold", "thermal_sensors_widget_core_critical_threshold"); + + //handle checkboxes separately + saveGraphDisplaySettings($config, $_POST, "thermal_sensors_widget_show_raw_output"); + saveGraphDisplaySettings($config, $_POST, "thermal_sensors_widget_show_full_sensor_name"); + saveGraphDisplaySettings($config, $_POST, "thermal_sensors_widget_pulsate_warning"); + saveGraphDisplaySettings($config, $_POST, "thermal_sensors_widget_pulsate_critical"); + + //write settings to config file + write_config("Saved thermal_sensors_widget settings via Dashboard."); + header("Location: ../../index.php"); +} + +function saveThresholdSettings(&$configArray, &$postArray, $warningValueKey, $criticalValueKey) { + $warningValue = 0; + $criticalValue = 0; + + if (isset($postArray[$warningValueKey])) { + $warningValue = (int) $postArray[$warningValueKey]; + } + + if (isset($postArray[$criticalValueKey])) { + $criticalValue = (int) $postArray[$criticalValueKey]; + } + + if (($warningValue >= MIN_THRESHOLD_VALUE && $warningValue <= MAX_THRESHOLD_VALUE) && + ($criticalValue >= MIN_THRESHOLD_VALUE && $criticalValue <= MAX_THRESHOLD_VALUE) && + ($warningValue < $criticalValue)) { + //all validated ok, save to config array + $configArray[WIDGETS_CONFIG_SECTION_KEY][THERMAL_SENSORS_WIDGET_SUBSECTION_KEY][$warningValueKey] = $warningValue; + $configArray[WIDGETS_CONFIG_SECTION_KEY][THERMAL_SENSORS_WIDGET_SUBSECTION_KEY][$criticalValueKey] = $criticalValue; + } +} + +function saveGraphDisplaySettings(&$configArray, &$postArray, $valueKey) { + $configArray[WIDGETS_CONFIG_SECTION_KEY][THERMAL_SENSORS_WIDGET_SUBSECTION_KEY][$valueKey] = isset($postArray[$valueKey]) ? 1 : 0; +} + +//========================================================================= +//get Threshold settings from config (apply defaults if missing) +$thermal_sensors_widget_zoneWarningTempThreshold = getThresholdValueFromConfig($config, "thermal_sensors_widget_zone_warning_threshold", DEFAULT_WARNING_THRESHOLD); +$thermal_sensors_widget_zoneCriticalTempThreshold = getThresholdValueFromConfig($config, "thermal_sensors_widget_zone_critical_threshold", DEFAULT_CRITICAL_THRESHOLD); +$thermal_sensors_widget_coreWarningTempThreshold = getThresholdValueFromConfig($config, "thermal_sensors_widget_core_warning_threshold", DEFAULT_WARNING_THRESHOLD); +$thermal_sensors_widget_coreCriticalTempThreshold = getThresholdValueFromConfig($config, "thermal_sensors_widget_core_critical_threshold", DEFAULT_CRITICAL_THRESHOLD); + +//get display settings from config (apply defaults if missing) +$thermal_sensors_widget_showRawOutput = getBoolValueFromConfig($config, "thermal_sensors_widget_show_raw_output", false); +$thermal_sensors_widget_showFullSensorName = getBoolValueFromConfig($config, "thermal_sensors_widget_show_full_sensor_name", false); +$thermal_sensors_widget_pulsateWarning = getBoolValueFromConfig($config, "thermal_sensors_widget_pulsate_warning", true); +$thermal_sensors_widget_pulsateCritical = getBoolValueFromConfig($config, "thermal_sensors_widget_pulsate_critical", true); + +function getThresholdValueFromConfig(&$configArray, $valueKey, $defaultValue) { + + $thresholdValue = $defaultValue; + + if (isset($configArray[WIDGETS_CONFIG_SECTION_KEY][THERMAL_SENSORS_WIDGET_SUBSECTION_KEY][$valueKey])) { + $thresholdValue = (int) $configArray[WIDGETS_CONFIG_SECTION_KEY][THERMAL_SENSORS_WIDGET_SUBSECTION_KEY][$valueKey]; + } + + if ($thresholdValue < MIN_THRESHOLD_VALUE || $thresholdValue > MAX_THRESHOLD_VALUE) { + //set to default if not in allowed range + $thresholdValue = $defaultValue; + } + return $thresholdValue; +} + +function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) { + + $boolValue = false; + + if (isset($configArray[WIDGETS_CONFIG_SECTION_KEY][THERMAL_SENSORS_WIDGET_SUBSECTION_KEY][$valueKey])) { + $boolValue = (bool) $configArray[WIDGETS_CONFIG_SECTION_KEY][THERMAL_SENSORS_WIDGET_SUBSECTION_KEY][$valueKey]; + } else { + //set to default if not in allowed range + $boolValue = $defaultValue; + } + return $boolValue; +} + +//========================================================================= +?> + + + + + + +
                              +
                              + (Updating...)

                              +
                              +
                              + + + diff --git a/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php b/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php new file mode 100644 index 0000000..c5f6286 --- /dev/null +++ b/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php @@ -0,0 +1,193 @@ +, Manuel Kasper + and Jonathan Watt . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +$nocsrf = true; + +require_once("guiconfig.inc"); +require_once("pfsense-utils.inc"); +require_once("functions.inc"); + +$first_time = false; +if (!is_array($config["widgets"]["trafficgraphs"])) { + $first_time = true; + $config["widgets"]["trafficgraphs"] = array(); +} +$a_config = &$config["widgets"]["trafficgraphs"]; + +if (!is_array($a_config["shown"])) { + $a_config["shown"] = array(); +} +if (!is_array($a_config["shown"]["item"])) { + $a_config["shown"]["item"] = array(); +} + +$ifdescrs = get_configured_interface_with_descr(); +if (isset($config['ipsec']['enable'])) { + $ifdescrs['enc0'] = "IPsec"; +} + +if ($_POST) { + if (isset($_POST["refreshinterval"])) { + $a_config["refreshinterval"] = $_POST["refreshinterval"]; + } + if (isset($_POST["scale_type"])) { + $a_config["scale_type"] = $_POST["scale_type"]; + } + $a_config["shown"]["item"] = array(); + foreach ($ifdescrs as $ifname => $ifdescr) { + $state = $_POST["shown"][$ifname]; + if ($state === "show") { + $a_config["shown"]["item"][] = $ifname; + } + } + write_config("Updated traffic graph settings via dashboard."); + header("Location: /"); + exit(0); +} + +$shown = array(); +foreach ($a_config["shown"]["item"] as $if) { + $shown[$if] = true; +} +if ($first_time) { + $keys = array_keys($ifdescrs); + $shown[$keys[0]] = true; +} + +if (isset($a_config["refreshinterval"])) { + $refreshinterval = $a_config["refreshinterval"]; +} else { + $refreshinterval = 10; +} + +if (isset($a_config["scale_type"])) { + $scale_type = $a_config["scale_type"]; +} else { + $scale_type = "up"; +} + +?> + + + + + + + $ifdescr) { + $ifinfo = get_interface_info($ifname); + if ($shown[$ifname]) { + $mingraphbutton = "inline"; + $showgraphbutton = "none"; + $graphdisplay = "inline"; + $interfacevalue = "show"; + $graphcounter++; + } else { + $mingraphbutton = "none"; + $showgraphbutton = "inline"; + $graphdisplay = "none"; + $interfacevalue = "hide"; + } + if ($ifinfo['status'] != "down") { ?> +
                              +
                              +
                              + Current Traffic +
                              +
                              +
                              Minimize <?=$ifname;?> traffic graph
                              +
                              Show <?=$ifname;?> traffic graph
                              +
                              +
                              +
                              +
                              + + + + + + + +
                              +
                              + diff --git a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php new file mode 100644 index 0000000..9cb760a --- /dev/null +++ b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php @@ -0,0 +1,80 @@ + + + + ' . gettext("Computer / Device") . ''; + echo ''; + echo ''; + ?> + + + 0) { + foreach ($wolcomputers as $wolent) { + echo '' . "\n"; + echo '' . "\n"; + + $is_active = exec("/usr/sbin/arp -an |/usr/bin/grep {$wolent['mac']}| /usr/bin/wc -l|/usr/bin/awk '{print $1;}'"); + if ($is_active == 1) { + echo '\n"; + } else { + echo '\n"; + } + echo '\n"; + } +} else { + echo "\n"; +} +?> +
                              ' . gettext("Interface") . '' . gettext("Status") . ' 
                              ' . $wolent['descr'] . '
                              ' . $wolent['mac'] . '
                              ' . convert_friendly_interface_to_friendly_descr($wolent['interface']) . '' . "\n"; + echo "\"pass\" " . gettext("Online") . "' . "\n"; + echo "\"block\" " . gettext("Offline") . "'; + /*if ($is_active) { */ + /* Will always show wake-up button even if pfsense thinks it is awake */ + /* } else { */ + echo " "; + echo "wol\n"; + /* } */ + echo "
                              " . gettext("No saved WoL addresses") . ".
                              +
                              DHCP Leases Status
                              diff --git a/src/usr/local/www/wizard.php b/src/usr/local/www/wizard.php new file mode 100644 index 0000000..adab493 --- /dev/null +++ b/src/usr/local/www/wizard.php @@ -0,0 +1,1061 @@ + "submit") { + $fieldname = $field['name']; + $fieldname = str_replace(" ", "", $fieldname); + $fieldname = strtolower($fieldname); + // update field with posted values. + if ($field['unsetfield'] <> "") { + $unset_fields = "yes"; + } else { + $unset_fields = ""; + } + if ($field['arraynum'] <> "") { + $arraynum = $field['arraynum']; + } else { + $arraynum = ""; + } + + update_config_field($field['bindstofield'], $_POST[$fieldname], $unset_fields, $arraynum, $field['type']); + } + + } + // run custom php code embedded in xml config. + if ($pkg['step'][$stepid]['stepsubmitphpaction'] <> "") { + eval($pkg['step'][$stepid]['stepsubmitphpaction']); + } + if (!$input_errors) { + write_config(); + } + $stepid++; + if ($stepid > $totalsteps) { + $stepid = $totalsteps; + } +} + +function update_config_field($field, $updatetext, $unset, $arraynum, $field_type) { + global $config; + $field_split = explode("->", $field); + foreach ($field_split as $f) { + $field_conv .= "['" . $f . "']"; + } + if ($field_conv == "") { + return; + } + if ($arraynum <> "") { + $field_conv .= "[" . $arraynum . "]"; + } + if (($field_type == "checkbox" and $updatetext <> "on") || $updatetext == "") { + /* + * item is a checkbox, it should have the value "on" + * if it was checked + */ + $var = "\$config{$field_conv}"; + $text = "if (isset({$var})) unset({$var});"; + eval($text); + return; + } + + if ($field_type == "interfaces_selection") { + $var = "\$config{$field_conv}"; + $text = "if (isset({$var})) unset({$var});"; + $text .= "\$config" . $field_conv . " = \"" . $updatetext . "\";"; + eval($text); + return; + } + + if ($unset == "yes") { + $text = "unset(\$config" . $field_conv . ");"; + eval($text); + } + $text = "\$config" . $field_conv . " = \"" . addslashes($updatetext) . "\";"; + eval($text); +} + +$title = preg_replace("/pfSense/i", $g['product_name'], $pkg['step'][$stepid]['title']); +$description = preg_replace("/pfSense/i", $g['product_name'], $pkg['step'][$stepid]['description']); + +// handle before form display event. +do { + $oldstepid = $stepid; + if ($pkg['step'][$stepid]['stepbeforeformdisplay'] <> "") { + eval($pkg['step'][$stepid]['stepbeforeformdisplay']); + } +} while ($oldstepid != $stepid); + +$closehead = false; +$pgtitle = array($title); +include("head.inc"); + +if (file_exists("/usr/local/www/themes/{$g['theme']}/wizard.css")) { + echo "\n"; +} else { + echo ""; +} +?> + + + + "") { ?> + + + +
                              + + + +
                              + + 
                              + +"; +?> +logo +

                               

                              +
                              + + + + + + + +
                               
                              + + + + + + + +"; + } +?> + + "") { + foreach ($pkg['step'][$stepid]['fields']['field'] as $field) { + + $value = $field['value']; + $name = $field['name']; + + $name = preg_replace("/\s+/", "", $name); + $name = strtolower($name); + + if ($field['bindstofield'] <> "") { + $arraynum = ""; + $field_conv = ""; + $field_split = explode("->", $field['bindstofield']); + // arraynum is used in cases where there is an array of the same field + // name such as dnsserver (2 of them) + if ($field['arraynum'] <> "") { + $arraynum = "[" . $field['arraynum'] . "]"; + } + foreach ($field_split as $f) { + $field_conv .= "['" . $f . "']"; + } + if ($field['type'] == "checkbox") { + $toeval = "if (isset(\$config" . $field_conv . $arraynum . ")) { \$value = \$config" . $field_conv . $arraynum . "; if (empty(\$value)) \$value = true; }"; + } else { + $toeval = "if (isset(\$config" . $field_conv . $arraynum . ")) \$value = \$config" . $field_conv . $arraynum . ";"; + } + eval($toeval); + } + + if (!$field['combinefieldsend']) { + echo ""; + } + + switch ($field['type']) { + case "input": + if ($field['displayname']) { + echo "\n"; + } else if (!$field['dontdisplayname']) { + echo "\n"; + } + if (!$field['dontcombinecells']) { + echo "\n"; + } else if (!$field['dontdisplayname']) { + echo "\n"; + } + if (!$field['dontcombinecells']) { + echo ""; + echo "\n"; + } else if (!$field['dontdisplayname']) { + echo "\n"; + } + if (!$field['dontcombinecells']) { + echo ""; + echo ""; + echo "\n"; + } else if (!$field['dontdisplayname']) { + echo "\n"; + } + if ($field['size']) { + $size = " size='" . $field['size'] . "' "; + } + if ($field['multiple'] == "yes") { + $multiple = "multiple=\"multiple\" "; + } + if (!$field['dontcombinecells']) { + echo "\n"; + } else if (!$field['dontdisplayname']) { + echo ""; + } + if (!$field['dontcombinecells']) { + echo ""; + echo ""; + echo "\n"; + } else if (!$field['dontdisplayname']) { + echo ""; + } + if (!$field['dontcombinecells']) { + echo "\n"; + } else if (!$field['dontdisplayname']) { + echo ""; + } + if (!$field['dontcombinecells']) { + echo "\n"; + } else if (!$field['dontdisplayname']) { + echo ""; + } + $checked = ""; + if ($value <> "") { + $checked = " checked=\"checked\""; + } + echo ""; + } + + echo "\n"; + } + + } + } +?> +
                               
                              " . fixup_string($title) . "
                              \n"; + echo $field['displayname']; + echo ":\n"; + echo fixup_string($field['name']); + echo ":\n"; + } + + echo "\n"; + + if ($field['description'] <> "") { + echo "
                              " . $field['description']; + } + break; + case "text": + echo "
                              \n"; + if ($field['description'] <> "") { + echo "

                              " . $field['description'] . "
                              "; + } + break; + case "inputalias": + if ($field['displayname']) { + echo "
                              \n"; + echo $field['displayname']; + echo ":\n"; + echo fixup_string($field['name']); + echo ":\n"; + } + + $inputaliases[] = $name; + echo "\n"; + + if ($field['description'] <> "") { + echo "
                              " . $field['description']; + } + break; + case "interfaces_selection": + case "interface_select": + $size = ""; + $multiple = ""; + $name = strtolower($name); + echo "
                              \n"; + echo fixup_string($field['displayname'] ? $field['displayname'] : $field['name']) . ":\n"; + echo "\n"; + if ($field['size'] <> "") { + $size = "size=\"{$field['size']}\""; + } + if ($field['multiple'] <> "" and $field['multiple'] <> "0") { + $multiple = "multiple=\"multiple\""; + $name .= "[]"; + } + echo "\n"; + + if ($field['description'] <> "") { + echo "
                              " . $field['description']; + } + + break; + case "password": + if ($field['displayname']) { + echo "
                              \n"; + echo $field['displayname']; + echo ":\n"; + echo fixup_string($field['name']); + echo ":"; + } + echo "\n"; + + if ($field['description'] <> "") { + echo "
                              " . $field['description']; + } + + break; + case "certca_selection": + $size = ""; + $multiple = ""; + $name = strtolower($name); + echo "
                              \n"; + echo fixup_string($field['displayname'] ? $field['displayname'] : $field['name']) . ":\n"; + echo "\n"; + if ($field['size'] <> "") { + $size = "size=\"{$field['size']}\""; + } + echo "\n"; + + if ($field['description'] <> "") { + echo "
                              " . $field['description']; + } + + break; + case "cert_selection": + $size = ""; + $multiple = ""; + $name = strtolower($name); + echo "
                              \n"; + echo fixup_string($field['displayname'] ? $field['displayname'] : $field['name']) . ":\n"; + echo "\n"; + if ($field['size'] <> "") { + $size = "size=\"{$field['size']}\""; + } + echo "\n"; + + if ($field['description'] <> "") { + echo "
                              " . $field['description']; + } + + break; + case "select": + if ($field['displayname']) { + echo "
                              \n"; + echo $field['displayname']; + echo ":\n"; + echo fixup_string($field['name']); + echo ":\n"; + } + $onchange = ""; + foreach ($field['options']['option'] as $opt) { + if ($opt['enablefields'] <> "") { + $onchange = "onchange=\"enableitems(this.selectedIndex);\" "; + } + } + echo "\n"; + echo "\n"; + + if ($field['description'] <> "") { + echo $field['description']; + } + + break; + case "textarea": + if ($field['displayname']) { + echo "\n"; + echo $field['displayname']; + echo ":\n"; + echo fixup_string($field['name']); + echo ":"; + } + echo "\n"; + + + if ($field['description'] <> "") { + echo "
                              " . $field['description']; + } + + break; + case "submit": + echo "
                               
                              "; + echo "\n"; + + if ($field['description'] <> "") { + echo "
                              " . $field['description']; + } + + break; + case "listtopic": + echo "
                               
                              " . $field['name'] . "
                              \n"; + + break; + case "subnet_select": + if ($field['displayname']) { + echo "
                              \n"; + echo $field['displayname']; + echo ":\n"; + echo fixup_string($field['name']); + echo ":"; + } + echo "\n"; + + if ($field['description'] <> "") { + echo "
                              " . $field['description']; + } + + break; + case "timezone_select": + exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist); + $timezonelist = array_filter($timezonelist, 'is_timezone'); + sort($timezonelist); + + /* kill carriage returns */ + for ($x = 0; $x < count($timezonelist); $x++) { + $timezonelist[$x] = str_replace("\n", "", $timezonelist[$x]); + } + + if ($field['displayname']) { + echo "
                              \n"; + echo $field['displayname']; + echo ":\n"; + echo fixup_string($field['name']); + echo ":"; + } + echo "\n"; + + if ($field['description'] <> "") { + echo "
                              " . $field['description']; + } + + break; + case "checkbox": + if ($field['displayname']) { + echo "
                              \n"; + echo $field['displayname']; + echo ":\n"; + echo $field['name']; + echo ":\n"; + + if ($field['description'] <> "") { + echo $field['description']; + } + + break; + } + + if ($field['typehint'] <> "") { + echo $field['typehint']; + } + if ($field['warning'] <> "") { + echo "
                              " . $field['warning'] . ""; + } + + if (!$field['combinefieldsbegin']) { + if (!$field['dontcombinecells']) { + echo "
                              +
                              +
                                +
                              +
                              +
                              + + + "") { + // create a fieldname loop that can be used with javascript + // hide and enable features. + echo "\n\n\n"; +} +?> + + + + "") { + // handle after form display event. + eval($pkg['step'][$stepid]['stepafterformdisplay']); +} + +if ($pkg['step'][$stepid]['javascriptafterformdisplay'] <> "") { + // handle after form display event. + echo "\n\n\n"; +} + +/* + * HELPER FUNCTIONS + */ + +function fixup_string($string) { + global $config, $g, $myurl, $title; + $newstring = $string; + // fixup #1: $myurl -> http[s]://ip_address:port/ + switch ($config['system']['webgui']['protocol']) { + case "http": + $proto = "http"; + break; + case "https": + $proto = "https"; + break; + default: + $proto = "http"; + break; + } + $port = $config['system']['webgui']['port']; + if ($port != "") { + if (($port == "443" and $proto != "https") or ($port == "80" and $proto != "http")) { + $urlport = ":" . $port; + } elseif ($port != "80" and $port != "443") { + $urlport = ":" . $port; + } else { + $urlport = ""; + } + } + $http_host = $_SERVER['SERVER_NAME']; + $urlhost = $http_host; + // If finishing the setup wizard, check if accessing on a LAN or WAN address that changed + if ($title == "Reload in progress") { + if (is_ipaddr($urlhost)) { + $host_if = find_ip_interface($urlhost); + if ($host_if) { + $host_if = convert_real_interface_to_friendly_interface_name($host_if); + if ($host_if && is_ipaddr($config['interfaces'][$host_if]['ipaddr'])) { + $urlhost = $config['interfaces'][$host_if]['ipaddr']; + } + } + } else if ($urlhost == $config['system']['hostname']) { + $urlhost = $config['wizardtemp']['system']['hostname']; + } else if ($urlhost == $config['system']['hostname'] . '.' . $config['system']['domain']) { + $urlhost = $config['wizardtemp']['system']['hostname'] . '.' . $config['wizardtemp']['system']['domain']; + } + } + if ($urlhost != $http_host) { + file_put_contents("{$g['tmp_path']}/setupwizard_lastreferrer", $proto . "://" . $http_host . $urlport . $_SERVER['REQUEST_URI']); + } + $myurl = $proto . "://" . $urlhost . $urlport . "/"; + + if (strstr($newstring, "\$myurl")) { + $newstring = str_replace("\$myurl", $myurl, $newstring); + } + // fixup #2: $wanip + if (strstr($newstring, "\$wanip")) { + $curwanip = get_interface_ip(); + $newstring = str_replace("\$wanip", $curwanip, $newstring); + } + // fixup #3: $lanip + if (strstr($newstring, "\$lanip")) { + $lanip = get_interface_ip("lan"); + $newstring = str_replace("\$lanip", $lanip, $newstring); + } + // fixup #4: fix'r'up here. + return $newstring; +} + +function is_timezone($elt) { + return !preg_match("/\/$/", $elt); +} + +?> + + + diff --git a/src/usr/local/www/wizards/openvpn_wizard.inc b/src/usr/local/www/wizards/openvpn_wizard.inc new file mode 100644 index 0000000..ee530a2 --- /dev/null +++ b/src/usr/local/www/wizards/openvpn_wizard.inc @@ -0,0 +1,676 @@ + $auth) { + if ($auth['type'] != "ldap") + continue; + $found = true; + $opts = array(); + $opts['name'] = $auth['name']; + $opts['value'] = $auth['name']; + $fields[1]['options']['option'][] = $opts; + } + if ($found == false) { + $stepid = 2; + } +} + +function step2_submitphpaction() { + global $stepid; + + if (isset($_POST['next'])) { + $_POST['uselist'] = ""; + $stepid +=3; + } +} + +function step3_submitphpaction() { + global $stepid, $savemsg, $config; + + /* Default LDAP port is 389 for TCP and 636 for SSL */ + if (empty($_POST['port'])) { + if ($_POST['transport'] == "tcp") + $config['ovpnserver']['step2']['port'] = 389; + elseif ($_POST['transport'] == "ssl") + $config['ovpnserver']['step2']['port'] = 636; + } elseif (!is_port($_POST['port'])) { + $stepid--; + $savemsg = "Please enter a valid port number."; + } + + if (empty($_POST['name']) || empty($_POST['ip']) ||empty($_POST['transport']) || + empty($_POST['scope']) || empty($_POST['basedn']) || empty($_POST['authscope']) || empty($_POST['nameattr'])) { + $stepid--; + $savemsg = "Please enter all information for authentication server."; + } else if (count(($authcfg = auth_get_authserver($_POST['name']))) > 0) { + $stepid--; + $savemsg = "Please choose a different name because an authentication server with this name already exists."; + } elseif (!is_fqdn($_POST['ip']) && !is_ipaddr($_POST['ip'])) { + $stepid--; + $savemsg = "Please enter a valid IP address or hostname for the authentication server."; + } else { + $config['ovpnserver']['step2']['uselist'] = "on"; + $_POST['uselist'] = "on"; + $stepid += 2; + } +} + +function step4_stepbeforeformdisplay() { + global $pkg, $stepid; + + $fields =& $pkg['step'][3]['fields']['field']; + + $found = false; + $authlist = auth_get_authserver_list(); + $fields[1]['options']['option'] = array(); + foreach ($authlist as $i => $auth) { + if ($auth['type'] != "radius") + continue; + $found = true; + $opts = array(); + $opts['name'] = $auth['name']; + $opts['value'] = $auth['name']; + $fields[1]['options']['option'][] = $opts; + } + if ($found == false) + $stepid = 4; +} + +function step4_submitphpaction() { + global $stepid; + + if (isset($_POST['next'])) { + $_POST['uselist'] = ""; + $stepid++; + } +} + +function step5_submitphpaction() { + global $stepid, $savemsg, $config; + + /* Default RADIUS Auth port = 1812 */ + if (empty($_POST['port'])) { + $config['ovpnserver']['step2']['port'] = 1812; + } elseif (!is_port($_POST['port'])) { + $stepid--; + $savemsg = "Please enter a valid port number."; + } + + if (empty($_POST['name']) || empty($_POST['ip']) || empty($_POST['secret'])) { + $stepid--; + $savemsg = "Please enter all information for authentication server."; + } else if (count(($authcfg = auth_get_authserver($_POST['name']))) > 0) { + $stepid--; + $savemsg = "Please choose a different name because an authentication server with this name already exists."; + } elseif (!is_fqdn($_POST['ip']) && !is_ipaddr($_POST['ip'])) { + $stepid--; + $savemsg = "Please enter a valid IP address or hostname for the authentication server."; + } else { + $config['ovpnserver']['step2']['uselist'] = "on"; + $_POST['uselist'] = "on"; + } +} + +function step6_stepbeforeformdisplay() { + global $stepid, $config; + + if (count($config['ca']) < 1) { + $stepid++; + } +} + +function step6_submitphpaction() { + global $stepid, $config; + + if (isset($_POST['next'])) { + $_POST['uselist'] = ""; + unset($config['ovpnserver']['step6']['uselist']); + $stepid++; + } else { + $config['ovpnserver']['step6']['uselist'] = "on"; + $_POST['uselist'] = "on"; + } +} + +function step7_submitphpaction() { + global $input_errors, $stepid, $savemsg, $_POST, $config; + + $canames = array(); + $cacns = array(); + if (is_array($config['ca'])) { + foreach($config['ca'] as $ca) { + $canames[] = $ca['descr']; + $cainfo = cert_get_subject_hash($ca['crt']); + $cacns[] = $cainfo["CN"]; + } + } + + if (preg_match("/[\?\>\<\&\/\\\"\']/", $_POST['descr'])) { + $input_errors[] = "The field 'Descriptive Name' contains invalid characters."; + } + + if (empty($_POST['descr']) || empty($_POST['keylength']) || empty($_POST['lifetime']) || + empty($_POST['country']) || empty($_POST['state']) || empty($_POST['city']) || + empty($_POST['organization']) || empty($_POST['email'])) { + $stepid--; + $savemsg = "Please enter all information for the new Certificate Authority."; + } elseif (has_special_chars($_POST['country']) || has_special_chars($_POST['state']) || + has_special_chars($_POST['city']) || has_special_chars($_POST['organization'])) { + $stepid--; + $input_errors[] = "Please do not use special characters in Certificate field names."; + } elseif (in_array($_POST['descr'], $canames) || in_array($_POST['descr'], $cacns)) { + $stepid--; + $savemsg = "Please enter a different name for the Certificate Authority. A Certificate Authority with that name already exists."; + } elseif (strlen($_POST['country']) != 2) { + $stepid--; + $savemsg = "Please enter only a two-letter ISO country code"; + } else { + $config['ovpnserver']['step6']['uselist'] = "on"; + $_POST['uselist'] = "on"; + } +} + +function step8_stepbeforeformdisplay() { + global $stepid, $config; + + if (count($config['cert']) < 1 || + (count($config['cert']) == 1 && stristr($config['cert'][0]['descr'], "webconf"))) { + $stepid++; + } +} + +function step8_submitphpaction() { + global $stepid, $config, $_POST; + + if (isset($_POST['next'])) { + $_POST['uselist'] = ""; + unset($config['ovpnserver']['step9']['uselist']); + $stepid++; + } else { + $config['ovpnserver']['step6']['uselist'] = "on"; + $_POST['uselist'] = "on"; + } +} + +function step9_stepbeforeformdisplay() { + global $config, $pkg, $stepid; + + $pconfig = $config['ovpnserver']; + + if (isset($pconfig['step6']['uselist'])) { + $country = $pconfig['step6']['country']; + $state = $pconfig['step6']['state']; + $city = $pconfig['step6']['city']; + $org = $pconfig['step6']['organization']; + $email = $pconfig['step6']['email']; + } else { + $ca = lookup_ca($pconfig['step6']['authcertca']); + $cavl = cert_get_subject_array($ca['crt']); + $country = $cavl[0]['v']; + $state = $cavl[1]['v']; + $city = $cavl[2]['v']; + $org = $cavl[3]['v']; + $email = $cavl[4]['v']; + } + $fields =& $pkg['step'][$stepid]['fields']['field']; + + foreach ($fields as $idx => $field) { + switch ($field['name']) { + case 'country': + $fields[$idx]['value'] = $country; + break; + case 'state': + $fields[$idx]['value'] = $state; + break; + case 'city': + $fields[$idx]['value'] = $city; + break; + case 'organization': + $fields[$idx]['value'] = $org; + break; + case 'email': + $fields[$idx]['value'] = $email; + break; + } + } +} + +function step9_submitphpaction() { + global $input_errors, $stepid, $savemsg, $_POST, $config; + + $certnames = array(); + $certcns = array(); + if (is_array($config['cert'])) { + foreach($config['cert'] as $cert) { + $certnames[] = $cert['descr']; + $certinfo = cert_get_subject_hash($cert['crt']); + $certcns[] = $certinfo["CN"]; + } + } + + if (preg_match("/[\?\>\<\&\/\\\"\']/", $_POST['descr'])) { + $input_errors[] = "The field 'Descriptive Name' contains invalid characters."; + } + + if (empty($_POST['descr']) || empty($_POST['keylength']) || empty($_POST['lifetime']) || + empty($_POST['country']) || empty($_POST['state']) || empty($_POST['city']) || + empty($_POST['organization']) || empty($_POST['email'])) { + $stepid--; + $savemsg = "Please enter all information for the new certificate."; + } elseif (has_special_chars($_POST['country']) || has_special_chars($_POST['state']) || + has_special_chars($_POST['city']) || has_special_chars($_POST['organization'])) { + $stepid--; + $input_errors[] = "Please do not use special characters in Certificate field names."; + } elseif (in_array($_POST['descr'], $certnames) || in_array($_POST['descr'], $certcns)) { + $stepid--; + $savemsg = "Please enter a different name for the Certificate. A Certificate with that name/common name already exists."; + } elseif (strlen($_POST['country']) != 2) { + $stepid--; + $savemsg = "Please enter only a two-letter ISO country code"; + } else { + $config['ovpnserver']['step9']['uselist'] = "on"; + $_POST['uselist'] = "on"; + } +} + +function step10_stepbeforeformdisplay() { + global $pkg, $stepid, $netbios_nodetypes; + + foreach ($pkg['step'][$stepid]['fields']['field'] as $idx => $field) { + if ($field['name'] == "crypto") { + $pkg['step'][$stepid]['fields']['field'][$idx]['options']['option'] = array(); + $cipherlist = openvpn_get_cipherlist(); + foreach ($cipherlist as $name => $desc) { + $opt = array(); + $opt['name'] = $desc; + $opt['value'] = $name; + $pkg['step'][$stepid]['fields']['field'][$idx]['options']['option'][] = $opt; + } + } else if ($field['name'] == "digest") { + $pkg['step'][$stepid]['fields']['field'][$idx]['options']['option'] = array(); + $digestlist = openvpn_get_digestlist(); + foreach ($digestlist as $name => $desc) { + $opt = array(); + $opt['name'] = $desc; + $opt['value'] = $name; + $pkg['step'][$stepid]['fields']['field'][$idx]['options']['option'][] = $opt; + } + } else if ($field['name'] == "compression") { + global $openvpn_compression_modes; + $pkg['step'][$stepid]['fields']['field'][$idx]['options']['option'] = array(); + foreach ($openvpn_compression_modes as $name => $desc) { + $opt = array(); + $opt['name'] = $desc; + $opt['value'] = $name; + $pkg['step'][$stepid]['fields']['field'][$idx]['options']['option'][] = $opt; + } + } else if ($field['name'] == "engine") { + $pkg['step'][$stepid]['fields']['field'][$idx]['options']['option'] = array(); + $engines = openvpn_get_engines(); + foreach ($engines as $name => $desc) { + $opt = array(); + $opt['name'] = $desc; + $opt['value'] = $name; + $pkg['step'][$stepid]['fields']['field'][$idx]['options']['option'][] = $opt; + } + } else if ($field['name'] == "nbttype") { + $pkg['step'][$stepid]['fields']['field'][$idx]['options']['option'] = array(); + foreach ($netbios_nodetypes as $type => $name) { + $opt = array(); + $opt['name'] = $name; + $opt['value'] = $type; + $pkg['step'][$stepid]['fields']['field'][$idx]['options']['option'][] = $opt; + } + } else if ($field['name'] == "localport") { + $pkg['step'][$stepid]['fields']['field'][$idx]['value'] = openvpn_port_next('UDP'); + } + } +} + +function step10_submitphpaction() { + global $savemsg, $stepid; + + /* Default OpenVPN port to next available port if left empty. */ + if (empty($_POST['localport'])) + $pconfig["step10"]["localport"] = openvpn_port_next('UDP'); + + /* input validation */ + if ($result = openvpn_validate_port($_POST['localport'], 'Local port')) + $input_errors[] = $result; + + if ($result = openvpn_validate_cidr($_POST['tunnelnet'], 'Tunnel Network', false, "ipv4")) + $input_errors[] = $result; + + if ($result = openvpn_validate_cidr($_POST['localnet'], 'Local Network', true, "ipv4")) + $input_errors[] = $result; + + $portused = openvpn_port_used($_POST['protocol'], $_POST['interface'], $_POST['localport']); + if ($portused != 0) + $input_errors[] = "The specified 'Local port' is in use. Please enter a port not already in use."; + + if (!isset($_POST['generatetlskey']) && isset($_POST['tlsauthentication'])) + if (!strstr($_POST['tlssharedkey'], "-----BEGIN OpenVPN Static key V1-----") || + !strstr($_POST['tlssharedkey'], "-----END OpenVPN Static key V1-----")) + $input_errors[] = "The field 'TLS Authentication Key' does not appear to be valid"; + + if (!empty($_POST['dnsserver1']) && !is_ipaddr(trim($_POST['dnsserver1']))) + $input_errors[] = "The field 'DNS Server #1' must contain a valid IP address"; + if (!empty($_POST['dnsserver2']) && !is_ipaddr(trim($_POST['dnsserver2']))) + $input_errors[] = "The field 'DNS Server #2' must contain a valid IP address"; + if (!empty($_POST['dnsserver3']) && !is_ipaddr(trim($_POST['dnsserver3']))) + $input_errors[] = "The field 'DNS Server #3' must contain a valid IP address"; + if (!empty($_POST['dnsserver4']) && !is_ipaddr(trim($_POST['dnsserver4']))) + $input_errors[] = "The field 'DNS Server #4' must contain a valid IP address"; + + if (!empty($_POST['ntpserver1']) && !is_ipaddr(trim($_POST['ntpserver1']))) + $input_errors[] = "The field 'NTP Server #1' must contain a valid IP address"; + if (!empty($_POST['ntpserver2']) && !is_ipaddr(trim($_POST['ntpserver2']))) + $input_errors[] = "The field 'NTP Server #2' must contain a valid IP address"; + + if (!empty($_POST['winsserver1']) && !is_ipaddr(trim($_POST['winsserver1']))) + $input_errors[] = "The field 'WINS Server #1' must contain a valid IP address"; + if (!empty($_POST['winsserver2']) && !is_ipaddr(trim($_POST['winsserver2']))) + $input_errors[] = "The field 'WINS Server #2' must contain a valid IP address"; + + if ($_POST['concurrentcon'] && !is_numeric($_POST['concurrentcon'])) + $input_errors[] = "The field 'Concurrent connections' must be numeric."; + + if (empty($_POST['tunnelnet'])) + $input_errors[] = "You must specify a 'Tunnel network'."; + + if (count($input_errors) > 0) { + $savemsg = $input_errors[0]; + $stepid = $stepid - 1; + } +} + +function step12_submitphpaction() { + global $config; + + $pconfig = $config['ovpnserver']; + + if (!is_array($config['ovpnserver'])) { + $message = "No configuration found, please try again."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=1&message={$message}"); + exit; + } + + if ($pconfig['step1']['type'] == "local") { + $auth = array(); + $auth['name'] = "Local Database"; + $auth['type'] = "local"; + } else if (isset($pconfig['step2']['uselist'])) { + $auth = array(); + $auth['type'] = $pconfig['step1']['type']; + $auth['refid'] = uniqid(); + $auth['name'] = $pconfig['step2']['authtype']; + + if ($auth['type'] == "ldap") { + $auth['host'] = $pconfig['step2']['ip']; + $auth['ldap_port'] = $pconfig['step2']['port']; + if ($pconfig['step1']['transport'] == "tcp") + $auth['ldap_urltype'] = 'TCP - Standard'; + else + $auth['ldap_urltype'] = 'SSL - Encrypted'; + $auth['ldap_protver'] = 3; + $auth['ldap_scope'] = $pconfig['step2']['scope']; + $auth['ldap_basedn'] = $pconfig['step2']['basedn']; + $auth['ldap_authcn'] = $pconfig['step2']['authscope']; + $auth['ldap_binddn'] = $pconfig['step2']['userdn']; + $auth['ldap_bindpw'] = $pconfig['step2']['passdn']; + $auth['ldap_attr_user'] = $pconfig['step1']['nameattr']; + $auth['ldap_attr_member'] = $pconfig['step1']['memberattr']; + $auth['ldap_attr_group'] = $pconfig['step1']['groupattr']; + } else if ($auth['type'] == "radius") { + $auth['host'] = $pconfig['step2']['ip']; + $auth['radius_auth_port'] = $pconfig['step2']['port']; + $auth['radius_secret'] = $pconfig['step2']['password']; + $auth['radius_srvcs'] = "auth"; + } + if (!is_array($config['system']['authserver'])) + $config['system']['authserver'] = array(); + + $config['system']['authserver'][] = $auth; + } else if (!isset($pconfig['step2']['uselist']) && empty($pconfig['step2']['authserv'])) { + $message = "Please choose an authentication server ."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=1&message={$message}"); + exit; + } else if (!($auth = auth_get_authserver($pconfig['step2']['authserv']))) { + $message = "An invalid authentication server has been specified."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=1&message={$message}"); + exit; + } + + if (isset($pconfig['step6']['uselist']) && !empty($pconfig['step6']['certca'])) { + $ca = array(); + $ca['refid'] = uniqid(); + $ca['descr'] = $pconfig['step6']['certca']; + $dn = array( + 'countryName' => $pconfig['step6']['country'], + 'stateOrProvinceName' => $pconfig['step6']['state'], + 'localityName' => $pconfig['step6']['city'], + 'organizationName' => $pconfig['step6']['organization'], + 'emailAddress' => $pconfig['step6']['email'], + 'commonName' => $pconfig['step6']['certca']); + + ca_create($ca, $pconfig['step6']['keylength'], $pconfig['step6']['lifetime'], $dn, "sha256"); + if (!is_array($config['ca'])) + $config['ca'] = array(); + + $config['ca'][] = $ca; + } else if (!isset($pconfig['step6']['uselist']) && empty($pconfig['step6']['authcertca'])) { + $message = "Please choose a Certificate Authority."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=5&message={$message}"); + exit; + } else if (!($ca = lookup_ca($pconfig['step6']['authcertca']))) { + $message = "An invalid Certificate Authority has been specified."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=5&message={$message}"); + exit; + } + + if (isset($pconfig['step9']['uselist'])) { + $cert = array(); + $cert['refid'] = uniqid(); + $cert['descr'] = $pconfig['step9']['certname']; + $dn = array( + 'countryName' => $pconfig['step9']['country'], + 'stateOrProvinceName' => $pconfig['step9']['state'], + 'localityName' => $pconfig['step9']['city'], + 'organizationName' => $pconfig['step9']['organization'], + 'emailAddress' => $pconfig['step9']['email'], + 'commonName' => $pconfig['step9']['certname']); + + cert_create($cert, $ca['refid'], $pconfig['step9']['keylength'], $pconfig['step9']['lifetime'], $dn, 'server', "sha256"); + if (!is_array($config['cert'])) + $config['cert'] = array(); + + $config['cert'][] = $cert; + } else if (!isset($pconfig['step9']['uselist']) && empty($pconfig['step9']['authcertname'])) { + $message = "Please choose a Certificate."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=7&message={$message}"); + exit; + } else if (!($cert = lookup_cert($pconfig['step9']['authcertname']))) { + $message = "An invalid Certificate has been specified."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=7&message={$message}"); + exit; + } + $server = array(); + $server['vpnid'] = openvpn_vpnid_next(); + switch ($auth['type']) { + case "ldap": + $server['authmode'] = $auth['name']; + $server['mode'] = "server_user"; + break; + case "radius": + $server['authmode'] = $auth['name']; + $server['mode'] = "server_user"; + break; + default: + $server['authmode'] = "Local Database"; + $server['mode'] = "server_tls_user"; + break; + } + $server['caref'] = $ca['refid']; + $server['certref'] = $cert['refid']; + $server['protocol'] = $pconfig['step10']['protocol']; + $server['interface'] = $pconfig['step10']['interface']; + if (isset($pconfig['step10']['localport'])) + $server['local_port'] = $pconfig['step10']['localport']; + + if (strlen($pconfig['step10']['descr']) > 30) + $pconfig['step10']['descr'] = substr($pconfig['step10']['descr'], 0, 30); + $server['description'] = $pconfig['step10']['descr']; + $server['custom_options'] = $pconfig['step10']['advanced']; + if (isset($pconfig['step10']['tlsauth'])) { + if (isset($pconfig['step10']['gentlskey'])) + $tlskey = openvpn_create_key(); + else + $tlskey = $pconfig['step10']['tlskey']; + $server['tls'] = base64_encode($tlskey); + } + $server['dh_length'] = $pconfig['step10']['dhkey']; + $server['tunnel_network'] = $pconfig['step10']['tunnelnet']; + if (isset($pconfig['step10']['rdrgw'])) + $server['gwredir'] = $pconfig['step10']['rdrgw']; + if (isset($pconfig['step10']['localnet'])) + $server['local_network'] = $pconfig['step10']['localnet']; + if (isset($pconfig['step10']['concurrentcon'])) + $server['maxclients'] = $pconfig['step10']['concurrentcon']; + if (isset($pconfig['step10']['compression'])) + $server['compression'] = $pconfig['step10']['compression']; + if (isset($pconfig['step10']['tos'])) + $server['passtos'] = $pconfig['step10']['tos']; + if (isset($pconfig['step10']['interclient'])) + $server['client2client'] = $pconfig['step10']['interclient']; + if (isset($pconfig['step10']['duplicate_cn'])) + $server['duplicate_cn'] = $pconfig['step10']['duplicate_cn']; + if (isset($pconfig['step10']['dynip'])) + $server['dynamic_ip'] = $pconfig['step10']['dynip']; + if (isset($pconfig['step10']['addrpool'])) + $server['pool_enable'] = $pconfig['step10']['addrpool']; + if (isset($pconfig['step10']['defaultdomain'])) + $server['dns_domain'] = $pconfig['step10']['defaultdomain']; + if (isset($pconfig['step10']['dns1'])) + $server['dns_server1'] = $pconfig['step10']['dns1']; + if (isset($pconfig['step10']['dns2'])) + $server['dns_server2'] = $pconfig['step10']['dns2']; + if (isset($pconfig['step10']['dns3'])) + $server['dns_server3'] = $pconfig['step10']['dns3']; + if (isset($pconfig['step10']['dns4'])) + $server['dns_server4'] = $pconfig['step10']['dns4']; + if (isset($pconfig['step10']['ntp1'])) + $server['ntp_server1'] = $pconfig['step10']['ntp1']; + if (isset($pconfig['step10']['ntp2'])) + $server['ntp_server2'] = $pconfig['step10']['ntp2']; + if (isset($pconfig['step10']['wins1'])) + $server['wins_server1'] = $pconfig['step10']['wins1']; + if (isset($pconfig['step10']['wins2'])) + $server['wins_server2'] = $pconfig['step10']['wins2']; + if (isset($pconfig['step10']['nbtenable'])) { + $server['netbios_ntype'] = $pconfig['step10']['nbttype']; + if (isset($pconfig['step10']['nbtscope'])) + $server['netbios_scope'] = $pconfig['step10']['nbtscope']; + $server['netbios_enable'] = $pconfig['step10']['nbtenable']; + } + $server['crypto'] = $pconfig['step10']['crypto']; + $server['digest'] = $pconfig['step10']['digest']; + $server['engine'] = $pconfig['step10']['engine']; + + if (isset($pconfig['step11']['ovpnrule'])) { + $rule = array(); + $rule['descr'] = sprintf(gettext("OpenVPN %s wizard"),$server['description']); + /* Ensure the rule descr is not too long for pf to handle */ + if (strlen($rule['descr']) > 52) + $rule['descr'] = substr($rule['descr'], 0, 52); + $rule['direction'] = "in"; + $rule['source']['any'] = TRUE; + $rule['destination']['network'] = $server['interface'] . "ip"; + $rule['destination']['port'] = $server['local_port']; + $rule['interface'] = $server['interface']; + $rule['protocol'] = strtolower($server['protocol']); + $rule['type'] = "pass"; + $rule['enabled'] = "on"; + $rule['created'] = make_config_revision_entry(null, gettext("OpenVPN Wizard")); + $config['filter']['rule'][] = $rule; + } + if (isset($pconfig['step11']['ovpnallow'])) { + $rule = array(); + $rule['descr'] = sprintf(gettext("OpenVPN %s wizard"),$server['description']); + /* Ensure the rule descr is not too long for pf to handle */ + if (strlen($rule['descr']) > 52) + $rule['descr'] = substr($rule['descr'], 0, 52); + $rule['source']['any'] = TRUE; + $rule['destination']['any'] = TRUE; + $rule['interface'] = "openvpn"; + //$rule['protocol'] = $server['protocol']; + $rule['type'] = "pass"; + $rule['enabled'] = "on"; + $rule['created'] = make_config_revision_entry(null, gettext("OpenVPN Wizard")); + $config['filter']['rule'][] = $rule; + } + + if (!is_array($config['openvpn']['openvpn-server'])) + $config['openvpn']['openvpn-server'] = array(); + + $config['openvpn']['openvpn-server'][] = $server; + + openvpn_resync('server', $server); + write_config(); + header("Location: vpn_openvpn_server.php"); + exit; +} + +?> diff --git a/src/usr/local/www/wizards/openvpn_wizard.xml b/src/usr/local/www/wizards/openvpn_wizard.xml new file mode 100644 index 0000000..6aea7fd --- /dev/null +++ b/src/usr/local/www/wizards/openvpn_wizard.xml @@ -0,0 +1,987 @@ + + + +/* + part of pfSense (https://www.pfsense.org/) + + Copyright (C) 2010 Ermal Luçi + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +12 + + 1 + OpenVPN Wizard: Authentication Type Selection + OpenVPN Remote Access Server Setup Wizard + on + + + listtopic + Select an Authentication Backend Type + + + select + Type of Server + authtype + <br/><b>NOTE:</b> If you are unsure, leave this set to "Local User Access." + ovpnserver->step1->type + + + + + + + + Next + submit + + + step1_submitphpaction(); + /usr/local/www/wizards/openvpn_wizard.inc + + + 2 + OpenVPN Wizard: LDAP Server Selection + OpenVPN Remote Access Server Setup Wizard + on + + + listtopic + LDAP Authentication Server List + + + authserv + LDAP servers + select + ovpnserver->step2->authserv + + + + + + submit + Add new LDAP server + + + submit + Next + + + step2_stepbeforeformdisplay(); + step2_submitphpaction(); + enablechange(); + /usr/local/www/wizards/openvpn_wizard.inc + + + 3 + OpenVPN Wizard: Add LDAP Server + OpenVPN Remote Access Server Setup Wizard + on + + + listtopic + LDAP Authentication Server Parameters + + + name + Name + input + ovpnserver->step2->authtype + 30 + Descriptive server name, for your own reference. + + + ip + Hostname or IP address + input + ovpnserver->step2->ip + Address of the LDAP server. + + + port + Port + input + 8 + ovpnserver->step2->port + LDAP Server port, leave blank for the default (389 for TCP, 636 for SSL). + + + transport + Transport + select + ovpnserver->step2->transport + + + + + <br/>The protocol used by your LDAP server. It can either be standard TCP or SSL encrypted. + + + scope + Search Scope Level + select + + + + + ovpnserver->step2->scope + + + basedn + Search Scope Base DN + input + 40 + ovpnserver->step2->basedn + + + authscope + Authentication Containers + input + 40 + ovpnserver->step2->authscope + Semi-Colon separated. This will be prepended to the search base dn above or you can specify full container path.<br/>EXAMPLE: CN=Users;DC=example<br/>EXAMPLE: CN=Users,DC=example,DC=com;OU=OtherUsers,DC=example,DC=com + + + userdn + LDAP Bind User DN + input + 20 + If left blank, an anonymous bind will be done. + ovpnserver->step2->userdn + + + passdn + LDAP Bind Password + password + 20 + ovpnserver->step2->passdn + If a user DN was supplied above, this password will also be used when performing a bind operation. + + + nameattr + User Naming Attribute + input + ovpnserver->step2->nameattr + Typically "cn" (OpenLDAP, Novell eDirectory), "samAccountName" (Microsoft AD) + + + groupattr + Group Naming Attribute + input + ovpnserver->step2->groupattr + Typically "cn" (OpenLDAP, Microsoft AD, and Novell eDirectory) + + + memberattr + Member Naming Attribute + input + ovpnserver->step2->memberattr + Typically "member" (OpenLDAP), "memberOf" (Microsoft AD), "uniqueMember" (Novell eDirectory) + + + submit + Add new Server + + + step3_submitphpaction(); + enablechange(); + /usr/local/www/wizards/openvpn_wizard.inc + + + 4 + OpenVPN Wizard: RADIUS Server Selection + OpenVPN Remote Access Server Setup Wizard + on + + + listtopic + RADIUS Authentication Server List + + + authserv + RADIUS servers + select + ovpnserver->step2->authserv + + + + + + submit + Add new RADIUS server + + + submit + Next + + + step4_stepbeforeformdisplay(); + step4_submitphpaction(); + enablechange(); + /usr/local/www/wizards/openvpn_wizard.inc + + + 5 + OpenVPN Wizard: Add RADIUS Server + OpenVPN Remote Access Server Setup Wizard + on + + + listtopic + RADIUS Authentication Server Parameters + + + name + Name + input + ovpnserver->step2->authtype + 20 + Descriptive name for the RADIUS server, for your reference. + + + ip + Hostname or IP address + input + ovpnserver->step2->ip + Address of the RADIUS server. + + + port + Authentication Port + input + 8 + ovpnserver->step2->port + Port used by the RADIUS server for accepting Authentication requests, typically 1812. + + + secret + Shared Secret + password + 20 + ovpnserver->step2->password + + + + Add new Server + submit + + + step5_submitphpaction(); + /usr/local/www/wizards/openvpn_wizard.inc + + + 6 + OpenVPN Wizard: Certificate Authority Selection + OpenVPN Remote Access Server Setup Wizard + on + + + Choose a Certificate Authority (CA) + listtopic + + + certca_selection + certca + Certificate Authority + ovpnserver->step6->authcertca + + + submit + Add new CA + + + Next + submit + + + step6_stepbeforeformdisplay(); + step6_submitphpaction(); + /usr/local/www/wizards/openvpn_wizard.inc + + + 7 + OpenVPN Wizard: Add Certificate Authority + OpenVPN Remote Access Server Setup Wizard + on + + + Create a New Certificate Authority (CA) Certificate + listtopic + + + descr + Descriptive name + A name for your reference, to identify this certificate. This is the same as common-name field for other Certificates. + input + 20 + ovpnserver->step6->certca + + + keylength + Key length + <br/>Size of the key which will be generated. The larger the key, the more security it offers, but larger keys are generally slower to use. + select + 2048 + ovpnserver->step6->keylength + + + + + + + + + lifetime + Lifetime + input + 10 + 3650 + Lifetime in days. This is commonly set to 3650 (Approximately 10 years.) + ovpnserver->step6->lifetime + + + country + Country Code + Two-letter ISO country code (e.g. US, AU, CA) + input + 5 + ovpnserver->step6->country + + + state + State or Province + Full State or Province name, not abbreviated (e.g. Kentucky, Indiana, Ontario). + input + 30 + ovpnserver->step6->state + + + city + City + City or other Locality name (e.g. Louisville, Indianapolis, Toronto). + input + 30 + ovpnserver->step6->city + + + organization + Organization + Organization name, often the Company or Group name. + input + 30 + ovpnserver->step6->organization + + + email + E-mail + E-mail address for the Certificate contact. Often the e-mail of the person generating the certificate (i.e. You.) + input + 30 + ovpnserver->step6->email + + + Add new CA + submit + + + step7_submitphpaction(); + /usr/local/www/wizards/openvpn_wizard.inc + enablechange(); + + + 8 + OpenVPN Wizard: Server Certificate Selection + OpenVPN Remote Access Server Setup Wizard + on + + + Choose a Server Certificate + listtopic + + + cert_selection + certname + Certificate + ovpnserver->step9->authcertname + + + submit + Add new Certificate + + + Next + submit + + + step8_stepbeforeformdisplay(); + step8_submitphpaction(); + /usr/local/www/wizards/openvpn_wizard.inc + + + 9 + OpenVPN Wizard: Add a Server Certificate + OpenVPN Remote Access Server Setup Wizard + on + + + Create a New Server Certificate + listtopic + + + descr + Descriptive name + A name for your reference, to identify this certificate. This is also known as the certificate's "Common Name." + input + 20 + ovpnserver->step9->certname + + + keylength + Key length + <br/>Size of the key which will be generated. The larger the key, the more security it offers, but larger keys are generally slower to use. + select + 2048 + ovpnserver->step9->keylength + + + + + + + + + lifetime + Lifetime + Lifetime in days. This is commonly set to 3650 (Approximately 10 years.) + input + 10 + 3650 + ovpnserver->step9->lifetime + + + country + Country Code + Two-letter ISO country code (e.g. US, AU, CA) + input + 5 + ovpnserver->step9->country + + + state + State or Province + Full State of Province name, not abbreviated (e.g. Kentucky, Indiana, Ontario). + input + 30 + ovpnserver->step9->state + + + city + City + City or other Locality name (e.g. Louisville, Indianapolis, Toronto). + input + 30 + ovpnserver->step9->city + + + organization + Organization + Organization name, often the Company or Group name. + input + 30 + ovpnserver->step9->organization + + + email + E-mail + E-mail address for the Certificate contact. Often the e-mail of the person generating the certificate (i.e. You.) + input + 30 + ovpnserver->step9->email + + + Create new Certificate + submit + + + step9_stepbeforeformdisplay(); + step9_submitphpaction(); + /usr/local/www/wizards/openvpn_wizard.inc + + + 10 + OpenVPN Wizard: Server Setup + OpenVPN Remote Access Server Setup Wizard + on + + + listtopic + General OpenVPN Server Information + + + interface + interfaces_selection + The interface where OpenVPN will listen for incoming connections (typically WAN.) + Interface + ovpnserver->step10->interface + + + Protocol + select + ovpnserver->step10->protocol + + + + + <br/>Protocol to use for OpenVPN connections. If you are unsure, leave this set to UDP. + + + localport + Local Port + Local port upon which OpenVPN will listen for connections. The default port is 1194. This can be left at its default unless you need to use a different port. + input + 10 + ovpnserver->step10->localport + + + description + Description + A name for this OpenVPN instance, for your reference. It can be set however you like, but is often used to distinguish the purpose of the service (e.g. "Remote Technical Staff"). It is also used by OpenVPN Client Export to identify this VPN on clients. + input + 30 + ovpnserver->step10->descr + + + listtopic + Cryptographic Settings + + + TLS Authentication + checkbox + on + Enable authentication of TLS packets. + ovpnserver->step10->tlsauth + + + Generate TLS Key + generatetlskey + tlssharedkey + on + checkbox + Automatically generate a shared TLS authentication key. + ovpnserver->step10->gentlskey + + + TLS Shared Key + tlssharedkey + Paste in a shared TLS key if one has already been generated. + textarea + 30 + 5 + ovpnserver->step10->tlskey + + + DH Parameters Length + dhparameters + select + 2048 + ovpnserver->step10->dhkey + + + + + + <br/>Length of Diffie-Hellman (DH) key exchange parameters, used for establishing a secure communications channel. As with other such settings, the larger values are more secure, but may be slower in operation. + + + crypto + select + Encryption Algorithm + ovpnserver->step10->crypto + AES-256-CBC + + + + <br/>The algorithm used to encrypt traffic between endpoints. This setting must match on the client and server side, but is otherwise set however you like. Certain algorithms will perform better on different hardware, depending on the availability of supported VPN accelerator chips. + + + digest + select + Auth Digest Algorithm + ovpnserver->step10->digest + + + + SHA1 + <br/>The method used to authenticate traffic between endpoints. This setting must match on the client and server side, but is otherwise set however you like. + + + engine + select + Hardware Crypto + ovpnserver->step10->engine + + + + <br/>The hardware cryptographic accelerator to use for this VPN connection, if any. + + + listtopic + Tunnel Settings + + + Tunnel Network + tunnelnet + input + 20 + ovpnserver->step10->tunnelnet + This is the virtual network used for private communications between this server and client hosts expressed using CIDR notation (eg. 10.0.8.0/24). The first network address will be assigned to the server virtual interface. The remaining network addresses can optionally be assigned to connecting clients. (see Address Pool) + + + Redirect Gateway + redirectgw + checkbox + Force all client generated traffic through the tunnel. + ovpnserver->step10->rdrgw + + + Local Network + localnet + input + 20 + ovpnserver->step10->localnet + This is the network that will be accessible from the remote endpoint, expressed as a CIDR range. You may leave this blank if you don't want to add a route to the local network through this tunnel on the remote machine. This is generally set to your LAN network. + + + Concurrent Connections + concurrentcon + Specify the maximum number of clients allowed to concurrently connect to this server. + input + 10 + ovpnserver->step10->concurrentcon + + + Compression + compression + <br/>Compress tunnel packets using the LZO algorithm. Adaptive compression will dynamically disable compression for a period of time if OpenVPN detects that the data in the packets is not being compressed efficiently. + ovpnserver->step10->compression + select + + + + + + Type-of-Service + tos + checkbox + Set the TOS IP header value of tunnel packets to match the encapsulated packet's TOS value. + ovpnserver->step10->tos + + + Inter-Client Communication + interclient + checkbox + Allow communication between clients connected to this server. + ovpnserver->step10->interclient + + + Duplicate Connections + duplicate_cn + checkbox + Allow multiple concurrent connections from clients using the same Common Name.<br/>NOTE: This is not generally recommended, but may be needed for some scenarios. + ovpnserver->step10->duplicate_cn + + + listtopic + Client Settings + + + Dynamic IP + dynip + checkbox + on + Allow connected clients to retain their connections if their IP address changes. + ovpnserver->step10->dynip + + + Address Pool + addrpool + checkbox + on + Provide a virtual adapter IP address to clients (see Tunnel Network). + ovpnserver->step10->addrpool + + + DNS Default Domain + defaultdomain + input + Provide a default domain name to clients. + ovpnserver->step10->defaultdomain + + + DNS Server 1 + dnsserver1 + input + ovpnserver->step10->dns1 + DNS server IP to provide to connecting clients. + + + DNS Server 2 + dnserver2 + input + ovpnserver->step10->dns2 + DNS server IP to provide to connecting clients. + + + DNS Server 3 + dnserver3 + input + ovpnserver->step10->dns3 + DNS server IP to provide to connecting clients. + + + DNS Server 4 + dnserver4 + input + ovpnserver->step10->dns4 + DNS server IP to provide to connecting clients. + + + NTP Server + ntpserver1 + input + ovpnserver->step10->ntp1 + Network Time Protocol server to provide to connecting clients. + + + NTP Server 2 + ntpserver2 + input + ovpnserver->step10->ntp2 + Network Time Protocol server to provide to connecting clients. + + + nbtenable + checkbox + NetBIOS Options + ovpnserver->step10->nbtenable + Enable NetBIOS over TCP/IP. <br/>If this option is not set, all NetBIOS-over-TCP/IP options (including WINS) will be disabled. + + + NetBIOS Node Type + nbttype + select + ovpnserver->step10->nbttype + + + + <br/>Possible options: b-node (broadcasts), p-node (point-to-point name queries to a WINS server), m-node (broadcast then query name server), and h-node (query name server, then broadcast). + + + NetBIOS Scope ID + nbtscope + input + ovpnserver->step10->nbtscope + A NetBIOS Scope ID provides an extended naming service for NetBIOS over TCP/IP. The NetBIOS scope ID isolates NetBIOS traffic on a single network to only those nodes with the same NetBIOS scope ID. + + + WINS Server 1 + winsserver1 + input + ovpnserver->step10->wins1 + A Windows Internet Name Service (WINS) server IP to provide to connecting clients. Not desirable in most all modern networks. + + + WINS Server 2 + winsserver2 + input + ovpnserver->step10->wins2 + A Windows Internet Name Service (WINS) server IP to provide to connecting clients. Not desirable in most all modern networks. + + + Advanced + textarea + 30 + 5 + Enter any additional options you would like to add to the OpenVPN server configuration here, separated by a semicolon. EXAMPLE: push "route 10.0.0.0 255.255.255.0" + ovpnserver->step10->advanced + + + Next + submit + + + step10_stepbeforeformdisplay(); + step10_submitphpaction(); + /usr/local/www/wizards/openvpn_wizard.inc + + + 11 + OpenVPN Wizard: Firewall Rule Configuration + OpenVPN Remote Access Server Setup Wizard + on + + + listtopic + Firewall Rule Configuration + + + text + Firewall rules control what network traffic is permitted. You must add rules to allow traffic to the OpenVPN server's IP and port, as well as allowing traffic from connected clients through the tunnel. These rules can be automatically added here, or configured manually after completing the wizard. + + + listtopic + Traffic from clients to server + + + ovpnrule + Firewall Rule + Add a rule to permit connections to this OpenVPN server process from clients anywhere on the Internet. + checkbox + ovpnserver->step11->ovpnrule + + + listtopic + Traffic from clients through VPN + + + ovpnallow + OpenVPN rule + Add a rule to allow all traffic from connected clients to pass inside the VPN tunnel. + checkbox + ovpnserver->step11->ovpnallow + + + Next + submit + + + + + 12 + OpenVPN Wizard: Finished! + OpenVPN Remote Access Server Setup Wizard + on + + + listtopic + Configuration Complete! + + + text + Your configuration is now complete. + + + text + To be able to export client configurations, browse to System->Packages and install the OpenVPN Client Export package. + + + submit + Finish + + + step12_submitphpaction(); + /usr/local/www/wizards/openvpn_wizard.inc + + \ No newline at end of file diff --git a/src/usr/local/www/wizards/setup_wizard.xml b/src/usr/local/www/wizards/setup_wizard.xml new file mode 100644 index 0000000..9da0509 --- /dev/null +++ b/src/usr/local/www/wizards/setup_wizard.xml @@ -0,0 +1,703 @@ + + + +/* $Id$ */ +/* + setup_wizard.xml + part of pfSense (https://www.pfsense.org/) + + Copyright (C) 2004, 2005 Scott Ullrich + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +10 + + 1 + pfSense Setup Wizard + true + This wizard will guide you through the initial configuration of pfSense.<br/><br/> The wizard may be stopped at any time by clicking the logo image at the top of the screen. + + + Next + submit + + + + conf_mount_rw(); + unlink_if_exists('/conf/trigger_initial_wizard'); + conf_mount_ro(); + + + + 2 + Bling your pfSense with pfSense Gold + true + Feel the power of a pfSense Gold subscription. Receive special benefits while supporting ongoing development of the Open Source pfSense project.<br/> <br/> Benefits include access to our AutoConfigBackup secure cloud based backup service for up to 10 hosts, pre-publication access to the updated pfSense: The Definitive Guide book in PDF, fully updated for the pfSense 2.1 release, and a monthly online MeetUp! Video conference to discuss and demonstrate advanced features and architectures using pfSense. <br/> <br/> Go to <a href="https://www.pfsense.org/gold" target="_blank"> pfSense Gold Subscriptions</a> to sign up now <br/> <br/> + + + Next + submit + + + + + 3 + General Information + On this screen you will set the general pfSense parameters. + + + Hostname + input + wizardtemp->system->hostname + EXAMPLE: myserver + ^[a-zA-Z0-9-]+$ + Invalid Hostname + + + Domain + input + wizardtemp->system->domain + EXAMPLE: mydomain.com + ^[a-zA-Z0-9.-]+$ + Domain name field is invalid + + + DNS Resolver Behavior + text + The default behavior of the DNS Resolver will ignore manually configured DNS servers for client queries and query root DNS servers directly. To use the manually configured DNS servers below for client queries, visit Services > DNS Resolver and enable DNS Query Forwarding after completing the wizard. + + + Primary DNS Server + input + system->dnsserver + + yes + 0 + ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + Primary DNS Server field is invalid + + + Secondary DNS Server + input + system->dnsserver + 1 + ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + Secondary DNS Server field is invalid + + + Override DNS + Allow DNS servers to be overridden by DHCP/PPP on WAN + checkbox + system->dnsallowoverride + + + Next + submit + + + + + + + + + + + 4 + Time Server Information + Please enter the time, date and time zone. + + + Time server hostname + Enter the hostname (FQDN) of the time server. + input + system->timeservers + + + Timezone + timezone_select + system->timezone + + + Next + submit + + + + + + + + 5 + true + Configure WAN Interface + On this screen we will configure the Wide Area Network information. + + var selectedItem = 0; + if(document.forms[0].ipaddress.value == 'dhcp') { + selectedItem = 1; + document.forms[0].ipaddress.value = ''; + } else if(document.forms[0].ipaddress.value == 'pppoe') { + selectedItem = 2; + document.forms[0].ipaddress.value = ''; + } else if(document.forms[0].ipaddress.value == 'pptp') { + selectedItem = 3; + document.forms[0].ipaddress.value = ''; + } else if(document.forms[0].ipaddress.value == 'ppp' || document.forms[0].ipaddress.value == 'l2tp') { + document.forms[0].ipaddress.value = ''; + } else { + selectedItem = 0; + } + document.forms[0].selectedtype.selectedIndex = selectedItem; + enableitems(selectedItem); + + + + SelectedType + select + true + + + + + + + + + General configuration + listtopic + + + true + MAC Address + interfaces->wan->spoofmac + input + This field can be used to modify ("spoof") the MAC address of the WAN interface (may be required with some cable connections). Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx or leave blank. + ^([0-9a-f]{2}([:-]||$)){6}$ + MAC Address field is invalid + + + true + MTU + input + interfaces->wan->mtu + Set the MTU of the WAN interface. If you leave this field blank, an MTU of 1492 bytes for PPPoE and 1500 bytes for all other connection types will be assumed. + + + true + MSS + input + interfaces->wan->mss + If you enter a value in this field, then MSS clamping for TCP connections to the value entered above minus 40 (TCP/IP header size) will be in effect. If you leave this field blank, an MSS of 1492 bytes for PPPoE and 1500 bytes for all other connection types will be assumed. This should match the above MTU value in most all cases. + + + Static IP Configuration + listtopic + + + IP Address + interfaces->wan->ipaddr + input + / + true + ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + IP Address field is invalid + + + true + true + true + Subnet Mask + interfaces->wan->subnet + subnet_select + + + Upstream Gateway + wizardtemp->wangateway + input + ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + Gateway IP Address field is invalid + + + DHCP client configuration + listtopic + + + DHCP Hostname + input + interfaces->wan->dhcphostname + The value in this field is sent as the DHCP client identifier and hostname when requesting a DHCP lease. Some ISPs may require this (for client identification). + + + PPPoE configuration + listtopic + + + PPPoE Username + input + wizardtemp->wan->username + + + PPPoE Password + input + wizardtemp->wan->password + + + PPPoE Service name + input + Hint: this field can usually be left empty + wizardtemp->wan->provider + + + PPPoE Dial on demand + Enable Dial-On-Demand mode + checkbox + This option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected. + wizardtemp->wan->ondemand + + + PPPoE Idle timeout + input + If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature. + wizardtemp->wan->idletimeout + + + PPTP configuration + listtopic + + + PPTP Username + input + wizardtemp->wan->pptpusername + + + PPTP Password + input + wizardtemp->wan->pptppassword + + + true + PPTP Local IP Address + input + / + wizardtemp->wan->localip + ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + PPTP Local IP Address field is invalid + + + true + true + true + pptplocalsubnet + wizardtemp->wan->subnet + subnet_select + + + PPTP Remote IP Address + wizardtemp->wan->gateway + input + ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + PPTP Remote IP Address field is invalid + + + PPTP Dial on demand + Enable Dial-On-Demand mode + checkbox + wizardtemp->wan->pptpondemand + This option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected. + + + PPTP Idle timeout + input + wizardtemp->wan->pptpidletimeout + If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature. + + + RFC1918 Networks + listtopic + + + true + Block RFC1918 Private Networks + When set, this option blocks traffic from IP addresses that are reserved for private networks as per RFC 1918 (10/8, 172.16/12, 192.168/16) as well as loopback addresses (127/8). You should generally leave this option turned on, unless your WAN network lies in such a private address space, too. + checkbox + interfaces->wan->blockpriv + Block private networks from entering via WAN + + + Block bogon networks + listtopic + + + true + Block bogon networks + When set, this option blocks traffic from IP addresses that are reserved (but not RFC 1918) or not yet assigned by IANA. Bogons are prefixes that should never appear in the Internet routing table, and obviously should not appear as the source address in any packets you receive. + checkbox + interfaces->wan->blockbogons + Block non-Internet routed networks from entering via WAN + + + Next + submit + + + + + + + $ppp) { + if ($ppp['ptpid'] == "0") { + if ((substr($config['interfaces']['wan']['if'],0,5) == "pppoe") || (substr($config['interfaces']['wan']['if'],0,4) == "pptp")) { + $oldif = explode(",", $ppp['ports']); + $config['interfaces']['wan']['if'] = $oldif[0]; + } + if ($type == "pppoe" || $type == "pptp") + unset($config['ppps']['ppp'][$pppid]); + } + } + } + + if ($type == "pppoe" || $type == "pptp") { + if ($type == "pptp") { + $config['wizardtemp']['wan']['username'] = $config['wizardtemp']['wan']['pptpusername']; + $config['wizardtemp']['wan']['password'] = $config['wizardtemp']['wan']['pptppassword']; + $config['wizardtemp']['wan']['ondemand'] = $config['wizardtemp']['wan']['pptpondemand']; + $config['wizardtemp']['wan']['idletimeout'] = $config['wizardtemp']['wan']['pptpidletimeout']; + unset($config['wizardtemp']['wan']['pptpusername']); + unset($config['wizardtemp']['wan']['pptppassword']); + unset($config['wizardtemp']['wan']['pptpondemand']); + unset($config['wizardtemp']['wan']['pptpidletimeout']); + } + $config['wizardtemp']['wan']['password'] = base64_encode($config['wizardtemp']['wan']['password']); + $tmp = array(); + $tmp['ptpid'] = "0"; + $tmp['type'] = $type; + $tmp['if'] = $type . "0"; + $tmp['ports'] = $config['interfaces']['wan']['if']; + $config['ppps']['ppp'][] = array_merge($tmp, $config['wizardtemp']['wan']); + unset($tmp); + $config['interfaces']['wan']['if'] = $type."0"; + } + unset($config['wizardtemp']['wan']); + ]]> + + + + + + + 6 + Configure LAN Interface + On this screen we will configure the Local Area Network information. + + + LAN IP Address + input + interfaces->lan->ipaddr + Type dhcp if this interface uses DHCP to obtain its IP address. + ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ + LAN IP Address field is invalid + + + Subnet Mask + subnet_select + interfaces->lan->subnet + + + Next + submit + + + + = $ipaddresses_before) { + // The LAN IP is in the 1st half of the subnet, so put DHCP in the 2nd half. + if ($ipaddresses_after > 30) { + // There is reasonable space in the subnet, use a smaller chunk of the space for DHCP + // This case will work out like the old defaults if the user has specified the ".1" address. + // The range will be something like ".10" to ".245" + $config['dhcpd']['lan']['range']['from'] = ip_after($_POST['lanipaddress'], 9); + $config['dhcpd']['lan']['range']['to'] = ip_before($highestip, 10); + } else { + // There is not much space in the subnet, so allocate everything above the LAN IP to DHCP. + $config['dhcpd']['lan']['range']['from'] = ip_after($_POST['lanipaddress']); + $config['dhcpd']['lan']['range']['to'] = ip_before($highestip); + } + } else { + // The LAN IP is in the 2nd half of the subnet, so put DHCP in the 1st half. + if ($ipaddresses_before > 30) { + // There is reasonable space in the subnet, use a smaller chunk of the space for DHCP + $config['dhcpd']['lan']['range']['from'] = ip_after($lowestip, 10); + $config['dhcpd']['lan']['range']['to'] = ip_before($_POST['lanipaddress'], 9); + } else { + // There is not much space in the subnet, so allocate everything below the LAN IP to DHCP. + $config['dhcpd']['lan']['range']['from'] = ip_after($lowestip); + $config['dhcpd']['lan']['range']['to'] = ip_before($_POST['lanipaddress']); + } + } + ]]> + + + + 7 + Set Admin WebGUI Password + On this screen we will set the admin password, which is used to access the WebGUI and also SSH services if you wish to enable them. + + + Admin Password + password + + + Admin Password AGAIN + password + + + Next + submit + + + + if($_POST['adminpassword'] != "") { + if($_POST['adminpassword'] == $_POST['adminpasswordagain']) { + $admin_user =& getUserEntryByUID(0); + local_user_set_password($admin_user, $_POST['adminpassword']); + local_user_set($admin_user); + write_config(); + } else { + print_info_box_np("Passwords do not match! Please press back in your browser window and correct."); + die; + } + } + + + + 8 + Reload configuration + true + Click 'Reload' to reload pfSense with new changes. + + + Reload + submit + + + + + 9 + Reload in progress + + A reload is now in progress. Please wait. <p> + <meta http-equiv="refresh" content="5; url=wizard.php?xml=setup_wizard.xml&stepid=9" > + <p> + The wizard will redirect to the next step once the reload is completed. + + + + + + + 10 + Wizard completed. + + 'pfSense') { + header("Location: " . fixup_string("\$myurl")); + exit; + } + ]]> + + + + Please consider contributing back to the project!

                              + Click here to purchase services offered by the pfSense team and find other ways to contribute.

                              + Click here to continue on to pfSense webConfigurator. + ]]> + + + diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc new file mode 100644 index 0000000..d984fed --- /dev/null +++ b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc @@ -0,0 +1,1664 @@ + $ifdesc) { + if (!is_altq_capable(get_real_interface($if))) + continue; + if (interface_has_gateway($if) || interface_has_gatewayv6($if)) + $wans++; + else + $lans++; + } + + foreach ($fields as &$field) + if ($field['name'] == 'numberofconnections') + $field['value'] = ($wans < $lans ? $wans : $lans); +} + +function step1_submitphpaction() { + global $stepid, $savemsg; + + if (!isset($_POST['numberofconnections'])) { + $savemsg=gettext("You need to specify the number of connections."); + $stepid--; + return; + } + if (intval($_POST['numberofconnections']) < 1) { + $savemsg=gettext("The number of connections should be greater than 1."); + $stepid--; + return; + } +} + +function step2_stepbeforeformdisplay() { + global $config, $pkg; + global $stepid, $savemsg; + + $wans = 0; + $lans = 0; + $iflist = array(); + $iflisttmp = get_configured_interface_with_descr(); + foreach ($iflisttmp as $if => $ifdesc) { + if (!is_altq_capable(get_real_interface($if))) + continue; + if (interface_has_gateway($if) || interface_has_gatewayv6($if)) + $wans++; + else + $lans++; + $iflist[$if] = $ifdesc; + } + $numberofconnections = intval($config['ezshaper']['step1']['numberofconnections']); + if ($numberofconnections > ($wans < $lans ? $wans : $lans)) { + $savemsg=gettext("You have less interfaces than number of connections!"); + $stepid--; + return; + } + + $cfgname = "traffic_shaper_wizard_dedicated.xml"; + + $fields =& $pkg['step'][1]['fields']['field']; + + /* + unset($config['ezshaper']['step2']); + $config['ezshaper']['step2'] = array(); + write_config(); + */ + $fields = array(); + + for ($i = 0; $i < $numberofconnections; $i++) { + $field = array(); + $linknum = $i+1; + $ifsel = ($i * 2); + $field['name'] = "Connection #{$linknum} parameters"; + $field['type'] = "listtopic"; + $fields[] = $field; + + $field = array(); + $field['displayname'] = "Local interface"; + $field['name'] = "local{$i}interface"; + $field['type'] = "select"; + $field['options']['option'] = array(); + $ifcnt = 0; + foreach ($iflist as $ifname => $ifdescr) { + // Skip wan interfaces here + if (interface_has_gateway($ifname) || interface_has_gatewayv6($ifname)) + continue; + if ($ifcnt == ($ifsel + 1)) + $field['value'] = $ifname; + $opts = array(); + $opts['displayname'] = $ifdescr; + $opts['name'] = $ifname; + $opts['value'] = $ifname; + $field['options']['option'][] = $opts; + $ifcnt++; + } + $field['combinefieldsbegin'] = "true"; + $field['bindstofield'] = "ezshaper->step2->local{$i}interface"; + $fields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "local{$i}downloadscheduler"; + $field['type'] = "select"; + $field['typehint'] = "Queueing discipline to apply on the download of this connection."; + $field['options']['option'] = array(); + $opts = array(); + $opts['name'] = "HFSC"; + $opts['value'] = "HFSC"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "CBQ"; + $opts['value'] = "CBQ"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "PRIQ"; + $opts['value'] = "PRIQ"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step2->local{$i}downloadscheduler"; + $fields[] = $field; + + $field = array(); + $field['displayname'] = "WAN Interface"; + $field['name'] = "conn{$i}interface"; + $field['type'] = "select"; + $field['options']['option'] = array(); + $ifcnt = 0; + foreach ($iflist as $ifname => $ifdescr) { + // Skip lan interfaces here + if (!interface_has_gateway($ifname) && !interface_has_gatewayv6($ifname)) + continue; + if ($ifcnt == $ifsel) + $field['value'] = $ifname; + $opts = array(); + $opts['displayname'] = $ifdescr; + $opts['name'] = $ifname; + $opts['value'] = $ifname; + $field['options']['option'][] = $opts; + $ifcnt++; + } + $field['bindstofield'] = "ezshaper->step2->conn{$i}interface"; + $field['combinefieldsbegin'] = "true"; + $fields[] = $field; + + $field = array(); + $field['name'] = "conn{$i}uploadscheduler"; + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['type'] = "select"; + $field['typehint'] = "Queueing discipline to apply on the upload of this connection."; + $field['options']['option'] = array(); + $opts = array(); + $opts['name'] = "HFSC"; + $opts['value'] = "HFSC"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "CBQ"; + $opts['value'] = "CBQ"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "PRIQ"; + $opts['value'] = "PRIQ"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step2->conn{$i}uploadscheduler"; + $fields[] = $field; + + $field = array(); + $field['displayname'] = "Upload"; + $field['name'] = "conn{$i}upload"; + $field['type'] = "input"; + $field['bindstofield'] = "ezshaper->step2->conn{$i}upload"; + $field['combinefieldsbegin'] = "true"; + $fields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "conn{$i}uploadspeed"; + $field['typehint'] = "Upload bandwidth on this connection."; + $field['type'] = "select"; + $field['options']['option'] = array(); + $opts = array(); + $opts['value'] = "Kb"; + $opts['name'] = "Kbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Mb"; + $opts['name'] = "Mbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Gb"; + $opts['name'] = "Gbit/s"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step2->conn{$i}uploadspeed"; + $fields[] = $field; + + $field = array(); + $field['displayname'] = "Download"; + $field['name'] = "conn{$i}download"; + $field['type'] = "input"; + $field['bindstofield'] = "ezshaper->step2->conn{$i}download"; + $field['combinefieldsbegin'] = "true"; + $fields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "conn{$i}downloadspeed"; + $field['typehint'] = "Download bandwidth on this connection."; + $field['type'] = "select"; + $field['options']['option'] = array(); + $opts = array(); + $opts['value'] = "Kb"; + $opts['name'] = "Kbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Mb"; + $opts['name'] = "Mbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Gb"; + $opts['name'] = "Gbit/s"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step2->conn{$i}downloadspeed"; + $fields[] = $field; + } + $field = array(); + $field['name'] = "Next"; + $field['type'] = "submit"; + $fields[] = $field; +} + +function step2_stepsubmitphpaction() { + global $config; + global $stepid, $savemsg; + $sumdownloads = 0; + + /* Input Validation */ + $steps = intval($config['ezshaper']['step1']['numberofconnections']); + for ($i = 0; $i < $steps; $i++) { + for ($j = $i + 1; $j <= $steps; $j++) { + if ($_POST["conn{$i}interface"] == $_POST["conn{$j}interface"] || $_POST["conn{$i}interface"] == $_POST["local{$j}interface"]) { + $savemsg=gettext("You cannot select the same interface for connections {$i} and {$j}."); + $stepid--; + return; + } + if (trim($_POST["conn{$i}uploadscheduler"]) != "PRIQ") { + if (!is_numeric($_POST["conn{$i}upload"])) { + $savemsg = gettext("Upload bandwidth of connection {$i} is not valid."); + $stepid--; + return; + } + if (!is_numeric($_POST["conn{$i}download"])) { + $savemsg = gettext("Download bandwidth of connection {$i} is not valid."); + $stepid--; + return; + } + $upbw = $_POST["conn{$i}upload"]; + $downbw = $_POST["conn{$i}download"]; + if ($upbw < 1 || $downbw < 1) { + $savemsg = gettext("You cannot specify bandwidth smaller than 1!"); + $stepid--; + return; + } + if (intval($upbw) < 128 && $_POST["conn{$i}uploadspeed"] == "Kb" && trim($_POST["conn{$i}uploadscheduler"]) == "CBQ") { + $savemsg=gettext("Uploads smaller than 128Kbit/s is not supported for connection {$i} on CBQ scheduler."); + $stepid--; + return; + } + } + if ($_POST["local{$i}interface"] == $_POST["conn{$j}interface"] || $_POST["local{$i}interface"] == $_POST["local{$j}interface"]) { + $savemsg=gettext("You cannot select the same interface for local and outside."); + $stepid--; + return; + } + } + } + + /* This is necessary since the wizard expects predefined fields. */ + unset($config['ezshaper']['step2']); + $config['ezshaper']['step2'] = array(); + + for ($i = 0; $i < $steps; $i++) { + $config['ezshaper']['step2']["local{$i}downloadscheduler"] = $_POST["local{$i}downloadscheduler"]; + $config['ezshaper']['step2']["local{$i}interface"] = $_POST["local{$i}interface"]; + $config['ezshaper']['step2']["conn{$i}uploadscheduler"] = $_POST["conn{$i}uploadscheduler"]; + $config['ezshaper']['step2']["conn{$i}upload"] = $_POST["conn{$i}upload"]; + $config['ezshaper']['step2']["conn{$i}uploadspeed"] = $_POST["conn{$i}uploadspeed"]; + $config['ezshaper']['step2']["conn{$i}download"] = $_POST["conn{$i}download"]; + $config['ezshaper']['step2']["conn{$i}downloadspeed"] = $_POST["conn{$i}downloadspeed"]; + $config['ezshaper']['step2']["conn${i}interface"] = $_POST["conn{$i}interface"]; + } +} + +function step3_stepbeforeformdisplay() { + global $config, $pkg; + global $stepid, $savemsg; + + $cfgname = "traffic_shaper_wizard_dedicated.xml"; + + $numberofconnections = intval($config['ezshaper']['step1']['numberofconnections']); + + $fields =& $pkg['step'][1]['fields']['field']; + + $voipfields =& $pkg['step'][2]['fields']['field']; + + $voipfields = array(); + $enablefields = array(); + + $field = array(); + $field['name'] = "Enable"; + $field['type'] = "checkbox"; + $field['typehint'] = "Prioritize Voice over IP traffic."; + $field['bindstofield'] = "ezshaper->step3->enable"; + $field['descritpion'] = "This will raise the priority of VOIP traffic above all other traffic."; + $voipfields[] = $field; + + $field = array(); + $field['name'] = "Next"; + $field['type'] = "submit"; + $voipfields[] = $field; + + $field = array(); + $field['name'] = "VOIP specific settings"; + $field['type'] = "listtopic"; + $voipfields[] = $field; + + $field = array(); + $field['name'] = "Provider"; + $enablefields[] = "Provider"; + $field['type'] = "select"; + $field['description'] = "Choose Generic if your provider isn't listed."; + $field['options']['option'] = array(); + $opts = array(); + $opts['name'] = "Generic (lowdelay)"; + $opts['value'] = "Generic"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "VoicePulse"; + $opts['value'] = "VoicePulse"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "Asterisk/Vonage"; + $opts['value'] = "Asterisk"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "PanasonicTDA"; + $opts['value'] = "Panasonic"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step3->provider"; + $voipfields[] = $field; + + $field = array(); + $field['displayname'] = "Upstream SIP Server"; + $field['name'] = "upstream_sip_server"; + $enablefields[] = "upstream_sip_server"; + $field['type'] = "inputalias"; + $field['description'] = "(Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the remote PBX or SIP Trunk to prioritize.
                              NOTE: You can also use a Firewall Alias in this location."; + $field['message'] = "IP Address field is non-blank and doesn't look like an IP address."; + $field['bindstofield'] = "ezshaper->step3->address"; + $voipfields[] = $field; + + for ($i = 0; $i < $numberofconnections; $i++) { + $connum = $i + 1; + $field = array(); + $field['name'] = "Connection #{$connum} parameters"; + $field['type'] = "listtopic"; + $voipfields[] = $field; + + $field = array(); + $field['displayname'] = "Upload"; + $field['name'] = "conn{$i}upload"; + $enablefields[] = "conn{$i}upload"; + $field['type'] = "input"; + $field['bindstofield'] = "ezshaper->step3->conn{$i}upload"; + $field['combinefieldsbegin'] = "true"; + $voipfields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "conn{$i}uploadspeed"; + $enablefields[] = "conn{$i}uploadspeed"; + $field['typehint'] = "Upload bandwidth guarantee for VOIP phone(s) on connection {$i}."; + $field['type'] = "select"; + $field['options']['option'] = array(); + $opts = array(); + $opts['value'] = "Kb"; + $opts['name'] = "Kbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Mb"; + $opts['name'] = "Mbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Gb"; + $opts['name'] = "Gbit/s"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step3->conn{$i}uploadspeed"; + $voipfields[] = $field; + + $field = array(); + $field['displayname'] = "Download"; + $field['name'] = "local{$i}download"; + $enablefields[] = "local{$i}download"; + $field['type'] = "input"; + $field['bindstofield'] = "ezshaper->step3->local{$i}download"; + $field['combinefieldsbegin'] = "true"; + $voipfields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "local{$i}downloadspeed"; + $enablefields[] = "local{$i}downloadspeed"; + $field['typehint'] = "Download bandwidth guarantee for VOIP phone(s) on connections."; + $field['type'] = "select"; + $field['options']['option'] = array(); + $opts = array(); + $opts['value'] = "Kb"; + $opts['name'] = "Kbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Mb"; + $opts['name'] = "Mbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Gb"; + $opts['name'] = "Gbit/s"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step3->local{$i}downloadspeed"; + $voipfields[] = $field; + } + + $field = array(); + $field['name'] = "Next"; + $field['type'] = "submit"; + $voipfields[] = $field; + $voipfields[0]['enablefields'] = implode(",", $enablefields); +} + +function step3_stepsubmitphpaction() { + global $config; + global $stepid, $savemsg; + + if (!$_POST['enable']) + return; + + if($_POST['upstream_sip_server']) { + if(!is_ipaddroralias($_POST['upstream_sip_server'])) { + /* item is not an ip or alias. error out */ + $savemsg=gettext("Address must be a valid IP address or Firewall Alias. Please correct this value to continue."); + $stepid--; + return; + } + } + + $steps = intval($config['ezshaper']['step1']['numberofconnections']); + for ($i = 0; $i < $steps; $i++) { + if ($config['ezshaper']['step2']["conn{$i}uploadscheduler"] != "PRIQ") { + if (!is_numeric($_POST["conn{$i}upload"])) { + $savemsg = gettext("Upload bandwidth of connection {$i} is not valid."); + $stepid--; + return; + } + if ($_POST["conn{$i}uploadspeed"] == "%") { + if (intval($_POST["conn{$i}upload"]) > 80) { + $savemsg=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection."); + $stepid--; + return; + } + } else { + $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}uploadspeed"]); + $ifbw = $factor * floatval($config['ezshaper']['step2']["conn{$i}upload"]); + $factor = wizard_get_bandwidthtype_scale($_POST["conn{$i}uploadspeed"]); + $input_bw = $factor * floatval($_POST["conn{$i}upload"]); + if ((0.8 * $ifbw) < $input_bw) { + $savemsg=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection."); + $stepid--; + return; + } + } + } + + if ($config['ezshaper']['step2']["local{$i}downloadscheduler"] != "PRIQ") { + if (!is_numeric($_POST["local{$i}download"])) { + $savemsg = gettext("Download bandwidth of connection {$i} is not valid."); + $stepid--; + return; + } + if ($_POST["local{$i}downloadspeed"] == "%") { + if (intval($_POST["local{$i}download"]) > 80) { + $savemsg=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection."); + $stepid--; + return; + } + } else { + $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}downloadspeed"]); + $ifbw = $factor * floatval($config['ezshaper']['step2']["conn{$i}download"]); + $factor = wizard_get_bandwidthtype_scale($_POST["local{$i}downloadspeed"]); + $input_bw = $factor * floatval($_POST["local{$i}download"]); + if ((0.8 * $ifbw) < $input_bw) { + $savemsg=gettext("You cannot set the VoIP download bandwidth on connection {$i} higher than 80% of the connection."); + $stepid--; + return; + } + } + } + } + + /* This is necessary since the wizard expects predefined fields. */ + unset($config['ezshaper']['step3']); + $config['ezshaper']['step3'] = array(); + + if (!empty($_POST['upstream_sip_server'])) + $config['ezshaper']['step3']['address'] = $_POST['upstream_sip_server']; + if ($_POST['enable'] == 'on') + $config['ezshaper']['step3']['enable'] = 'on'; + for ($i = 0; $i < $steps; $i++) { + $config['ezshaper']['step3']["local{$i}download"] = $_POST["local{$i}download"]; + $config['ezshaper']['step3']["local{$i}downloadspeed"] = $_POST["local{$i}downloadspeed"]; + $config['ezshaper']['step3']["conn{$i}upload"] = $_POST["conn{$i}upload"]; + $config['ezshaper']['step3']["conn{$i}uploadspeed"] = $_POST["conn{$i}uploadspeed"]; + } +} + +function step4_stepsubmitphpaction() { + global $config; + global $stepid, $savemsg; + + if ( $_POST['enable'] ) { + if(!$_POST['bandwidth']) { + $savemsg="You need to specify a value for bandwidth!"; + $stepid--; + return; + } + if(!is_numeric($_POST['bandwidth'])) { + $savemsg="The posted value is not a valid bandwidth."; + $stepid--; + return; + } + + if ($_POST['bandwidthspeed'] <> "%") { + $savemsg = gettext("Only percentage bandwidth specification is allowed."); + $stepid--; + return; + } + $bw = $_POST['bandwidth']; + if($bw > 15 || $bw < 2) { + $savemsg="Values should be between 2% and 15%!"; + $stepid--; + return; + } + if($_POST['address'] <> "" && !is_ipaddroralias($_POST['address'])) { + /* item is not an ip or alias. error out */ + $savemsg=gettext("Address must be a valid IP address or Firewall Alias. Please correct this value to continue."); + $stepid--; + } + } +} + +function step5_stepsubmitphpaction() { + global $stepid, $savemsg; + + if ( $_POST['enable'] ) { + if ($_POST['p2pcatchall']) { + if(!is_numeric($_POST['bandwidth'])) { + $savemsg="Posted value is not a valid bandwidth."; + $stepid--; + return; + } + if ($_POST['bandwidthspeed'] <> "%") { + $savemsg = gettext("Only percentage bandwidth specification is allowed."); + $stepid--; + return; + } + $bw = $_POST['bandwidth']; + if($bw > 15 || $bw < 2) { + $savemsg="Values should be between 2% and 15%!"; + $stepid--; + return; + } + } + } +} + +function step8_stepsubmitphpaction() { + global $g, $config; + + /* save the new configuration */ + apply_all_chosen_items(); + + /* reset rrd queues */ + system("rm -f /var/db/rrd/*queuedrops.rrd"); + system("rm -f /var/db/rrd/*queues.rrd"); + enable_rrd_graphing(); + + /* apply the new configuration to the system */ + filter_configure(); + + /* And we're no longer dirty! */ + clear_subsystem_dirty('shaper'); + + update_filter_reload_status("Initializing"); + header("Location: status_filter_reload.php"); + exit; +} + +function apply_all_chosen_items() { + global $config, $g, $altq_list_queues, $gamesplist, $voiplist, $othersplist, $p2plist; + + require_once("wizardapp.inc"); + + /* + * Wipe previous config. + * Doing it here makes sense since we can wipe the previous config only after + * the user decides to do so, finishing the wizard. + */ + if(isset($config['shaper']['queue'])) + unset($config['shaper']['queue']); + /* XXX: This is redundant, because this should be handled by converter at startup. */ + if(isset($config['shaper']['rule'])) + unset($config['shaper']['rule']); + foreach ($config['filter']['rule'] as $key => $rule) + if ($rule['wizard'] == "yes") + unset($config['filter']['rule'][$key]); + + /* restart the cached config */ + unset($altq_list_queues); + $altq_list_queues = array(); + + $steps = intval($config['ezshaper']['step1']['numberofconnections']); + + $interfacelist = array(); + + for ($i = 0; $i < $steps; $i++) { + + $tmppath = array(); + $altq =& new altq_root_queue(); + + $altq->SetInterface($config['ezshaper']['step2']["conn{$i}interface"]); + $interfacelist[] = $config['ezshaper']['step2']["conn{$i}interface"]; + $altq->SetScheduler($config['ezshaper']['step2']["conn{$i}uploadscheduler"]); + $altq->SetBandwidth(floatval($config['ezshaper']['step2']["conn{$i}upload"])); + $altq->SetBwscale($config['ezshaper']['step2']["conn{$i}uploadspeed"]); + $altq->SetEnabled("on"); + $altq_list_queues[$altq->GetQname()] =& $altq; + array_push($tmppath, $config['ezshaper']['step2']["conn{$i}interface"]); + $altq->SetLink($tmppath); + $altq->wconfig(); + + $sched = $config['ezshaper']['step2']["conn{$i}uploadscheduler"]; + $voipbw =0; + $voipbwunit = "Kb"; + $voip = false; + $penalty = false; + $penaltybw = 0; + $penaltybwunit = "Kb"; + $p2p = false; + $p2pcatchall = false; + $p2pcatchbw = 0; + $p2pcatchbwunit = "%"; + $games = false; + $otherpriority = false; + $remainbw = 0; + $factor = 0; + $upfactor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}uploadspeed"]); + $upbw = floatval($config['ezshaper']['step2']["conn{$i}upload"]) * $upfactor; + + if ($config['ezshaper']['step3']['enable']) { + $voip = true; + $voipbw = $config['ezshaper']['step3']["conn{$i}upload"]; + $voipbwunit = $config['ezshaper']['step3']["conn{$i}uploadspeed"]; + if ($voipbwunit == "%") + $factor = $upbw/100; + else + $factor = wizard_get_bandwidthtype_scale($voipbwunit); + $remainbw += $voipbw * $factor; + } + if ($config['ezshaper']['step4']['enable']) { + $penalty = true; + $penaltybw = $config['ezshaper']['step4']['bandwidth']; + $penaltybwunit = $config['ezshaper']['step4']['bandwidthunit']; + if ($penaltybwunit == "%") + $factor = $upbw/100; + else + $factor = wizard_get_bandwidthtype_scale($penaltybwunit); + $remainbw += $penaltybw * $factor; + } else { + $penalty = false; + $penaltybw = 0; + } + if ($config['ezshaper']['step5']['enable']) { + $p2p = true; + if ($config['ezshaper']['step5']['p2pcatchall']) { + $p2pcatchall = true; + $p2pcatchbw = $config['ezshaper']['step5']['bandwidth']; + $p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit']; + if ($p2pcatchbwunit == "%") + $factor = $upbw/100; + else + $factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit); + $remainbw += $p2pcatchbw * $factor; + } else { + $p2pcatchall = false; + $p2pcatchbw = 0; + } + } else { + $p2p = false; + $p2pcatchall = false; + $p2pcatchbw = 0; + } + if ($config['ezshaper']['step6']['enable']) { + $games = true; + } else { + $games = false; + } + + if ($config['ezshaper']['step7']['enable']) { + $otherpriority = true; + } else { + $otherpriority = false; + } + $remainbw = round($remainbw / $upbw * 100, 2); + + if (intval($remainbw) > 0 && intval($remainbw) > 30) { + $savemsg=gettext("Custom Bandwidths are greater than 30%. Please lower them for the wizard to continue."); + header("Location: wizard.php?xml=traffic_shaper_wizard_dedicated.xml&stepid=2&message={$savemsg}"); + exit; + } else { + $remainbw = 100 - $remainbw; + } + + if ($sched != "PRIQ") { + if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qInternet"; + //$tmpcf['priority'] = 6; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ") { + $tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}upload"]); + $tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + } + else if ($sched == "HFSC") { + $tmpcf['upperlimit'] = "on"; + $tmpcf['upperlimit3'] = + floatval($config['ezshaper']['step2']["conn{$i}upload"]) . $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = floatval($config['ezshaper']['step2']["conn{$i}upload"]) . $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + $tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}upload"]); + $tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + } + array_push($tmppath, "qInternet"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + //array_pop($tmppath); + //echo "qInternet
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + $altq =& $qtmp; + } + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qACK"; + $tmpcf['priority'] = 6; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.2; + $tmpcf['bandwidthtype'] = "%"; + } + else if ($sched == "HFSC") { + $lkbw = 0.20 * $remainbw; + $tmpcf['linkshare3'] = "{$lkbw}%"; + $tmpcf['linkshare'] = "on"; + $tmpcf['bandwidth'] = $lkbw; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qACK"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qACK
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + if ($p2pcatchall) + $tmpcf['name'] = "qOthersDefault"; + else + $tmpcf['name'] = "qDefault"; + $tmpcf['priority'] = 3; + $tmpcf['enabled'] = "on"; + if (!$p2pcatchall) + $tmpcf['default'] = "on"; + $tmpcf['ecn'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpcf['bandwidth'] = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, $tmpcf['name']); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qDefault
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + + if ($p2p) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qP2P"; + $tmpcf['priority'] = 1; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($p2pcatchall) { + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $p2pcatchbw; + $tmpcf['bandwidthtype'] = $p2pcatchbwunit; + } else if ($sched == "HFSC") { + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$p2pcatchbw}{$p2pcatchbwunit}"; + $tmpcf['upperlimit'] = "on"; + $tmpcf['upperlimit3'] = "{$p2pcatchbw}{$p2pcatchbwunit}"; + $tmpcf['bandwidth'] = $p2pcatchbw; + $tmpcf['bandwidthtype'] = $p2pcatchbwunit; + } + $tmpcf['default'] = "on"; + + } else { + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.05; /* 5% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpbw = $remainbw * 0.05; /* 5% bandwidth */ + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$tmpbw}%"; + $tmpcf['upperlimit'] = "on"; + $tmpcf['upperlimit3'] = "{$tmpbw}%"; + $tmpcf['bandwidth'] = $tmpbw; + $tmpcf['bandwidthtype'] = "%"; + } + } + array_push($tmppath, "qP2P"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qP2P
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($voip) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qVoIP"; + $tmpcf['priority'] = 7; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + if ($voipbw > 0) { + $tmpcf['bandwidth'] = $voipbw; + $tmpcf['bandwidthtype'] = $voipbwunit; + } else { + $tmpcf['bandwidth'] = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } + } else if ($sched == "HFSC") { + if ($voipbw > 0) { + $tmpcf['realtime3'] = "{$voipbw}{$voipbwunit}"; + } else { + $voipbw = $remainbw * 0.20; /* 20% bandwidth */ + $tmpcf['realtime3'] = "{$voipbw}%"; + } + $tmpcf['realtime'] = "on"; + $tmpcf['bandwidth'] = 32; + $tmpcf['bandwidthtype'] = "Kb"; + } + array_push($tmppath, "qVoIP"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qVoIP
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($games) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qGames"; + $tmpcf['priority'] = 5; + $tmpcf['enabled'] = "on"; + $tmpcf['ecn'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $gamesbw = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$gamesbw}%"; + $tmpcf['bandwidth'] = "{$gamesbw}"; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qGames"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qGames
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($otherpriority) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qOthersHigh"; + $tmpcf['priority'] = 4; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpcf['linkshare'] = "on"; + $otherbw = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['linkshare3'] = "{$otherbw}%"; + $tmpcf['bandwidth'] = $otherbw; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qOthersHigh"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qHigh
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qOthersLow"; + $tmpcf['priority'] = 2; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + if ($penalty) { + $tmpcf['bandwidthtype'] = $penaltybwunit; + $tmpcf['bandwidth'] = $penaltybw; + } else { + $tmpcf['bandwidth'] = $remainbw * 0.05; /* 5% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } + } else if ($sched == "HFSC") { + if ($penalty) { + $tmpcf['linkshare3'] = "{$penaltybw}{$penaltybwunit}"; + $tmpcf['bandwidth'] = $penaltybw; + $tmpcf['bandwidthtype'] = $penaltybwunit; + } else { + $lsbw = $remainbw * 0.05; + $tmpcf['linkshare3'] = "{$lsbw}%"; /* 5% bandwidth */ + $tmpcf['bandwidth'] = $lsbw; + $tmpcf['bandwidthtype'] = "%"; + } + $tmpcf['linkshare'] = "on"; + } + array_push($tmppath, "qOthersLow"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qLow
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + array_pop($tmppath); + + $downfactor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}downloadspeed"]); + $downbw = floatval($config['ezshaper']['step2']["conn{$i}download"]) * $downfactor; + + $tmppath = array(); + $altq =& new altq_root_queue(); + + $altq->SetInterface($config['ezshaper']['step2']["local{$i}interface"]); + $altq->SetScheduler($config['ezshaper']['step2']["local{$i}downloadscheduler"]); + //$altq->SetBandwidth($config['ezshaper']['step2']["conn{$i}download"]); + //$altq->SetBwscale($config['ezshaper']['step2']["conn{$i}downloadspeed"]); + $altq->SetEnabled("on"); + $altq_list_queues[$altq->GetQname()] =& $altq; + array_push($tmppath, $config['ezshaper']['step2']["local{$i}interface"]); + $altq->SetLink($tmppath); + //var_dump($input_errors); + $altq->wconfig(); + + $sched = $config['ezshaper']['step2']["local{$i}downloadscheduler"]; + $voipbw =0; + $voipbwunit = "%"; + $voip = false; + $penalty = false; + $penaltybw = 0; + $penaltybwunit = "%"; + $p2p = false; + $p2pcatchall = false; + $p2pcatchbw = 0; + $games = false; + $otherpriority = false; + $remainbw = 0; + + if ($config['ezshaper']['step3']['enable']) { + $voip = true; + $voipbw = $config['ezshaper']['step3']["local{$i}download"]; + $voipbwunit = $config['ezshaper']['step3']["local{$i}downloadspeed"]; + if ($sched != HFSC) { + if ($voipbwunit == "%") + $factor = $downbw/100; + else + $factor = wizard_get_bandwidthtype_scale($voipbwunit); + $remainbw += floatval($voipbw) * $factor; + } else + $remainbw += 32000; /* 32Kbit/s reserved for HFSC link sharing */ + } + if ($config['ezshaper']['step4']['enable']) { + $penalty = true; + $penaltybw = $config['ezshaper']['step4']['bandwidth']; + $penaltybwunit = $config['ezshaper']['step4']['bandwidthunit']; + if ($penaltybwunit == "%") + $factor = $downbw/100; + else + $factor = wizard_get_bandwidthtype_scale($penaltybwunit); + $remainbw += floatval($penaltybw) * $factor; + } else { + $penalty = false; + $penaltybw = 0; + } + if ($config['ezshaper']['step5']['enable']) { + $p2p = true; + if ($config['ezshaper']['step5']['p2pcatchall']) { + $p2pcatchall = true; + $p2pcatchbw = $config['ezshaper']['step5']['bandwidth']; + $p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit']; + if ($p2pcatchbwunit == "%") + $factor = $downbw/100; + else + $factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit); + $remainbw += floatval($p2pcatchbw) * $factor; + } else { + $p2pcatchall = false; + $p2pcatchbw = 0; + } + } else { + $p2p = false; + $p2pcatchall = false; + $p2pcatchbw = 0; + } + if ($config['ezshaper']['step6']['enable']) { + $games = true; + } else { + $games = false; + } + + if ($config['ezshaper']['step7']['enable']) { + $otherpriority = true; + } else { + $otherpriority = false; + } + $remainbw = round($remainbw / $downbw * 100, 2); + if (intval($remainbw) > 0 && intval($remainbw) > 40) { + $savemsg=gettext("Custom Bandwidths are greater than 40%. Please lower them for the wizard to continue."); + header("Location: wizard.php?xml=traffic_shaper_wizard_dedicated.xml&stepid=2&message={$savemsg}"); + exit; + } else { + $remainbw = 100 - $remainbw; + } + + if (!$p2pcatchall) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qLink"; + $tmpcf['priority'] = 2; + $tmpcf['enabled'] = "on"; + $tmpcf['default'] = "on"; + $tmpcf['qlimit'] = 500; + $tmpcf['ecn'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = 20; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpcf['bandwidth'] = 20; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, $tmpcf['name']); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qDefault
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($sched != "PRIQ") { + if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qInternet"; + //$tmpcf['priority'] = 6; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ") { + $tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}download"]); + $tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}downloadspeed"]; + } + else if ($sched == "HFSC") { + $tmpcf['upperlimit'] = "on"; + $tmpcf['upperlimit3'] = floatval($config['ezshaper']['step2']["conn{$i}download"]) . $config['ezshaper']['step2']["conn{$i}downloadspeed"]; + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = floatval($config['ezshaper']['step2']["conn{$i}download"]) . $config['ezshaper']['step2']["conn{$i}downloadspeed"]; + $tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}download"]); + $tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}downloadspeed"]; + } + array_push($tmppath, "qInternet"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + //array_pop($tmppath); + //echo "qInternet
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + $altq =& $qtmp; + } + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qACK"; + $tmpcf['priority'] = 6; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.2; + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $lkbw = 0.20 * $remainbw; + $tmpcf['linkshare3'] = "{$lkbw}%"; + $tmpcf['linkshare'] = "on"; + $tmpcf['bandwidth'] = $lkbw; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qACK"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qACK $remainbw
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + + if ($p2p) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qP2P"; + $tmpcf['priority'] = 1; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($p2pcatchall) { + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $p2pcatchbw; + $tmpcf['bandwidthtype'] = $p2pcatchbwunit; + } else if ($sched == "HFSC") { + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$p2pcatchbw}{$p2pcatchbwunit}"; + $tmpcf['upperlimit'] = "on"; + $tmpcf['upperlimit3'] = "{$p2pcatchbw}{$p2pcatchbwunit}"; + $tmpcf['bandwidth'] = $p2pcatchbw; + $tmpcf['bandwidthtype'] = $p2pcatchbwunit; + } + $tmpcf['default'] = "on"; + $tmpcf['qlimit'] = 500; + } else { + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.05; /* 5% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpbw = $remainbw * 0.05; /* 5% bandwidth */ + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$tmpbw}%"; + $tmpcf['upperlimit'] = "on"; + $tmpcf['upperlimit3'] = "{$tmpbw}%"; + $tmpcf['bandwidth'] = $tmpbw; + $tmpcf['bandwidthtype'] = "%"; + } + } + array_push($tmppath, "qP2P"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qP2P
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($voip) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qVoIP"; + $tmpcf['priority'] = 7; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + if ($voipbw > 0) { + $tmpcf['bandwidth'] = $voipbw; + $tmpcf['bandwidthtype'] = $voipbwunit; + } else { + $tmpcf['bandwidth'] = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } + } else if ($sched == "HFSC") { + if ($voipbw > 0) { + $tmpcf['realtime3'] = "{$voipbw}{$voipbwunit}"; + } else { + $voipbw = $remainbw * 0.20; /* 20% bandwidth */ + $tmpcf['realtime3'] = "{$voipbw}%"; + } + $tmpcf['realtime'] = "on"; + $tmpcf['bandwidth'] = 32; + $tmpcf['bandwidthtype'] = "Kb"; + } + array_push($tmppath, "qVoIP"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qVoIP
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($games) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qGames"; + $tmpcf['priority'] = 5; + $tmpcf['enabled'] = "on"; + $tmpcf['ecn'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $gamesbw = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$gamesbw}%"; + $tmpcf['bandwidth'] = "{$gamesbw}"; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qGames"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qGames
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($otherpriority) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qOthersHigh"; + $tmpcf['priority'] = 4; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpcf['linkshare'] = "on"; + $otherbw = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['linkshare3'] = "{$otherbw}%"; + $tmpcf['bandwidth'] = $otherbw; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qOthersHigh"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qHigh
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qOthersLow"; + $tmpcf['priority'] = 3; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + if ($penalty) { + $tmpcf['bandwidth'] = $penaltybw; + $tmpcf['bandwidthtype'] = $penaltybwunit; + } else { + $tmpcf['bandwidthtype'] = "%"; + $tmpcf['bandwidth'] = $remainbw * 0.05; /* 5% bandwidth */ + } + } else if ($sched == "HFSC") { + if ($penalty) { + $tmpcf['linkshare3'] = "{$penaltybw}{$penaltybwunit}"; + $tmpcf['bandwidth'] = $penaltybw; + $tmpcf['bandwidthtype'] = $penaltybwunit; + } else { + $lsbw = $remainbw * 0.05; + $tmpcf['linkshare3'] = "{$lsbw}%"; /* 5% bandwidth */ + $tmpcf['bandwidth'] = $lsbw; + $tmpcf['bandwidthtype'] = "%"; + } + $tmpcf['linkshare'] = "on"; + } + array_push($tmppath, "qOthersLow"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qLow
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + array_pop($tmppath); + } + + if (!is_array($config['filter']['rule'])) + $config['filter']['rule'] = array(); + + $interfacelist = implode(",", $interfacelist); + + /* Rules */ + if ($penalty) { + if( is_ipaddr($config['ezshaper']['step4']['address']) || is_alias($config['ezshaper']['step4']['address'])) { + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Penalty Box"); + $rule['defaultqueue'] = "qOthersLow"; + $rule['source']['address'] = $config['ezshaper']['step4']['address']; + $rule['destination']['any'] = TRUE; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + } + } + + /* If user specifies an IP, we don't bother with providers */ + if ($voip) { + if( is_ipaddr($config['ezshaper']['step3']['address']) || is_alias($config['ezshaper']['step3']['address'])) { + /* create VOIP rules */ + $rule = array(); + $rule['type'] = "match"; + //$rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Connections From Upstream SIP Server"); + $rule['protocol'] = "udp"; + $rule['defaultqueue'] = "qVoIP"; + $rule['source']['address'] = $config['ezshaper']['step3']['address']; + $rule['destination']['any'] = TRUE; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + + $rule = array(); + $rule['type'] = "match"; + //$rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Connections To Upstream SIP Server"); + $rule['protocol'] = "udp"; + $rule['defaultqueue'] = "qVoIP"; + $rule['source']['any'] = TRUE; + $rule['destination']['address'] = $config['ezshaper']['step3']['address']; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + + } elseif( $config['ezshaper']['step3']['provider'] == "Generic" ) { + /* create VOIP rules */ + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + $rule['descr'] = "DiffServ/Lowdelay/Upload"; + $rule['protocol'] = "udp"; + $rule['source']['any'] = TRUE; + $rule['defaultqueue'] = "qVoIP"; + $rule['destination']['any'] = TRUE; + $rule['iptos'] = "lowdelay"; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + + } else { + /* loop through voiplist[] */ + foreach ($voiplist[$config['ezshaper']['step3']['provider']] as $voip) { + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + $rule['defaultqueue'] = 'qVoIP'; + $rule['source']['any'] = TRUE; + $rule['destination']['any'] = TRUE; + $rule['descr'] = "m_voip {$voip[0]} outbound"; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['destination']['port'] = $voip[2]."-".$voip[3]; + if($voip[1] != '') + $rule['protocol'] = $voip[1]; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + } + } + } + + /* loop through p2plist[] */ + if ($p2p) { + foreach($config['ezshaper']['step5'] as $key => $val) { + if (!is_array($p2plist[$key])) + continue; + foreach ($p2plist[$key] as $p2pclient) { + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + $rule['defaultqueue'] = 'qP2P'; + $rule['source']['any'] = TRUE; + $rule['destination']['any'] = TRUE; + $rule['descr'] = "m_P2P {$p2pclient[0]} outbound"; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['destination']['port'] = $p2pclient[2]."-".$p2pclient[3]; + if($p2pclient[1] != '') + $rule['protocol'] = $p2pclient[1]; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + } + } + } + + /* loop through gamesplist[] */ + if ($games) { + foreach($config['ezshaper']['step6'] as $key => $val) { + if (!is_array($gamesplist[$key])) + continue; + foreach ($gamesplist[$key] as $Gameclient) { + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + $rule['defaultqueue'] = 'qGames'; + if ($Gameclient[1] == "tcp") + $rule['ackqueue'] = 'qACK'; + $rule['source']['any'] = TRUE; + $rule['destination']['any'] = TRUE; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['descr'] = "m_Game {$Gameclient[0]} outbound"; + $rule['destination']['port'] = $Gameclient[2]."-".$Gameclient[3]; + if($Gameclient[1] != '') + $rule['protocol'] = $Gameclient[1]; + $config['filter']['rule'][] = $rule; + } + } + } + + /* loop through othersplist[] */ + if ($otherpriority) { + foreach($config['ezshaper']['step7'] as $key => $val) { + if (!is_array($othersplist[$key])) + continue; + foreach ($othersplist[$key] as $otherclient) { + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + switch ($val) { + case "H": + $rule['defaultqueue'] = 'qOthersHigh'; /* posted value H or L */ + if ($otherclient[1] == "tcp") + $rule['ackqueue'] = 'qACK'; + $loop = 0; + break; + case "L": + $rule['defaultqueue'] = 'qOthersLow'; /* posted value H or L */ + if ($otherclient[1] == "tcp") + $rule['ackqueue'] = 'qACK'; + $loop = 0; + break; + case "D": + if ($p2pcatchall) { + $loop = 0; + $rule['defaultqueue'] = 'qOthersDefault'; + if ($otherclient[1] == "tcp") + $rule['ackqueue'] = 'qACK'; + } else + $loop = 1; /* It automatically goes to default queue */ + break; + default: + $loop = 1; + } + if (!$loop) { + $rule['source']['any'] = TRUE; + $rule['destination']['any'] = TRUE; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['descr'] = "m_Other {$otherclient[0]} outbound"; + + if($otherclient[2] or $otherclient[3]) { + $rule['destination']['port'] = $otherclient[2]."-".$otherclient[3]; + } + if($otherclient[1] != '') + $rule['protocol'] = $otherclient[1]; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + } + } + } + } + write_config(); +} + +function wizard_get_bandwidthtype_scale($type = "b") { + switch ($type) { + case "Gb": + $factor = 1024 * 1024 * 1024; + break; + case "Mb": + $factor = 1024 * 1024; + break; + case "Kb": + $factor = 1024; + break; + case "b": + default: + $factor = 1; + break; + } + return intval($factor); +} + +?> diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml new file mode 100755 index 0000000..c86a72a --- /dev/null +++ b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml @@ -0,0 +1,1649 @@ + + + + + 9 + + 1 + pfSense Traffic Shaper Wizard + true + This wizard will guide you through setting up the pfSense traffic shaper. + Please be aware that Custom Bandwidths should not exceed 30% of the interface/link bandwidth. Keep this in mind during the wizard. + + + + listtopic + Traffic shaper Wizard + + + Enter number of WAN type connections + numberofconnections + input + ^[0-9]+$ + Number of connections you have + ezshaper->step1->numberofconnections + + + Next + submit + + + step1_stepbeforeformdisplay(); + step1_submitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc + + + 2 + pfSense Traffic Shaper Wizard + Shaper configuration + + step2_stepbeforeformdisplay(); + step2_stepsubmitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc + + + Next + submit + + + + + 3 + pfSense Traffic Shaper Wizard + Voice over IP + + + Enable + checkbox + Prioritize Voice over IP traffic + This will raise the priority of VOIP traffic above all other traffic. + ezshaper->step3->enable + + + Next + submit + + + VOIP specific settings + listtopic + + + Provider + select + Choose Generic if your provider isn't listed. + ezshaper->step3->provider + + + + + + + + + Upstream SIP Server + upstream_sip_server + inputalias + (Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the <strong>remote</strong> PBX or SIP Trunk to prioritize. <br />NOTE: You can also use a Firewall Alias in this location. + ezshaper->step3->address + IP Address field is non-blank and doesn't look like an IP address. + + + Bandwidth + input + ^[0-9]*$ + Total bandwidth in percentage(%)(should be between 5 and 40) guarantee for VOIP traffic. + ezshaper->step3->bandwidth + + + Next + submit + + + step3_stepbeforeformdisplay(); + step3_stepsubmitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc + + + 4 + pfSense Traffic Shaper Wizard + Penalty Box + true + + + true + Enable + checkbox + Penalize IP or Alias + This will lower the priority of traffic from this IP or alias. + Address,Bandwidth,BandwidthSpeed + ezshaper->step4->enable + + + Next + submit + + + PenaltyBox specific settings + listtopic + + + Address + inputalias + This allows you to just provide the IP address of the computer(s) to penalize. NOTE: You can also use a Firewall Alias in this location. + ezshaper->step4->address + IP Address field is non-blank and doesn't look like an IP address. + + + Bandwidth + input + ^[0-9]*$ + Speed must be numerical. + ezshaper->step4->bandwidth + true + + + true + true + true + true + BandwidthSpeed + The limit you want to apply. + select + + + + + + + + ezshaper->step4->bandwidthunit + + + Next + submit + + + step4_stepsubmitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc + + + 5 + pfSense Traffic Shaper Wizard + Peer to Peer networking + true + + + true + Enable + checkbox + Lower priority of Peer-to-Peer traffic + This will lower the priority of P2P traffic below all other traffic. Please check the items that you would like to prioritize lower than normal traffic. + p2pCatchAll,Bandwidth,BandwidthSpeed,Aimster,BitTorrent,BuddyShare,CuteMX,DCplusplus,dcc,DirectConnect,DirectFileExpress,EDonkey2000,FastTrack,Gnutella,grouper,hotComm,HotlineConnect,iMesh,Napster,OpenNap,Scour,Shareaza,SongSpy,WinMX + ezshaper->step5->enable + + + Next + submit + + + p2p Catch all + listtopic + + + p2pCatchAll + checkbox + When enabled, all uncategorized traffic is fed to the p2p queue. + ezshaper->step5->p2pcatchall + + + Bandwidth + input + ^[0-9]*$ + Speed must be numerical. + ezshaper->step5->bandwidth + true + + + true + true + true + true + BandwidthSpeed + The limit you want to apply. + select + + + + + + + + ezshaper->step5->bandwidthunit + + + Enable/Disable specific P2P protocols + listtopic + + + Aimster + checkbox + Aimster and other P2P using the Aimster protocol and ports + ezshaper->step5->aimster + + + BitTorrent + checkbox + Bittorrent and other P2P using the Torrent protocol and ports + ezshaper->step5->bittorrent + + + BuddyShare + checkbox + BuddyShare and other P2P using the BuddyShare protocol and ports + ezshaper->step5->buddyshare + + + CuteMX + checkbox + CuteMX and other P2P using the CuteMX protocol and ports + ezshaper->step5->cutemx + + + DCplusplus + checkbox + DC++ and other P2P using the DC++ protocol and ports + ezshaper->step5->dcplusplus + + + DCC + checkbox + irc DCC file transfers + ezshaper->step5->dcc + + + DirectConnect + checkbox + DirectConnect and other P2P using the DirectConnect protocol and ports + ezshaper->step5->directconnect + + + DirectFileExpress + checkbox + DirectFileExpress and other P2P using the DirectFileExpress protocol and ports + ezshaper->step5->directfileexpress + + + eDonkey2000 + checkbox + eDonkey and other P2P using the eDonkey protocol and ports + ezshaper->step5->edonkey2000 + + + FastTrack + checkbox + FastTrack and other P2P using the FastTrack protocol and ports + ezshaper->step5->fasttrack + + + Gnutella + checkbox + Gnutella and other P2P using the Gnutella protocol and ports + ezshaper->step5->gnutella + + + grouper + checkbox + grouper and other P2P using the grouper protocol and ports + ezshaper->step5->grouper + + + hotComm + checkbox + hotComm and other P2P using the hotComm protocol and ports + ezshaper->step5->hotcomm + + + HotlineConnect + checkbox + HotlineConnect and other P2P using the HotlineConnect protocol and ports + ezshaper->step5->hotlineconnect + + + iMesh + checkbox + iMesh and other P2P using the iMesh protocol and ports + ezshaper->step5->imesh + + + Napster + checkbox + Napster and other P2P using the Napster protocol and ports + ezshaper->step5->napster + + + OpenNap + checkbox + OpenNap and other P2P using the OpenNap protocol and ports + ezshaper->step5->opennap + + + Scour + checkbox + Scour and other P2P using the Scour protocol and ports + ezshaper->step5->scour + + + Shareaza + checkbox + Shareaza and other P2P using the Shareaza protocol and ports + ezshaper->step5->shareaza + + + SongSpy + checkbox + SongSpy and other P2P using the SongSpy protocol and ports + ezshaper->step5->songspy + + + WinMX + checkbox + WinMX and other P2P using the WinMX protocol and ports + ezshaper->step5->winmx + + + Next + submit + + + step5_stepsubmitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc + + + 6 + pfSense Traffic Shaper Wizard + true + Network Games + + + Enable + checkbox + Prioritize network gaming traffic + This will raise the priority of gaming traffic to higher than most traffic. + BattleNET,EAOrigin,GameForWindowsLive,PlayStationConsoles,Steam,WiiConsoles,XboxConsoles,ARMA2,ARMA3,Battlefield2,Battlefield3,BattlefieldBC2,Borderlands,CallOfDuty,Counterstrike,Crysis2,Crysis3,DeltaForce,DeadSpace2,DeadSpace3,Dirt3,DOOM3,DragonAge2,EmpireEarth,EveOnline,Everquest,Everquest2,FarCry,FarCry2,FarCry3,GunZOnline,HalfLife,LeagueofLegends,Lineage2,MassEffect3,MechwarriorOnline,Minecraft,OperationFlashpointDR,PlanetSide,PlanetSide2,QuakeIII,QuakeIV,StarWarsTOR,TigerWoods2004PS2,TribesAscend,UnrealTournament,WolfensteinEnemyTerritory,WorldOfWarcraft + true + ezshaper->step6->enable + + + Next + submit + + + Enable/Disable specific game consoles and services + listtopic + + + BattleNET + checkbox + Battle.net - Virtually every game from Blizzard publishing should match this. This includes the following game series: Starcraft, Diablo, Warcraft. Guild Wars also uses this port. + ezshaper->step6->battlenet + + + EAOrigin + checkbox + EA Origin Client - Some PC games by EA use this. + ezshaper->step6->eaorigin + + + GameForWindowsLive + checkbox + Games for Windows Live + ezshaper->step6->gamesforwindowslive + + + PlayStationConsoles + checkbox + PlayStation Consoles - This should cover all ports required for the Playstation 4, Playstation, PS Vita + ezshaper->step6->playstationconsoles + + + Steam + checkbox + Steam Game Client (Includes: America's Army 3, Counter-Strike: Source, Counter-Strike: Global Offensive, Half-Life 2, COD: Black Ops Series, Borderlands 2, Natural Selection 2, Left 4 Dead Series, Portal 2 and many other games on the Steam) + ezshaper->step6->steam + + + WiiConsoles + checkbox + Wii Consoles - Wii, Wii U, DS and 3DS + ezshaper->step6->wiiconsoles + + + XboxConsoles + checkbox + Xbox Consoles - Xbox 360 and Xbox One + ezshaper->step6->xboxconsoles + + + Enable/Disable specific games + listtopic + + + ARMA2 + checkbox + ARMA 2 + ezshaper->step6->arma2 + + + ARMA3 + checkbox + ARMA 3 + ezshaper->step6->arma3 + + + Battlefield2 + checkbox + Battlefield 2 - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->battlefield2 + + + Battlefield3 + checkbox + Battlefield 3 and 4 - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->battlefield3 + + + BattlefieldBC2 + checkbox + Battlefield: Bad Company 2 + ezshaper->step6->battlefieldbc2 + + + Borderlands + checkbox + Borderlands + ezshaper->step6->borderlands + + + CallOfDuty + checkbox + Call Of Duty (United Offensive) + ezshaper->step6->callofduty + + + Counterstrike + checkbox + Counterstrike. The ultimate 1st person shooter. + ezshaper->step6->counterstrike + + + Crysis2 + checkbox + Crysis 2 + ezshaper->step6->crysis2 + + + Crysis3 + checkbox + Crysis 3 + ezshaper->step6->crysis3 + + + DeadSpace2 + checkbox + Dead Space2 - this game uses a HUGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->deadspace2 + + + DeadSpace3 + checkbox + Dead Space 3 + ezshaper->step6->deadspace3 + + + DeltaForce + checkbox + Delta Force + ezshaper->step6->deltaforce + + + Dirt3 + checkbox + Dirt 3 + ezshaper->step6->dirt3 + + + DOOM3 + checkbox + DOOM3 + ezshaper->step6->doom3 + + + DragonAge2 + checkbox + Dragon Age 2 + ezshaper->step6->dragonage2 + + + EmpireEarth + checkbox + Empire Earth + ezshaper->step6->empireearth + + + EveOnline + checkbox + EVE Online + ezshaper->step6->eveonline + + + Everquest + checkbox + Everquest - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->everquest + + + Everquest2 + checkbox + Everquest II + ezshaper->step6->everquest2 + + + FarCry + checkbox + Far Cry + ezshaper->step6->farcry + + + FarCry2 + checkbox + Far Cry 2 + ezshaper->step6->farcry2 + + + FarCry3 + checkbox + Far Cry 3 + ezshaper->step6->farcry3 + + + GunZOnline + checkbox + GunZ Online + ezshaper->step6->gunzonline + + + HalfLife + checkbox + Half-Life + ezshaper->step6->halflife + + + LeagueofLegends + checkbox + League of Legends - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->leagueoflegends + + + Lineage2 + checkbox + Lineage II + ezshaper->step6->lineage2 + + + MassEffect3 + checkbox + Mass Effect 3 + ezshaper->step6->masseffect3 + + + MechwarriorOnline + checkbox + MechWarrior: Online - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->mechwarrioronline + + + Minecraft + checkbox + Minecraft + ezshaper->step6->minecraft + + + PlanetSide + checkbox + PlanetSide + ezshaper->step6->planetside + + + PlanetSide2 + checkbox + PlanetSide 2 + ezshaper->step6->planetside2 + + + OperationFlashpointDR + checkbox + Operation Flashpoint: Dragon Rising + ezshaper->step6->operationflashpoint-dr + + + QuakeIII + checkbox + Quake III + ezshaper->step6->quakeiii + + + QuakeIV + checkbox + Quake IV + ezshaper->step6->quakeiv + + + StarWarsTOR + checkbox + StarWars: The Old Republic - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->starwarstor + + + TigerWoods2004PS2 + checkbox + Tiger Woods 2004 for PS2 + ezshaper->step6->tigerwoods2004ps2 + + + TribesAscend + checkbox + Tribes Ascend + ezshaper->step6->tribesascend + + + UnrealTournament + checkbox + Unreal Tournament Series + ezshaper->step6->unrealtournament + + + WolfensteinEnemyTerritory + checkbox + Wolfenstein Enemy Territory + ezshaper->step6->wolfet + + + WorldOfWarcraft + checkbox + World of Warcraft + ezshaper->step6->wow + + + Next + submit + + + /usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc + + + 7 + pfSense Traffic Shaper Wizard + true + Raise or lower other Applications + + + Enable + checkbox + Other networking protocols + This will help raise or lower the priority of other protocols higher than most traffic. + AppleRemoteDesktop,MSRDP,PCAnywhere,VNC,AIM,Facetime,GoogleHangouts,ICQ,IRC,Jabber,MSN,TeamSpeak,TeamSpeak3,Ventrilo,PPTP,IPSEC,iTunesRadio,StreamingMP3,RTSP,RTMP,HTTP,IMAP,LotusNotes,POP3,SMTP,BattleNETDownloader,SteamDownloader,APNS,AppleMobileSync,CrashPlan,CVSUP,DNS,GIT,HBCI,ICMP,MySqlServer,NNTP,Slingbox,SMB,SNMP,Subversion + true + ezshaper->step7->enable + + + Next + submit + + + Remote Service / Terminal emulation + listtopic + + + AppleRemoteDesktop + ezshaper->step7->appleremotedesktop + select + + + + + + Apple Remote Desktop + + + MSRDP + select + ezshaper->step7->msrdp + + + + + + Microsoft Remote Desktop Protocol + + + PCAnywhere + ezshaper->step7->pcanywhere + select + + + + + + Symantec PC Anywhere + + + VNC + ezshaper->step7->vnc + select + + + + + + Virtual Network Computing + + + Messengers + listtopic + + + AIM + ezshaper->step7->aolinstantmessenger + select + + + + + + AOL Instant Messenger + + + Facetime + ezshaper->step7->facetime + select + + + + + + Facetime + + + ICQ + ezshaper->step7->icq + select + + + + + + ICQ + + + IRC + select + ezshaper->step7->irc + + + + + + Internet Relay Chat + + + Jabber + select + ezshaper->step7->jabber + + + + + + Jabber instant messenger + + + GoogleHangouts + ezshaper->step7->googlehangouts + select + + + + + + Google Hangouts + + + MSN + ezshaper->step7->msnmessenger + select + + + + + + MSN Messenger + + + Teamspeak + ezshaper->step7->teamspeak + select + + + + + + TeamSpeak + + + Teamspeak3 + ezshaper->step7->teamspeak3 + select + + + + + + TeamSpeak 3 + + + Ventrilo + ezshaper->step7->ventrilo + select + + + + + + Ventrilo + + + VPN + listtopic + + + PPTP + select + ezshaper->step7->pptp + + + + + + Microsoft Point to Point tunneling protocol + + + IPSEC + select + ezshaper->step7->ipsec + + + + + + IPSEC VPN traffic + + + Multimedia/Streaming + listtopic + + + iTunesRadio + select + ezshaper->step7->itunesradio + + + + + + iTunes Radio - this rule uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + + + StreamingMP3 + select + ezshaper->step7->streamingmp3 + + + + + + Streaming Media + + + RTSP + ezshaper->step7->rtsp + select + + + + + + RealTime streaming protocol + + + RTMP + ezshaper->step7->rtmp + select + + + + + + Real-Time Messaging Protocol - Used by video streaming services such as Twitch.tv. + + + Web + listtopic + + + HTTP + select + ezshaper->step7->http + + + + + + HTTP and HTTPS aka Web Traffic + + + Mail + listtopic + + + SMTP + select + ezshaper->step7->smtp + + + + + + Mail Protocol + + + POP3 + select + ezshaper->step7->pop3 + + + + + + POP3 Protocol + + + IMAP + ezshaper->step7->imap + select + + + + + + IMAP Protocol + + + LotusNotes + ezshaper->step7->lotusnotes + select + + + + + + Lotus Notes + + + Game Downloader + listtopic + + + BattleNetDownloader + select + ezshaper->step7->battlenetdownloader + + + + + + Battle.NET Downloader + + + SteamDownloader + select + ezshaper->step7->steamdownloader + + + + + + Steam Downloader + + + Miscellaneous + listtopic + + + APNS + select + ezshaper->step7->apns + + + + + + Apple Push Notification Service + + + AppleMobileSync + select + ezshaper->step7->applemobilesync + + + + + + Apple Mobile Sync + + + CrashPlan + ezshaper->step7->crashplan + select + + + + + + CrashPlan + + + CVSUP + ezshaper->step7->cvsup + select + + + + + + CVSUP + + + DNS + select + ezshaper->step7->dns + + + + + + Domain Name Services + + + Git + ezshaper->step7->git + select + + + + + + Git Server + + + HBCI + ezshaper->step7->hbci + select + + + + + + HBCI + + + ICMP + ezshaper->step7->icmp + select + + + + + + ICMP Protocol + + + SMB + ezshaper->step7->smb + select + + + + + + Microsoft SMB Protocol and friends + + + SNMP + ezshaper->step7->snmp + select + + + + + + Simple Network Management Protocol + + + MySQLServer + ezshaper->step7->mysqlserver + select + + + + + + MySQL Server + + + NNTP + ezshaper->step7->nntp + select + + + + + + Internet News + + + Slingbox + ezshaper->step7->slingbox + select + + + + + + Slingbox + + + Subversion + ezshaper->step7->subversion + select + + + + + + Subversion Server + + + Next + submit + + + /usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc + + + 8 + pfSense Traffic Shaper Wizard + + Reload profile notice + listtopic + + After pressing Finish the system will load the new profile.<br/> Please note that this may take a moment.<br/> Also note that the traffic shaper is stateful meaning that only new connections will be shaped.<br/> If this is an issue please reset the state table after loading the profile.<br/> + + + Finish + submit + + + step8_stepsubmitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc + + diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc new file mode 100644 index 0000000..3f68869 --- /dev/null +++ b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc @@ -0,0 +1,1741 @@ + $ifdesc) { + if (!is_altq_capable(get_real_interface($if))) + continue; + if (interface_has_gateway($if) || interface_has_gatewayv6($if)) + $wans++; + else + $lans++; + } + + foreach ($fields as &$field) { + if ($field['name'] == 'numberofconnections') + $field['value'] = $wans; + else if ($field['name'] == 'numberoflocalinterfaces') + $field['value'] = $lans; + } +} + +function step1_submitphpaction() { + global $stepid, $savemsg; + + if (!isset($_POST['numberofconnections'])) { + $savemsg=gettext("You need to specify the number of connections."); + $stepid--; + return; + } + if (intval($_POST['numberofconnections']) < 1) { + $savemsg=gettext("The number of connections should be greater than 1."); + $stepid--; + return; + } + + if (!isset($_POST['numberoflocalinterfaces'])) { + $savemsg=gettext("You need to specify the number of LAN type interfaces."); + $stepid--; + return; + } + if (intval($_POST['numberoflocalinterfaces']) < 1) { + $savemsg=gettext("The number of LAN type interfaces should be greater than 1."); + $stepid--; + return; + } +} + +function step2_stepbeforeformdisplay() { + global $config, $pkg; + global $stepid, $savemsg; + + $wans = 0; + $lans = 0; + $iflist = array(); + $iflisttmp = get_configured_interface_with_descr(); + foreach ($iflisttmp as $if => $ifdesc) { + if (!is_altq_capable(get_real_interface($if))) + continue; + if (interface_has_gateway($if) || interface_has_gatewayv6($if)) + $wans++; + else + $lans++; + $iflist[$if] = $ifdesc; + } + $numberofconnections = intval($config['ezshaper']['step1']['numberofconnections']); + if ($numberofconnections > $wans) { + $savemsg=gettext("You have less interfaces than number of connections!"); + $stepid--; + return; + } + + $numberoflocalinterfaces = intval($config['ezshaper']['step1']['numberoflocalinterfaces']); + if ($numberoflocalinterfaces > $lans) { + $savemsg=gettext("You have less interfaces than number of connections!"); + $stepid--; + return; + } + $cfgname = "traffic_shaper_wizard_multi_all.xml"; + + $fields =& $pkg['step'][1]['fields']['field']; + + /* + unset($config['ezshaper']['step2']); + $config['ezshaper']['step2'] = array(); + write_config(); + */ + $fields = array(); + + for ($i = 0; $i < $numberoflocalinterfaces; $i++) { + $field = array(); + $interface_friendly = $i+1; + $field['name'] = "Setup connection speed and scheduler information for interface LAN #{$interface_friendly}"; + $field['type'] = "listtopic"; + $fields[] = $field; + + $field = array(); + $field['displayname'] = "Interface & Scheduler"; + $field['name'] = "local{$i}interface"; + $field['type'] = "select"; + $field['options']['option'] = array(); + foreach ($iflist as $ifname => $ifdescr) { + // Skip wan interfaces here + if (interface_has_gateway($ifname) || interface_has_gatewayv6($ifname)) + continue; + $opts = array(); + $opts['displayname'] = $ifdescr; + $opts['name'] = $ifname; + $opts['value'] = $ifname; + $field['options']['option'][] = $opts; + } + $field['combinefieldsbegin'] = "true"; + $field['bindstofield'] = "ezshaper->step2->local{$i}interface"; + $fields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "local{$i}downloadscheduler"; + $field['type'] = "select"; + $field['typehint'] = "Queueing discipline to apply on this local interface."; + $field['options']['option'] = array(); + $opts = array(); + $opts['name'] = "HFSC"; + $opts['value'] = "HFSC"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "CBQ"; + $opts['value'] = "CBQ"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "PRIQ"; + $opts['value'] = "PRIQ"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step2->local{$i}downloadscheduler"; + $fields[] = $field; + } + + for ($i = 0; $i < $numberofconnections; $i++) { + $field = array(); + $interface_friendly = $i+1; + $field['name'] = "Setup connection speed and scheduler information for interface WAN#{$interface_friendly}"; + $field['type'] = "listtopic"; + $fields[] = $field; + + $field = array(); + $field['displayname'] = "Interface & Scheduler"; + $field['name'] = "conn{$i}interface"; + $field['type'] = "select"; + $interface_real = $i+1; + $field['options']['option'] = array(); + foreach ($iflist as $ifname => $ifdescr) { + // Skip lan interfaces here + if (!interface_has_gateway($ifname) && !interface_has_gatewayv6($ifname)) + continue; + $opts = array(); + $opts['displayname'] = $ifdescr; + $opts['name'] = $ifname; + $opts['value'] = $ifname; + $field['options']['option'][] = $opts; + } + $field['bindstofield'] = "ezshaper->step2->conn{$i}interface"; + $field['combinefieldsbegin'] = "true"; + $fields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "conn{$i}uploadscheduler"; + $field['type'] = "select"; + $field['typehint'] = "Queueing discipline to apply on the upload of this connection."; + $field['options']['option'] = array(); + $opts = array(); + $opts['name'] = "HFSC"; + $opts['value'] = "HFSC"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "CBQ"; + $opts['value'] = "CBQ"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "PRIQ"; + $opts['value'] = "PRIQ"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step2->conn{$i}uploadscheduler"; + $fields[] = $field; + + $field = array(); + $field['displayname'] = "Upload"; + $field['name'] = "conn{$i}upload"; + $field['type'] = "input"; + $field['bindstofield'] = "ezshaper->step2->conn{$i}upload"; + $field['combinefieldsbegin'] = "true"; + $fields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "conn{$i}uploadspeed"; + $field['typehint'] = "Upload bandwidth on this connection."; + $field['type'] = "select"; + $field['options']['option'] = array(); + $opts = array(); + $opts['value'] = "Kb"; + $opts['name'] = "Kbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Mb"; + $opts['name'] = "Mbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Gb"; + $opts['name'] = "Gbit/s"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step2->conn{$i}uploadspeed"; + $fields[] = $field; + + $field = array(); + $field['displayname'] = "Download"; + $field['name'] = "conn{$i}download"; + $field['type'] = "input"; + $field['bindstofield'] = "ezshaper->step2->conn{$i}download"; + $field['combinefieldsbegin'] = "true"; + $fields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "conn{$i}downloadspeed"; + $field['typehint'] = "Download bandwidth on this connection."; + $field['type'] = "select"; + $field['options']['option'] = array(); + $opts = array(); + $opts['value'] = "Kb"; + $opts['name'] = "Kbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Mb"; + $opts['name'] = "Mbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Gb"; + $opts['name'] = "Gbit/s"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step2->conn{$i}downloadspeed"; + $fields[] = $field; + } + $field = array(); + $field['name'] = "Next"; + $field['type'] = "submit"; + $fields[] = $field; +} + +function step2_stepsubmitphpaction() { + global $config; + global $stepid, $savemsg; + $sumdownloads = 0; + + /* Input Validation */ + $steps = intval($config['ezshaper']['step1']['numberofconnections']); + $localint = intval($config['ezshaper']['step1']['numberoflocalinterfaces']); + for ($i = 0; $i < $steps; $i++) { + for ($j = $i + 1; $j <= $steps; $j++) { + if ($_POST["conn{$i}interface"] == $_POST["conn{$j}interface"]) { + $savemsg=gettext("You cannot select the same interface for connections {$i} and {$j}."); + $stepid--; + return; + } + if (trim($_POST["conn{$i}uploadscheduler"]) != "PRIQ") { + if (!is_numeric($_POST["conn{$i}upload"])) { + $savemsg = gettext("Upload bandwidth of connection {$i} is not valid."); + $stepid--; + return; + } + if (!is_numeric($_POST["conn{$i}download"])) { + $savemsg = gettext("Download bandwidth of connection {$i} is not valid."); + $stepid--; + return; + } + $upbw = $_POST["conn{$i}upload"]; + $downbw = $_POST["conn{$i}download"]; + if ($upbw < 1 || $downbw < 1) { + $savemsg = gettext("You cannot specify 0 bandwidth!"); + $stepid--; + return; + } + if (intval($upbw) < 128 && $_POST["conn{$i}uploadspeed"] == "Kb" && trim($_POST["conn{$i}uploadscheduler"]) == "CBQ") { + $savemsg=gettext("Uploads smaller than 128Kbit/s is not supported for connection {$i} on CBQ scheduler."); + $stepid--; + return; + } + } + } + for ($j = 0; $j < $localint; $j++) { + if ($_POST["conn{$i}interface"] == $_POST["local{$j}interface"]) { + $savemsg=gettext("You cannot select the same interface for local and outside."); + $stepid--; + return; + } + } + } + for ($i = 0; $i < $localint; $i++) { + for ($j = $i + 1; $j < $localint; $j++) { + if ($_POST["local{$i}interface"] == $_POST["local{$j}interface"]) { + $savemsg=gettext("You cannot select the same interface twice on local interfaces."); + $stepid--; + return; + } + } + } + + /* This is necessary since the wizard expects predefined fields. */ + unset($config['ezshaper']['step2']); + $config['ezshaper']['step2'] = array(); + + for ($i = 0; $i < $localint; $i++) { + $config['ezshaper']['step2']["local{$i}downloadscheduler"] = $_POST["local{$i}downloadscheduler"]; + $config['ezshaper']['step2']["local{$i}interface"] = $_POST["local{$i}interface"]; + } + + for ($i = 0; $i < $steps; $i++) { + $config['ezshaper']['step2']["conn{$i}uploadscheduler"] = $_POST["conn{$i}uploadscheduler"]; + $config['ezshaper']['step2']["conn{$i}upload"] = $_POST["conn{$i}upload"]; + $config['ezshaper']['step2']["conn{$i}uploadspeed"] = $_POST["conn{$i}uploadspeed"]; + $config['ezshaper']['step2']["conn{$i}download"] = $_POST["conn{$i}download"]; + $config['ezshaper']['step2']["conn{$i}downloadspeed"] = $_POST["conn{$i}downloadspeed"]; + $config['ezshaper']['step2']["conn${i}interface"] = $_POST["conn{$i}interface"]; + } +} + +function step3_stepbeforeformdisplay() { + global $config, $pkg; + global $stepid, $savemsg; + + $cfgname = "traffic_shaper_wizard_multi_all.xml"; + + $numberofconnections = intval($config['ezshaper']['step1']['numberofconnections']); + $numberoflocalinterfaces = intval($config['ezshaper']['step1']['numberoflocalinterfaces']); + + $fields =& $pkg['step'][1]['fields']['field']; + + $voipfields =& $pkg['step'][2]['fields']['field']; + + $voipfields = array(); + $enablefields = array(); + + $field = array(); + $field['name'] = "enable"; + $field['type'] = "checkbox"; + $field['typehint'] = "Prioritize Voice over IP traffic."; + $field['bindstofield'] = "ezshaper->step3->enable"; + $field['descritpion'] = "This will raise the priority of VOIP traffic above all other traffic."; + $voipfields[] = $field; + + $field = array(); + $field['name'] = "Next"; + $field['type'] = "submit"; + $voipfields[] = $field; + + $field = array(); + $field['name'] = "VOIP specific settings"; + $field['type'] = "listtopic"; + $voipfields[] = $field; + + $field['name'] = "Provider"; + $enablefields[] = "Provider"; + $field['type'] = "select"; + $field['description'] = "Choose Generic if your provider isn't listed."; + $field['options']['option'] = array(); + $opts = array(); + $opts['name'] = "Generic (lowdelay)"; + $opts['value'] = "Generic"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "VoicePulse"; + $opts['value'] = "VoicePulse"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "Asterisk/Vonage"; + $opts['value'] = "Asterisk"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['name'] = "PanasonicTDA"; + $opts['value'] = "Panasonic"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step3->provider"; + $voipfields[] = $field; + + $field = array(); + $field['displayname'] = "Upstream SIP Server"; + $field['name'] = "upstream_sip_server"; + $enablefields[] = "upstream_sip_server"; + $field['type'] = "inputalias"; + $field['description'] = "(Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the remote PBX or SIP Trunk to prioritize.
                              NOTE: You can also use a Firewall Alias in this location."; + $field['message'] = "IP Address field is non-blank and doesn't look like an IP address."; + $field['bindstofield'] = "ezshaper->step3->address"; + $voipfields[] = $field; + + for ($i = 0; $i < $numberofconnections; $i++) { + $field = array(); + $interface_friendly = $i+1; + $field['name'] = "Connection WAN #{$interface_friendly}"; + $field['type'] = "listtopic"; + $voipfields[] = $field; + + $field = array(); + $field['displayname'] = "Upload"; + $field['name'] = "conn{$i}upload"; + $enablefields[] = "conn{$i}upload"; + $field['type'] = "input"; + $field['bindstofield'] = "ezshaper->step3->conn{$i}upload"; + $field['combinefieldsbegin'] = "true"; + $voipfields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "conn{$i}uploadspeed"; + $enablefields[] = "conn{$i}uploadspeed"; + $field['typehint'] = "Upload bandwidth guarantee for VOIP phone(s) on connection {$i}."; + $field['type'] = "select"; + $field['options']['option'] = array(); + $opts = array(); + $opts['value'] = "Kb"; + $opts['name'] = "Kbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Mb"; + $opts['name'] = "Mbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Gb"; + $opts['name'] = "Gbit/s"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step3->conn{$i}uploadspeed"; + $voipfields[] = $field; + } + + for ($i = 0; $i < $numberoflocalinterfaces; $i++) { + $field = array(); + $interface_friendly = $i+1; + $field['name'] = "Connection LAN #{$interface_friendly}"; + $field['type'] = "listtopic"; + $voipfields[] = $field; + + $field = array(); + $field['displayname'] = "Download"; + $field['name'] = "local{$i}download"; + $enablefields[] = "local{$i}download"; + $field['type'] = "input"; + $field['bindstofield'] = "ezshaper->step3->local{$i}download"; + $field['combinefieldsbegin'] = "true"; + $voipfields[] = $field; + + $field = array(); + $field['combinefieldsend'] = "true"; + $field['dontdisplayname'] = "true"; + $field['dontcombinecells'] = "true"; + $field['name'] = "local{$i}downloadspeed"; + $enablefields[] = "local{$i}downloadspeed"; + $field['typehint'] = "Download bandwidth guarantee for VOIP phone(s) on connections."; + $field['type'] = "select"; + $field['options']['option'] = array(); + $opts = array(); + $opts['value'] = "Kb"; + $opts['name'] = "Kbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Mb"; + $opts['name'] = "Mbit/s"; + $field['options']['option'][] = $opts; + $opts = array(); + $opts['value'] = "Gb"; + $opts['name'] = "Gbit/s"; + $field['options']['option'][] = $opts; + $field['bindstofield'] = "ezshaper->step3->local{$i}downloadspeed"; + $voipfields[] = $field; + } + + $field = array(); + $field['name'] = "Next"; + $field['type'] = "submit"; + $voipfields[] = $field; + $voipfields[0]['enablefields'] = implode(",", $enablefields); +} + +function step3_stepsubmitphpaction() { + global $config; + global $stepid, $savemsg; + + if (!$_POST['enable']) + return; + + if($_POST['upstream_sip_server']) { + if(!is_ipaddroralias($_POST['upstream_sip_server'])) { + /* item is not an ip or alias. error out */ + $savemsg=gettext("Address must be a valid IP address or Firewall Alias. Please correct this value to continue."); + $stepid--; + return; + } + } + + $steps = intval($config['ezshaper']['step1']['numberofconnections']); + for ($i = 0; $i < $steps; $i++) { + if ($config['ezshaper']['step2']["conn{$i}uploadscheduler"] == "PRIQ") + continue; + if (!is_numeric($_POST["conn{$i}upload"])) { + $savemsg = gettext("Upload bandwidth of connection {$i} is not valid."); + $stepid--; + return; + } + if ($_POST["conn{$i}uploadspeed"] == "%") { + if (intval($_POST["conn{$i}upload"]) > 80) { + $savemsg=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection."); + $stepid--; + return; + } + } else { + $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}uploadspeed"]); + $ifbw = $factor * floatval($config['ezshaper']['step2']["conn{$i}upload"]); + $factor = wizard_get_bandwidthtype_scale($_POST["conn{$i}uploadspeed"]); + $input_bw = $factor * floatval($_POST["conn{$i}upload"]); + if ((0.8 * $ifbw) < $input_bw) { + $savemsg=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection."); + $stepid--; + return; + } + } + } + + $localint = intval($config['ezshaper']['step1']['numberoflocalinterfaces']); + for ($i = 0; $i < $localint; $i++) { + if ($config['ezshaper']['step2']["local{$i}downloadscheduler"] == "PRIQ") + continue; + if (!is_numeric($_POST["local{$i}download"])) { + $savemsg = gettext("Download bandwidth of connection {$i} is not valid."); + $stepid--; + return; + } + if ($_POST["local{$i}downloadspeed"] == "%") { + if (intval($_POST["local{$i}download"]) > 80) { + $savemsg=gettext("You cannot set the VoIP download bandwidth on connection {$i} higher than 80% of the connection."); + $stepid--; + return; + } + } else { + for ($j = 0; $j < $steps; $j++) { + $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$j}downloadspeed"]); + $ifbw = $factor * floatval($config['ezshaper']['step2']["conn{$j}download"]); + $factor = wizard_get_bandwidthtype_scale($_POST["local{$i}downloadspeed"]); + $input_bw = $factor * floatval($_POST["local{$i}download"]); + if ((0.8 * $ifbw) < $input_bw) { + $savemsg=gettext("You cannot set the VoIP download bandwidth on connection {$j} higher than 80% of the connection."); + $stepid--; + return; + } + } + } + } + + /* This is necessary since the wizard expects predefined fields. */ + unset($config['ezshaper']['step3']); + $config['ezshaper']['step3'] = array(); + + if (!empty($_POST['upstream_sip_server'])) + $config['ezshaper']['step3']['address'] = $_POST['upstream_sip_server']; + if ($_POST['enable'] == 'on') + $config['ezshaper']['step3']['enable'] = 'on'; + if (!empty($_POST['provider'])) { + $VoIPproviders = array("Generic", "VoicePulse", "Asterisk", "Panasonic"); + if (in_array($_POST['provider'], $VoIPproviders)) { + $config['ezshaper']['step3']['provider'] = $_POST['provider']; + } + } + for ($i = 0; $i < $localint; $i++) { + $config['ezshaper']['step3']["local{$i}download"] = $_POST["local{$i}download"]; + $config['ezshaper']['step3']["local{$i}downloadspeed"] = $_POST["local{$i}downloadspeed"]; + } + + for ($i = 0; $i < $steps; $i++) { + $config['ezshaper']['step3']["conn{$i}upload"] = $_POST["conn{$i}upload"]; + $config['ezshaper']['step3']["conn{$i}uploadspeed"] = $_POST["conn{$i}uploadspeed"]; + } +} + +function step4_stepsubmitphpaction() { + global $config; + global $stepid, $savemsg; + + if ( $_POST['enable'] ) { + if(!$_POST['bandwidth']) { + $savemsg="You need to specify a value for bandwidth!"; + $stepid--; + return; + } + if(!is_numeric($_POST['bandwidth'])) { + $savemsg="The posted value is not a valid bandwidth."; + $stepid--; + return; + } + if ($_POST['bandwidthspeed'] <> "%") { + $savemsg = gettext("Only percentage bandwidth specification is allowed."); + $stepid--; + return; + } + $bw = $_POST['bandwidth']; + if($bw > 15 || $bw < 2) { + $savemsg="Values should be between 2% and 15%!"; + $stepid--; + return; + } + if($_POST['address'] <> "" && !is_ipaddroralias($_POST['address'])) { + /* item is not an ip or alias. error out */ + $savemsg=gettext("Address must be a valid IP address or Firewall Alias. Please correct this value to continue."); + $stepid--; + } + } +} + +function step5_stepsubmitphpaction() { + global $stepid, $savemsg; + if ( $_POST['enable'] ) { + if ($_POST['p2pcatchall']) { + if(!is_numeric($_POST['bandwidth'])) { + $savemsg="Posted value is not a valid bandwidth."; + $stepid--; + } + if ($_POST['bandwidthspeed'] <> "%") { + $savemsg = gettext("Only percentage bandwidth specification is allowed."); + $stepid--; + return; + } + $bw = $_POST['bandwidth']; + if($bw > 15 || $bw < 2) { + $savemsg="Values should be between 2% and 15%!"; + $stepid--; + return; + } + } + } +} + +function step8_stepsubmitphpaction() { + global $g, $config; + + /* save the new configuration */ + apply_all_chosen_items(); + + /* reset rrd queues */ + system("rm -f /var/db/rrd/*queuedrops.rrd"); + system("rm -f /var/db/rrd/*queues.rrd"); + enable_rrd_graphing(); + + /* apply the new configuration to the system */ + filter_configure(); + + /* And we're no longer dirty! */ + clear_subsystem_dirty('shaper'); + + update_filter_reload_status("Initializing"); + header("Location: status_filter_reload.php"); + exit; +} + +function apply_all_chosen_items() { + global $config, $g, $altq_list_queues, $gamesplist, $voiplist, $othersplist, $p2plist; + + require_once("wizardapp.inc"); + + /* + * Wipe previous config. + * Doing it here makes sense since we can wipe the previous config only after + * the user decides to do so, finishing the wizard. + */ + if(isset($config['shaper']['queue'])) + unset($config['shaper']['queue']); + /* XXX: This is redundant, because this should be handled by converter at startup. */ + if(isset($config['shaper']['rule'])) + unset($config['shaper']['rule']); + foreach ($config['filter']['rule'] as $key => $rule) + if ($rule['wizard'] == "yes") + unset($config['filter']['rule'][$key]); + + /* restart the cached config */ + unset($altq_list_queues); + $altq_list_queues = array(); + + $steps = intval($config['ezshaper']['step1']['numberofconnections']); + + $interfacelist = array(); + + for ($i = 0; $i < $steps; $i++) { + + $tmppath = array(); + $altq =& new altq_root_queue(); + + $altq->SetInterface($config['ezshaper']['step2']["conn{$i}interface"]); + $interfacelist[] = $config['ezshaper']['step2']["conn{$i}interface"]; + $altq->SetScheduler($config['ezshaper']['step2']["conn{$i}uploadscheduler"]); + $altq->SetBandwidth(floatval($config['ezshaper']['step2']["conn{$i}upload"])); + $altq->SetBwscale($config['ezshaper']['step2']["conn{$i}uploadspeed"]); + $altq->SetEnabled("on"); + $altq_list_queues[$altq->GetQname()] =& $altq; + array_push($tmppath, $config['ezshaper']['step2']["conn{$i}interface"]); + $altq->SetLink($tmppath); + $altq->wconfig(); + + $sched = $config['ezshaper']['step2']["conn{$i}uploadscheduler"]; + $voipbw =0; + $voipbwunit = "Kb"; + $voip = false; + $penalty = false; + $penaltybw = 0; + $penaltybwunit = "Kb"; + $p2p = false; + $p2pcatchall = false; + $p2pcatchbw = 0; + $p2pcatchbwunit = "%"; + $games = false; + $otherpriority = false; + $remainbw = 0; + $factor = 0; + $upfactor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}uploadspeed"]); + $upbw = floatval($config['ezshaper']['step2']["conn{$i}upload"]) * $upfactor; + + if ($config['ezshaper']['step3']['enable']) { + $voip = true; + $voipbw = $config['ezshaper']['step3']["conn{$i}upload"]; + $voipbwunit = $config['ezshaper']['step3']["conn{$i}uploadspeed"]; + if ($voipbwunit == "%") + $factor = $upbw/100; + else + $factor = wizard_get_bandwidthtype_scale($voipbwunit); + $remainbw += $voipbw * $factor; + } + if ($config['ezshaper']['step4']['enable']) { + $penalty = true; + $penaltybw = $config['ezshaper']['step4']['bandwidth']; + $penaltybwunit = $config['ezshaper']['step4']['bandwidthunit']; + if ($penaltybwunit == "%") + $factor = $upbw/100; + else + $factor = wizard_get_bandwidthtype_scale($penaltybwunit); + $remainbw += $penaltybw * $factor; + } else { + $penalty = false; + $penaltybw = 0; + } + if ($config['ezshaper']['step5']['enable']) { + $p2p = true; + if ($config['ezshaper']['step5']['p2pcatchall']) { + $p2pcatchall = true; + $p2pcatchbw = $config['ezshaper']['step5']['bandwidth']; + $p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit']; + if ($p2pcatchbwunit == "%") + $factor = $upbw/100; + else + $factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit); + $remainbw += $p2pcatchbw * $factor; + } else { + $p2pcatchall = false; + $p2pcatchbw = 0; + } + } else { + $p2p = false; + $p2pcatchall = false; + $p2pcatchbw = 0; + } + if ($config['ezshaper']['step6']['enable']) { + $games = true; + } else { + $games = false; + } + + if ($config['ezshaper']['step7']['enable']) { + $otherpriority = true; + } else { + $otherpriority = false; + } + + $remainbw = round($remainbw / $upbw * 100, 2); + + if (intval($remainbw) > 0 && intval($remainbw) > 30) { + $savemsg=gettext("Custom Bandwidths are greater than 30%. Please lower them for the wizard to continue."); + header("Location: wizard.php?xml=traffic_shaper_wizard_multi_all.xml&stepid=2&message={$savemsg}"); + exit; + } else { + $remainbw = 100 - $remainbw; + } + + if ($sched != "PRIQ") { + if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qInternet"; + //$tmpcf['priority'] = 6; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ") { + $tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}upload"]); + $tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + } + else if ($sched == "HFSC") { + $tmpcf['linkshare3'] = + floatval($config['ezshaper']['step2']["conn{$i}upload"]) . $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + $tmpcf['upperlimit3'] = + floatval($config['ezshaper']['step2']["conn{$i}upload"]) . $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + $tmpcf['upperlimit'] = "on"; + + + $tmpcf['linkshare'] = "on"; + $tmpcf['bandwidth'] = floatval($config['ezshaper']['step2']["conn{$i}upload"]); + $tmpcf['bandwidthtype'] = $config['ezshaper']['step2']["conn{$i}uploadspeed"]; + } + array_push($tmppath, "qInternet"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + //array_pop($tmppath); + //echo "qInternet
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + $altq =& $qtmp; + } + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qACK"; + $tmpcf['priority'] = 6; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.2; + $tmpcf['bandwidthtype'] = "%"; + } + else if ($sched == "HFSC") { + $lkbw = 0.20 * $remainbw; + $tmpcf['linkshare3'] = "{$lkbw}%"; + $tmpcf['linkshare'] = "on"; + $tmpcf['bandwidth'] = $lkbw; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qACK"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qACK
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + if ($p2pcatchall) + $tmpcf['name'] = "qOthersDefault"; + else + $tmpcf['name'] = "qDefault"; + $tmpcf['priority'] = 3; + $tmpcf['enabled'] = "on"; + if (!$p2pcatchall) + $tmpcf['default'] = "on"; + $tmpcf['ecn'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpcf['bandwidth'] = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, $tmpcf['name']); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qDefault
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + + if ($p2p) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qP2P"; + $tmpcf['priority'] = 1; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($p2pcatchall) { + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $p2pcatchbw; + $tmpcf['bandwidthtype'] = $p2pcatchbwunit; + } else if ($sched == "HFSC") { + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$p2pcatchbw}{$p2pcatchbwunit}"; + $tmpcf['upperlimit'] = "on"; + $tmpcf['upperlimit3'] = "{$p2pcatchbw}{$p2pcatchbwunit}"; + $tmpcf['bandwidth'] = $p2pcatchbw; + $tmpcf['bandwidthtype'] = $p2pcatchbwunit; + } + $tmpcf['default'] = "on"; + + } else { + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.05; /* 5% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpbw = $remainbw * 0.05; /* 5% bandwidth */ + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$tmpbw}%"; + $tmpcf['upperlimit'] = "on"; + $tmpcf['upperlimit3'] = "{$tmpbw}%"; + $tmpcf['bandwidth'] = $tmpbw; + $tmpcf['bandwidthtype'] = "%"; + } + } + array_push($tmppath, "qP2P"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qP2P
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($voip) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qVoIP"; + $tmpcf['priority'] = 7; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + if ($voipbw > 0) { + $tmpcf['bandwidth'] = $voipbw; + $tmpcf['bandwidthtype'] = $voipbwunit; + } else { + $tmpcf['bandwidth'] = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } + } else if ($sched == "HFSC") { + if ($voipbw > 0) { + $tmpcf['realtime3'] = "{$voipbw}{$voipbwunit}"; + } else { + $voipbw = $remainbw * 0.20; /* 20% bandwidth */ + $tmpcf['realtime3'] = "{$voipbw}%"; + } + $tmpcf['realtime'] = "on"; + $tmpcf['bandwidth'] = 32; + $tmpcf['bandwidthtype'] = "Kb"; + } + array_push($tmppath, "qVoIP"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qVoIP
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($games) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qGames"; + $tmpcf['priority'] = 5; + $tmpcf['enabled'] = "on"; + $tmpcf['ecn'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $gamesbw = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$gamesbw}%"; + $tmpcf['bandwidth'] = "{$gamesbw}"; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qGames"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qGames
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($otherpriority) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qOthersHigh"; + $tmpcf['priority'] = 4; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpcf['linkshare'] = "on"; + $otherbw = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['linkshare3'] = "{$otherbw}%"; + $tmpcf['bandwidth'] = $otherbw; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qOthersHigh"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qHigh
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qOthersLow"; + $tmpcf['priority'] = 2; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + if ($penalty) { + $tmpcf['bandwidthtype'] = $penaltybwunit; + $tmpcf['bandwidth'] = $penaltybw; + } else { + $tmpcf['bandwidth'] = $remainbw * 0.05; /* 5% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } + } else if ($sched == "HFSC") { + if ($penalty) { + $tmpcf['linkshare3'] = "{$penaltybw}{$penaltybwunit}"; + $tmpcf['bandwidth'] = $penaltybw; + $tmpcf['bandwidthtype'] = $penaltybwunit; + } else { + $lsbw = $remainbw * 0.05; + $tmpcf['linkshare3'] = "{$lsbw}%"; /* 5% bandwidth */ + $tmpcf['bandwidth'] = $lsbw; + $tmpcf['bandwidthtype'] = "%"; + } + $tmpcf['linkshare'] = "on"; + } + array_push($tmppath, "qOthersLow"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qLow
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + array_pop($tmppath); + } + + /* LAN bandwidth ----------------------------------------------------------------------------------------- */ + $localint = intval($config['ezshaper']['step1']['numberoflocalinterfaces']); + $lanbw = 0; + for ($i = 0; $i < $steps; $i++) { + $down = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}downloadspeed"]); + $input_bw = floatval($config['ezshaper']['step2']["conn{$i}download"]) * $down; + $lanbw += $input_bw; + } + + for ($i = 0; $i < $localint; $i++) { + + $tmppath = array(); + $altq =& new altq_root_queue(); + + $altq->SetInterface($config['ezshaper']['step2']["local{$i}interface"]); + $altq->SetScheduler($config['ezshaper']['step2']["local{$i}downloadscheduler"]); + //$altq->SetBandwidth($lanbw/1000); + //$altq->SetBwscale("Kb"); + $altq->SetEnabled("on"); + $altq_list_queues[$altq->GetQname()] =& $altq; + array_push($tmppath, $config['ezshaper']['step2']["local{$i}interface"]); + $altq->SetLink($tmppath); + //var_dump($input_errors); + $altq->wconfig(); + + $sched = $config['ezshaper']['step2']["local{$i}downloadscheduler"]; + $voipbw =0; + $voipbwunit = "%"; + $voip = false; + $penalty = false; + $penaltybw = 0; + $penaltybwunit = "%"; + $p2p = false; + $p2pcatchall = false; + $p2pcatchbw = 0; + $games = false; + $otherpriority = false; + $remainbw = 0; + + + if ($config['ezshaper']['step3']['enable']) { + $voip = true; + $voipbw = $config['ezshaper']['step3']["local{$i}download"]; + $voipbwunit = $config['ezshaper']['step3']["local{$i}downloadspeed"]; + if ($sched != HFSC) { + if ($voipbwunit == "%") + $factor = $lanbw/100; + else + $factor = wizard_get_bandwidthtype_scale($voipbwunit); + $remainbw += floatval($voipbw) * $factor; + } else + $remainbw += 32000; /* 32Kbit/s reserved for HFSC link sharing */ + } + if ($config['ezshaper']['step4']['enable']) { + $penalty = true; + $penaltybw = $config['ezshaper']['step4']['bandwidth']; + $penaltybwunit = $config['ezshaper']['step4']['bandwidthunit']; + if ($penaltybwunit == "%") + $factor = $lanbw/100; + else + $factor = wizard_get_bandwidthtype_scale($penaltybwunit); + $remainbw += floatval($penaltybw) * $factor; + } else { + $penalty = false; + $penaltybw = 0; + } + if ($config['ezshaper']['step5']['enable']) { + $p2p = true; + if ($config['ezshaper']['step5']['p2pcatchall']) { + $p2pcatchall = true; + $p2pcatchbw = $config['ezshaper']['step5']['bandwidth']; + $p2pcatchbwunit = $config['ezshaper']['step5']['bandwidthunit']; + if ($p2pcatchbwunit == "%") + $factor = $upbw/100; + else + $factor = wizard_get_bandwidthtype_scale($p2pcatchbwunit); + $remainbw += floatval($p2pcatchbw) * $factor; + } else { + $p2pcatchall = false; + $p2pcatchbw = 0; + } + } else { + $p2p = false; + $p2pcatchall = false; + $p2pcatchbw = 0; + } + if ($config['ezshaper']['step6']['enable']) { + $games = true; + } else { + $games = false; + } + + if ($config['ezshaper']['step7']['enable']) { + $otherpriority = true; + } else { + $otherpriority = false; + } + $remainbw = round($remainbw / $lanbw * 100, 2); + + if (intval($remainbw) > 0 && intval($remainbw) > 40) { + $savemsg=gettext("Custom Bandwidths are greater than 40%. Please lower them for the wizard to continue."); + header("Location: wizard.php?xml=traffic_shaper_wizard_multi_all.xml&stepid=2&message={$savemsg}"); + exit; + } else { + $remainbw = 100 - $remainbw; + } + + if (!$p2pcatchall) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qLink"; + $tmpcf['priority'] = 2; + $tmpcf['enabled'] = "on"; + $tmpcf['default'] = "on"; + $tmpcf['qlimit'] = 500; + $tmpcf['ecn'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = 20; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpcf['bandwidth'] = 20; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, $tmpcf['name']); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qDefault
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($sched != "PRIQ") { + if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qInternet"; + //$tmpcf['priority'] = 6; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ") { + $tmpcf['bandwidth'] = $lanbw/1000; + $tmpcf['bandwidthtype'] = "Kb"; + } + else if ($sched == "HFSC") { + $tmpcf['linkshare3'] = $lanbw/1000 . "Kb"; + $tmpcf['upperlimit3'] = $lanbw/1000 . "Kb"; + $tmpcf['upperlimit'] = "on"; + $tmpcf['linkshare'] = "on"; + $tmpcf['bandwidth'] = $lanbw/1000; + $tmpcf['bandwidthtype'] = "Kb"; + } + array_push($tmppath, "qInternet"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + //array_pop($tmppath); + //echo "qInternet
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + $altq =& $qtmp; + } + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qACK"; + $tmpcf['priority'] = 6; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + If ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.2; + $tmpcf['bandwidthtype'] = "%"; + } + else if ($sched == "HFSC") { + $lkbw = 0.20 * $remainbw; + $tmpcf['linkshare3'] = "{$lkbw}%"; + $tmpcf['linkshare'] = "on"; + $tmpcf['bandwidth'] = $lkbw; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qACK"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qACK
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + + if ($p2p) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qP2P"; + $tmpcf['priority'] = 1; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($p2pcatchall) { + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $p2pcatchbw; + $tmpcf['bandwidthtype'] = $p2pcatchbwunit; + } else if ($sched == "HFSC") { + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$p2pcatchbw}{$p2pcatchbwunit}"; + $tmpcf['upperlimit'] = "on"; + $tmpcf['upperlimit3'] = "{$p2pcatchbw}{$p2pcatchbwunit}"; + $tmpcf['bandwidth'] = $p2pcatchbw; + $tmpcf['bandwidthtype'] = $p2pcatchbwunit; + } + $tmpcf['default'] = "on"; + $tmpcf['qlimit'] = 500; + } else { + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.05; /* 5% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpbw = $remainbw * 0.05; /* 5% bandwidth */ + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$tmpbw}%"; + $tmpcf['upperlimit'] = "on"; + $tmpcf['upperlimit3'] = "{$tmpbw}%"; + $tmpcf['bandwidth'] = $tmpbw; + $tmpcf['bandwidthtype'] = "%"; + } + } + array_push($tmppath, "qP2P"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qP2P
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($voip) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qVoIP"; + $tmpcf['priority'] = 7; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + if ($voipbw > 0) { + $tmpcf['bandwidth'] = $voipbw; + $tmpcf['bandwidthtype'] = $voipbwunit; + } else { + $tmpcf['bandwidth'] = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } + } else if ($sched == "HFSC") { + if ($voipbw > 0) { + $tmpcf['realtime3'] = "{$voipbw}{$voipbwunit}"; + } else { + $voipbw = $remainbw * 0.20; /* 20% bandwidth */ + $tmpcf['realtime3'] = "{$voipbw}%"; + } + $tmpcf['realtime'] = "on"; + $tmpcf['bandwidth'] = 32; + $tmpcf['bandwidthtype'] = "Kb"; + } + array_push($tmppath, "qVoIP"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qVoIP
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($games) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qGames"; + $tmpcf['priority'] = 5; + $tmpcf['enabled'] = "on"; + $tmpcf['ecn'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $gamesbw = $remainbw * 0.2; /* 20% bandwidth */ + $tmpcf['linkshare'] = "on"; + $tmpcf['linkshare3'] = "{$gamesbw}%"; + $tmpcf['bandwidth'] = "{$gamesbw}"; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qGames"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qGames
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + + if ($otherpriority) { + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qOthersHigh"; + $tmpcf['priority'] = 4; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + $tmpcf['bandwidth'] = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['bandwidthtype'] = "%"; + } else if ($sched == "HFSC") { + $tmpcf['linkshare'] = "on"; + $otherbw = $remainbw * 0.1; /* 10% bandwidth */ + $tmpcf['linkshare3'] = "{$otherbw}%"; + $tmpcf['bandwidth'] = $otherbw; + $tmpcf['bandwidthtype'] = "%"; + } + array_push($tmppath, "qOthersHigh"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qHigh
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + + + if ($sched == "PRIQ") + $q =& new priq_queue(); + else if ($sched == "CBQ") + $q =& new cbq_queue(); + else if ($sched == "HFSC") + $q =& new hfsc_queue(); + $tmpcf = array(); + $tmpcf['name'] = "qOthersLow"; + $tmpcf['priority'] = 3; + $tmpcf['ecn'] = "on"; + $tmpcf['enabled'] = "on"; + if ($sched == "CBQ") { + $tmpcf['borrow'] = "on"; + if ($penalty) { + $tmpcf['bandwidth'] = $penaltybw; + $tmpcf['bandwidthtype'] = $penaltybwunit; + } else { + $tmpcf['bandwidthtype'] = "%"; + $tmpcf['bandwidth'] = $remainbw * 0.05; /* 5% bandwidth */ + } + } else if ($sched == "HFSC") { + if ($penalty) { + $tmpcf['linkshare3'] = "{$penaltybw}{$penaltybwunit}"; + $tmpcf['bandwidth'] = $penaltybw; + $tmpcf['bandwidthtype'] = $penaltybwunit; + } else { + $lsbw = $remainbw * 0.05; + $tmpcf['linkshare3'] = "{$lsbw}%"; /* 5% bandwidth */ + $tmpcf['bandwidth'] = $lsbw; + $tmpcf['bandwidthtype'] = "%"; + } + $tmpcf['linkshare'] = "on"; + } + array_push($tmppath, "qOthersLow"); + $qtmp =& $altq->add_queue($q, $tmpcf, $tmppath, $input_errors); + array_pop($tmppath); + //echo "qLow
                              "; + //var_dump($input_errors); + $qtmp->wconfig(); + } + array_pop($tmppath); + } + +/* End LAN bandwidth ------------------------------------------------------------------------------------- */ + + + + if (!is_array($config['filter']['rule'])) + $config['filter']['rule'] = array(); + + $interfacelist = implode(",", $interfacelist); + + /* Rules */ + if ($penalty) { + if( is_ipaddr($config['ezshaper']['step4']['address']) || is_alias($config['ezshaper']['step4']['address'])) { + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Penalty Box"); + $rule['defaultqueue'] = "qOthersLow"; + $rule['source']['address'] = $config['ezshaper']['step4']['address']; + $rule['destination']['any'] = TRUE; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + + } + } + + /* If user specifies an IP, we don't bother with providers */ + if ($voip) { + if( is_ipaddr($config['ezshaper']['step3']['address']) || is_alias($config['ezshaper']['step3']['address'])) { + /* create VOIP rules */ + $rule = array(); + $rule['type'] = "match"; + //$rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Connections From Upstream SIP Server"); + $rule['protocol'] = "udp"; + $rule['defaultqueue'] = "qVoIP"; + $rule['source']['address'] = $config['ezshaper']['step3']['address']; + $rule['destination']['any'] = TRUE; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + + $rule = array(); + $rule['type'] = "match"; + //$rule['interface'] = $interfacelist; + $rule['descr'] = gettext("Connections To Upstream SIP Server"); + $rule['protocol'] = "udp"; + $rule['defaultqueue'] = "qVoIP"; + $rule['source']['any'] = TRUE; + $rule['destination']['address'] = $config['ezshaper']['step3']['address']; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + + } elseif( $config['ezshaper']['step3']['provider'] == "Generic" ) { + /* create VOIP rules */ + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + $rule['descr'] = "DiffServ/Lowdelay/Upload"; + $rule['protocol'] = "udp"; + $rule['source']['any'] = TRUE; + $rule['defaultqueue'] = "qVoIP"; + $rule['destination']['any'] = TRUE; + $rule['iptos'] = "lowdelay"; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + + } else { + /* loop through voiplist[] */ + foreach ($voiplist[$config['ezshaper']['step3']['provider']] as $voip) { + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + $rule['defaultqueue'] = 'qVoIP'; + $rule['source']['any'] = TRUE; + $rule['destination']['any'] = TRUE; + $rule['descr'] = "m_voip {$voip[0]} outbound"; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['destination']['port'] = $voip[2]."-".$voip[3]; + if($voip[1] != '') + $rule['protocol'] = $voip[1]; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + } + } + } + + /* loop through p2plist[] */ + if ($p2p) { + foreach($config['ezshaper']['step5'] as $key => $val) { + if (!is_array($p2plist[$key])) + continue; + foreach ($p2plist[$key] as $p2pclient) { + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + $rule['defaultqueue'] = 'qP2P'; + $rule['source']['any'] = TRUE; + $rule['destination']['any'] = TRUE; + $rule['descr'] = "m_P2P {$p2pclient[0]} outbound"; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['destination']['port'] = $p2pclient[2]."-".$p2pclient[3]; + if($p2pclient[1] != '') + $rule['protocol'] = $p2pclient[1]; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + } + } + } + + /* loop through gamesplist[] */ + if ($games) { + foreach($config['ezshaper']['step6'] as $key => $val) { + if (!is_array($gamesplist[$key])) + continue; + foreach ($gamesplist[$key] as $Gameclient) { + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + $rule['defaultqueue'] = 'qGames'; + if ($Gameclient[1] == "tcp") + $rule['ackqueue'] = 'qACK'; + $rule['source']['any'] = TRUE; + $rule['destination']['any'] = TRUE; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['descr'] = "m_Game {$Gameclient[0]} outbound"; + $rule['destination']['port'] = $Gameclient[2]."-".$Gameclient[3]; + if($Gameclient[1] != '') + $rule['protocol'] = $Gameclient[1]; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + } + } + } + + /* loop through othersplist[] */ + if ($otherpriority) { + foreach($config['ezshaper']['step7'] as $key => $val) { + if (!is_array($othersplist[$key])) + continue; + foreach ($othersplist[$key] as $otherclient) { + $rule = array(); + $rule['type'] = "match"; + $rule['interface'] = $interfacelist; + switch ($val) { + case "H": + $rule['defaultqueue'] = 'qOthersHigh'; /* posted value H or L */ + if ($otherclient[1] == "tcp") + $rule['ackqueue'] = 'qACK'; + $loop = 0; + break; + case "L": + $rule['defaultqueue'] = 'qOthersLow'; /* posted value H or L */ + if ($otherclient[1] == "tcp") + $rule['ackqueue'] = 'qACK'; + $loop = 0; + break; + case "D": + if ($p2pcatchall) { + $loop = 0; + $rule['defaultqueue'] = 'qOthersDefault'; + if ($otherclient[1] == "tcp") + $rule['ackqueue'] = 'qACK'; + } else + $loop = 1; /* It automatically goes to default queue */ + break; + default: + $loop = 1; + } + if (!$loop) { + $rule['source']['any'] = TRUE; + $rule['destination']['any'] = TRUE; + $rule['floating'] = "yes"; + $rule['wizard'] = "yes"; + $rule['enabled'] = "on"; + $rule['descr'] = "m_Other {$otherclient[0]} outbound"; + + if($otherclient[2] or $otherclient[3]) { + $rule['destination']['port'] = $otherclient[2]."-".$otherclient[3]; + } + if($otherclient[1] != '') + $rule['protocol'] = $otherclient[1]; + $rule['created'] = make_config_revision_entry(null, gettext("Traffic Shaper Wizard")); + $config['filter']['rule'][] = $rule; + } + } + } + } + write_config(); +} + +function wizard_get_bandwidthtype_scale($type = "b") { + switch ($type) { + case "Gb": + $factor = 1024 * 1024 * 1024; + break; + case "Mb": + $factor = 1024 * 1024; + break; + case "Kb": + $factor = 1024; + break; + case "b": + default: + $factor = 1; + break; + } + return intval($factor); +} + +?> diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml new file mode 100755 index 0000000..e94256b --- /dev/null +++ b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml @@ -0,0 +1,1657 @@ + + + + + 9 + + 1 + pfSense Traffic Shaper Wizard + true + This wizard will guide you through setting up the pfSense traffic shaper. + Please be aware that Custom Bandwidths should not exceed 30% of the interface/link bandwidth. Keep this in mind during the wizard. + + + + listtopic + Traffic shaper Wizard + + + Enter number of WAN type connections + numberofconnections + input + ^[0-9]+$ + Number of connections you have + ezshaper->step1->numberofconnections + + + Enter number of LAN type interfaces + numberoflocalinterfaces + input + ^[0-9]+$ + Number of local interfaces you have + ezshaper->step1->numberoflocalinterfaces + + + Next + submit + + + step1_stepbeforeformdisplay(); + step1_submitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc + + + 2 + pfSense Traffic Shaper Wizard + Shaper configuration + + step2_stepbeforeformdisplay(); + step2_stepsubmitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc + + + Next + submit + + + + + 3 + pfSense Traffic Shaper Wizard + Voice over IP + + + Enable + checkbox + Prioritize Voice over IP traffic + This will raise the priority of VOIP traffic above all other traffic. + ezshaper->step3->enable + + + Next + submit + + + VOIP specific settings + listtopic + + + Provider + select + Choose Generic if your provider isn't listed. + ezshaper->step3->provider + + + + + + + + + Upstream SIP Server + upstream_sip_server + inputalias + (Optional) If this is chosen, the provider field will be overridden. This allows you to provide the IP address of the <strong>remote</strong> PBX or SIP Trunk to prioritize. <br />NOTE: You can also use a Firewall Alias in this location. + ezshaper->step3->address + IP Address field is non-blank and doesn't look like an IP address. + + + Bandwidth + input + ^[0-9]*$ + Total bandwidth in percentage(%)(should be between 5 and 40) guarantee for VOIP traffic. + ezshaper->step3->bandwidth + + + Next + submit + + + step3_stepbeforeformdisplay(); + step3_stepsubmitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc + + + 4 + pfSense Traffic Shaper Wizard + Penalty Box + true + + + true + Enable + checkbox + Penalize IP or Alias + This will lower the priority of traffic from this IP or alias. + Address,Bandwidth,BandwidthSpeed + ezshaper->step4->enable + + + Next + submit + + + PenaltyBox specific settings + listtopic + + + Address + inputalias + This allows you to just provide the IP address of the computer(s) to penalize. NOTE: You can also use a Firewall Alias in this location. + ezshaper->step4->address + IP Address field is non-blank and doesn't look like an IP address. + + + Bandwidth + input + ^[0-9]*$ + Speed must be numerical. + ezshaper->step4->bandwidth + true + + + true + true + true + true + BandwidthSpeed + The limit you want to apply. + select + + + + + + + + ezshaper->step4->bandwidthunit + + + Next + submit + + + step4_stepsubmitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc + + + 5 + pfSense Traffic Shaper Wizard + Peer to Peer networking + true + + + true + Enable + checkbox + Lower priority of Peer-to-Peer traffic + This will lower the priority of P2P traffic below all other traffic. Please check the items that you would like to prioritize lower than normal traffic. + p2pCatchAll,Bandwidth,BandwidthSpeed,Aimster,BitTorrent,BuddyShare,CuteMX,DCplusplus,dcc,DirectConnect,DirectFileExpress,EDonkey2000,FastTrack,Gnutella,grouper,hotComm,HotlineConnect,iMesh,Napster,OpenNap,Scour,Shareaza,SongSpy,WinMX + ezshaper->step5->enable + + + Next + submit + + + p2p Catch all + listtopic + + + p2pCatchAll + checkbox + When enabled, all uncategorized traffic is fed to the p2p queue. + ezshaper->step5->p2pcatchall + + + Bandwidth + input + ^[0-9]*$ + Speed must be numerical. + ezshaper->step5->bandwidth + true + + + true + true + true + true + BandwidthSpeed + The limit you want to apply. + select + + + + + + + + ezshaper->step5->bandwidthunit + + + Enable/Disable specific P2P protocols + listtopic + + + Aimster + checkbox + Aimster and other P2P using the Aimster protocol and ports + ezshaper->step5->aimster + + + BitTorrent + checkbox + Bittorrent and other P2P using the Torrent protocol and ports + ezshaper->step5->bittorrent + + + BuddyShare + checkbox + BuddyShare and other P2P using the BuddyShare protocol and ports + ezshaper->step5->buddyshare + + + CuteMX + checkbox + CuteMX and other P2P using the CuteMX protocol and ports + ezshaper->step5->cutemx + + + DCplusplus + checkbox + DC++ and other P2P using the DC++ protocol and ports + ezshaper->step5->dcplusplus + + + DCC + checkbox + irc DCC file transfers + ezshaper->step5->dcc + + + DirectConnect + checkbox + DirectConnect and other P2P using the DirectConnect protocol and ports + ezshaper->step5->directconnect + + + DirectFileExpress + checkbox + DirectFileExpress and other P2P using the DirectFileExpress protocol and ports + ezshaper->step5->directfileexpress + + + eDonkey2000 + checkbox + eDonkey and other P2P using the eDonkey protocol and ports + ezshaper->step5->edonkey2000 + + + FastTrack + checkbox + FastTrack and other P2P using the FastTrack protocol and ports + ezshaper->step5->fasttrack + + + Gnutella + checkbox + Gnutella and other P2P using the Gnutella protocol and ports + ezshaper->step5->gnutella + + + grouper + checkbox + grouper and other P2P using the grouper protocol and ports + ezshaper->step5->grouper + + + hotComm + checkbox + hotComm and other P2P using the hotComm protocol and ports + ezshaper->step5->hotcomm + + + HotlineConnect + checkbox + HotlineConnect and other P2P using the HotlineConnect protocol and ports + ezshaper->step5->hotlineconnect + + + iMesh + checkbox + iMesh and other P2P using the iMesh protocol and ports + ezshaper->step5->imesh + + + Napster + checkbox + Napster and other P2P using the Napster protocol and ports + ezshaper->step5->napster + + + OpenNap + checkbox + OpenNap and other P2P using the OpenNap protocol and ports + ezshaper->step5->opennap + + + Scour + checkbox + Scour and other P2P using the Scour protocol and ports + ezshaper->step5->scour + + + Shareaza + checkbox + Shareaza and other P2P using the Shareaza protocol and ports + ezshaper->step5->shareaza + + + SongSpy + checkbox + SongSpy and other P2P using the SongSpy protocol and ports + ezshaper->step5->songspy + + + WinMX + checkbox + WinMX and other P2P using the WinMX protocol and ports + ezshaper->step5->winmx + + + Next + submit + + + step5_stepsubmitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc + + + 6 + pfSense Traffic Shaper Wizard + true + Network Games + + + Enable + checkbox + Prioritize network gaming traffic + This will raise the priority of gaming traffic to higher than most traffic. + BattleNET,EAOrigin,GameForWindowsLive,PlayStationConsoles,Steam,WiiConsoles,XboxConsoles,ARMA2,ARMA3,Battlefield2,Battlefield3,BattlefieldBC2,Borderlands,CallOfDuty,Counterstrike,Crysis2,Crysis3,DeltaForce,DeadSpace2,DeadSpace3,Dirt3,DOOM3,DragonAge2,EmpireEarth,EveOnline,Everquest,Everquest2,FarCry,FarCry2,FarCry3,GunZOnline,HalfLife,LeagueofLegends,Lineage2,MassEffect3,MechwarriorOnline,Minecraft,OperationFlashpointDR,PlanetSide,PlanetSide2,QuakeIII,QuakeIV,StarWarsTOR,TigerWoods2004PS2,TribesAscend,UnrealTournament,WolfensteinEnemyTerritory,WorldOfWarcraft + true + ezshaper->step6->enable + + + Next + submit + + + Enable/Disable specific game consoles and services + listtopic + + + BattleNET + checkbox + Battle.net - Virtually every game from Blizzard publishing should match this. This includes the following game series: Starcraft, Diablo, Warcraft. Guild Wars also uses this port. + ezshaper->step6->battlenet + + + EAOrigin + checkbox + EA Origin Client - Some PC games by EA use this. + ezshaper->step6->eaorigin + + + GameForWindowsLive + checkbox + Games for Windows Live + ezshaper->step6->gamesforwindowslive + + + PlayStationConsoles + checkbox + PlayStation Consoles - This should cover all ports required for the Playstation 4, Playstation, PS Vita + ezshaper->step6->playstationconsoles + + + Steam + checkbox + Steam Game Client (Includes: America's Army 3, Counter-Strike: Source, Counter-Strike: Global Offensive, Half-Life 2, COD: Black Ops Series, Borderlands 2, Natural Selection 2, Left 4 Dead Series, Portal 2 and many other games on the Steam) + ezshaper->step6->steam + + + WiiConsoles + checkbox + Wii Consoles - Wii, Wii U, DS and 3DS + ezshaper->step6->wiiconsoles + + + XboxConsoles + checkbox + Xbox Consoles - Xbox 360 and Xbox One + ezshaper->step6->xboxconsoles + + + Enable/Disable specific games + listtopic + + + ARMA2 + checkbox + ARMA 2 + ezshaper->step6->arma2 + + + ARMA3 + checkbox + ARMA 3 + ezshaper->step6->arma3 + + + Battlefield2 + checkbox + Battlefield 2 - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->battlefield2 + + + Battlefield3 + checkbox + Battlefield 3 and 4 - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->battlefield3 + + + BattlefieldBC2 + checkbox + Battlefield: Bad Company 2 + ezshaper->step6->battlefieldbc2 + + + Borderlands + checkbox + Borderlands + ezshaper->step6->borderlands + + + CallOfDuty + checkbox + Call Of Duty (United Offensive) + ezshaper->step6->callofduty + + + Counterstrike + checkbox + Counterstrike. The ultimate 1st person shooter. + ezshaper->step6->counterstrike + + + Crysis2 + checkbox + Crysis 2 + ezshaper->step6->crysis2 + + + Crysis3 + checkbox + Crysis 3 + ezshaper->step6->crysis3 + + + DeadSpace2 + checkbox + Dead Space2 - this game uses a HUGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->deadspace2 + + + DeadSpace3 + checkbox + Dead Space 3 + ezshaper->step6->deadspace3 + + + DeltaForce + checkbox + Delta Force + ezshaper->step6->deltaforce + + + Dirt3 + checkbox + Dirt 3 + ezshaper->step6->dirt3 + + + DOOM3 + checkbox + DOOM3 + ezshaper->step6->doom3 + + + DragonAge2 + checkbox + Dragon Age 2 + ezshaper->step6->dragonage2 + + + EmpireEarth + checkbox + Empire Earth + ezshaper->step6->empireearth + + + EveOnline + checkbox + EVE Online + ezshaper->step6->eveonline + + + Everquest + checkbox + Everquest - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->everquest + + + Everquest2 + checkbox + Everquest II + ezshaper->step6->everquest2 + + + FarCry + checkbox + Far Cry + ezshaper->step6->farcry + + + FarCry2 + checkbox + Far Cry 2 + ezshaper->step6->farcry2 + + + FarCry3 + checkbox + Far Cry 3 + ezshaper->step6->farcry3 + + + GunZOnline + checkbox + GunZ Online + ezshaper->step6->gunzonline + + + HalfLife + checkbox + Half-Life + ezshaper->step6->halflife + + + LeagueofLegends + checkbox + League of Legends - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->leagueoflegends + + + Lineage2 + checkbox + Lineage II + ezshaper->step6->lineage2 + + + MassEffect3 + checkbox + Mass Effect 3 + ezshaper->step6->masseffect3 + + + MechwarriorOnline + checkbox + MechWarrior: Online - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->mechwarrioronline + + + Minecraft + checkbox + Minecraft + ezshaper->step6->minecraft + + + PlanetSide + checkbox + PlanetSide + ezshaper->step6->planetside + + + PlanetSide2 + checkbox + PlanetSide 2 + ezshaper->step6->planetside2 + + + OperationFlashpointDR + checkbox + Operation Flashpoint: Dragon Rising + ezshaper->step6->operationflashpoint-dr + + + QuakeIII + checkbox + Quake III + ezshaper->step6->quakeiii + + + QuakeIV + checkbox + Quake IV + ezshaper->step6->quakeiv + + + StarWarsTOR + checkbox + StarWars: The Old Republic - this game uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + ezshaper->step6->starwarstor + + + TigerWoods2004PS2 + checkbox + Tiger Woods 2004 for PS2 + ezshaper->step6->tigerwoods2004ps2 + + + TribesAscend + checkbox + Tribes Ascend + ezshaper->step6->tribesascend + + + UnrealTournament + checkbox + Unreal Tournament Series + ezshaper->step6->unrealtournament + + + WolfensteinEnemyTerritory + checkbox + Wolfenstein Enemy Territory + ezshaper->step6->wolfet + + + WorldOfWarcraft + checkbox + World of Warcraft + ezshaper->step6->wow + + + Next + submit + + + /usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc + + + 7 + pfSense Traffic Shaper Wizard + true + Raise or lower other Applications + + + Enable + checkbox + Other networking protocols + This will help raise or lower the priority of other protocols higher than most traffic. + AppleRemoteDesktop,MSRDP,PCAnywhere,VNC,AIM,Facetime,GoogleHangouts,ICQ,IRC,Jabber,MSN,TeamSpeak,TeamSpeak3,Ventrilo,PPTP,IPSEC,iTunesRadio,StreamingMP3,RTSP,RTMP,HTTP,IMAP,LotusNotes,POP3,SMTP,BattleNETDownloader,SteamDownloader,APNS,AppleMobileSync,CrashPlan,CVSUP,DNS,GIT,HBCI,ICMP,MySqlServer,NNTP,Slingbox,SMB,SNMP,Subversion + true + ezshaper->step7->enable + + + Next + submit + + + Remote Service / Terminal emulation + listtopic + + + AppleRemoteDesktop + ezshaper->step7->appleremotedesktop + select + + + + + + Apple Remote Desktop + + + MSRDP + select + ezshaper->step7->msrdp + + + + + + Microsoft Remote Desktop Protocol + + + PCAnywhere + ezshaper->step7->pcanywhere + select + + + + + + Symantec PC Anywhere + + + VNC + ezshaper->step7->vnc + select + + + + + + Virtual Network Computing + + + Messengers + listtopic + + + AIM + ezshaper->step7->aolinstantmessenger + select + + + + + + AOL Instant Messenger + + + Facetime + ezshaper->step7->facetime + select + + + + + + Facetime + + + ICQ + ezshaper->step7->icq + select + + + + + + ICQ + + + IRC + select + ezshaper->step7->irc + + + + + + Internet Relay Chat + + + Jabber + select + ezshaper->step7->jabber + + + + + + Jabber instant messenger + + + GoogleHangouts + ezshaper->step7->googlehangouts + select + + + + + + Google Hangouts + + + MSN + ezshaper->step7->msnmessenger + select + + + + + + MSN Messenger + + + Teamspeak + ezshaper->step7->teamspeak + select + + + + + + TeamSpeak + + + Teamspeak3 + ezshaper->step7->teamspeak3 + select + + + + + + TeamSpeak 3 + + + Ventrilo + ezshaper->step7->ventrilo + select + + + + + + Ventrilo + + + VPN + listtopic + + + PPTP + select + ezshaper->step7->pptp + + + + + + Microsoft Point to Point tunneling protocol + + + IPSEC + select + ezshaper->step7->ipsec + + + + + + IPSEC VPN traffic + + + Multimedia/Streaming + listtopic + + + iTunesRadio + select + ezshaper->step7->itunesradio + + + + + + iTunes Radio - this rule uses a LARGE port range, be aware that you may need to manually rearrange the resulting rules to correctly prioritize other traffic. + + + StreamingMP3 + select + ezshaper->step7->streamingmp3 + + + + + + Streaming Media + + + RTSP + ezshaper->step7->rtsp + select + + + + + + RealTime streaming protocol + + + RTMP + ezshaper->step7->rtmp + select + + + + + + Real-Time Messaging Protocol - Used by video streaming services such as Twitch.tv. + + + Web + listtopic + + + HTTP + select + ezshaper->step7->http + + + + + + HTTP and HTTPS aka Web Traffic + + + Mail + listtopic + + + SMTP + select + ezshaper->step7->smtp + + + + + + Mail Protocol + + + POP3 + select + ezshaper->step7->pop3 + + + + + + POP3 Protocol + + + IMAP + ezshaper->step7->imap + select + + + + + + IMAP Protocol + + + LotusNotes + ezshaper->step7->lotusnotes + select + + + + + + Lotus Notes + + + Game Downloader + listtopic + + + BattleNetDownloader + select + ezshaper->step7->battlenetdownloader + + + + + + Battle.NET Downloader + + + SteamDownloader + select + ezshaper->step7->steamdownloader + + + + + + Steam Downloader + + + Miscellaneous + listtopic + + + APNS + select + ezshaper->step7->apns + + + + + + Apple Push Notification Service + + + AppleMobileSync + select + ezshaper->step7->applemobilesync + + + + + + Apple Mobile Sync + + + CrashPlan + ezshaper->step7->crashplan + select + + + + + + CrashPlan + + + CVSUP + ezshaper->step7->cvsup + select + + + + + + CVSUP + + + DNS + select + ezshaper->step7->dns + + + + + + Domain Name Services + + + Git + ezshaper->step7->git + select + + + + + + Git Server + + + HBCI + ezshaper->step7->hbci + select + + + + + + HBCI + + + ICMP + ezshaper->step7->icmp + select + + + + + + ICMP Protocol + + + SMB + ezshaper->step7->smb + select + + + + + + Microsoft SMB Protocol and friends + + + SNMP + ezshaper->step7->snmp + select + + + + + + Simple Network Management Protocol + + + MySQLServer + ezshaper->step7->mysqlserver + select + + + + + + MySQL Server + + + NNTP + ezshaper->step7->nntp + select + + + + + + Internet News + + + Slingbox + ezshaper->step7->slingbox + select + + + + + + Slingbox + + + Subversion + ezshaper->step7->subversion + select + + + + + + Subversion Server + + + Next + submit + + + /usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc + + + 8 + pfSense Traffic Shaper Wizard + + Reload profile notice + listtopic + + After pressing Finish the system will load the new profile.<br/> Please note that this may take a moment.<br/> Also note that the traffic shaper is stateful meaning that only new connections will be shaped.<br/> If this is an issue please reset the state table after loading the profile.<br/> + + + Finish + submit + + + step8_stepsubmitphpaction(); + /usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc + + diff --git a/src/usr/local/www/xmlrpc.php b/src/usr/local/www/xmlrpc.php new file mode 100755 index 0000000..5fd022a --- /dev/null +++ b/src/usr/local/www/xmlrpc.php @@ -0,0 +1,592 @@ + array( + "true" => new XML_RPC_Response(new XML_RPC_Value(true, $XML_RPC_Boolean)), + "false" => new XML_RPC_Response(new XML_RPC_Value(false, $XML_RPC_Boolean)), + "authfail" => new XML_RPC_Response(new XML_RPC_Value(gettext("Authentication failed"), $XML_RPC_String)) + ) +); + +/* + * pfSense XMLRPC errors + * $XML_RPC_erruser + 1 = Auth failure + */ +$XML_RPC_erruser = 200; + +/* EXPOSED FUNCTIONS */ +$exec_php_doc = gettext("XMLRPC wrapper for eval(). This method must be called with two parameters: a string containing the local system\'s password followed by the PHP code to evaluate."); +$exec_php_sig = array( + array( + $XML_RPC_Boolean, // First signature element is return value. + $XML_RPC_String, // password + $XML_RPC_String, // shell code to exec + ) +); + +function xmlrpc_authfail() { + log_auth("webConfigurator authentication error for 'admin' from {$_SERVER['REMOTE_ADDR']}"); +} + +function exec_php_xmlrpc($raw_params) { + global $config, $xmlrpc_g; + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + $exec_php = $params[0]; + eval($exec_php); + if ($toreturn) { + $response = XML_RPC_encode($toreturn); + return new XML_RPC_Response($response); + } else { + return $xmlrpc_g['return']['true']; + } +} + +/*****************************/ +$exec_shell_doc = gettext("XMLRPC wrapper for mwexec(). This method must be called with two parameters: a string containing the local system\'s password followed by an shell command to execute."); +$exec_shell_sig = array( + array( + $XML_RPC_Boolean, // First signature element is return value. + $XML_RPC_String, // password + $XML_RPC_String, // shell code to exec + ) +); + +function exec_shell_xmlrpc($raw_params) { + global $config, $xmlrpc_g; + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + $shell_cmd = $params[0]; + mwexec($shell_cmd); + + return $xmlrpc_g['return']['true']; +} + +/*****************************/ +$backup_config_section_doc = gettext("XMLRPC wrapper for backup_config_section. This method must be called with two parameters: a string containing the local system\'s password followed by an array containing the keys to be backed up."); +$backup_config_section_sig = array( + array( + $XML_RPC_Struct, // First signature element is return value. + $XML_RPC_String, + $XML_RPC_Array + ) +); + +function backup_config_section_xmlrpc($raw_params) { + global $config, $xmlrpc_g; + + if (xmlrpc_loop_detect()) { + log_error("Disallowing CARP sync loop"); + return; + } + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + $val = array_intersect_key($config, array_flip($params[0])); + + return new XML_RPC_Response(XML_RPC_encode($val)); +} + +/*****************************/ +$restore_config_section_doc = gettext("XMLRPC wrapper for restore_config_section. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion."); +$restore_config_section_sig = array( + array( + $XML_RPC_Boolean, + $XML_RPC_String, + $XML_RPC_Struct + ) +); + +function restore_config_section_xmlrpc($raw_params) { + global $config, $xmlrpc_g; + + $old_config = $config; + + if (xmlrpc_loop_detect()) { + log_error("Disallowing CARP sync loop"); + return; + } + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + + /* + * Make sure it doesn't end up with both dnsmasq and unbound enabled + * simultaneously in secondary + * */ + if (isset($params[0]['unbound']['enable']) && isset($config['dnsmasq']['enable'])) { + unset($config['dnsmasq']['enable']); + services_dnsmasq_configure(); + } else if (isset($params[0]['dnsmasq']['enable']) && isset($config['unbound']['enable'])) { + unset($config['unbound']['enable']); + services_unbound_configure(); + } + + // Some sections should just be copied and not merged or we end + // up unable to sync the deletion of the last item in a section + $sync_full = array('dnsmasq', 'unbound', 'ipsec', 'aliases', 'wol', 'load_balancer', 'openvpn', 'cert', 'ca', 'crl', 'schedules', 'filter', 'nat', 'dhcpd', 'dhcpv6'); + $sync_full_done = array(); + foreach ($sync_full as $syncfull) { + if (isset($params[0][$syncfull])) { + $config[$syncfull] = $params[0][$syncfull]; + unset($params[0][$syncfull]); + $sync_full_done[] = $syncfull; + } + } + + $vipbackup = array(); + $oldvips = array(); + if (isset($params[0]['virtualip'])) { + if (is_array($config['virtualip']['vip'])) { + foreach ($config['virtualip']['vip'] as $vipindex => $vip) { + if ($vip['mode'] == "carp") { + $oldvips["{$vip['interface']}_vip{$vip['vhid']}"]['content'] = "{$vip['password']}{$vip['advskew']}{$vip['subnet']}{$vip['subnet_bits']}{$vip['advbase']}"; + $oldvips["{$vip['interface']}_vip{$vip['vhid']}"]['interface'] = $vip['interface']; + $oldvips["{$vip['interface']}_vip{$vip['vhid']}"]['subnet'] = $vip['subnet']; + } else if ($vip['mode'] == "ipalias" && (substr($vip['interface'], 0, 4) == '_vip' || strpos($vip['interface'], "lo0"))) { + $oldvips[$vip['subnet']]['content'] = "{$vip['interface']}{$vip['subnet']}{$vip['subnet_bits']}"; + $oldvips[$vip['subnet']]['interface'] = $vip['interface']; + $oldvips[$vip['subnet']]['subnet'] = $vip['subnet']; + } else if (($vip['mode'] == "ipalias" || $vip['mode'] == 'proxyarp') && !(substr($vip['interface'], 0, 4) == '_vip') || strpos($vip['interface'], "lo0")) { + $vipbackup[] = $vip; + } + } + } + } + + // For vip section, first keep items sent from the master + $config = array_merge_recursive_unique($config, $params[0]); + + /* Then add ipalias and proxyarp types already defined on the backup */ + if (is_array($vipbackup) && !empty($vipbackup)) { + if (!is_array($config['virtualip'])) { + $config['virtualip'] = array(); + } + if (!is_array($config['virtualip']['vip'])) { + $config['virtualip']['vip'] = array(); + } + foreach ($vipbackup as $vip) { + array_unshift($config['virtualip']['vip'], $vip); + } + } + + /* Log what happened */ + $mergedkeys = implode(",", array_merge(array_keys($params[0]), $sync_full_done)); + write_config(sprintf(gettext("Merged in config (%s sections) from XMLRPC client."), $mergedkeys)); + + /* + * The real work on handling the vips specially + * This is a copy of intefaces_vips_configure with addition of not reloading existing/not changed carps + */ + if (isset($params[0]['virtualip']) && is_array($config['virtualip']) && is_array($config['virtualip']['vip'])) { + $carp_setuped = false; + $anyproxyarp = false; + foreach ($config['virtualip']['vip'] as $vip) { + if ($vip['mode'] == "carp" && isset($oldvips["{$vip['interface']}_vip{$vip['vhid']}"])) { + if ($oldvips["{$vip['interface']}_vip{$vip['vhid']}"]['content'] == "{$vip['password']}{$vip['advskew']}{$vip['subnet']}{$vip['subnet_bits']}{$vip['advbase']}") { + if (does_vip_exist($vip)) { + unset($oldvips["{$vip['interface']}_vip{$vip['vhid']}"]); + continue; // Skip reconfiguring this vips since nothing has changed. + } + } + } else if ($vip['mode'] == "ipalias" && strstr($vip['interface'], "_vip") && isset($oldvips[$vip['subnet']])) { + if ($oldvips[$vip['subnet']]['content'] == "{$vip['interface']}{$vip['subnet']}{$vip['subnet_bits']}") { + if (does_vip_exist($vip)) { + unset($oldvips[$vip['subnet']]); + continue; // Skip reconfiguring this vips since nothing has changed. + } + } + unset($oldvips[$vip['subnet']]); + } + + switch ($vip['mode']) { + case "proxyarp": + $anyproxyarp = true; + break; + case "ipalias": + interface_ipalias_configure($vip); + break; + case "carp": + if ($carp_setuped == false) { + $carp_setuped = true; + } + interface_carp_configure($vip); + break; + } + } + /* Cleanup remaining old carps */ + foreach ($oldvips as $oldvipar) { + $oldvipif = get_real_interface($oldvipar['interface']); + if (!empty($oldvipif)) { + if (is_ipaddrv6($oldvipar['subnet'])) { + mwexec("/sbin/ifconfig " . escapeshellarg($oldvipif) . " inet6 " . escapeshellarg($oldvipar['subnet']) . " delete"); + } else { + pfSense_interface_deladdress($oldvipif, $oldvipar['subnet']); + } + } + } + if ($carp_setuped == true) { + interfaces_sync_setup(); + } + if ($anyproxyarp == true) { + interface_proxyarp_configure(); + } + } + + if (isset($old_config['ipsec']['enable']) !== isset($config['ipsec']['enable'])) { + vpn_ipsec_configure(); + } + + unset($old_config); + + return $xmlrpc_g['return']['true']; +} + +/*****************************/ +$merge_config_section_doc = gettext("XMLRPC wrapper for merging package sections. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion."); +$merge_config_section_sig = array( + array( + $XML_RPC_Boolean, + $XML_RPC_String, + $XML_RPC_Struct + ) +); + +function merge_installedpackages_section_xmlrpc($raw_params) { + global $config, $xmlrpc_g; + + if (xmlrpc_loop_detect()) { + log_error("Disallowing CARP sync loop"); + return; + } + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + $config['installedpackages'] = array_merge($config['installedpackages'], $params[0]); + $mergedkeys = implode(",", array_keys($params[0])); + write_config(sprintf(gettext("Merged in config (%s sections) from XMLRPC client."), $mergedkeys)); + + return $xmlrpc_g['return']['true']; +} + +/*****************************/ +$merge_config_section_doc = gettext("XMLRPC wrapper for merge_config_section. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion."); +$merge_config_section_sig = array( + array( + $XML_RPC_Boolean, + $XML_RPC_String, + $XML_RPC_Struct + ) +); + +function merge_config_section_xmlrpc($raw_params) { + global $config, $xmlrpc_g; + + if (xmlrpc_loop_detect()) { + log_error("Disallowing CARP sync loop"); + return; + } + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + $config_new = array_overlay($config, $params[0]); + $config = $config_new; + $mergedkeys = implode(",", array_keys($params[0])); + write_config(sprintf(gettext("Merged in config (%s sections) from XMLRPC client."), $mergedkeys)); + return $xmlrpc_g['return']['true']; +} + +/*****************************/ +$filter_configure_doc = gettext("Basic XMLRPC wrapper for filter_configure. This method must be called with one parameter: a string containing the local system\'s password. This function returns true upon completion."); +$filter_configure_sig = array( + array( + $XML_RPC_Boolean, + $XML_RPC_String + ) +); + +function filter_configure_xmlrpc($raw_params) { + global $xmlrpc_g, $config; + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + filter_configure(); + system_routing_configure(); + setup_gateways_monitor(); + relayd_configure(); + require_once("openvpn.inc"); + openvpn_resync_all(); + if (isset($config['dnsmasq']['enable'])) { + services_dnsmasq_configure(); + } elseif (isset($config['unbound']['enable'])) { + services_unbound_configure(); + } else { + # Both calls above run services_dhcpd_configure(), then we just + # need to call it when they are not called to avoid restarting dhcpd + # twice, as described on ticket #3797 + services_dhcpd_configure(); + } + local_sync_accounts(); + + return $xmlrpc_g['return']['true']; +} + +/*****************************/ +$carp_configure_doc = gettext("Basic XMLRPC wrapper for configuring CARP interfaces."); +$carp_configure_sig = array( + array( + $XML_RPC_Boolean, + $XML_RPC_String + ) +); + +function interfaces_carp_configure_xmlrpc($raw_params) { + global $xmlrpc_g; + + if (xmlrpc_loop_detect()) { + log_error("Disallowing CARP sync loop"); + return; + } + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + interfaces_vips_configure(); + + return $xmlrpc_g['return']['true']; +} + +/*****************************/ +$check_firmware_version_doc = gettext("Basic XMLRPC wrapper for check_firmware_version. This function will return the output of check_firmware_version upon completion."); + +$check_firmware_version_sig = array( + array( + $XML_RPC_String, + $XML_RPC_String + ) +); + +function check_firmware_version_xmlrpc($raw_params) { + global $xmlrpc_g, $XML_RPC_String; + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + return new XML_RPC_Response(new XML_RPC_Value(check_firmware_version(false), $XML_RPC_String)); +} + +/*****************************/ +$pfsense_firmware_version_doc = gettext("Basic XMLRPC wrapper for check_firmware_version. This function will return the output of check_firmware_version upon completion."); + +$pfsense_firmware_version_sig = array ( + array ( + $XML_RPC_Struct, + $XML_RPC_String + ) +); + +function pfsense_firmware_version_xmlrpc($raw_params) { + global $xmlrpc_g; + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + return new XML_RPC_Response(XML_RPC_encode(host_firmware_version())); +} + +/*****************************/ +$reboot_doc = gettext("Basic XMLRPC wrapper for rc.reboot."); +$reboot_sig = array(array($XML_RPC_Boolean, $XML_RPC_String)); +function reboot_xmlrpc($raw_params) { + global $xmlrpc_g; + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + mwexec_bg("/etc/rc.reboot"); + + return $xmlrpc_g['return']['true']; +} + +/*****************************/ +$get_notices_sig = array( + array( + $XML_RPC_Array, + $XML_RPC_String + ), + array( + $XML_RPC_Array + ) +); + +function get_notices_xmlrpc($raw_params) { + global $g, $xmlrpc_g; + + $params = xmlrpc_params_to_php($raw_params); + if (!xmlrpc_auth($params)) { + xmlrpc_authfail(); + return $xmlrpc_g['return']['authfail']; + } + if (!function_exists("get_notices")) { + require("notices.inc"); + } + if (!$params) { + $toreturn = get_notices(); + } else { + $toreturn = get_notices($params); + } + $response = new XML_RPC_Response(XML_RPC_encode($toreturn)); + + return $response; +} + +$xmlrpclockkey = lock('xmlrpc', LOCK_EX); + +/*****************************/ +$server = new XML_RPC_Server( + array( + 'pfsense.exec_shell' => array('function' => 'exec_shell_xmlrpc', + 'signature' => $exec_shell_sig, + 'docstring' => $exec_shell_doc), + 'pfsense.exec_php' => array('function' => 'exec_php_xmlrpc', + 'signature' => $exec_php_sig, + 'docstring' => $exec_php_doc), + 'pfsense.filter_configure' => array('function' => 'filter_configure_xmlrpc', + 'signature' => $filter_configure_sig, + 'docstring' => $filter_configure_doc), + 'pfsense.interfaces_carp_configure' => array('function' => 'interfaces_carp_configure_xmlrpc', + 'docstring' => $carp_configure_sig), + 'pfsense.backup_config_section' => array('function' => 'backup_config_section_xmlrpc', + 'signature' => $backup_config_section_sig, + 'docstring' => $backup_config_section_doc), + 'pfsense.restore_config_section' => array('function' => 'restore_config_section_xmlrpc', + 'signature' => $restore_config_section_sig, + 'docstring' => $restore_config_section_doc), + 'pfsense.merge_config_section' => array('function' => 'merge_config_section_xmlrpc', + 'signature' => $merge_config_section_sig, + 'docstring' => $merge_config_section_doc), + 'pfsense.merge_installedpackages_section_xmlrpc' => array('function' => 'merge_installedpackages_section_xmlrpc', + 'signature' => $merge_config_section_sig, + 'docstring' => $merge_config_section_doc), + 'pfsense.check_firmware_version' => array('function' => 'check_firmware_version_xmlrpc', + 'signature' => $check_firmware_version_sig, + 'docstring' => $check_firmware_version_doc), + 'pfsense.host_firmware_version' => array('function' => 'pfsense_firmware_version_xmlrpc', + 'signature' => $pfsense_firmware_version_sig, + 'docstring' => $host_firmware_version_doc), + 'pfsense.reboot' => array('function' => 'reboot_xmlrpc', + 'signature' => $reboot_sig, + 'docstring' => $reboot_doc), + 'pfsense.get_notices' => array('function' => 'get_notices_xmlrpc', + 'signature' => $get_notices_sig) + ) +); + +unlock($xmlrpclockkey); + +function array_overlay($a1, $a2) { + foreach ($a1 as $k => $v) { + if (!array_key_exists($k, $a2)) { + continue; + } + if (is_array($v) && is_array($a2[$k])) { + $a1[$k] = array_overlay($v, $a2[$k]); + } else { + $a1[$k] = $a2[$k]; + } + } + return $a1; +} + +?> -- cgit v1.1