","",$text); $text = str_replace("`","",$text); $text = str_replace(chr(0),"",$text); return $text; } function randString($length) { $str = ''; $charset='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $count = strlen($charset); while ($length--) { $str .= $charset[random_int(0, $count-1)]; } return $str; } // connect to mongodb $usernamedatabase = "largedogvrstudio"; $passworddatabase = "50W9lh950Dt9H16tIBnIJS5BT525sPak"; $ipaddressdatabase = "localhost"; $connection = new MongoDB\Driver\Manager("mongodb://" . $usernamedatabase . ":" . $passworddatabase . "@" . $ipaddressdatabase); $database = "largedogvrstudio"; $collection = "usersinfo"; $websiteaccount = "largedogvrstudio"; // check if they are already logged in $ipsession; $logincookie = decodehtmlforphpcopy($_COOKIE['largedogvrstudio']); if (strpos($logincookie, "session") === false) { header("Location: /notloggedin/"); exit; } else { // get what session they are using $number = substr($logincookie,0,8); $session = substr($logincookie,8); $ipsession = $session . decodehtmlforphpcopy($_SERVER['REMOTE_ADDR']); // check for an invalid session $command = new MongoDB\Driver\Command(["count" => $collection, "query" => array($number => $ipsession)]); $document = $connection->executeCommand($database,$command); $document = current($document->toArray()); $count = trim(var_export($document->n, true),"'"); if ($count === "0") { // they have an invalid session // remove the cookie setcookie("largedogvrstudio", "" , time() - (86400 * 30), "/","largedogvrstudio.com",true,true); // 86400 = 1 day header("Location: /notloggedin/"); exit; } } // get the username $query = new MongoDB\Driver\Query([$number => $ipsession]); $value = $connection->executeQuery($database . "." . $collection, $query); foreach ($value as $document) { $username = trim(var_export($document->username, true),"'"); } // set the websitedata date_default_timezone_set('UTC'); $websitedata = randString(50); $websitedatatime = str_replace(array(":"," "),"-",date("Y-m-d H:i:s",strtotime(date("Y-m-d H:i:s")." +1 day"))); $updates = array([ "q" => array("username" => $username), "u" => array('$set'=>array("websitedata" => $websitedata)) ]); $command = new MongoDB\Driver\Command(["update" => $collection, "updates" => $updates]); $connection->executeCommand($database,$command); $updates = array([ "q" => array("username" => $username), "u" => array('$set'=>array("websitedatatime" => $websitedatatime)) ]); $command = new MongoDB\Driver\Command(["update" => $collection, "updates" => $updates]); $connection->executeCommand($database,$command); // get the information $query = new MongoDB\Driver\Query([$number => $ipsession]); $value = $connection->executeQuery($database . "." . $collection, $query); foreach ($value as $document) { $baseballgamebitcoinprice = trim(var_export($document->baseballgamebitcoinprice, true),"'"); $baseballgamebitcoinpricetime = trim(var_export($document->baseballgamebitcoinpricetime, true),"'"); $baseballgamestatus = trim(var_export($document->baseballgamestatus, true),"'"); $baseballgamebitcoinaccount = trim(var_export($document->baseballgamebitcoinaccount, true),"'"); $baseballgamebitcoinpurchaseprice = trim(var_export($document->baseballgamebitcoinpurchaseprice, true),"'"); if ($baseballgamestatus === "enabled") { $baseballgamepurchaseprice = trim(var_export($document->baseballgamepurchaseprice, true),"'"); $baseballgamepurchasemethod = trim(var_export($document->baseballgamepurchasemethod, true),"'"); $baseballgamepurchasedate = trim(var_export($document->baseballgamepurchasedate, true),"'"); } } // make sure the bitcoin price for has not expired (it will expire in one week after it is set) $baseballgamebitcoinpricetimeexpired = false; $bitcoinpricetimeexpiration = date("Y-m-d H:i:s",strtotime(date("Y-m-d H:i:s")." -1 week")); $bitcoinpricetimeexpiration = str_replace(" ","-",$bitcoinpricetimeexpiration); $bitcoinpricetimeexpiration = str_replace(":","-",$bitcoinpricetimeexpiration); if ($baseballgamebitcoinpricetime < $bitcoinpricetimeexpiration) { // the bitcoin price has expired for the baseball game $baseballgamebitcoinpricetimeexpired = true; $updates = array([ "q" => array('username' => $username), "u" => array('$set'=>array("baseballgamebitcoinpurchaseprice" => "")) ]); $command = new MongoDB\Driver\Command(["update" => $collection, "updates" => $updates]); $connection->executeCommand($database,$command); $updates = array([ "q" => array('username' => $username), "u" => array('$set'=>array("baseballgamebitcoinprice" => "")) ]); $command = new MongoDB\Driver\Command(["update" => $collection, "updates" => $updates]); $connection->executeCommand($database,$command); $updates = array([ "q" => array('username' => $username), "u" => array('$set'=>array("baseballgamebitcoinpricetime" => "")) ]); $command = new MongoDB\Driver\Command(["update" => $collection, "updates" => $updates]); $connection->executeCommand($database,$command); } // create the html for the bitcoin modal $bitcoinmodallabel; $bitcoinmodallabeldata; if ($baseballgamebitcoinprice != "" && $baseballgamebitcoinpurchaseprice != "" && is_numeric($baseballgamebitcoinpurchaseprice) === true && $baseballgamebitcoinpricetimeexpired === false) { $bitcoinmodallabel = '

To complete your purchase of baseballgame, please send ' . $baseballgamebitcoinpurchaseprice . ' BTC to ' . $baseballgamebitcoinaccount . '. Once you have done this, please wait for three confirmations of the bitcoin transaction, and then press the Update Status of Bitcoin Payment button, next to the game you want to purchase.

Make sure that you send the exact amount displayed, and make sure that your transaction fees dont deduct from the amount you want to send.

If you have already sent the bitcoin and are waiting for the three confirmations, please close this menu and click on the Update Status of Bitcoin Payment button

'; $bitcoinmodallabeldata = ""; } else { if (date("Y-m-d-H-i-s") < $baseballgamebitcoinpricetime) { $bitcoinmodallabeldata = "You must wait one hour between confirming bitcoin payments, so this will be at " . $baseballgamebitcoinpricetime; $bitcoinmodallabel = ""; } else { $bitcoinmodallabel = "Click Confirm to receive the payment address and amount."; $bitcoinmodallabeldata = ""; } } $collection = "website"; $query = new MongoDB\Driver\Query(["username" => $websiteaccount]); $value = $connection->executeQuery($database . "." . $collection, $query); foreach ($value as $document) { $baseballgamecurrentprice = trim(var_export($document->baseballgamecurrentprice, true),"'"); // create the variables for each videogame paypal button $baseballgamepaypalbutton = $username . "||baseballgame||videogamedashboard"; } ?> LargeDogVRStudio - Video Game Dashboard

Video Games Dashboard

Purchase or download a game - Their are no refunds on any sales. If you need help purchasing a video game using bitcoin, click here

# Game Name Current Price Status Download Invoice Purchase Using PayPal, or Credit/Debit Card Purchase Using Bitcoin Update Status of Bitcoin Payment

1
Baseball Game