Ejemplo n.º 1
0
    header("location: " . Config::getErrorPage() . "/" . "user_not_found");
    exit;
}
echo '<form name="input" action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
echo '<div id="personal">';
echo "<h2>User {$userName} - you have ID of {$userID}</h2>";
echo 'First Name: <input type="textbox" name="bsfirstname" value="' . $userSettings->getFirstName() . '" />';
echo 'Last Name: <input type="textbox" name="bslastname" value="' . $userSettings->getLastName() . '" />';
echo 'Email: <input type="textbox" name="bsemail" value="' . $userSettings->getEmail() . '" />';
echo '<input type="submit" name="bsupdateuser" value="Update" />';
echo "</div></br>";
echo "</form>";
echo '<div id="socialnetwork">';
echo "<h3>Facebook:";
echo 'ID: <input type="textbox" name="facebookid" value="' . $userSettings->getFacebookUserID() . '" />';
echo '<input type="textbox" name="facebookoauthtoken" value="' . $userSettings->getFacebookOAuthToken() . '" />';
echo '<input type="textbox" name="facebookoauthtokensecret" value="' . $userSettings->getFacebookOAuthTokenSecret() . '" />';
echo 'Image URL: <input type="textbox" name="facebookimageurl" value="' . $userSettings->getFacebookProfileImageUrl() . '"/></h3>';
echo '<h3>Twitter:';
echo 'ID: <input type="textbox" name="twitterid" value="' . $userSettings->getTwitterUserID() . '" />';
echo '<input type="textbox" name="twitteroauthtoken" value="' . $userSettings->getTwitterOAuthToken() . '" />';
echo '<input type="textbox" name="twitteroauthtokensecret" value="' . $userSettings->getTwitterOAuthTokenSecret() . '" /';
echo 'Image Url: <input type="textbox" name="twittermageurl" value="' . $userSettings->getTwitterProfileImageUrl() . '" /></h3>';
echo '<h3>FourSquare:';
echo 'ID: <input type="textbox" name="foursquareid" value="' . $userSettings->getFoursquareUserID() . '" />';
echo '<input type="textbox" name="foursquareoauthtoken" value="' . $userSettings->getFoursquareOAuthToken() . '" />';
echo '<input type="textbox" name="foursquareoauthtokensecret" value="' . $userSettings->getFoursquareOAuthTokenSecret() . '" />';
echo 'Image Url: <input type="textbox" name="foursquareimageurl" value="' . $userSettings->getFoursquareProfileImageUrl() . '" /></h3>';
echo "</div></br>";
include 'gofooter.php';
ob_end_flush();
Ejemplo n.º 2
0
    mydie(mysqli_error($link), 500, $link);
}
/* Assume Team Sport - drop record by initiator into go_gameSubscriber_Team table */
$sql = sprintf("insert into go_gameSubscribers_Team (gameID,publicGameID, userID, initiatorFlag, position,teamID, teamName) values ('%s','%u','%u',1,1,'%u','%s')", mysqli_real_escape_string($link, $gameID), mysqli_real_escape_string($link, $publicGameID), mysqli_real_escape_string($link, $createdByUserID), mysqli_real_escape_string($link, $teamID), mysqli_real_escape_string($link, $teamName));
if (Config::getDebug()) {
    $LOG->log("{$sql}", PEAR_LOG_INFO);
}
$rc = mysqli_query($link, $sql);
if (!$rc) {
    // Server error
    header('HTTP/1.1 500 Internal Server Error');
    mydie(mysqli_error($link), 500, $link);
}
insertGameInvites($link, $gameID, $gameInviteKey, $subscriptionClose, $createdByUserID, $createdByUserName, $gameInvitees);
//Twitter syndication
$twitter = new EpiTwitter(Config::getTwitterConsumerKey(), Config::getTwitterConsumerKeySecret(), $userSettings->getTwitterOAuthToken(), $userSettings->getTwitterOAuthTokenSecret());
if ($twitter) {
    $response = $twitter->post_statusesUpdate(array('status' => $title . " " . $syndicationUrl));
    if (Config::getDebug()) {
        $LOG->log("{$response}", PEAR_LOG_INFO);
    }
}
header('HTTP/1.1 200 OK');
$link->close();
/* Close Database */
//return xml
Utility::emitXML("", "insert_game", 0);
Utility::emitXML("200", "status_code");
Utility::emitXML("ok", "status_message");
Utility::emitXML("{$gameID}", "gameid");
Utility::emitXML("", "insert_game", 0);