function rss_header_logininfo($showLoginBox = true) { $ret = "<div id=\"loginfo\">\n"; if (rss_user_level() > RSS_USER_LEVEL_NOLEVEL) { $ret .= sprintf(__('Logged in as <strong>%s</strong>'), rss_user_name()) . " | <a href=\"" . getPath() . "?logout\">" . __('Logout') . "</a>\n"; } else { if (true == $showLoginBox) { $ret .= __('Not logged in') . " | <a href=\"#\" onclick=\"miniloginform(); return false;\">" . __('Login') . "</a>"; $ret .= "<div style=\"display:none\" id=\"loginformcontainer\">" . '<form ' . 'onsubmit="return loginHandler();" ' . 'method="post" action="' . getPath() . '">' . '<div style="display:inline"><input style=" width:50px;" name="username" id="username" type="text" /></div>' . '<div style="display:inline"><input style=" width:50px;" name="password" id="password" type="password" /></div>' . '<div style="display:inline"><input type="submit" value="' . __('Login') . '" /></div>' . '</form>' . "</div>\n"; } } $ret .= "</div>\n"; return $ret; }
function rss_user_check_user_level($level) { return rss_user_level() >= $level; }