function get_current_test() { // 3/16/09, 7/25/09 $delay = 1; // minimum time in minutes between queries - 7/25/09 $when = get_variable('_aprs_time'); // misnomer acknowledged if (time() < $when) { return; } else { $next = time() + $delay * 60; $query = "UPDATE `{$GLOBALS['mysql_prefix']}settings` SET `value`='{$next}' WHERE `name`='_aprs_time'"; $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); } $aprs = $instam = $locatea = $gtrack = $glat = FALSE; // 3/22/09 $query = "SELECT `id`, `aprs`, `instam`, `locatea`, `gtrack`, `glat` FROM `{$GLOBALS['mysql_prefix']}responder`WHERE ((`aprs` = 1) OR (`instam` = 1) OR (`locatea` = 1) OR (`gtrack` = 1) OR (`glat` = 1))"; $result = mysql_query($query) or do_error($query, ' mysql error=', mysql_error(), basename(__FILE__), __LINE__); while ($row = stripslashes_deep(mysql_fetch_assoc($result))) { if ($row['aprs'] == 1) { $aprs = TRUE; } if ($row['instam'] == 1) { $instam = TRUE; } if ($row['locatea'] == 1) { $locatea = TRUE; } //7/29/09 if ($row['gtrack'] == 1) { $gtrack = TRUE; } //7/29/09 if ($row['glat'] == 1) { $glat = TRUE; } //7/29/09 } // end while () unset($result); if ($glat) { $glat_func = do_glat_test(); } print $glat_func; $result_code = "Get Current Successful"; return $result_code; }
// end for each() } error_reporting(E_ALL); foreach ($ret_val as $value) { // any hole? if (empty($value)) { return FALSE; } // end if() } return $ret_val; } // end function do_glat_test(); // $user = "******"; // known good value $user = $_POST['frm_badge']; $results = do_glat_test($user); $caption = $results ? "Successful" : "Fails"; $api_key = get_variable('gmaps_api_key'); // empty($_GET) ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Maps JavaScript API Example: Simple Map</title> <script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php print $api_key; ?>