Example #1
0
function scan_start($input, $gid)
{
    increment_scan($gid);
    $GLOBALS['users_hidden']['hours'] = 0;
    $GLOBALS['users_hidden']['worthless'] = 0;
    $GLOBALS['users_hidden']['private'] = 0;
    $GLOBALS['users_hidden']['f2p'] = 0;
    $time_start = time();
    if (!isset($input) || empty($input) && !is_array($input)) {
        echo 'No data submitted';
        return false;
    }
    if (!is_array($input)) {
        //look for steamid32s in this string to make into an array.
        $userlist = steamidFormatConvert($input);
    } else {
        if (is_numeric($input[0])) {
            $userlist = $input;
        }
    }
    if (!isset($userlist[0]) || empty($userlist[0]) || !is_array($userlist) || !is_numeric($userlist[0])) {
        echo 'no steamids detected...';
        return false;
    }
    $small = 0;
    $large = 99;
    $profiles100 = array();
    globalSchemas($gid);
    if ($gid == 440) {
        preference_get();
    }
    //ob_start();
    echo '<table class="sres" ><thead><tr><th data-sort="float">player</th><th>items</th></tr></thead><tbody>';
    while ($small <= count($userlist)) {
        $profiles100 = array_slice($userlist, $small, $large);
        // slice it from point 0 to point 99 (100 total)
        $small += 100;
        $large += 100;
        $playerURL = 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' . AKey() . '&steamids=' . implode(",", $profiles100) . '&format=json';
        $playerData = json_decode(get_data($playerURL), true);
        if (isset($playerData['response']['players'][0]['steamid'])) {
            echo scan_queue($playerData['response']['players'], $gid);
        } else {
            $playerData = json_decode(get_data($playerURL), true);
            if (isset($playerData['response']['players'][0]['steamid'])) {
                echo scan_queue($playerData['response']['players'], $gid);
            } else {
                echo '</tbody></table>Something went wrong with steam!<br>';
                break;
            }
        }
    }
    echo '</tbody></table>';
    //ob_end_flush();
    echo $GLOBALS['users_hidden']['hours'] + $GLOBALS['users_hidden']['worthless'] + $GLOBALS['users_hidden']['private'] + $GLOBALS['users_hidden']['f2p'], ' users hidden. ( ', $GLOBALS['users_hidden']['hours'], ' hours. ', $GLOBALS['users_hidden']['worthless'], ' worthless. ', $GLOBALS['users_hidden']['private'], ' private. ', $GLOBALS['users_hidden']['f2p'], ' F2P.', ' )<br>';
    echo 'Scan took ' . (time() - $time_start) . ' second' . (time() - $time_start > 1 ? 's' : '') . '. Bugs? Report them <a target=blank href=/bug.php>here</a>';
}
Example #2
0
function sysev()
{
    $unix = new unix();
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $pid = @file_get_contents($pidfile);
    if ($unix->process_exists($pid)) {
        writelogs("Already running pid {$pid}", __FUNCTION__, __FILE__, __LINE__);
        return;
    }
    $t = 0;
    system_admin_events_checks();
    system_rotate_events_checks();
    udfbguard_admin_events();
    mysql_admin_mysql_check();
    nginx_admin_mysql_check();
    system_admin_mysql_check();
    postfix_admin_mysql_check();
    sys_load();
    scan_queue();
}