{"action":"created","issue":{"url":"https://api.github.com/repos/ztizzlegaming/CSGOWinBig/issues/194","repository_url":"https://api.github.com/repos/ztizzlegaming/CSGOWinBig","labels_url":"https://api.github.com/repos/ztizzlegaming/CSGOWinBig/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/ztizzlegaming/CSGOWinBig/issues/194/comments","events_url":"https://api.github.com/repos/ztizzlegaming/CSGOWinBig/issues/194/events","html_url":"https://github.com/ztizzlegaming/CSGOWinBig/issues/194","id":141909997,"number":194,"title":"Website just says loading. ","user":{"login":"jonnytothedee","id":16887976,"avatar_url":"https://avatars.githubusercontent.com/u/16887976?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnytothedee","html_url":"https://github.com/jonnytothedee","followers_url":"https://api.github.com/users/jonnytothedee/followers","following_url":"https://api.github.com/users/jonnytothedee/following{/other_user}","gists_url":"https://api.github.com/users/jonnytothedee/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnytothedee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnytothedee/subscriptions","organizations_url":"https://api.github.com/users/jonnytothedee/orgs","repos_url":"https://api.github.com/users/jonnytothedee/repos","events_url":"https://api.github.com/users/jonnytothedee/events{/privacy}","received_events_url":"https://api.github.com/users/jonnytothedee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-03-18T16:07:03Z","updated_at":"2016-03-19T00:08:34Z","closed_at":null,"body":"I have no idea why. I've been trying for days to fix the steam login but instead of the login button it just says loading..\r\nThe link is www.csgo-crazy.com\r\nANY suggestions would be greatly appreciated!"},"comment":{"url":"https://api.github.com/repos/ztizzlegaming/CSGOWinBig/issues/comments/198589724","html_url":"https://github.com/ztizzlegaming/CSGOWinBig/issues/194#issuecomment-198589724","issue_url":"https://api.github.com/repos/ztizzlegaming/CSGOWinBig/issues/194","id":198589724,"user":{"login":"jonnytothedee","id":16887976,"avatar_url":"https://avatars.githubusercontent.com/u/16887976?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnytothedee","html_url":"https://github.com/jonnytothedee","followers_url":"https://api.github.com/users/jonnytothedee/followers","following_url":"https://api.github.com/users/jonnytothedee/following{/other_user}","gists_url":"https://api.github.com/users/jonnytothedee/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnytothedee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnytothedee/subscriptions","organizations_url":"https://api.github.com/users/jonnytothedee/orgs","repos_url":"https://api.github.com/users/jonnytothedee/repos","events_url":"https://api.github.com/users/jonnytothedee/events{/privacy}","received_events_url":"https://api.github.com/users/jonnytothedee/received_events","type":"User","site_admin":false},"created_at":"2016-03-19T00:08:34Z","updated_at":"2016-03-19T00:08:34Z","body":"Well I fixed my default.php but now my issue is the error Fatal error: Call to a member function query() on a non-object in /home/a7862206/public_html/php/login-status.php on line 36\r\n\r\nMy login-status.php is as follows:\r\n\r\n<?php\r\n# Copyright (c) 2015 Jordan Turley, CSGO Win Big. All Rights Reserved.\r\n\r\nsession_start();\r\ninclude 'default.php';\r\ninclude 'SteamAuthentication/steamauth/userInfo.php';\r\n\r\n$db = getDB();\r\n\r\n$steamID = isset($_SESSION['steamid']) ? $_SESSION['steamid'] : null;\r\n\r\n$loginStatus = !is_null($steamID) && isset($steamID) ? 1 : 0;\r\n\r\nif ($loginStatus === 1) {\r\n\t# Get user's 64bit Steam ID\r\n\t$steam64Id = $steamprofile['steamid'];\r\n\r\n\t# Check if the user has entered their trade link\r\n\t$stmt = $db->prepare('SELECT * FROM users WHERE steamId64 = :id');\r\n\t$stmt->bindValue(':id', $steam64Id);\r\n\t$stmt->execute();\r\n\r\n\t# First, check the count\r\n\tif ($stmt->rowCount() === 0) {\r\n\t\t$tradeToken = null;\r\n\t} else {\r\n\t\t$userInfo = $stmt->fetch();\r\n\t\t$tradeToken = $userInfo['tradeToken'];\r\n\t}\r\n} else {\r\n\t# This is only for when they are not logged in, so the trade token wouldn't matter\r\n\t$tradeToken = null;\r\n}\r\n\r\n# Home page stuff: Minimum bet ($0.20), total games played, total money won, biggest pot ever\r\n$stmt = $db->query('SELECT * FROM history');\r\n$allGames = $stmt->fetchAll();\r\n\r\n$totalGamesPlayed = count($allGames);\r\n\r\n$totalMoneyWon = 0;\r\nforeach ($allGames as $game) {\r\n\t$totalMoneyWon += intval($game['potPrice']);\r\n}\r\n\r\n# Get all games from the past 24 hours for home page info shit\r\n/* $stmt = $db->query('SELECT * FROM history WHERE date > DATE_SUB(NOW(), INTERVAL 24 HOUR) AND date <= NOW()');\r\n\r\n$gamesPlayedToday = $stmt->rowCount();\r\n\r\n$allFromPastDay = $stmt->fetchAll();\r\n$moneyWonToday = 0;\r\n$biggestPotToday = 0;\r\n\r\nforeach ($allFromPastDay as $pot) {\r\n\t$potPrice = $pot['potPrice'];\r\n\r\n\t$moneyWonToday += $potPrice;\r\n\r\n\tif ($potPrice > $biggestPotToday) {\r\n\t\t$biggestPotToday = $potPrice;\r\n\t}\r\n} */\r\n\r\n# Get the max pot price ever\r\n$stmt = $db->query('SELECT MAX(potPrice) FROM history');\r\n$row = $stmt->fetch();\r\n$biggestPotEver = $row['MAX(potPrice)'];\r\n\r\n$infoArr = array(\r\n\t'totalGamesPlayed' => $totalGamesPlayed,\r\n\t'totalMoneyWon' => $totalMoneyWon,\r\n\t'biggestPotEver' => $biggestPotEver\r\n);\r\n\r\n$data = array(\r\n\t'loginStatus' => $loginStatus,\r\n\t'userInfo' => $loginStatus === 1 ? $steamprofile : null,\r\n\t'tradeToken' => $tradeToken,\r\n\t'info' => $infoArr\r\n);\r\necho jsonSuccess($data);\r\n?>\r\n"}}