<?php
/*
Simple:Press Forum
In Line Login
$LastChangedDate: 2010-02-11 10:08:11 -0700 (Thu, 11 Feb 2010) $
$Rev: 3472 $
*/

if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) {
	die('Access Denied');
}

function sf_render_inline_login_form()
{
	$user_login = '';
	$user_pass = '';
	$using_cookie = false;

	$sflogin = sf_get_option('sflogin');

	$redirect_to = $_SERVER['REQUEST_URI'];

   	$out = '<br />'."\n";
   	$out.= '<div id="sfloginform"><fieldset>'."\n";
    $out.= '<form name="loginform" id="loginform" action="'.$sflogin['sfloginurl'].'" method="post">'."\n";

    $sfrpx = sf_get_option('sfrpx');
    if ($sfrpx['sfrpxenable'])
    {
        $out.= spf_rpx_loginform('sfloginform', '100%', true);
    }

	$out.= '<p><label for="log">'.__("Username:", "sforum").'&nbsp;<input type="text" class="sfcontrol" tabindex="84" name="log" id="log" value="'.esc_attr($user_login).'" size="11" /></label></p>'."\n";
	$out.= '<p><label for="login_password">'.__("Password:", "sforum").'&nbsp;<input type="password" class="sfcontrol" tabindex="85" name="pwd" id="login_password" value="" size="11" /></label></p>'."\n";
	$out.= '<p><input type="checkbox" tabindex="86" id="rememberme" name="rememberme" value="forever" /><label for="rememberme">&nbsp;'.__("Remember me", "sforum").'</label></p>';
	$out.= '<div class="sfclear"></div>';
	$out.= '<p><input type="submit" class="sfcontrol" name="submit" id="submit" value="'.__("Login", "sforum").'" tabindex="87" /></p>'."\n";
	$out.= '<input type="hidden" name="redirect_to" value="'.esc_attr($redirect_to).'" />'."\n";
	$out.= '</form>'."\n";
	$out.= '<br /><p><a href="'.$sflogin['sflostpassurl'].'">'.esc_attr(__('Lost Your Password', "sforum")).'?</a></p>'."\n";

   	$out.= '</fieldset></div>'."\n";
	$out.= '<div class="sfclear"></div>';
	return $out;
}

?>