Index: active_campus_explorer/pocket_ace_html/pages/reminder.php =================================================================== --- active_campus_explorer/pocket_ace_html/pages/reminder.php (revision 4430) +++ active_campus_explorer/pocket_ace_html/pages/reminder.php (revision 4417) @@ -69,7 +69,7 @@ $location = daGetPositionDescription($reminderX, $reminderY, $reminderZ); print("You have selected a reminder to occur when you are near " . $location."."); - if(!isset($reason)) $reason = "You have selected a reminder to occur when you are near". $location; + if(!isset($reason)) $reason = ""; if(!isset($try) && !isset($resch)) { reminderInputGUI('reminder.php', $db_date, $reason, null, $reminderX, $reminderY, $reminderZ); Index: active_campus_explorer/pocket_ace_html/gui/sites_gui_fn.php =================================================================== --- active_campus_explorer/pocket_ace_html/gui/sites_gui_fn.php (revision 4430) +++ active_campus_explorer/pocket_ace_html/gui/sites_gui_fn.php (revision 4417) @@ -192,7 +192,6 @@ $result = ""; $result .= tr(); // begin the row - // the first cell will be the servies icons $result .= td(guiItemWidth($servicesItem), 0, "", 'LEFT', 'MIDDLE'); $result .= table(0,guiItemWidth($servicesItem)) . tr(); @@ -212,28 +211,9 @@ $result .= endTag('TD'); $result .= endTag('TR'); // end the row - $result .= endTag('TD'); - return $result; } -function guiSiteEntityInTableDisplay_Bus_Stop($servicesItem, $Route, $status) { - - $result = $servicesItem; - $result .= endTag('TD'); - $result .= td(0,0,"",'LEFT','MIDDLE'); - $result .= guiSpacer() . $Route; - $result .= endTag('TD'); - - $result .= td(0,0,"",'RIGHT','MIDDLE'); - $result .= $status; - $result .= endTag('TD'); - - $result .= endTag('TR'); - return $result; - -} - function guiSiteEntityInTableDisplay_548($servicesItem,$siteLinkHTML,$editLinkHTML) { $result = ""; $result .= tr(); // begin the row @@ -258,38 +238,11 @@ $siteLinkHTML = guiSiteLinkHTML( $entity->properties ); $editLinkHTML = guiSiteEditLinkHTML( $entity->properties ); - $check = array_key_exists('category',$entity->properties); - if ($check) { - if ($entity->properties['category'] == 'BUS_STOP') { - $result = guiSiteEntityInTableDisplay_Default($servicesItem,$siteLinkHTML,$editLinkHTML); - $route_array = daGetBusRoutes($entity->properties['site_id']); - if(count($route_array)>0) { - $status = "5"; - $result .= guiSiteEntityInTableDisplay_Bus_Stop("", "",""); - $temp = td(guiItemWidth($servicesItem), 0, "FFFFFF", 'LEFT'); - $result .= guiSiteEntityInTableDisplay_Bus_Stop($temp, "Bus Route","ETA (minutes)"); - } - while(count($route_array) > 0) { - $target=$GLOBALS["new_window_name"]; - $servicesItem = makeLink(htmlentities($entity->properties["name"]), $entity->properties["url"], "", $target ) ; - $tempVar = array_pop($route_array); - $route = makeLink(htmlentities($tempVar), "http://parking.ucsd.edu","",$target); - $entity->properties["entity_name"]=$tempVar; - session_register('$entity->properties["site_id"]'); - $_SESSION['$entity->properties["site_id"]'] = $entity; - $servicesItem = guiDefaultEntityServiceBarItems($entity); - $result .= guiSiteEntityInTableDisplay_Default($servicesItem, $route, $status); - } - return $result; - } - } - if(is548PDA()) { return guiSiteEntityInTableDisplay_548($servicesItem,$siteLinkHTML,$editLinkHTML); } return guiSiteEntityInTableDisplay_Default($servicesItem,$siteLinkHTML,$editLinkHTML); - //return guiSiteEntityInTableDisplay_Default($servicesItem,$siteLinkHTML,$editLinkHTML, $isBus, $entity); $result = ""; $result .= tr(); // begin the row Index: active_campus_explorer/pocket_ace_html/gui/reminders_gui_fn.php =================================================================== --- active_campus_explorer/pocket_ace_html/gui/reminders_gui_fn.php (revision 4430) +++ active_campus_explorer/pocket_ace_html/gui/reminders_gui_fn.php (revision 4417) @@ -178,31 +178,6 @@ print(">" . $years . ""); } print(""); - - - print("
    Time:"); - print("    "); - print(""); - print(""); - - print(""); if(isset($resch)) { print(""); Index: active_campus_explorer/pocket_ace_html/conf/maps_conf.php =================================================================== --- active_campus_explorer/pocket_ace_html/conf/maps_conf.php (revision 4430) +++ active_campus_explorer/pocket_ace_html/conf/maps_conf.php (revision 4417) @@ -128,7 +128,6 @@ $mapIconScreenshotFile = "$ActiveCampus_file_system_home/active_campus_explorer/images/icons/map/mapIconCamera.png"; $mapIconQuestionWeb = "$ActiveCampus_browser_home/active_campus_explorer/images/icons/map/mapIconQuestion.png"; $mapIconQuestionFile = "$ActiveCampus_file_system_home/active_campus_explorer/images/icons/map/mapIconQuestion.png"; -$mapIconBusFile = "$ActiveCampus_file_system_home/active_campus_explorer/images/icons/map/mapIconBus.png"; $mapIconDotFile = "$ActiveCampus_file_system_home/active_campus_explorer/images/icons/map/mapIconDot.png"; $mapIconMessageFile = "$ActiveCampus_file_system_home/active_campus_explorer/images/icons/new_message.png"; Index: active_campus_explorer/pocket_ace_html/conf/page_conf.php =================================================================== --- active_campus_explorer/pocket_ace_html/conf/page_conf.php (revision 4430) +++ active_campus_explorer/pocket_ace_html/conf/page_conf.php (revision 4417) @@ -74,7 +74,6 @@ $mac_footer_page= $page_path . "mac_footer.php"; $mac_buddy_page = $page_path . "mac_buddy.php"; $mac_buddy_action_page= $page_path . "mac_buddy_action.php"; -$mac_bus_page = $page_path . "mac_bus.php"; $my_active_campus_page = $page_path . "my_active_campus.php"; Index: active_campus_explorer/soap/location.php =================================================================== --- active_campus_explorer/soap/location.php (revision 4430) +++ active_campus_explorer/soap/location.php (revision 4417) @@ -48,8 +48,7 @@ * @date Wed Jan 15 19:11:12 PST 2003 */ require_once("../conf/main_conf.php"); -require_once("latLongToNad83.php"); - + // Make sure we're being included from ActiveCampus-soap.php. if(!isset($server) || !is_object($server)) exit; @@ -102,16 +101,8 @@ // Logging. daLogSOAPCall($function); - - // Convert LatLong to Nad83 - //$latitude = 32.879; - // $longitude = -117.241; - $result = latLongToNad83($longitude, $latitude); - if(is_string($result)) { - return genericFault($function, $result); - } - daSetManualPosition($result["x"], $result["y"], $result["z"]); + // XXX // Given that we can (empirically) handle 2 locator requests per second // without triggering a meltdown scenario (which is guaranteed after 5 per @@ -125,7 +116,7 @@ $maxLatency = 10; $highMark = $GLOBALS["geolocation_activity_trust_time"] - $maxLatency; if($highMark < $lowMark) $highMark = $lowMark; - + return array("lowMark" => $lowMark, "highMark" => $highMark); } registerSOAP($server, 'SOAPLocationsManualLocate', $SOAPLocationsManualLocateSig, "XXX Unfinished"); @@ -207,7 +198,6 @@ return elementsEncode($result); } - registerSOAP($server, 'SOAPLocationsUsersGet', $SOAPLocationsUsersGetSig); ?> Index: active_campus_explorer/soap/latLongToNad83.php =================================================================== --- active_campus_explorer/soap/latLongToNad83.php (revision 4430) +++ active_campus_explorer/soap/latLongToNad83.php (revision 4417) @@ -1,63 +0,0 @@ -"; - - echo "y = $y[0] feet (projected using NAD83, State Plane 0406)"; - - echo "
"; - - echo "z = $z[0] feet (projected using NAD83, State Plane 0406)"; - - echo "
"; - */ - } - - pj_free($source_pj); - - pj_free($dest_pj); - - return array("x" => $x[0], "y" => $y[0], "z" => $z[0]); -} - -?> Index: active_campus_explorer/functions/data_access/db/sites_sql_fn.php =================================================================== --- active_campus_explorer/functions/data_access/db/sites_sql_fn.php (revision 4430) +++ active_campus_explorer/functions/data_access/db/sites_sql_fn.php (revision 4417) @@ -99,36 +99,7 @@ function dbGetSiteCategories() { return resultsetToArray(sqlQuery("select category, category_name, category_icon from categories")); } -function dbGetSitesByDescription($description) { - $sites = resultsetToArray(sqlQuery("SELECT * from sites WHERE sites.abbreviation ='$description'")); - - return $sites; - -} -function dbGetBusRouteNumber($SiteID) -{ - $queryResult = resultsetToArray(sqlQuery("SELECT ace_bus_stops.bus_stop_id from ace_bus_stops WHERE ace_bus_stops.site_id = $SiteID")); - if(count($queryResult)>0 ) { - - $tempHolder = array_pop($queryResult); - $tempHolder = $tempHolder['bus_stop_id']; - $queryResult2 = resultsetToArray(sqlQuery("SELECT bus_route_id from ace_bus_stop_routes WHERE ace_bus_stop_routes.bus_stop_id =$SiteID")); - if(count($queryResult2)==0) $queryResult2 = false; - return $queryResult2; - } - if(count($queryResult) == 0) $queryResult = false; - return $queryResult; -} -function dbGetBusRouteName($BusRouteArray) { - $BusNames = array(); - foreach($BusRouteArray as $BusRoute) { - $route = $BusRoute['bus_route_id']; - $bus_result=sqlFetchArray(sqlQuery("SELECT bus_route from ace_bus_routes WHERE bus_route_id='$route'")); - array_push($BusNames,$bus_result['bus_route']); - } - return($BusNames); -} function dbGetSitesInArea($id, $layerArea) { // Build the query describing the information we want from the table. The Index: active_campus_explorer/functions/data_access/db/reminders_sql_fn.php =================================================================== --- active_campus_explorer/functions/data_access/db/reminders_sql_fn.php (revision 4430) +++ active_campus_explorer/functions/data_access/db/reminders_sql_fn.php (revision 4417) @@ -91,9 +91,6 @@ return resultsetToArray(sqlQuery("select reminder.reminder_id, owner, message, exp, context_buddy.buddy_id, buddy_name from reminder inner join context_buddy on (reminder.reminder_id = context_buddy.reminder_id) inner join buddy_relations on (context_buddy.buddy_id = buddy_relations.buddy_id and owner = user_id) where delivered like 'f' and removed like 'f' and subscription = 'both' and owner = '" . $id ."' order by reminder.reminder_id")); } -function dbGetBusReminders($id) { - return resultsetToArray(sqlQuery("select reminder.reminder_id, owner, message, exp, context_buddy.buddy_id, buddy_name from reminder inner join context_buddy on (reminder.reminder_id = context_buddy.reminder_id) inner join buddy_relations on (context_buddy.buddy_id = buddy_relations.buddy_id and owner = user_id) where bus like 't' and delivered like 'f' and removed like 'f' and subscription = 'both' and owner = '" . $id ."' order by reminder.reminder_id")); -} function dbGetLocationReminders($id) { return resultsetToArray(sqlQuery("select reminder.reminder_id, owner, message, exp, x, y, z from reminder inner join context_loc on (reminder.reminder_id = context_loc.reminder_id) where delivered like 'f' and removed like 'f' and owner = '" . $id ."' order by reminder.reminder_id")); } Index: active_campus_explorer/functions/data_access/location_data_access_fn.php =================================================================== --- active_campus_explorer/functions/data_access/location_data_access_fn.php (revision 4430) +++ active_campus_explorer/functions/data_access/location_data_access_fn.php (revision 4417) @@ -287,24 +287,7 @@ else return $locationName . " at " . $locationAreaName; } -function daGetSiteByPosition($x="", $y="", $z="") { - global $locationDistantName; - // XXX $id is taken from the session from child functions - $id = daGetId(); - if($x==="") { - $operator = daGetOperatorInfoCached($id); - $x = $operator['x']; - $y = $operator['y']; - $z = $operator['z']; - } - - $locationName = daGetLocationName($x, $y, $z); - - return dbGetSitesByDescription($locationName); - -} - /** * Toggle if geolocation should update the user's position. * Index: active_campus_explorer/functions/data_access/sites_data_access_fn.php =================================================================== --- active_campus_explorer/functions/data_access/sites_data_access_fn.php (revision 4430) +++ active_campus_explorer/functions/data_access/sites_data_access_fn.php (revision 4417) @@ -85,11 +85,6 @@ } return null; } -function daGetBusRoutes($site_id) { - $check1 = dbGetBusRouteNumber($site_id); - if($check1 != false) - return(dbGetBusRouteName($check1)); -} /** * Get a list of unknown APs seen recently. Index: active_campus_explorer/functions/data_access/reminders_data_access_fn.php =================================================================== --- active_campus_explorer/functions/data_access/reminders_data_access_fn.php (revision 4430) +++ active_campus_explorer/functions/data_access/reminders_data_access_fn.php (revision 4417) @@ -47,30 +47,6 @@ return dbReminderAddReminder($owner,$message,$date, $x, $y, $z); } -function daGetProxforBusReminder($recipient, $site_id) -{ - $user = dbGetUsersInfoById($recipient); - $site = dbGetSiteById($site_id); - $userx = $user['x']; - $sitex = $site['x']; - $usery = $user['y']; - $sitey = $site['y']; - $userz = $user['z']; - $sitez = $site['z']; - $distance = ($sitex - $userx) * ($sitex - $userx); - $distance = $distance + ($sitey - $usery) * ($sitey - $usery); - $distance = $distance + ($sitez - $userz) * ($sitez - $userz); - $distance = sqrt($distance); - // choosing factor of 8 because bus moves 8x faster than user - return ($distance * 8); -} - -function daReminderAddBusReminder($message, $date, $x, $y, $z, $target, $recipient=null, $prox) -{ - if($recipient === null) $recipient = daGetId(); - return dbReminderAddBusReminder($target, $recipient, $message, $date, $x, $y, $z, $prox); -} - function daReminderAddBuddyReminder($message, $date, $reminderID, $owner=null) { if($owner === null) $owner = daGetId(); @@ -222,28 +198,6 @@ return $wrapper; } -function daGetNearbyBusReminders($id, $area) { - $wrapper = array(); - $nearByBuses = array(); - $active = array(); - $promiscuous = array(); - daGetBuddies($nearByBuses, $active, $promiscuous, $area, $id); - $buses = dbGetBusReminders($id); - - $wrapper = array(); - if(count($buses) !== 0) { - // foreach buddy reminder check if the buddy is nearby - foreach($buses as $bus) { - foreach($nearByBuses as $near) { - if($bus['buddy_id'] === $near['id']) - $temp = array('item_type' => 'buddy', 'message' => $bus['message'], 'exp' => $bus['exp'], 'id' => $bus['reminder_id'], 'reminder_id' => $bus['reminder_id'], 'buddy_id' => $bus['buddy_id'], 'owner' => $bus['owner']); - array_push($wrapper, $temp); - } - } - return $wrapper; - } -} - function daGetNearbyBuddyReminders($id, $area) { $wrapper = array(); $nearByBuddies = array(); Index: active_campus_explorer/functions/notification.php =================================================================== --- active_campus_explorer/functions/notification.php (revision 4430) +++ active_campus_explorer/functions/notification.php (revision 4417) @@ -40,7 +40,7 @@ */ -/*id is userID*/ + function doNotificationCheck($id = null) { if(!isset($id)) $id = daGetId(); $radius = 60; @@ -49,7 +49,6 @@ $area = new Area(new Point($op["x"], $op["y"], $op["z"]), new Circle($radius)); if($isAware === true) { doBuddyNotificationCheck($id, $area); - doBusNotificationCheck($id, $area); doLocationReminderCheck($id, $area); } doReverseBuddyNotificationCheck($id, $area); @@ -64,19 +63,6 @@ } } -function doBusNotificationCheck($id, $area) { - $reminders = daGetNearbyBusReminders($id, $area); - - //deliver nearby buddy reminders - if (count($reminders) > 1) { - foreach($reminders as $reminder) { - daSendNotification($reminder); - } - } else { - daSendNotification($reminders[0]); - } -} - function doLocationReminderCheck($id, $area) { $reminders = daGetNearbyLocationReminders($id, $area); Index: developer.php =================================================================== --- developer.php (revision 4430) +++ developer.php (revision 4417) @@ -71,16 +71,16 @@ // Access control the rest. requirePermissions(array("developer")); ?> + ActiveCampus developer page + WARNING: This installation is marked as a non-production test database"); }