Example #1
0
/**
 * Checks if there is an authenticated user
 */
function fs_authenticated()
{
    return fs_get_current_user() !== null;
}
Example #2
0
<?php 
global $fs_hide_support_button;
if (!isset($fs_hide_support_button)) {
    ?>
		<span class='normal_font' style='float:<?php 
    H_END();
    ?>
;margin:10px;'>
		<button class="button" onclick="FS.openDonationWindow()">
			<?php 
    fs_e('Support FireStats');
    ?>
		</button>
		<br/>
		<?php 
    $user = fs_get_current_user();
    if (isset($user->logged_in) && $user->logged_in) {
        ?>
		<button class="button" onclick="sendRequest('action=logout')">
			<?php 
        fs_e('Log out');
        ?>
		</button>
		<?php 
    }
    ?>
		</span>
	<?php 
}
$home = FS_HOMEPAGE;
echo "<a style='border-bottom: 0px' href='{$home}'><img alt='" . fs_r('FireStats') . "' src='" . fs_url("img/firestats-header.png") . "'/></a>";