/**
 * Generates the Login URL if needed
 */
if (!$login) {
    $loginURL = $trackmania->getLoginURL(SCOPE);
} else {
    $logoutURL = $trackmania->getLogoutURL();
}
/**
 * Gets the current URL. The OAuth class can do that...
 */
$currentURL = $trackmania->getCurrentURI();
/**
 * Retrieves the posts list
 */
$posts = $guestbook->getPosts($page);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> 
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>TrackMania Web Services SDK for PHP - Guestbook example</title>
		<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/start/jquery-ui.css" type="text/css" media="all" />
		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" ></script>
		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js" ></script>
		<style type="text/css">
			input.text { width:80%; padding: 6px; }
			#guestbook { font-size: 13px; width: 500px; margin: 20px 0; }
			#guestbook .post, #guestbook  .header { padding: 10px; margin: 5px 0; }
			#guestbook .post p { margin: 2px; }
			#guestbook .post .ui-priority-secondary { font-size: 11px; text-align: right; }