function get_100_users() { $c = db_init('archive', 'items_730'); $OOD = $c->find(array("recent" => array('$lt' => time() - 172800)), array('_id' => 1))->sort(array("recent" => 1))->limit(100); //get a list of the most out of date steamids in the database (returns steamids only) $sids = ''; if ($OOD->count() > 100) { $is_additive = false; foreach ($OOD as $k => $usr) { $sids .= ',' . $usr['_id']; } } else { $steamid1 = db_load('start_steamid_730'); if (empty($steamid1)) { $steamid1 = 76561197960287930; } $sc = 0; while ($sc <= 100 && $sc++) { $sids .= ',' . ($steamid1 + $sc); } } $playerData = json_decode(get_data('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' . AKey() . '&steamids=' . $sids . '&format=json'), true); return $playerData['response']['players']; }
<?php include 'php/730_core.php'; createHead('CS:GO Scanner', 730); echo '<div class=news>CSGO prices may not be accurate. Exercise caution when trading, thanks.</div>'; if (isset($_SESSION['sid']) && donator_level(10)) { if (!form_spam_valid()) { $noscan = true; } $json = db_load('730_schemalist_time'); echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST"><textarea placeholder="Enter "status" output here. ' . $json['priced'], ' Items Priced. Last Pricelist Update: ', ($json['time'] > 3600 ? date('i', time() - $json['time']) . ' minutes' : 'Over an hour') . ' ago." rows="20" name="form-data" class="scanSubmit"></textarea><input type="submit" class="scansub"> ' . form_spam_fields() . '</form><br>'; if (isset($_POST['form-data']) && !isset($noscan)) { scan_start($_POST['form-data'], 730); } else { } } else { echo '<h1 class="ct login_notice">Please login to scan.</h1>'; } createFooter(730);
<?php include 'php/core.php'; createHead('Metadata', 440); echo '<div class="lt col2">'; echo '<ul>'; echo '<li><span class="lt">Price list last updated:</span><span class="rt">' . date('M d, Y', db_load('440_pricelist_v4_time')) . '</span></li>'; echo '<li><span class="lt">Schema (itemlist) last updated:</span><span class="rt">' . date('M d, Y', db_load('440_schema_time')) . '</span></li>'; echo '<li><span class="lt">Paint bucket images last updated:</span><span class="rt">' . date('M d, Y', db_load('440_paint_time')) . '</span></li>'; echo '<li><span class="lt">Game list last updated:</span><span class="rt">' . date('M d, Y', db_load('753_list_time')) . '</span></li>'; //echo '<li><span class="lt">Old-ass pricelist I don\'t even use anymore last updated:</span><span class="rt">' . date('M d, Y', db_load('440_pricelist_v2_time')) . '</span></li>'; echo '</ul>'; echo '</div>'; createFooter(440);
function updateListOfAllSteamGames() { $dir = json_directory(); $old = db_load('753_list_time'); if ($old == false || time() - $old >= 28800) { $listOfAllGamesOnSteam = json_decode(get_data('http://api.steampowered.com/ISteamApps/GetAppList/v2'), true); $listOfAllGamesOnSteam = $listOfAllGamesOnSteam['applist']['apps']; foreach ($listOfAllGamesOnSteam as $key => $game) { $OrderedList[$game['appid']] = $game['name']; } if ($OrderedList[5] === 'Dedicated Server') { $results = json_encode($OrderedList); file_put_contents($dir . "/753_games.json", $results); db_save('753_list_time', time()); } } }
function apiKeyBox() { if (admin_password() && isset($_POST['apikeyfield']) && isset($_POST['apikeysubmit'])) { db_save('akey', $_POST['apikeyfield']); } $apikey = db_load('akey'); echo '<div class="col2 rt"><h2>Api Key:</h2><br><form action="', $_SERVER['PHP_SELF'], '" method=post><input name="apikeyfield" type="text" placeholder="', $apikey, '"><br><input name="pass" type="password" class="ddinput"><input type=submit name=apikeysubmit value=apikeysubmit></form></div>'; }
function BKey() { return db_load('bkey'); }