コード例 #1
0
<?php

/*
*/
error_reporting(E_ALL);
require_once './incs/functions.inc.php';
do_aprs();
print "finished finished finished finished finished finished ";
コード例 #2
0
function get_current()
{
    // 3/16/09, 6/10/11, 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 = $ogts = $t_tracker = FALSE;
    // 6/10/11, 7/6/11
    $ts_threshold = strtotime('now - 24 hour');
    // discard inputs older than this - 4/25/11
    $query = "SELECT `id`, `aprs`, `instam`, `locatea`, `gtrack`, `glat`, `ogts`, `t_tracker` FROM `{$GLOBALS['mysql_prefix']}responder` WHERE ((`aprs` = 1) OR (`instam` = 1) OR (`locatea` = 1) OR (`gtrack` = 1) OR (`glat` = 1) OR (`ogts` = 1) OR (`t_tracker` = 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
        if ($row['ogts'] == 1) {
            $ogts = TRUE;
        }
        // 7/6/11
        if ($row['t_tracker'] == 1) {
            $t_tracker = TRUE;
        }
        // 6/10/11
    }
    // end while ()
    unset($result);
    if ($aprs) {
        do_aprs();
    }
    if ($instam) {
        $temp = get_variable("instam_key");
        $instam = $temp == "" ? FALSE : $temp;
        if ($instam) {
            do_instam($temp);
        }
    }
    if ($locatea) {
        do_locatea();
    }
    //7/29/09
    if ($gtrack) {
        do_gtrack();
    }
    //7/29/09
    if ($glat) {
        do_glat();
    }
    //7/29/09
    if ($ogts) {
        do_ogts();
    }
    // 7/6/11
    if ($t_tracker) {
        do_t_tracker();
    }
    // 6/10/11
    return array("aprs" => $aprs, "instam" => $instam, "locatea" => $locatea, "gtrack" => $gtrack, "glat" => $glat, "ogts" => $ogts, "t_tracker" => $t_tracker);
    //7/29/09, 7/6/11, 6/10/11
}