From: maxious Date: Tue, 22 Feb 2011 02:49:20 +0000 Subject: Add analytics X-Git-Url: http://maxious.lambdacomplex.org/git/?p=bus.git&a=commitdiff&h=f14b32c832da7346ef1103a9b6449c2daba0135f --- Add analytics --- --- a/busui/about.php +++ b/busui/about.php @@ -1,23 +1,24 @@

- Busness Time - An ACT bus timetable webapp -Based on the maxious-canberra-transit-feed -Uses jQuery Mobile, PHP, Ruby, Python, Google Transit Feed Specification tools, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service - -Feedback encouraged; contact maxious@lambdacomplex.org - -Some icons by Joseph Wain / glyphish.com - - -Disclaimer: The content of this website is of a general and informative nature. Please check with printed timetables or those available on http://action.act.gov.au before your trip. +Busness Time - An ACT bus timetable webapp
+Based on the maxious-canberra-transit-feed (download, last updated )
+Source code for the transit feed and this site @ http://maxious.lambdacomplex.org/git
+Uses jQuery Mobile, PHP, Ruby, Python, Google Transit Feed Specification tools, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service
+
+Feedback encouraged; contact maxious@lambdacomplex.org
+
+Some icons by Joseph Wain / glyphish.com
+
+Disclaimer: The content of this website is of a general and informative nature. Please check with printed timetables or those available on http://action.act.gov.au before your trip. Whilst every effort has been made to ensure the high quality and accuracy of the Site, the Author makes no warranty, express or implied concerning the topicality, correctness, completeness or quality of the information, which is provided "as is". The Author expressly disclaims all warranties, including but not limited to warranties of fitness for a particular purpose and warranties of merchantability. All offers are not binding and without obligation. The Author expressly reserves the right, in his discretion, to suspend, change, modify, add or remove portions of the Site and to restrict or terminate the use and accessibility of the Site -without prior notice. +without prior notice. --- a/busui/common.inc.php +++ b/busui/common.inc.php @@ -1,36 +1,55 @@ centroid)) { + $session['lat'] = $contents[0]->centroid->coordinates[0]; + $session['lon'] = $contents[0]->centroid->coordinates[1]; + } + else { + $session['lat'] = ""; + $session['lon'] = ""; + } + } +//print_r ($_SESSION); function isDebug() { return $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" || !$_SERVER['SERVER_NAME']; +} + +function isMetricsOn() +{ + return true; } function debug($msg) { if (isDebug()) echo ""; } function isFastDevice() { + $fastDevices = Array("Mozilla/5.0 (X11;", "Mozilla/5.0 (Windows;", "Mozilla/5.0 (iP", "Mozilla/5.0 (Linux; U; Android", "Mozilla/4.0 (compatible; MSIE"); + $slowDevices = Array("J2ME","MIDP","Opera/","Mozilla/2.0 (compatible;","Mozilla/3.0 (compatible;"); return true; } -function include_header($pageTitle, $opendiv = true, $geolocate = false) { - // this starts the session - session_start(); - - // if (isDebug()) // set php error level high +function include_header($pageTitle, $pageType, $opendiv = true, $geolocate = false) { echo ' - busness time - '.$pageTitle.' - '; + '.$pageTitle.''; if (isDebug()) echo ' '; @@ -49,13 +68,24 @@ @@ -64,35 +94,12 @@ if ($geolocate) { echo " "; } -echo ' - +echo ' + '; -if ($opendiv) echo '

