Example #1
0
    <style>
        .table {
            table-layout: fixed;
            word-wrap: break-word;
        }
    </style>
  </head>
  <body style="background-color: #EEE;">
    <div class="container" style="margin-top: 30px; margin-bottom: 30px; padding-bottom: 10px; background-color: #FFF;">
		<h1>SteamAuth Demo</h1>
		<span class="small pull-left" style="padding-right: 10px;">for SteamAuth 2.3</span>
		<hr>
		<?php 
if (!isset($_SESSION['steamid'])) {
    echo "<div style='margin: 30px auto; text-align: center;'>Welcome Guest! Please log in!";
    echo steamlogin();
    echo "</div>";
} else {
    include 'steamauth/userInfo.php';
    echo "<div style='float:left;'><a href='https://github.com/SmItH197/SteamAuthentication'><button type='button' class='btn btn-success' style='margin: 2px 3px;'>GitHub Repo</button></a><a href='https://github.com/SmItH197/SteamAuthentication/releases'><button type='button' style='margin: 2px 3px;' class='btn btn-warning'>Download</button></a></div><br><br>\n\t<h4 style='margin-bottom: 3px; float:left;'>Steam WebAPI-Output:</h4><span style='float:right;'><a href='steamauth/logout.php'>Log out</a></span>\n\t<table class='table table-striped'><tr><td><b>Variable name</b></td><td><b>Value</b></td><td><b>Description</b></td></tr>\n\t<tr><td>\$steamprofile['steamid']</td><td>" . $steamprofile['steamid'] . "</td><td>SteamID64 of the user</td></tr>\n\t<tr><td>\$steamprofile['communityvisibilitystate']</td><td>" . $steamprofile['communityvisibilitystate'] . "</td><td>1 - Account not visible; 3 - Account is public (Depends on the relationship of your account to the others)</td></tr>\n\t<tr><td>\$steamprofile['profilestate']</td><td>" . $steamprofile['profilestate'] . "</td><td>1 - The user has a Steam Community profile; 0 - if not</td></tr>\n\t<tr><td>\$steamprofile['personaname']</td><td>" . $steamprofile['personaname'] . "</td><td>Public name of the user</td></tr>\n\t<tr><td>\$steamprofile['lastlogoff']</td><td>" . $steamprofile['lastlogoff'] . "</td><td><a href='http://www.unixtimestamp.com/' target='_blank'>Unix timestamp</a> of the user's last logoff</td></tr>\n\t<tr><td>\$steamprofile['profileurl']</td><td>" . $steamprofile['profileurl'] . "</td><td>Link to the user's profile</td></tr>\n\t<tr><td>\$steamprofile['personastate']</td><td>" . $steamprofile['personastate'] . "</td><td>0 - Offline, 1 - Online, 2 - Busy, 3 - Away, 4 - Snooze, 5 - looking to trade, 6 - looking to play</td></tr>\n\t<tr><td>\$steamprofile['realname']</td><td>" . $steamprofile['realname'] . "</td><td>\"Real\" name</td></tr>\n\t<tr><td>\$steamprofile['primaryclanid']</td><td>" . $steamprofile['primaryclanid'] . "</td><td>The ID of the user's primary group</td></tr>\n\t<tr><td>\$steamprofile['timecreated']</td><td>" . $steamprofile['timecreated'] . "</td><td><a href='http://www.unixtimestamp.com/' target='_blank'>Unix timestamp</a> for the time the user's account was created</td></tr>\n\t<tr><td>\$steamprofile['avatar']</td><td><img src='" . $steamprofile['avatar'] . "'><br>" . $steamprofile['avatar'] . "</td><td>Adress of the user's 32x32px avatar</td></tr>\n\t<tr><td>\$steamprofile['avatarmedium']</td><td style=''><img src='" . $steamprofile['avatarmedium'] . "'><br>" . $steamprofile['avatarmedium'] . "</td><td>Adress of the user's 64x64px avatar</td></tr>\n\t<tr><td>\$steamprofile['avatarfull']</td><td><img src='" . $steamprofile['avatarfull'] . "'><br>" . $steamprofile['avatarfull'] . "</td><td>Adress of the user's 184x184px avatar</td></tr>\n\t</table>";
}
?>
	<hr>
	<div class="pull-right"><i>This page is powered by <a href="http://steampowered.com">Steam</a></i></div>
	<a href="https://github.com/SmItH197/SteamAuthentication">GitHub Repo</a><br>
	Demo page by <a href="https://github.com/blackcetha" target="_blank">BlackCetha</a></div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
  </body>
</html>
Example #2
0
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="js/noty/packaged/jquery.noty.packaged.min.js"></script>
	<script src="js/main.js"></script>
</head>
<body>
		<header id="header">
		<div style="  width: 1100px;  margin: auto;">
			<strong class="logo"><a href="/"><?php 
echo $title;
?>
</a></strong>	 
			<div style="float: right;">
				<?php 
if (!isset($_SESSION["steamid"])) {
    steamlogin();
    //echo '<div style="display: inline-block; margin: 35px 90px 0 0; color: #eee; font-size: 12pt;"><a href=en.php><img src=img/en.gif></a><a href=ru.php><img src=img/ru.gif></a></div>';
    echo "<a class=\"btns\">ВОЙТИ С ПОМОЩЬЮ </a>";
    echo "<a class=\"btn\" href=\"?login\">" . $msg[$lang]["login2"] . "</a>";
} else {
    //echo '<div style="display: inline-block; margin: 35px 90px 0 0; color: #eee; font-size: 12pt;"><a href=en.php><img src=img/en.gif></a><a href=ru.php><img src=img/ru.gif></a>    '.$msg[$lang]["loggedin"].' sf</div>';
    echo '<div style="display: inline-block; margin: 35px 110px 0 0; color: #eee; font-size: 12pt;">' . $msg[$lang]["loggedin"] . ' ' . $steamprofile['personaname'] . ' </div><div style="display: inline-block; position: absolute; margin-top: 28px; margin-left: -100px "><img src="' . $steamprofile['avatar'] . '"></div>';
    echo "<a class=\"btn\" href=\"steamauth/logout.php\">" . $msg[$lang]["logout"] . "</a>";
    mysql_query("UPDATE users SET name='" . $steamprofile['personaname'] . "', avatar='" . $steamprofile['avatarfull'] . "' WHERE steamid='" . $_SESSION["steamid"] . "'");
}
?>
    		</div>
		</div>
	    </header>
	<div id="wrapper">
			<div id="main">
 /**
  * @return string HTML
  */
 public function getLoginForm()
 {
     return steamlogin();
 }