<?php include 'php/440_core.php'; createHead('TF2 Scanner', 440); if (isset($_SESSION['sid']) && donator_level(10)) { if (!form_spam_valid()) { $noscan = true; } echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST"><textarea placeholder="Enter "status" output here." rows="20" name="form-data" class="scanSubmit"></textarea><input type="submit" value=Scan class="scansub"> ' . form_spam_fields() . '</form>'; if (isset($_POST['form-data']) && !isset($noscan)) { scan_start($_POST['form-data'], 440); } else { include 'php/update.php'; updateEverything(); } } else { echo '<h1 class="ct login_notice">Please login to scan.</h1>'; } createFooter(440);
function scan_queue($profile_list, $gid) { if (donator_level(20)) { $max_requests = 24; } else { $max_requests = 2; } $curl_options = array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_CONNECTTIMEOUT => 5, CURLOPT_TIMEOUT => 7, CURLOPT_FOLLOWLOCATION => TRUE); $parallel_curl = new ParallelCurl($max_requests, $curl_options); foreach ($profile_list as $profile) { if ($gid == 440) { $url = 'http://api.steampowered.com/IEconItems_440/GetPlayerItems/v0001/?key=' . AKey() . '&SteamID=' . $profile['steamid'] . '&format=json'; $parallel_curl->startRequest($url, 'scan_440_single', $profile); } if ($gid == 730) { $url = 'http://steamcommunity.com/profiles/' . $profile['steamid'] . '/inventory/json/730/2'; $parallel_curl->startRequest($url, 'scan_730_single', $profile); } if ($gid == 570) { $url = 'http://api.steampowered.com/IEconItems_570/GetPlayerItems/v0001/?key=' . AKey() . '&SteamID=' . $profile['steamid'] . '&format=json'; $parallel_curl->startRequest($url, 'scan_570_single', $profile); } //ob_flush(); //flush(); } // This should be called when you need to wait for the requests to finish. // This will automatically run on destruct of the ParallelCurl object, so the next line is optional. $parallel_curl->finishAllRequests(); }
<?php include 'php/scan_core.php'; include 'php/update.php'; createHead('DB', 440, '<script src="js/slider.js" ></script><script src="js/char-insert.js" ></script><script src="js/reserve.js" ></script><script src="js/as-compiled.js" ></script><link rel="stylesheet" href="css/autoSuggest.css" type="text/css" media="screen">'); if (donator_level(20)) { $databases = array('440' => array('name' => 'unusual search', 'url' => 'php/autocomplete_nowep.php', 'db' => 'items', 'col' => 'unusual'), '730' => array('name' => 'csgo db', 'url' => 'php/autoc_730.php', 'db' => 'archive', 'col' => 'items_730')); echo '<h1>Endgame Database.</h1>'; foreach ($databases as $key => $db) { $c = db_init($db['db'], $db['col']); echo '<a class="show_hide" href="#" rel="#slidingDiv_' . $key . '"><h2>' . $db['name'] . '</h2></a>', '<div id="slidingDiv_' . $key . '" class="toggleDiv bp-content cf">', '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">', $c->count(), ' Backpacks in database. ', '(Enter at least 3 characters then click the item you want.)<input type="text" id="as-input" class=as-input autocomplete=off data-autocompleteurl=' . $db['url'] . ' /><br>', '<input type=hidden name=gid value=' . $key . '><input type=submit>', $key == 730 ? ' copy and paste: stattrak™ ★' : '', '<br><div class="col2 lt">', 'Sort by: <select name=sortby>' . '<option value=1 selected=selected>Hours played</option>', '<option value=2>Last Updated</option>', '<option value=3>First added to DB</option>', '</select><select name=sortorder><option value=1 selected=selected>Sort lowest first</option><option value=2>Sort Highest First</option></select><br>', '</div></form>', '</div><br>'; $c = null; } if (isset($_POST['gid']) && is_numeric($_POST['gid']) || isset($_GET['gid'])) { include_once 'php/multidb_core.php'; database_search_prepare($_POST['gid']); } else { echo 'No search submitted.'; updateListOfAllSteamGames(); } } else { login_or_donator(); } createFooter();
<?php include 'db_core.php'; session_start(); if ((isset($_POST['reserve']) || isset($_POST['unreserve'])) && isset($_SESSION['sid']) && is_numeric($_SESSION['sid']) && isset($_POST['gid']) && is_numeric($_POST['gid']) && donator_level(20)) { switch ($_POST['gid']) { case 440: $collection = db_init('items', 'unusual'); break; case 730: $collection = db_init('archive', 'items_730'); break; default: echo 'User not reserved, this game is not supported.'; return 0; } /* $m = new MongoClient(); $db = $m->items; $collection = $db->unusual; */ $steamid = (int) $_SESSION['sid']; //user is reserving a database entry. if (isset($_POST['notes'])) { $notes = (string) $_POST['notes']; } else { $notes = 'no notes.'; } $cursor = $collection->find(array('user_reserver' => $steamid)); $resultCount = $cursor->count(); $max = 5;
function createHead($title, $gid = 440, $includes = '') { if (donator_level(20)) { $donor = true; } else { $donor = false; } header('Access-Control-Allow-Origin: http://endgame.tf'); $banners = array(440 => array('bnr' => '/440.gif', 'alt' => 'Team Fortress 2 Endgame', 'icn' => 't.gif'), 730 => array('bnr' => '/730.gif', 'alt' => 'Counter-Strike Endgame', 'icn' => 's.gif'), 570 => array('bnr' => '/570.gif', 'alt' => 'Dota 2 Endgame', 'icn' => 'd.gif'), 620 => array('bnr' => '/620.gif', 'alt' => 'Portal 2 Endgame', 'icn' => 's.gif')); ?> <!DOCTYPE HTML><html lang="en"><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="description" content="The best free TF2/CSGO server scanner. Scan groups, friend lists with donator features including powerful user preference settings." /> <meta name="keywords" content="scanner, sharking, playtime, trading, jewing, team fortress 2, tf2, teamfortress, csgo, cs:go, Counter-Strike, Dota2, Dota" /> <link href=img/icn/<?php echo $banners[$gid]['icn']; ?> rel=icon> <title><?php echo $title; ?> </title> <link href="css/tf2egv3.css" rel="stylesheet" type="text/css"> <link href="css/csgoeg.css" rel="stylesheet" type="text/css"> <link href="css/stylesheet.php" rel="stylesheet" type="text/css"> <script src="js/jquery.js" ></script> <script src="js/stupidtable.min.js" ></script> <?php echo $includes; ?> </head><body class="a<?php echo $gid; ?> "> <div class="top-holder"> <div class="color-top b<?php echo $gid; ?> "></div> <?php echo '<div id="bnr-txt">', $banners[$gid]['alt'], '</div><img src="img/bnr/', $banners[$gid]['bnr'], '" alt="', $banners[$gid]['alt'], ' banner">'; ?> <div class="b<?php echo $gid; ?> " id="nav"> <ul> <li><a href="index.php">Home</a></li> <li><a href="#">Scanning</a> <ul> <li><a href="440_scan.php">TF2 Scanner</a></li> <?php echo $donor == true ? '<li><a href="440_group.php">TF2 Multi</a></li>' : ''; ?> <li><a href="730_scan.php">CS:GO Scanner</a></li> <?php echo $donor == true ? '<li><a href="730_group.php">CS:GO Multi</a></li>' : ''; echo $donor == true ? '<li><a href="db.php">Databases</a></li>' : ''; ?> <li class="listend b<?php echo $gid; ?> "></li> </ul> </li> <?php echo '<li>Help<ul><li><a href=/tutorials.php>Tutorials</a></li> ' . (isset($_SESSION['sid']) ? '<li><a href=/bug.php>Bug report/contact</a></li>' : '') . '<li><a href=/donate.php>Donate</a></li>' . '<li><a href=/meta.php>Meta</a></li>' . '<li class="listend b', $gid, '"></li></ul></li>'; if (isset($_SESSION['sid'])) { echo '<li><a href="profile.php">' . (isset($_SESSION['currentUserName']) ? substr(ucfirst(htmlentities($_SESSION['currentUserName'])), 0, 10) : 'user') . '</a><ul>'; if ($_SESSION['sid'] == 76561198013370444) { echo '<li><a href="admin.php">Admin</a></li>'; } echo $donor == true ? '<li><a href="settings.php">Settings</a></li><li><a href="whitelist.php">Hide/Show items</a></li><li><a href="dblist.php">My reserved users</a></li>' : '', '<li>' . LoginButton() . '</li>', '<li class="listend b', $gid, '"></li>', '</ul></li>'; } else { echo '<li>' . LoginButton() . '</li>'; } echo '</ul></div></div><div id="content" class="cf">'; }
<?php include_once 'php/core.php'; include_once 'php/db_core.php'; include_once 'php/multidb_core.php'; createHead('Your Reserved Users', 440, '<script src="js/unreserve.js" ></script>'); if (isset($_GET['gid'])) { $gid = (int) $_GET['gid']; } echo '<h2><a href=' . $_SERVER['PHP_SELF'] . '?gid=440>Your TF2 reserved users.</a></h2><br>'; echo '<h2><a href=' . $_SERVER['PHP_SELF'] . '?gid=730>Your CSGO reserved users.</a></h2><br>'; if (isset($gid) && is_numeric($_SESSION['sid']) && donator_level(20)) { switch ($_GET['gid']) { case 440: $collection = $c = db_init('items', 'unusual'); include_once 'php/440_core.php'; break; case 730: $collection = db_init('archive', 'items_730'); include 'php/730_core.php'; break; } $steamid = (int) $_SESSION['sid']; if (isset($_POST['notes'])) { $notes = (string) $_POST['notes']; } else { $notes = 'no notes.'; } $cursor = $collection->find(array('user_reserver' => $steamid)); if ($cursor->count() > 0) { echo '<input type="hidden" id=gameid value="' . $gid . '">';