Location: PHPKode > projects > NedEngine > nedengine-0.4/includes/applets/login.inc.php
<?php
/*****************************************************************************
* NedEngine (c) René Gabriëls 2002                                           *
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                           *
* This program is free software. You can redistribute it and/or modify       *
* it under the terms of the GNU General Public License as published by       *
* the Free Software Foundation; either version 2 of the License.             *
* -------------------------------------------------------------------------- *
* Vertical login applet                                                      *
*****************************************************************************/

// If the user is logged in -> display some links
if ($session->logged_in ()) {
	echo "<table class='appletwidth' cellspacing='1' cellpadding='0'>\n";
	echo "  <tr><td class='applettitle'>" . _LANG_PROFILE_ . "</td></tr>\n";
	echo "  <tr>\n";
    echo "    <td class='appletcontent'>\n";
	echo "      <table border='0' cellspacing='0' cellpadding='0' width='100%'>\n";
	echo "        <tr><td class='appletentry'>" . str_replace ("%u", "<b>" . $session->username . "</b>", _LANG_LOGIN_AS_) . "</a><br><br></td></tr>\n";
	echo "        <tr><td class='appletentry'> <b>&middot;</b> <a href='" . $config->site_url . "site/logout.php'>" . _LANG_LOGOUT_ . "</a></td></tr>\n";
	echo "        <tr><td class='appletentry'> <b>&middot;</b> <a href='" . $config->site_url . "site/editprofile.php'>" . _LANG_PROFILE_EDIT_ . "</a></td></tr>\n";
	echo "        <tr><td class='appletentry'> <b>&middot;</b> <a href='" . $config->site_url . "site/session.php'>" . _LANG_SESSION_OVERVIEW_ . "</a></td></tr>\n";
	echo "      </table>\n";
	echo "    </td>\n";
	echo "  </tr>\n";
	echo "</table>\n";
}
// If user is not logged in yet -> display login form
else {
	echo "<table class='appletwidth' cellspacing='1' cellpadding='0'>\n";
	echo "  <tr><td class='applettitle'>" . _LANG_LOGIN_ . "</td></tr>\n";
	echo "  <tr>\n";
	echo "    <td class='appletcontent'>\n";
	echo "     <form action='" . $config->site_url . "site/login.php' method='post'>\n";
	echo "     <input type='hidden' name='login_form_submitted' value='1'>\n";
	echo "      <table border='0' cellspacing='0' cellpadding='0' width='100%'>\n";
	echo "        <tr><td class='appletentry'>" . _LANG_USERNAME_ . ":</td></tr>\n";
	echo "        <tr><td class='appletentry'><input type='text' name='username' size='18'></td></tr>\n";
	echo "        <tr><td class='appletentry'>" . _LANG_PASSWORD_ . ":</td></tr>\n";
	echo "        <tr><td class='appletentry'><input type='password' name='password' size='18'></td></tr>\n";
	echo "        <tr><td class='appletentry'><input type='submit' value='inloggen'></td></tr>\n";
	echo "        <tr><td class='appletentry'>" . _LANG_NO_ACCOUNT_YET_ . " <a href='" . $config->site_url . "site/register.php'>" . _LANG_REGISTER_ . "</a></td></tr>\n";
	echo "      </table>\n";
	echo "     </form>\n";
	echo "    </td>\n";
	echo "  </tr>\n";
	echo "</table>\n";
}
?>
Return current item: NedEngine