- + if (isMetricsOn()) { + require_once('owa/owa_env.php'); + require_once(OWA_DIR.'owa_php.php'); + $owa = new owa_php(); + $owa->setSiteId('bus.lambdacomplex.org'); + $owa->setPageTitle($pageTitle); + $owa->setPageType($pageType); + $owa->trackPageView(); + $owa->placeHelperPageTags(); + } + +if ($opendiv) { + echo '
+

'.$pageTitle.'

'; } - +} function include_footer() { + if ($geolocate && isset($_SESSION['lat'])) { + echo ""; + } + echo ''; } @@ -145,7 +176,7 @@ { // from http://www.perturb.org/display/Perlfunc__Seconds_Since_Midnight.html if (isset($_SESSION['time'])) { - $time = mkdate($_SESSION['time']); + $time = strtotime($_SESSION['time']); return (date("G",$time) * 3600) + (date("i",$time) * 60) + date("s",$time); } return (date("G") * 3600) + (date("i") * 60) + date("s"); @@ -226,8 +257,11 @@ } $center = $totalLat/sizeof($mapPoints).",".$totalLon/sizeof($mapPoints); } - - return ''; + $output = ""; + $output .= '

Open Map...

'; + $output .= '
'; + $output .= '
'; + return $output; } function distance($lat1, $lng1, $lat2, $lng2) @@ -333,7 +367,8 @@ } function geocode($query, $giveOptions) { - $url = "http://geocoding.cloudmade.com/daa03470bb8740298d4b10e3f03d63e6/geocoding/v2/find.js?query=".$query."&bbox=-35.5,149.00,-35.15,149.1930&return_location=true&bbox_only=true"; + global $cloudmadeAPIkey; + $url = "http://geocoding.cloudmade.com/$cloudmadeAPIkey/geocoding/v2/find.js?query=".$query."&bbox=-35.5,149.00,-35.15,149.1930&return_location=true&bbox_only=true"; $contents = json_decode(getPage($url)); if ($giveOptions) return $contents->features; elseif (isset($contents->features[0]->centroid)) return $contents->features[0]->centroid->coordinates[0].",".$contents->features[0]->centroid->coordinates[1]; @@ -341,7 +376,8 @@ } function reverseGeocode($lat,$lng) { - $url = "http://geocoding.cloudmade.com/daa03470bb8740298d4b10e3f03d63e6/geocoding/v2/find.js?around=".$lat.",".$lng."&distance=closest&object_type=road"; + global $cloudmadeAPIkey; + $url = "http://geocoding.cloudmade.com/$cloudmadeAPIkey/geocoding/v2/find.js?around=".$lat.",".$lng."&distance=closest&object_type=road"; $contents = json_decode(getPage($url)); return $contents->features[0]->properties->name; } @@ -390,4 +426,44 @@ } return implode(", ",$pointNames); } + +function timePlaceSettings($geolocate = false) { + global $service_periods; + $geoerror = false; + if ($geolocate == true) { + $geoerror = !isset($_SESSION['lat']) || !isset($_SESSION['lat']) + || $_SESSION['lat'] == "" || $_SESSION['lon'] == ""; + } + if ($geoerror) { + echo '
Sorry, but your location could not currently be detected. + Please allow location permission, wait for your location to be detected, + or enter an address/co-ordinates in the box below.
'; + } + echo '
+

Change Time/Place...

+
+
+
+ + +
+
+ + Current Time? +
+
+ + + +
+ + + +
'; +} ?> --- /dev/null +++ b/busui/feedback.php @@ -1,1 +1,18 @@ + +

Add/Move/Delete a Bus Stop Location

+StopID: +or StopCode: +Suggested Stop Location (lat/long or words): + +

Bug Report/Feedback

+ --- a/busui/index.php +++ b/busui/index.php @@ -1,20 +1,11 @@
-
+

busness time


Canberra Bus Timetables and Trip Planner
Launch Trip Planner... -
-

Time/Place Settings

-
- - -
-
- - "/> -
-
- - - -
- - -
- -
-
- - - + + --- /dev/null +++ b/busui/layar_api.php @@ -1,1 +1,58 @@ + $page_start && $stopNum <= $page_end) { + $hotspot = Array(); + $hotspot['id'] = $row[0]; + $hotspot['title'] = $row[1]; + $hotspot['type'] = 0; + $hotspot['lat'] = floor($row[2]*1000000); + $hotspot['lon'] = floor($row[3]*1000000); + $hotspot['distance'] = distance($row[2], $row[3], $_REQUEST['lat'], $_REQUEST['lon']); + if (!isset($_REQUEST['radius']) || $hotspot['distance'] < $_REQUEST['radius']) { + $hotspot['actions'] = Array(Array("label" => 'View more trips/information', 'uri' => 'http://bus.lambdacomplex.org/'.'stop.php?stopid='.$row[0])); + $url = $APIurl."/json/stoptrips?stop=".$row[0]."&time=".midnight_seconds()."&service_period=".service_period(); + $trips = json_decode(getPage($url)); + debug(print_r($trips,true)); + foreach ($trips as $key => $row) + { + if ($key < 3) { + $hotspot['line'.strval($key+2)]= $row[1][1] .' @ ' .midnight_seconds_to_time($row[0]); + } + } + if (sizeof($trips) == 0) $hotspot['line2'] = 'No trips in the near future.'; + $output['hotspots'][] = $hotspot; + } + } +} +if (sizeof($hotspot) > 0) { + $output['errorString'] = 'ok'; + $output['errorCode'] = 0; + } else { + $output['errorString'] = 'no results, try increasing range'; + $output['errorCode'] = 21; +} +if ($page_end >= $max_results || sizeof($hotspot) < $max_page) { + $output["morePages"] = false; + $output["nextPageKey"] = null; +} else { + $output["morePages"] = true; + $output["nextPageKey"] = $page_end; +} +echo json_encode($output); +?> --- /dev/null +++ b/busui/owa/Callbacks.inc @@ -1,1 +1,10 @@ + --- /dev/null +++ b/busui/owa/action.php @@ -1,1 +1,48 @@ + + * @copyright Copyright © 2006 Peter Adams + * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 + * @category owa + * @package owa + * @version $Revision$ + * @since owa 1.0.0 + * @depricated + */ + +$owa = new owa_php; + +$owa->e->debug('Special action request received by action.php...'); + +if ( $owa->isEndpointEnabled( basename( __FILE__ ) ) ) { + + // run controller or view and echo page content + echo $owa->handleRequestFromURL(); +} else { + // unload owa + $owa->restInPeace(); +} + +?> --- /dev/null +++ b/busui/owa/api.php @@ -1,1 +1,49 @@ + + * @copyright Copyright © 2010 Peter Adams + * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 + * @category owa + * @package owa + * @version $Revision$ + * @since owa 1.3.0 + * @link http://wiki.openwebanalytics.com/index.php?title=REST_API + */ + +// define entry point cnstant +define('OWA_API', true); +// invoke OWA +$owa = new owa_php; + +if ( $owa->isEndpointEnabled( basename( __FILE__ ) ) ) { + + // run api command and echo page content + echo $owa->handleRequest('', 'base.apiRequest'); +} else { + // unload owa + $owa->restInPeace(); +} + +?> --- /dev/null +++ b/busui/owa/cli.php @@ -1,1 +1,92 @@ + + * @copyright Copyright © 2010 Peter Adams + * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 + * @category owa + * @package owa + * @version $Revision$ + * @since owa 1.2.1 + */ + +define('OWA_CLI', true); + +if (!empty($_POST)) { + exit(); +} elseif (!empty($_GET)) { + exit(); +} elseif (!empty($argv)) { + $params = array(); + // get params from the command line args + // $argv is a php super global variable + + for ($i=1; $iisEndpointEnabled( basename( __FILE__ ) ) ) { + + // setting CLI mode to true + $owa->setSetting('base', 'cli_mode', true); + // setting user auth + $owa->setCurrentUser('admin', 'cli-user'); + // run controller or view and echo page content + $s = owa_coreAPI::serviceSingleton(); + $s->loadCliCommands(); + + if (array_key_exists('cmd', $params)) { + + $cmd = $s->getCliCommandClass($params['cmd']); + + if ($cmd) { + $params['do'] = $cmd; + echo $owa->handleRequest($params); + } else { + echo "Invalid command name."; + } + + } else { + echo "Missing a command argument."; + } + +} else { + // unload owa + $owa->restInPeace(); +} + +?> --- /dev/null +++ b/busui/owa/conf/countryCodes2Names.php @@ -1,1 +1,253 @@ - + 'Afghanistan', + 'AX' => 'Åland Islands', + 'AL' => 'Albania', + 'DZ' => 'Algeria', + 'AS' => 'American Samoa', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarctica', + 'AG' => 'Antigua and Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Armenia', + 'AW' => 'Aruba', + 'AU' => 'Australia', + 'AT' => 'Austria', + 'AZ' => 'Azerbaijan', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BY' => 'Belarus', + 'BE' => 'Belgium', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivia, Plurinational State of', + 'BA' => 'Bosnia and Herzegovina', + 'BW' => 'Botswana', + 'BV' => 'Bouvet Island', + 'BR' => 'Brazil', + 'IO' => 'British Indian Ocean Territory', + 'BN' => 'Brunei Darussalam', + 'BG' => 'Bulgaria', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'KH' => 'Cambodia', + 'CM' => 'Cameroon', + 'CA' => 'Canada', + 'CV' => 'Cape Verde', + 'KY' => 'Cayman Islands', + 'CF' => 'Central African Republic', + 'TD' => 'Chad', + 'CL' => 'Chile', + 'CN' => 'China', + 'CX' => 'Christmas Island', + 'CC' => 'Cocos (Keeling) Islands', + 'CO' => 'Colombia', + 'KM' => 'Comoros', + 'CG' => 'Congo', + 'CD' => 'Congo, the Democratic Republic of the', + 'CK' => 'Cook Islands', + 'CR' => 'Costa Rica', + 'CI' => "Côte d'Ivoire", + 'HR' => 'Croatia', + 'CU' => 'Cuba', + 'CY' => 'Cyprus', + 'CZ' => 'Czech Republic', + 'DK' => 'Denmark', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'DO' => 'Dominican Republic', + 'EC' => 'Ecuador', + 'EG' => 'Egypt', + 'SV' => 'El Salvador', + 'GQ' => 'Equatorial Guinea', + 'ER' => 'Eritrea', + 'EE' => 'Estonia', + 'ET' => 'Ethiopia', + 'FK' => 'Falkland Islands (Malvinas)', + 'FO' => 'Faroe Islands', + 'FJ' => 'Fiji', + 'FI' => 'Finland', + 'FR' => 'France', + 'GF' => 'French Guiana', + 'PF' => 'French Polynesia', + 'TF' => 'French Southern Territories', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgia', + 'DE' => 'Germany', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GR' => 'Greece', + 'GL' => 'Greenland', + 'GD' => 'Grenada', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HM' => 'Heard Island and McDonald Islands', + 'VA' => 'Holy See (Vatican City State)', + 'HN' => 'Honduras', + 'HK' => 'Hong Kong', + 'HU' => 'Hungary', + 'IS' => 'Iceland', + 'IN' => 'India', + 'ID' => 'Indonesia', + 'IR' => 'Iran, Islamic Republic of', + 'IQ' => 'Iraq', + 'IE' => 'Ireland', + 'IM' => 'Isle of Man', + 'IL' => 'Israel', + 'IT' => 'Italy', + 'JM' => 'Jamaica', + 'JP' => 'Japan', + 'JE' => 'Jersey', + 'JO' => 'Jordan', + 'KZ' => 'Kazakhstan', + 'KE' => 'Kenya', + 'KI' => 'Kiribati', + 'KP' => "Korea, Democratic People's Republic of", + 'KR' => 'Korea, Republic of', + 'KW' => 'Kuwait', + 'KG' => 'Kyrgyzstan', + 'LA' => "Lao People's Democratic Republic", + 'LV' => 'Latvia', + 'LB' => 'Lebanon', + 'LS' => 'Lesotho', + 'LR' => 'Liberia', + 'LY' => 'Libyan Arab Jamahiriya', + 'LI' => 'Liechtenstein', + 'LT' => 'Lithuania', + 'LU' => 'Luxembourg', + 'MO' => 'Macao', + 'MK' => 'Macedonia, the former Yugoslav Republic of', + 'MG' => 'Madagascar', + 'MW' => 'Malawi', + 'MY' => 'Malaysia', + 'MV' => 'Maldives', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MH' => 'Marshall Islands', + 'MQ' => 'Martinique', + 'MR' => 'Mauritania', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MX' => 'Mexico', + 'FM' => 'Micronesia, Federated States of', + 'MD' => 'Moldova, Republic of', + 'MC' => 'Monaco', + 'MN' => 'Mongolia', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MA' => 'Morocco', + 'MZ' => 'Mozambique', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NL' => 'Netherlands', + 'AN' => 'Netherlands Antilles', + 'NC' => 'New Caledonia', + 'NZ' => 'New Zealand', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'NF' => 'Norfolk Island', + 'MP' => 'Northern Mariana Islands', + 'NO' => 'Norway', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestinian Territory, Occupied', + 'PA' => 'Panama', + 'PG' => 'Papua New Guinea', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PH' => 'Philippines', + 'PN' => 'Pitcairn', + 'PL' => 'Poland', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'QA' => 'Qatar', + 'RE' => 'Réunion', + 'RO' => 'Romania', + 'RU' => 'Russian Federation', + 'RW' => 'Rwanda', + 'BL' => 'Saint Barthélemy', + 'SH' => 'Saint Helena', + 'KN' => 'Saint Kitts and Nevis', + 'LC' => 'Saint Lucia', + 'MF' => 'Saint Martin (French part)', + 'PM' => 'Saint Pierre and Miquelon', + 'VC' => 'Saint Vincent and the Grenadines', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'ST' => 'Sao Tome and Principe', + 'SA' => 'Saudi Arabia', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'SC' => 'Seychelles', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapore', + 'SK' => 'Slovakia', + 'SI' => 'Slovenia', + 'SB' => 'Solomon Islands', + 'SO' => 'Somalia', + 'ZA' => 'South Africa', + 'GS' => 'South Georgia and the South Sandwich Islands', + 'ES' => 'Spain', + 'LK' => 'Sri Lanka', + 'SD' => 'Sudan', + 'SR' => 'Suriname', + 'SJ' => 'Svalbard and Jan Mayen', + 'SZ' => 'Swaziland', + 'SE' => 'Sweden', + 'CH' => 'Switzerland', + 'SY' => 'Syrian Arab Republic', + 'TW' => 'Taiwan, Province of China', + 'TJ' => 'Tajikistan', + 'TZ' => 'Tanzania, United Republic of', + 'TH' => 'Thailand', + 'TL' => 'Timor-Leste', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad and Tobago', + 'TN' => 'Tunisia', + 'TR' => 'Turkey', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks and Caicos Islands', + 'TV' => 'Tuvalu', + 'UG' => 'Uganda', + 'UA' => 'Ukraine', + 'AE' => 'United Arab Emirates', + 'GB' => 'United Kingdom', + 'US' => 'United States', + 'UM' => 'United States Minor Outlying Islands', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'VE' => 'Venezuela, Bolivarian Republic of', + 'VN' => 'Viet Nam', + 'VG' => 'Virgin Islands, British', + 'VI' => 'Virgin Islands, U.S.', + 'WF' => 'Wallis and Futuna', + 'EH' => 'Western Sahara', + 'YE' => 'Yemen', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe' +); +?> --- /dev/null +++ b/busui/owa/conf/countryNames2Codes.php @@ -1,1 +1,250 @@ - + 'AF', + "Åland islands" => 'AX', + "albania" => 'AL', + "algeria" => 'DZ', + "american samoa" => 'AS', + "andorra" => 'AD', + "angola" => 'AO', + "anguilla" => 'AI', + "antarctica" => 'AQ', + "antigua and barbuda" => 'AG', + "argentina" => 'AR', + "armenia" => 'AM', + "aruba" => 'AW', + "australia" => 'AU', + "austria" => 'AT', + "azerbaijan" => 'AZ', + "bahamas" => 'BS', + "bahrain" => 'BH', + "bangladesh" => 'BD', + "barbados" => 'BB', + "belarus" => 'BY', + "belgium" => 'BE', + "belize" => 'BZ', + "benin" => 'BJ', + "bermuda" => 'BM', + "bhutan" => 'BT', + "bolivia, plurinational state of" => 'BO', + "bosnia and herzegovina" => 'BA', + "botswana" => 'BW', + "bouvet island" => 'BV', + "brazil" => 'BR', + "british indian ocean territory" => 'IO', + "brunei darussalam" => 'BN', + "bulgaria" => 'BG', + "burkina faso" => 'BF', + "burundi" => 'BI', + "cambodia" => 'KH', + "cameroon" => 'CM', + "canada" => 'CA', + "cape verde" => 'CV', + "cayman islands" => 'KY', + "central african republic" => 'CF', + "chad" => 'TD', + "chile" => 'CL', + "china" => 'CN', + "christmas island" => 'CX', + "cocos (keeling) islands" => 'CC', + "colombia" => 'CO', + "comoros" => 'KM', + "congo" => 'CG', + "congo, the democratic republic of the" => 'CD', + "cook islands" => 'CK', + "costa rica" => 'CR', + "côte d'ivoire" => 'CI', + "croatia" => 'HR', + "cuba" => 'CU', + "cyprus" => 'CY', + "czech republic" => 'CZ', + "denmark" => 'DK', + "djibouti" => 'DJ', + "dominica" => 'DM', + "dominican republic" => 'DO', + "ecuador" => 'EC', + "egypt" => 'EG', + "el salvador" => 'SV', + "equatorial guinea" => 'GQ', + "eritrea" => 'ER', + "estonia" => 'EE', + "ethiopia" => 'ET', + "falkland islands (malvinas)" => 'FK', + "faroe islands" => 'FO', + "fiji" => 'FJ', + "finland" => 'FI', + "france" => 'FR', + "french guiana" => 'GF', + "french polynesia" => 'PF', + "french southern territories" => 'TF', + "gabon" => 'GA', + "gambia" => 'GM', + "georgia" => 'GE', + "germany" => 'DE', + "ghana" => 'GH', + "gibraltar" => 'GI', + "greece" => 'GR', + "greenland" => 'GL', + "grenada" => 'GD', + "guadeloupe" => 'GP', + "guam" => 'GU', + "guatemala" => 'GT', + "guernsey" => 'GG', + "guinea" => 'GN', + "guinea-bissau" => 'GW', + "guyana" => 'GY', + "haiti" => 'HT', + "heard island and mcdonald islands" => 'HM', + "holy see (vatican city state)" => 'VA', + "honduras" => 'HN', + "hong kong" => 'HK', + "hungary" => 'HU', + "iceland" => 'IS', + "india" => 'IN', + "indonesia" => 'ID', + "iran, islamic republic of" => 'IR', + "iraq" => 'IQ', + "ireland" => 'IE', + "isle of man" => 'IM', + "israel" => 'IL', + "italy" => 'IT', + "jamaica" => 'JM', + "japan" => 'JP', + "jersey" => 'JE', + "jordan" => 'JO', + "kazakhstan" => 'KZ', + "kenya" => 'KE', + "kiribati" => 'KI', + "korea, democratic people's republic of" => 'KP', + "korea, republic of" => 'KR', + "kuwait" => 'KW', + "kyrgyzstan" => 'KG', + "lao people's democratic republic" => 'LA', + "latvia" => 'LV', + "lebanon" => 'LB', + "lesotho" => 'LS', + "liberia" => 'LR', + "libyan arab jamahiriya" => 'LY', + "liechtenstein" => 'LI', + "lithuania" => 'LT', + "luxembourg" => 'LU', + "macao" => 'MO', + "macedonia, the former yugoslav republic of" => 'MK', + "madagascar" => 'MG', + "malawi" => 'MW', + "malaysia" => 'MY', + "maldives" => 'MV', + "mali" => 'ML', + "malta" => 'MT', + "marshall islands" => 'MH', + "martinique" => 'MQ', + "mauritania" => 'MR', + "mauritius" => 'MU', + "mayotte" => 'YT', + "mexico" => 'MX', + "micronesia, federated states of" => 'FM', + "moldova, republic of" => 'MD', + "monaco" => 'MC', + "mongolia" => 'MN', + "montenegro" => 'ME', + "montserrat" => 'MS', + "morocco" => 'MA', + "mozambique" => 'MZ', + "myanmar" => 'MM', + "namibia" => 'NA', + "nauru" => 'NR', + "nepal" => 'NP', + "netherlands" => 'NL', + "netherlands antilles" => 'AN', + "new caledonia" => 'NC', + "new zealand" => 'NZ', + "nicaragua" => 'NI', + "niger" => 'NE', + "nigeria" => 'NG', + "niue" => 'NU', + "norfolk island" => 'NF', + "northern mariana islands" => 'MP', + "norway" => 'NO', + "oman" => 'OM', + "pakistan" => 'PK', + "palau" => 'PW', + "palestinian territory, occupied" => 'PS', + "panama" => 'PA', + "papua new guinea" => 'PG', + "paraguay" => 'PY', + "peru" => 'PE', + "philippines" => 'PH', + "pitcairn" => 'PN', + "poland" => 'PL', + "portugal" => 'PT', + "puerto rico" => 'PR', + "qatar" => 'QA', + "réunion" => 'RE', + "romania" => 'RO', + "russian federation" => 'RU', + "rwanda" => 'RW', + "saint barthélemy" => 'BL', + "saint helena" => 'SH', + "saint kitts and nevis" => 'KN', + "saint lucia" => 'LC', + "saint martin (french part)" => 'MF', + "saint pierre and miquelon" => 'PM', + "saint vincent and the grenadines" => 'VC', + "samoa" => 'WS', + "san marino" => 'SM', + "sao tome and principe" => 'ST', + "saudi arabia" => 'SA', + "senegal" => 'SN', + "serbia" => 'RS', + "seychelles" => 'SC', + "sierra leone" => 'SL', + "singapore" => 'SG', + "slovakia" => 'SK', + "slovenia" => 'SI', + "solomon islands" => 'SB', + "somalia" => 'SO', + "south africa" => 'ZA', + "south georgia and the south sandwich islands" => 'GS', + "spain" => 'ES', + "sri lanka" => 'LK', + "sudan" => 'SD', + "suriname" => 'SR', + "svalbard and jan mayen" => 'SJ', + "swaziland" => 'SZ', + "sweden" => 'SE', + "switzerland" => 'CH', + "syrian arab republic" => 'SY', + "taiwan, province of china" => 'TW', + "tajikistan" => 'TJ', + "tanzania, united republic of" => 'TZ', + "thailand" => 'TH', + "timor-leste" => 'TL', + "togo" => 'TG', + "tokelau" => 'TK', + "tonga" => 'TO', + "trinidad and tobago" => 'TT', + "tunisia" => 'TN', + "turkey" => 'TR', + "turkmenistan" => 'TM', + "turks and caicos islands" => 'TC', + "tuvalu" => 'TV', + "uganda" => 'UG', + "ukraine" => 'UA', + "united arab emirates" => 'AE', + "united kingdom" => 'GB', + "united states" => 'US', + "united states minor outlying islands" => 'UM', + "uruguay" => 'UY', + "uzbekistan" => 'UZ', + "vanuatu" => 'VU', + "venezuela, bolivarian republic of" => 'VE', + "viet nam" => 'VN', + "virgin islands, british" => 'VG', + "virgin islands, u.s." => 'VI', + "wallis and futuna" => 'WF', + "western sahara" => 'EH', + "yemen" => 'YE', + "zambia" => 'ZM', + "zimbabwe" => 'ZW', +); +?> --- /dev/null +++ b/busui/owa/conf/index.php @@ -1,1 +1,3 @@ - + --- /dev/null +++ b/busui/owa/conf/messages.php @@ -1,1 +1,100 @@ - + + * @copyright Copyright © 2006 Peter Adams + * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 + * @category owa + * @package owa + * @version $Revision: 1051 $ + * @since owa 1.0.0 + */ + +$_owa_messages = array( + +2000 => array("An e-mail containing instructions on how to complete the password reset process has been sent to %s",1), +2001 => array("The e-mail %s was not found in our database. Please check the address and try again.",1), +2002 => array("Login Failed. Your user name or password did not match.",0), +2003 => array("Your Account lacks the necessary privileges to access the requested resource.",0), +2004 => array("You must login to access the requested resource.",0), +2010 => array("Success. Logout Complete.",0), +2011 => array("Error. Can't find your temporary passkey in the db.",0), + +// Options/Configuration related +2500 => array("Options Saved.",0), +2501 => array("The module was activated successfully.",0), +2502 => array("The module was deactivated successfully.",0), +2503 => array("Options reset to Default Values.",0), +2504 => array("Entity %s Schema Created.",1), +2504 => array("Goal Saved.",0), + + +//User managment +3000 => array("Success. User Added.", 0), +3001 => array("Error. That user name is already taken.",0), +3002 => array("The form data that you entered contained one or more errors. Please check the data and submit the from again."), +3003 => array("Success. User profile saved.",0), +3004 => array("Success. User acount deleted."), +3005 => array("Enter Your New Password", 0), +3006 => array("Success. Please login with your new password.",0), +3007 => array("Error. Your passwords must match.",0), +3008 => array("Error. Your password must be %s characters long.", 1), +3009 => array("Error. A user with that email address already exists.", 0), +3010 => array("A user with that email address does not exist.", 0), +3011 => array("Could not update user profile."), +3012 => array("Could not connect the database. Check your settings and try again.",0), + +//sites management +3200 => array("Error. Please fill in all required fields.",0), +3201 => array("Success. Site Profile Updated.",0), +3202 => array("Success. Site Added.",0), +3203 => array("Error. Site Could not be added",0), +3204 => array("Success. Site Deleted.",0), +3206 => array("Error. A site with that domain already exists.",0), +3207 => array("Error. You must enter a domain when adding a web site.",0), +3208 => array("Error. That site does not exist.",0), +3208 => array("Please remove the http:// from your beginning of your domain.",0), + + +//install +3300 => array("Could not connect to the database. Please check the database connection settings in your configuration file and try again.",0), +3301 => array("This version of OWA requires PHP 5.2.x or higher.",0), +3302 => array("Database Schema Installation failed. Please check the error log file for more details.",0), +3303 => array("Success. Default Site Added.",0), +3304 => array("Success. Admin User Added.",0), +3305 => array("Success. Base Database Schema Installed.",0), +3306 => array("Error. User id already exists for some reason.",0), +3307 => array("Updates failed. Check OWA's error log file for more details and try again.",0), +3308 => array("Success. Updates were applied.",0), +3309 => array("Site Domain is required.",0), +3310 => array("E-mail Address is required.",0), +3311 => array("These updates must be applied using the command line interface (CLI). Run '/path/to/php cli.php cmd=update' from your server's command shell to apply these updates. For more information on updating see the install/update page on the wiki.",0), +// Graph related +3500 => array("There is no data for\nthis time period.",0), + +// Report Related +3600 => array("Unknown",0) + +); + + +?> --- /dev/null +++ b/busui/owa/conf/os.ini @@ -1,1 +1,73 @@ +;;; Operating Systems +[info] +name="2006-03-30" + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Windows + +[Win.*NT 5.1] +name="Windows XP" + +[Win.*NT 5\.0] +name="Windows 2000" + +[Win.*(Vista|XP|2000|ME|NT|9.?)] +name="Windows $1" + +[Windows .*(3\.11|NT)] +name="Windows $1" + +[Win32] +name="Windows [prior to 1995" + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; UNIX + +[Linux 2\.(.?)\.] +name="Linux 2.$1.x" + +[Linux] +name="Linux [unknown version]" + +[FreeBSD .*-CURRENT$] +name="FreeBSD -CURRENT" + +[FreeBSD (.?)\.] +name="FreeBSD $1.x" + +[NetBSD 1\.(.?)\.] +name="NetBSD 1.$1.x" + +[(Free|Net|Open)BSD] +name="$1BSD [unknown]" + +[HP-UX B\.(10|11)\.] +name="HP-UX B.$1.x" + +[IRIX(64)? 6\.] +name="IRIX 6.x" + +[SunOS 4\.1] +name="SunOS 4.1.x" + +[SunOS 5\.([4-6])] +name="Solaris 2.$1.x" + +[SunOS 5\.([78])] +name="Solaris $1.x" + +[X11] +name="UNIX [unknown]" + +[Unix] +name="UNIX [unknown]" + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Macintosh + +[Mac_PowerPC] +name="Mac OS [PowerPC]" + +[Mac OS X] +name="Mac OS X" + +[*] +name="Unknown OS" --- /dev/null +++ b/busui/owa/conf/query_strings.ini @@ -1,1 +1,29 @@ - +[\?(?:.+&|)q=(.+?)(?:&|$)] +[search\?(?:.+&|)p=(.+?)(?:&|$)] +[\?(?:.+&|)Keywords=(.+?)(?:&|$)] +[\?(?:.+&|)MT=(.+?)(?:&|$)] +[\?(?:.+&|)Q=(.+?)(?:&|$)] +[\?(?:.+&|)QUERY=(.+?)(?:&|$)] +[\?(?:.+&|)Suchwort=(.+?)(?:&|$)] +[\?(?:.+&|)ask=(.+?)(?:&|$)] +[\?(?:.+&|)eingabe=(.+?)(?:&|$)] +[\?(?:.+&|)in=(.+?)(?:&|$)] +[\?(?:.+&|)keyword=(.+?)(?:&|$)] +[\?(?:.+&|)keywords=(.+?)(?:&|$)] +[\?(?:.+&|)kw=(.+?)(?:&|$)] +[\?(?:.+&|)mots=(.+?)(?:&|$)] +[\?(?:.+&|)motscles=(.+?)(?:&|$)] +[\?(?:.+&|)query=(.+?)(?:&|$)] +[\?(?:.+&|)query2=(.+?)(?:&|$)] +[\?(?:.+&|)queryterm=(.+?)(?:&|$)] +[\?(?:.+&|)sTerm=(.+?)(?:&|$)] +[\?(?:.+&|)sc=(.+?)(?:&|$)] +[\?(?:.+&|)search=(.+?)(?:&|$)] +[\?(?:.+&|)search2=(.+?)(?:&|$)] +[\?(?:.+&|)searchfor=(.+?)(?:&|$)] +[\?(?:.+&|)searchText=(.+?)(?:&|$)] +[\?(?:.+&|)srch=(.+?)(?:&|$)] +[\?(?:.+&|)su=(.+?)(?:&|$)] +[\?(?:.+&|)such=(.+?)(?:&|$)] +[\?(?:.+&|)suche=(.+?)(?:&|$)] +[\?(?:.+&|)szukaj=(.+?)(?:&|$)] --- /dev/null +++ b/busui/owa/conf/robots.ini @@ -1,1 +1,14 @@ - +#bot# +#crawl# +#spider# +#curl# +#host# +#localhost# +#java# +#libcurl# +#libwww# +#lwp# +#perl# +#php# +#wget# +#search# --- /dev/null +++ b/busui/owa/conf/search_engines.ini @@ -1,1 +1,418 @@ +;;; Search Engines + +[info] +name="2006-02-22" + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Google +[Google] +name="Google" + +[google\.co\.uk/custom\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Google + +[groups\.google\.(?:com|fr)/groups\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Google + +[go(?:[ogle]{4})\.[a-z.]+(?::80|)/(?:search|linux|de|ie|url|custom|cobrand|bsd|mac|netscape|uk|redhat|webhp)\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Google + +[google\.com/u/[A-Za-z0-9]*\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Google + +[images\.google\.[a-z]*/imgres\?(?:.+&|)imgurl=(.+?)(?:&|$)] +parent=Google + +[images\.google\.[a-z]*/images\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Google + +[google\.netscape\.com/(?:netscape|search)\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Google + +[216\.239\.[0-9]+\.100/search\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Google + +[free\.fr/google\.pl\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Google + +[google\.com/search\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Google + +[google\.netscape\.com/netscape\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Google + +[google\.com/netscape\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Google + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; OVERTURE + +[Overture] +name="Overture" + +[overture\.com/d/search[^?]*\?(?:.+&|)Keywords=(.+?)(?:&|$)] +parent=Overture + +[search\.as\.orientation\.com/cgi-bin/gotosearch\.cgi\?(?:.+&|)Keywords=(.+?)(?:&|$)] +parent=Overture + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HOTBOT + +[Hotbot] +name="HotBot" + +[hotbot\?(?:.+&|)MT=(.+?)(?:&|$)] +parent=Hotbot + +[hotbot\.lycos\.com/?\?(?:.+&|)MT=(.+?)(?:&|$)] +parent=Hotbot + +[hotbot\.lycos\.com\/text/default\.asp\?(?:.+&|)MT=(.+?)(?:&|$)] +parent=Hotbot + +[hotbot\.lycos\.com/director\.asp\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Hotbot + +[hotbot\.lycos\.com/include/nc_frameset_ink_highend\.asp\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Hotbot + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MSN + +[MSN] +name="MSN search" + +[search\..*msn\..+/spbasic\.htm\?(?:.+&|)MT=(.+?)(?:&|$)] +parent=MSN + +[search\..*msn\..+/(?:sp)?results\.asp\?(?:.+&|)MT=(.+?)(?:&|$)] +parent=MSN + +[search\.[a-z.]*msn\.[a-z.]+/(?:sp)?(?:results\.asp|basic\.htm|results\.aspx)\?(?:.+&|)q=(.+?)(?:&|$)] +parent=MSN + +[search\.[a-z.]*msn\.[a-z.]+/autosearch/as_(?:pane)?results\.asp\?(?:.+&|)q=(.+?)(?:&|$)] +parent=MSN + +[msn\.[^/]+/[^?]+?default\.asp\?(?:.+&|)s=(.+?)(?:&|$)] +parent=MSN + +[encarta\.msn\.com/(?:encarta|find)/search\.asp\?(?:.+&|)search=(.+?)(?:&|$)] +name="MSN Encarta" + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Random Engines + +[goo\.ne\.jp/[^?]+\.asp\?(?:.+&|)MT=(.+?)(?:&|$)] +name="Goo Japan" + +[search\.icq\.com/default\.asp\?(?:.+&|)MT=(.+?)(?:&|$)] +name="ICQ Directory" + +[nomade\.(?:tiscali\.)?fr/(?:ink|[_a-zA-Z0-9]*recherche[_a-zA-Z0-9]*)\.asp\?(?:.+&|)MT=(.+?)(?:&|$)] +name="Nomade" + +[yahoo\.co\.jp/bin/search\?(?:.+&|)p=(.+?)(?:&|$)] +name="Yahoo Japan" + +[metacrawler\.com(?:/crawler|)\?(?:.+&|)general=(.+?)(?:&|$)] +name="MetaCrawler" + +[chello\.[^/]+/utilities/search[^?]*\?(?:.+&|)keywords=(.+?)(?:&|$)] +name="Chello" + +[Voila] +name"Viola" + +[voila\.[^/]+/(?:S/)?(?:ns|www|msie_fr|quiquoiou|voilang|voila|search|wanadoo[a-z_]*|r?msie4[a-z_]*)\?(?:.+&|)kw=(.+?)(?:&|$)] +parent=Voila + +[voila\.fr/voila\?(?:.+&|)kw=(.+?)(?:&|$)] +parent=Voila + +[voila\.fr/(?:quiquoiou|voilang|voila|search|wanadoo[a-z_]*|r?msie4[a-z_]*)/?\?(?:.+&|)mots=(.+?)(?:&|$)] +parent=Voila + +[search\.ke\.wanadoo\.fr/S/wanadoo\?(?:.+&|)kw=(.+?)(?:&|$)] +name="Wanadoo.fr" + +[freshmeat\.net/search/?\?(?:.+&|)q=(.+?)(?:&|$)] +name="Freshmeat" + +[Vivisimo] +name="Vivisimo" + +[vivisimo.com/search\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Vivisimo + +[vivisimo\.com/cgi-bin/xml2html\.sh\?(?:.+&|)s=(.+?)(?:&|$)] +parent=Vivisimo + +[vivisimo\.com/cgi-bin/treeHtmlMain\?(?:.+&|)s=(.+?)(?:&|$)] +parent=Vivisimo + +[webcrawler.com/cgi-bin/WebQuery\?(?:.+&|)searchText=(.+?)(?:&|$)] +name="WebCrawler" + +[findology\.com/(?:ce/|)search\.pl\?(?:.+&|)search=(.+?)(?:&|$)] +name="Findology" + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Search.com + +[Search.com] +name="Search.com" + +[search\.cnet\.com/Infoseek/\?(?:.+&|)QUERY=(.+?)(?:&|$)] +parent=Search.com + +[search\.com/Infoseek/\?(?:.+&|)QUERY=(.+?)(?:&|$)] +parent=Search.com + +[search\.com/search\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Search.com + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ask Jeeves + +[Ask_Jeeves] +name="Ask Jeeves" + + +[(?:askjeeves|aj|ask)\..+/main/meta[aA]nswer\.asp\?(?:.+&|)ask=(.+?)(?:&|$)] +parent=Ask_Jeeves + +[(?:askjeeves|aj|ask)\..+/main/[aA]sk[jJ]eeves\.asp\?(?:.+&|)ask=(.+?)(?:&|$)] +parent=Ask_Jeeves + +[(?:askjeeves|aj|ask)\..+/main/followup\.asp\?(?:.+&|)ask=(.+?)(?:&|$)] +parent=Ask_Jeeves + +[(?:askjeeves|aj|ask)\..+/main/Links\.asp\?(?:.+&|)ask=(.+?)(?:&|$)] +parent=Ask_Jeeves + +[(?:askjeeves|aj|ask)\..+/main/moreResults\.asp\?(?:.+&|)ask=(.+?)(?:&|$)] +parent=Ask_Jeeves + +[tm\.ask\.com/r\?(?:.+&|)ask=(.+?)(?:&|$)] +parent=Ask_Jeeves + +[ask\.co\.uk/main/followup40\.asp\?(?:.+&|)ask=(.+?)(?:&|$)] +parent=Ask_Jeeves + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LookSmart + +[Looksmart] +name="Looksmart" + +[looksmart\.com\?(?:.+&|)key=(.+?)(?:&|$)] +parent=Looksmart + +[looksmart\.(?:co\.uk|com)/r_search\?(?:.+&|)key=(.+?)(?:&|$)] +parent=Looksmart + +[surfy\.com/cgi-bin/search\?(?:.+&|)key=(.+?)(?:&|$)] +parent=Looksmart + +[synd(?:-[a-z]+)?\.looksmart\.co\.uk/synd-[a-z]*/Search[a-z]*\.jsp\?(?:.+&|)key=(.+?)(?:&|$)] +parent=Looksmart + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Alltheweb + +[alltheweb\.(?:com|net)/search\?(?:.+&|)q=(.+?)(?:&|$)] +name="Alltheweb" + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AltaVista + +[Altavista] +name="AltaVista" + +[altavista\.com/(?:query|q|)\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Altavista + +[altavista\.com/iepane\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Altavista + +[altavista\.com/sites/search/res_text\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Altavista + +[altavista\.com/sites/listings/GT_av\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Altavista + +[altavista\.com/web\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Altavista + +[altavista\.com/iepane\?(?:.+&|)search=(.+?)(?:&|$)] +parent=Altavista + +[altavista\.com/sites/search/res_text\?(?:.+&|)search=(.+?)(?:&|$)] +parent=Altavista + +[altavista\.digital\.com/sites/search/web\?(?:.+&|)search=(.+?)(?:&|$)] +parent=Altavista + +[[-a-z]+\.altavista\.com/q\?(?:.+&|)what=(.+?)(?:&|$)] +parent=Altavista + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CompuServe + +[CompuServe] +name="Compuserve" + +[compuserve(?:office)*\.de/suche/suche\.jsp\?(?:.+&|)q=(.+?)(?:&|$)] +parent=CompuServe + +[cissearch\.compuserve\.com/search/cssearch/cssearch-(?:frameset|results)\.adp\?(?:.+&|)sTerm=(.+?)(?:&|$)] +parent=CompuServe + +[search\.cs\.com/search/cssearch/cssearch-frameset\.adp\?(?:.+&|)sTerm=(.+?)(?:&|$)] +parent=CompuServe + +[websearch\.cs\.com/cs/results/cssearch-(?:banner|frameset)\.adp\?(?:.+&|)sTerm=(.+?)(?:&|$)] +parent=CompuServe + +[websearch\.cs\.com/gateway/results/gateway-(?:cat|frameset|results|banner)\.adp\?(?:.+&|)sTerm=(.+?)(?:&|$)] +parent=CompuServe + +[search\.compuserve\.co\.uk/results\.adp\?(?:.+&|)query=(.+?)(?:&|$)] +parent=CompuServe + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Dogpile + +[Dogpile] +name="Dogpile" + +[dogpile\.com/texis/search\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Dogpile + +[dogpile\.com/info.dogpl/search/web/(?:.+&|)] +parent=Dogpile + +[catalog\.dogpile\.com/texis/catalog\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Dogpile + +[catalog\.dogpile\.com/texis/redir/main\.bin\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Dogpile + +[opendir\.dogpile\.com/texis/dpdir/search\.html\?(?:.+&|)q=(.+?)(?:&|$)] +parent=Dogpile + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AOL + +[AOL] +name="AOL" + +[(?:search|suchen|recherche|aolrecherches)\.aol\.(?:co\.)?[a-z.]+/(?:search|minisearch|itemsearch|results|web|cat|dirsearch|advncd|redirect)(?:_[a-z]+)?\.adp\?(?:.+&|)query=(.+?)(?:&|$)] +parent=AOL + +[uk-nf01\.web\.aol\.com/cgi-bin/pursuit\?(?:.+&|)query=(.+?)(?:&|$)] +parent=AOL + +[americaonline\.com\.br/cgi-bin\?(?:.+&|)query=(.+?)(?:&|$)] +parent=AOL + +[shopping\.aol\.de/scripts/ao/results\.php\?(?:.+&|)query=(.+?)(?:&|$)] +parent=AOL + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LYCOS + +[Lycos] +name="Lycos" + +[(?:richmedia|multimedia|search)\.lycos\.com/default.asp\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Lycos + +[lycosuk\.co\.uk/cgi-bin/pursuit\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Lycos + +[lycos\.com(?:\.)*/srch(?:/setup\.html|/more\.html)*\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Lycos + +[search\.lycos\.com/main(?:/|/default.asp|)\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Lycos + +[lycos\.com/srch/\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Lycos + +[lycos\.com/srch/index\.html\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Lycos + +[search\.lycos\.com/main\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Lycos + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MAMA + +[Mamma] +name="Mamma" + +[mamma\.com/Mamma\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Mamma + +[mamma[0-9]+\.mamma\.com/Mamma\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Mamma + +[partners\.mamma\.com/(?:Altavista|Askjeeves1|Beaucoup|Botbot|Cb_12c4|HotSheet|Hotbar|Pages)\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Mamma + +[mamma\.com/Mamma_pictures\?(?:.+&|)query=(.+?)(?:&|$)] +parent=Mamma + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EXCITE + +[Excite] +name="Excite" + +[search\.excite\.com\?(?:.+&|)s=(.+?)(?:&|$)] +parent=Excite + +[excite\.[a-z.]+/search\search.dcg\?(?:.+&|)s=(.+?)(?:&|$)] +parent=Excite + +[\.excite(?:\.[a-z]+|)\.[a-z]+/[^?]+\?(?:.+&|)search=(.+?)(?:&|$)] +parent=Excite + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; YAHOO + +[Yahoo] +name="Yahoo!" + +[de\.finance\.yahoo\.com/q\?(?:.+&|)s=(.+?)(?:&|$)] +parent=Yahoo + +[(?:[a-z]+\.)?search\.yahoo\.[^/]+/(?:[a-z]+/)?search/?[^?]*\?(?:.+&|)p=(.+?)(?:&|$)] +parent=Yahoo + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DMOZ + +[dmoz] +name="The Open Directory Project (DMOZ)" + +[search\.dmoz\.org\?(?:.+&|)search=(.+?)(?:&|$)] +parent=dmoz + +[directory\.wwwresources\.com/directory.cgi\?(?:.+&|)search2=(.+?)(?:&|$)] +parent=dmoz + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NETSCAPE + +[Netscape] +name="Netscape" + +[(?:search|search-intl|directory)\.netscape\.com/(?:[a-z]*/)?google\.tmpl\?(?:.+&|)search=(.+?)(?:&|$)] +parent=Netscape + +[search\.netscape\.com/search.psp\?(?:.+&|)search=(.+?)(?:&|$)] +parent=Netscape + +[search\.netscape\.com\?(?:.+&|)search=(.+?)(?:&|$)] +parent=Netscape + +[directory\.netscape\.com/cgi-bin/search\?(?:.+&|)search=(.+?)(?:&|$)] +parent=Netscape + +[directory\.netscape\.com/search\.tmpl\?(?:.+&|)search=(.+?)(?:&|$)] +parent=Netscape + +[search-intl\.netscape\.com/(?:de|fr|uk)/search(?:[0-9]|)\.tmpl\?(?:.+&|)search=(.+?)(?:&|$)] +parent=Netscape + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Default + +;;; [*] +;;; name="Unknown Referer" --- /dev/null +++ b/busui/owa/daemon.php @@ -1,1 +1,53 @@ + + * @copyright Copyright © 2006-2011 Peter Adams + * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 + * @category owa + * @package owa + * @version $Revision$ + * @since owa 1.4.0 + */ +require_once('owa_env.php'); +require_once(OWA_DIR.'owa_php.php'); +require_once(OWA_BASE_CLASS_DIR.'daemon.php'); + +define('OWA_DAEMON', true); + +if (!empty($_POST)) { + exit(); +} elseif (!empty($_GET)) { + exit(); +} + +$owa = new owa_php(); + +if ( $owa->isEndpointEnabled( basename( __FILE__ ) ) ) { + // start daemon + $daemon = new owa_daemon(); + $daemon->start(); + +} else { + // unload owa + $owa->restInPeace(); +} + +?> --- /dev/null +++ b/busui/owa/eventQueue.php @@ -1,1 +1,366 @@ - + + * @copyright Copyright © 2006 Peter Adams + * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 + * @category owa + * @package owa + * @version $Revision$ + * @since owa 1.0.0 + */ +class eventQueue { + + /** + * Stores listeners + * + */ + var $listeners = array(); + + /** + * Stores listener IDs by event type + * + */ + var $listenersByEventType = array(); + + /** + * Stores listener IDs by event type + * + */ + var $listenersByFilterType = array(); + + /** + * Constructor + * + */ + function __construct() { + + } + + /** + * Attach + * + * Attaches observers by event type. + * Takes a valid user defined callback function for use by PHP's call_user_func_array + * + * @param $event_name string + * @param $observer mixed can be a function name or function array + * @return bool + */ + + function attach($event_name, $observer) { + + $id = md5(microtime()); + + // Register event names for this handler + if(is_array($event_name)) { + + foreach ($event_name as $k => $name) { + + $this->listenersByEventType[$name][] = $id; + } + + } else { + + $this->listenersByEventType[$event_name][] = $id; + } + + $this->listeners[$id] = $observer; + + return true; + } + + /** + * Attach + * + * Attaches observers by filter type. + * Takes a valid user defined callback function for use by PHP's call_user_func_array + * + * @param $filter_name string + * @param $observer mixed can be a function name or function array + * @return bool + */ + + function attachFilter($filter_name, $observer, $priority = 10) { + + $id = md5(microtime()); + + $this->listenersByFilterType[$filter_name][$priority][] = $id; + + $this->listeners[$id] = $observer; + + } + + /** + * Notify + * + * Notifies all handlers of events in order that they were registered + * + * @param $event_type string + * @param $event array + * @return bool + */ + function notify($event) { + + $responses = array(); + owa_coreAPI::debug("Notifying listeners of ".$event->getEventType()); + //print_r($this->listenersByEventType[$event_type] ); + //print $event->getEventType(); + if (array_key_exists($event->getEventType(), $this->listenersByEventType)) { + $list = $this->listenersByEventType[$event->getEventType()]; + //print_r($list); + if (!empty($list)) { + foreach ($this->listenersByEventType[$event->getEventType()] as $k => $observer_id) { + //print_r($list); + $class = get_class( $this->listeners[$observer_id][0] ); + $responses[ $class ] = call_user_func_array($this->listeners[$observer_id], array($event)); + //owa_coreAPI::debug(print_r($event, true)); + owa_coreAPI::debug(sprintf("%s event handled by %s.",$event->getEventType(), get_class($this->listeners[$observer_id][0]))); + } + } + } else { + owa_coreAPI::debug("no listeners registered for this event type."); + } + + owa_coreAPI::debug('EHS: Responses - '.print_r($responses, true)); + + if ( in_array( OWA_EHS_EVENT_FAILED, $responses, true ) ) { + owa_coreAPI::debug("EHS: Event was not handled successfully by some handlers."); + //$q = $this->getAsyncEventQueue(owa_coreAPI::getSetting('base', 'event_queue_type')); + //$q->addToQueue($event); + return OWA_EHS_EVENT_FAILED; + } else { + owa_coreAPI::debug("EHS: Event was handled successfully by all handlers."); + return OWA_EHS_EVENT_HANDLED; + } + + } + + /** + * Notify Untill + * + * Notifies all handlers of events in order that they were registered + * Stops notifying after first handler returns true + * + * @param $event_type string + * @param $event array + * @return bool + */ + + function notifyUntill() { + owa_coreAPI::debug("Notifying Until listener for $event_type answers"); + } + + /** + * Filter + * + * Filters event by handlers in order that they were registered + * + * @param $filter_name string + * @param $value array + * @return $new_value mixed + */ + function filter($filter_name, $value = '') { + owa_coreAPI::debug("Filtering $filter_name"); + + if (array_key_exists($filter_name, $this->listenersByFilterType)) { + // sort the filter list by priority + ksort($this->listenersByFilterType[$filter_name]); + //get the function arguments + $args = func_get_args(); + // outer priority loop + foreach ($this->listenersByFilterType[$filter_name] as $priority) { + // inner filter class/function loop + foreach ($priority as $observer_id) { + // pass args to filter + owa_coreAPI::debug(sprintf("Filter: %s::%s. Value passed: %s", get_class($this->listeners[$observer_id][0]),$this->listeners[$observer_id][1], print_r($value, true))); + $value = call_user_func_array($this->listeners[$observer_id], array_slice($args,1)); + owa_coreAPI::debug(sprintf("Filter: %s::%s. Value returned: %s", get_class($this->listeners[$observer_id][0]),$this->listeners[$observer_id][1], print_r($value, true))); + // set filterred value as value in args for next filter + $args[1] = $value; + // debug whats going on + owa_coreAPI::debug(sprintf("%s filtered by %s.", $filter_name, get_class($this->listeners[$observer_id][0]))); + } + } + } + + return $value; + } + + /** + * Log + * + * Notifies handlers of tracking events + * Provides switch for async notification + * + * @param $event_params array + * @param $event_type string + */ + function log($event_params, $ev