$reply = $row['shorten'] == 'bukkit' ? getCraftBukkitVersion() : getMinecraftVersion(); if (is_array($reply)) { echo 'Version for ' . $row['shorten'] . ' is: ' . $reply['version'] . "\r\n"; if (strlen($reply['version']) > 1) { $query2->execute(array($reply['version'], $reply['downloadPath'], $row['shorten'])); } } } echo "Fetch version for valves appIDs\r\n"; $steamVersion = array(); $query2 = $sql->prepare("UPDATE `servertypes` SET `steamVersion`=? WHERE `appID`=?"); $query = $sql->prepare("SELECT t.`appID`,t.`shorten` FROM `servertypes` t INNER JOIN `rservermasterg` r ON t.`id`=r.`servertypeid` WHERE t.`appID` IS NOT NULL AND t.`steamgame`!='N' GROUP BY t.`appID` ORDER BY t.`appID`"); $query->execute(); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { if (!in_array($row['appID'], array(null, '', false))) { $lookUpAppID = workAroundForValveChaos($row['appID'], $row['shorten']); $json = webhostRequest('api.steampowered.com', 'easy-wi.com', '/ISteamApps/UpToDateCheck/v0001/?appid=' . $lookUpAppID . '&version=0.0.0.0&format=json'); $decoded = @json_decode($json); if ($decoded and !isset($decoded->response->error) and isset($decoded->response->required_version)) { $query2->execute(array($decoded->response->required_version, $row['appID'])); echo 'Version for appID ' . $row['appID'] . ' is: ' . $decoded->response->required_version . "\r\n"; } else { if (isset($decoded->response->error)) { echo 'Error for appID ' . $row['appID'] . ' is: ' . $decoded->response->error . "\r\n"; } else { echo 'Error for appID ' . $row['appID'] . ' is: Could not retrieve JSON string' . "\r\n"; } } } } $webhostdomain = webhostdomain(0);
} } $url = $row2['twitter'] == 'N' ? $row2['feedUrl'] : 'https://twitter.com/' . $row2['loginName']; $strtotime = strtotime($row3['pubDate']); $feedArray[$url][] = array('title' => $row3['title'], 'link' => $row3['link'], 'text' => $text, 'url' => $url, 'date' => date('Y-m-d', $strtotime), 'time' => date('H:i', $strtotime)); } } unset($object); } else { $steamAppIDs = ''; if ($row['steamFeeds'] == 'Y') { $steamAppIDsArray = array(); $query2 = $sql->prepare("SELECT t.`appID`,t.`shorten` FROM `servertypes` AS t WHERE t.`resellerid`=? AND t.`steamgame`='S' AND EXISTS (SELECT 1 FROM `rservermasterg` WHERE `servertypeid`=t.`id`)"); $query2->execute(array($reseller_id)); while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) { $steamAppIDsArray[] = workAroundForValveChaos($row2['appID'], $row2['shorten']); } $steamAppIDs = count($steamAppIDsArray) > 0 ? ' OR (n.`feedID`=0 AND n.`content` IN (' . implode(',', $steamAppIDsArray) . '))' : ''; } $query2 = $sql->prepare("(SELECT 'cms' AS `newsType`,p.`id` AS `newsID`,p.`date` AS `newsDate`,t.`id` AS `textID`,t.`title` AS `newsTitle`,t.`text` AS `newsText`,'' AS `twitterText`,'' AS `feedUrl`,'N' AS `twitter`,'' AS `loginName`,'' AS `link` FROM `page_pages` p LEFT JOIN `page_pages_text` t ON p.`id`=t.`pageid` WHERE p.`released`='1' AND p.`type`='news' AND t.`language`=:lang AND p.`resellerid`=0) UNION (SELECT 'feed' AS `newsType`,u.`feedID` AS `newsID`,n.`pubDate` AS `newsDate`,0 AS `textID`,n.`title` AS `newsTitle`,n.`content` AS `newsText`,n.`description` AS `twitterText`,u.`feedUrl`,u.`twitter`,u.`loginName`,n.`link` FROM `feeds_news` n LEFT JOIN `feeds_url` u ON n.`feedID`=u.`feedID` WHERE n.`resellerID`=:resellerID AND n.`active`='Y' AND (u.`active`='Y' {$steamAppIDs})) ORDER BY `newsDate` DESC LIMIT 0,{$newsAmount}"); $query2->execute(array(':lang' => $user_language, ':resellerID' => $row['resellerID'])); while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) { if ($row2['newsType'] == 'cms') { $url = $page_url; $link = (isset($seo) and $seo == 'Y') ? $page_url . '/' . $user_language . '/' . szrp($gsprache->news) . '/' . szrp($row2['newsTitle']) . '/' : $page_url . '/index.php?site=news&id=' . $row2['newsID']; $text = nl2br($row2['newsText']); } else { $url = $row2['twitter'] == 'N' ? $row2['feedUrl'] : 'https://twitter.com/' . $row2['loginName']; $link = $row2['link']; if ($row['displayContent'] == 'Y' and $row['limitDisplay'] == 'Y' and $row2['twitter'] == 'N') { $text = substr(preg_replace('/<(.*?)>/', '', preg_replace('/<*?[^<>]*?>(.*?)<\\/*?>/', '$1', $row2['newsText'], -1), -1), 0, $row['maxChars']);
private function windowsCollectData($row) { if ($row['supdates'] != 3 and $row['updates'] != 3) { if (strlen($this->steamAccount) > 0) { $connectData = $this->steamAccount; if (strlen($this->steamPassword) > 0) { $connectData .= ':' . $this->steamPassword; } } else { if (strlen($row['steamAcc']) > 0) { $connectData = $row['steamAcc']; if (strlen($this->steamPassword) > 0) { $connectData .= ':' . $row['steamPwd']; } } else { $connectData = 'anonymous'; } } $callBackUrl = strlen($this->webhost) > 0 ? $this->webhost . '/get_password.php?w=ms&shorten=' . $row['shorten'] : ''; $this->winCmds[] = 'master ' . $row['shorten'] . ' steam:' . $connectData . ':' . workAroundForValveChaos($row['appID'], $row['shorten'], false) . ' ' . $callBackUrl; } $this->updateAmount++; }