function render_logged_out_index()
{
    $html = '<div class="fbconnect_title_wrapper">';
    $html .= '<h2>Login to this application using facebook</h2>';
    $html .= '</div>';
    if (is_fbconnect_enabled()) {
        $html .= '<div class="fbconnect_login">';
        $html .= render_fbconnect_button('medium');
        $html .= '</div>';
    }
    return $html;
}
Beispiel #2
0
        error_log("submitted a your account form for '" . $params['username'] . "' when user '" . $user->username . "' is logged in!");
        go_home();
    }
    $user->name = $params['name'];
    $user->email = $params['email'];
    if ($params['password'] != PASSWORD_PLACEHOLDER) {
        $user->password = $params['password'];
    }
    $user->save();
}
echo '<table class="account_table"><tr><td>';
echo '<h3>Account settings for <b>' . $user->getName() . '</b></h3>';
echo '<p>You can edit information about yourself here.</p>';
echo render_edit_user_table($user);
echo '</td><td>';
if (is_fbconnect_enabled()) {
    if ($user->is_facebook_user()) {
        // If a user has a password, then it means that they can log in independent of their Facebook
        // account. So they should be given the opportunity to Disconnect and maintain their account
        if ($user->hasPassword()) {
            echo '<h3>Connected To Facebook</h3>';
            echo '<p>Your account is linked with a Facebook account.</p>';
            echo '<a href="disconnect.php">Disconnect from Facebook</a>';
        }
    } else {
        echo '<h3>Connect with Facebook</h3>';
        echo '<p>Do you have a Facebook account? Connect it with The Run Around to share your information here, and see which of your friends are here.</p>';
        echo render_fbconnect_button('large');
    }
}
echo '</td></tr></table>';
Beispiel #3
0
function render_logged_out_index()
{
    $html = '<img src="http://www.somethingtoputhere.com/therunaround/images/runaround_image.jpg" class="welcome_img" />';
    $html .= '<div class="welcome_dialog">';
    $html .= '<h3>Welcome to the Run Around</h3>';
    $html .= '<p>This is a simple site where you can log your runs and chart progress on your ' . 'workout routine.</p>';
    $html .= '<div class="clearfix"><form action="login.php" method="post">' . '<div class="login_sector">' . '<div class="login_prompt"><b>Login</b>:</div>' . '<div class="clearfix"><label>Username:</label><input name="username" class="inputtext" type="text" size="20" value="" /></div> ' . '<div class="clearfix"><label>Password:</label><input name="password" class="inputtext" type="password" size="20" value=""/></div> ' . '<input id="submit" class="inputsubmit" value="Login" name="submit" type="submit" />' . '</div>';
    if (is_fbconnect_enabled()) {
        $html .= '<div class="login_sector_fb">';
        $html .= '<div class="login_prompt">Or <b>login</b> with Facebook:</div>';
        $html .= render_fbconnect_button('medium');
        $html .= '</div>';
    }
    $html .= '</form></div>';
    $html .= '<div class="signup_container"> ' . 'Don\'t have an account? <a href="register.php">Register Now!</a> ';
    $html .= '</div></div>';
    return $html;
}