示例#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>';
}
示例#2
0
if (isset($_POST['Delete'])) {
    preference_delete();
    sleep(0.5);
}
/*
Items worth less than x 			√
Maximum Hours on a user 			√
Hide users with worthless Backpacks √
Hide F2P 							√
Hide players offline for X time 	x
Hide users not playing TF2 			x
Backpack viewer 1 and 2 			√
Item warnings 						√
*/
if (isset($_SESSION['sid'])) {
    preference_get();
}
echo '<div class="col2 lt">';
echo '<h2>Normal Scanner Options:</h2>';
echo 'Hide items worth less than <input type="text" class="ddinput" name="numeric[ss][threshold]" value="' . (isset($_SESSION['pref']['numeric']['ss']['threshold']) ? $_SESSION['pref']['numeric']['ss']['threshold'] : 1) . '"> refined.<br><br>';
echo 'Hide users with more than <input type="text" class="ddinput" name="numeric[ss][maxhours]" value="' . (isset($_SESSION['pref']['numeric']['ss']['maxhours']) ? $_SESSION['pref']['numeric']['ss']['maxhours'] : 99999) . '"> hours played.<br><br>';
echo 'Show users with private/empty/worthless backpacks?  ';
echo '<select name="numeric[ss][worthless]">' . '<option value = "1"' . (!isset($_SESSION['pref']['numeric']['ss']['worthless']) || $_SESSION['pref']['numeric']['ss']['worthless'] == 1 ? ' selected="selected"' : '') . '>Yes</option>' . '<option value = "0"' . (isset($_SESSION['pref']['numeric']['ss']['worthless']) && $_SESSION['pref']['numeric']['ss']['worthless'] == 0 ? ' selected="selected"' : '') . '>No</option></select><br><br>';
echo 'Show users who are Free To Play ( <div class="lk f2p"></div> ) ';
echo '<select name="numeric[ss][f2p]">' . '<option value = "1"' . (!isset($_SESSION['pref']['numeric']['ss']['f2p']) || $_SESSION['pref']['numeric']['ss']['f2p'] == 1 ? ' selected="selected"' : '') . '>Yes</option>' . '<option value= "0"' . (isset($_SESSION['pref']['numeric']['ss']['f2p']) && $_SESSION['pref']['numeric']['ss']['f2p'] == 0 ? ' selected="selected"' : '') . '>No</option></select><br><br>';
echo '</div>';
//end pref-left
echo '<div class="col2 rt">';
echo '<h2>Group/Friend Scanner Options:</h2>';
echo 'Hide users with no items worth more than <input type="text" class="ddinput" name="numeric[gs][threshold]" value="' . (isset($_SESSION['pref']['numeric']['gs']['threshold']) ? $_SESSION['pref']['numeric']['gs']['threshold'] : 1) . '"> refined.<br><br>';
echo 'Hide users with more than <input type="text" class="ddinput" name="numeric[gs][maxhours]" value="' . (isset($_SESSION['pref']['numeric']['gs']['maxhours']) ? $_SESSION['pref']['numeric']['gs']['maxhours'] : 99999) . '"> hours played.<br><br>';