예제 #1
0
			a{text-decoration:none;color:inherit;}
			a img{border:none;margin:2px;}
			a:hover{color:#C1C1C1;}
			.status_online{color:#5BC34F;}
			.status_offline{color:#B60012;}
			body{text-align:center;color:#FFF;font:13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;line-height:18px;background:#000 url(img/default-bg.jpg) no-repeat scroll center top;}
			.game-box{min-height:130px;text-align:center;-moz-border-radius:3px;float:right;color:#F2F2F2;background:transparent url(img/transparent.png) repeat scroll 0 0;min-width:250px;border:1px solid #FFF;padding:5px;margin:1px;}
		</style>
	</head>
	
	<body>
		<?php 
#echo "<pre>";
#print_r($steam->getGames());
#echo "</pre>";
echo "<h1>{$steam->getFriendlyName()} plays:</h1><br />";
foreach ($steam->getGames() as $game) {
    echo "<div class=\"left game-box\">";
    echo $game['name'] . "<br />";
    echo "<a href=\"{$game['storeLink']} title=\"Link to {$game['name']} in the store\"><img src=\"{$game['logo']}\" /></a><br />";
    if ($game['hoursLast2Weeks'] != 0) {
        echo "Play time for the last 2 weeks: {$game['hoursLast2Weeks']}<br />";
    }
    if ($game['hoursOnRecord'] != 0) {
        echo "Overall play time: {$game['hoursOnRecord']}<br />";
    }
    echo "</div>";
}
echo "<div class=\"clear\"></div>";
echo "<h2>In total they have {$steam->getTotalGames()} games.</h2>";
?>
예제 #2
0
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<style type="text/css">
			.right{float:right;}
			.left{float:left;}
			.clear{clear:both;}
			a{text-decoration:none;color:inherit;}
			a img{border:none;margin:2px;}
			a:hover{color:#C1C1C1;}
			.status_online{color:#5BC34F;}
			.status_offline{color:#B60012;}
			body{font:13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;line-height:18px;background:#000 url(img/default-bg.jpg) no-repeat scroll center top;}
			.id-box{text-align:center;-moz-border-radius:3px;float:right;color:#F2F2F2;background:transparent url(img/transparent.png) repeat scroll 0 0;min-width:250px;border:1px solid #FFF;padding:5px;}
		</style>
	</head>
	
	<body>
		<div class="id-box">
		<?php 
echo "<img class=\"avatar left\" src=\"{$steam->getAvatarMedium()}\" />";
echo "<a href=\"{$steam->baseUrl()}\">{$steam->getFriendlyName()}</a>&nbsp;";
if ($steam->onlineState() != "offline") {
    echo "<img src=\"img/status_online.png\" title=\"User is online\" /> <br /> <span class=\"status_online\">{$steam->getStateMessage()}</span><br />";
} else {
    echo "<img src=\"img/status_offline.png\" title=\"User is offline\" /> <br /> <span class=\"status_offline\">Offline<br />{$steam->getStateMessage()}</span><br />";
}
echo "<a class=\"right\" href=\"steam://friends/message/{$steam->getSteamID64()}\"><img src=\"img/sendmsg.png\" title=\"Send Message\" /></a>\n\t\t\t\t\t<a class=\"right\" href=\"steam://friends/add/{$steam->getSteamID64()}\"><img src=\"img/befriend.png\" title=\"Befriend User \" /></a>";
?>
		</div>
	</body>
</html>