Example #1
0
function getGameSubscribers($gameID)
{
    $url = Config::getAPIDomain() . "/go_getgamesubscribers.php?query=gamesubscribers&gameid=" . urlencode($gameID);
    if (Config::getDebug()) {
        Config::getLogObject()->log("{$url}", PEAR_LOG_DEBUG);
    }
    $curl = @curl_init($url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    $xml = @curl_exec($curl);
    curl_close($curl);
    if ($xml) {
        $document = @simplexml_load_string($xml);
        echo "<h3>Users subscribed to Game</h3>";
        if (!$document) {
            return false;
        }
        echo "<ul>";
        foreach ($document->game as $game) {
            //echo('<li><a href="gocustomizegame.php?gameid=' . $game->gameid . '">' . $game->title . '</a></li>');
            echo '<li><a href="' . Config::getRootDomain() . '/goprofile.php?userid=' . $game->userid . '">' . $game->username . '</a></li>';
        }
    }
    echo "</ul>";
    return;
}
 public function __construct()
 {
     $this->LOG = Config::getLogObject();
     if (func_num_args()) {
         $gameID = func_get_arg(0);
         $this->getGame($gameID);
     }
     //if
 }
 public function __construct()
 {
     $this->LOG = Config::getLogObject();
     if (func_num_args()) {
         $activityReward = func_get_arg(0);
         $activityReward = trim(strtolower($activityReward));
         $this->getActivityReward($activityReward);
     }
     //if
 }
 public function __construct()
 {
     $this->LOG = Config::getLogObject();
     if (func_num_args()) {
         $userID = func_get_arg(0);
         if (is_numeric($userID)) {
             $this->getUserBanK($userID);
         }
     }
     //if
 }
 public function getVenue($venueID, $returnFormat = "xml", $authentication = false)
 {
     $url = $this->FOURSQUARE_APIS['VENUE'] . "." . $returnFormat;
     $url .= "?vid=" . $venueID;
     if (Config::getDebug()) {
         Config::getLogObject()->log("{$url}", PEAR_LOG_INFO);
     }
     $curl = @curl_init($url);
     curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
     $result = @curl_exec($curl);
     @curl_close($curl);
     echo $result;
 }
Example #6
0
   Date:  September 13,2010
   Purpose: retrive user friends from go_userFriends table 
      if operation = friends
      if operation = invites will instead
      retrieve open invites from go_inviteDetails
   modified October 19,2010 by Julio H Miyares
   added search betsquare users feature 
   currently searches will hit an isam version of go_users named go_users_search

*/
include '.gobasicdefines.php';
$include_path = ini_get('include_path');
ini_set('include_path', INI_PATH . ':' . $include_path);
require_once 'config.class.php';
require_once 'goutility.class.php';
$LOG = Config::getLogObject();
$userID = $_GET['userid'];
$query = $_GET['query'];
$operation = $_GET['operation'];
$querySort = $_GET['sort'];
//default if empty
if (empty($operation)) {
    $operation = 'friends';
}
/* verify have enough to continue - set defaults for missing parameters as long as they are not
   mandatory
*/
if (!isset($userID)) {
    mydie("paramaters not complete");
}
$params['userid'] = $userID;
 public static function login($userName, $password)
 {
     $userID = 0;
     $link = mysqli_connect(Config::getDatabaseServer(), Config::getDatabaseUser(), Config::getDatabasePassword(), Config::getDatabase());
     if (!$link) {
         mydie("Error connecting to Database");
     }
     $sql = sprintf("select userID from go_user where userName='******' and password='******'", mysqli_real_escape_string($link, $userName), mysqli_real_escape_string($link, $password));
     if (Config::getDebug()) {
         Config::getLogObject()->log("{$sql}", PEAR_LOG_INFO);
     }
     $cursor = @mysqli_query($link, $sql);
     if (!$cursor) {
         $this->mydie(mysqli_error($link) . " executing sql %sql", $link);
     }
     $row = @mysqli_fetch_assoc($cursor);
     if ($row) {
         $userID = $row['userID'];
     }
     $cursor->close();
     $link->close();
     if (Config::getDebug()) {
         Config::getLogObject()->log("Value of userID = {$userID}");
     }
     return $userID;
 }
 public function __construct()
 {
     $this->games = array();
     $this->publicGames = array();
     $this->LOG = Config::getLogObject();
 }
Example #9
0
 public static function getTeamIDOrTeamName($param, $type = 'id')
 {
     $LOG = Config::getLogObject();
     $link = mysqli_connect(Config::getDatabaseServer(), Config::getDatabaseUser(), Config::getDatabasePassword(), Config::getDatabase());
     if (!$link) {
         // Server error
         // mydie("Error connecting to Database");
         return GAMEON_ERROR;
     }
     if ($type == 'id') {
         $sql = sprintf("select * from go_teams_lu where id='%u'", mysqli_real_escape_string($link, $param));
     } else {
         $sql = sprintf("select * from go_teams_lu where teamName='%s'", mysqli_real_escape_string($link, $param));
     }
     if (Config::getDebug()) {
         $LOG->log("{$sql}", PEAR_LOG_INFO);
     }
     $cursor = mysqli_query($link, $sql);
     if ($cursor) {
         $row = mysqli_fetch_assoc($cursor);
         $rv = GAMEON_OK . GAMEON_DELIMITER . ($type == 'id' ? 'teamname' . GAMEON_DELIMITER . $row['teamName'] : 'teamid' . GAMEON_DELIMITER . $row['id']);
     } else {
         $rv = GAMEON_NORECORD;
     }
     if (isset($cursor)) {
         $cursor->close();
     }
     if (isset($link)) {
         $link->close();
     }
     return $rv;
 }