[Openfirst-cvscommit] SF.net SVN: openfirst: [232] trunk/src
Brought to you by:
xtimg
From: <ast...@us...> - 2007-06-24 02:31:22
|
Revision: 232 http://svn.sourceforge.net/openfirst/?rev=232&view=rev Author: astronouth7303 Date: 2007-06-23 19:31:24 -0700 (Sat, 23 Jun 2007) Log Message: ----------- Added basic "user bar". Login/logout now accessable. Modified Paths: -------------- trunk/src/login.php trunk/src/logout.php trunk/src/style/headers.php trunk/src/style/style.css Modified: trunk/src/login.php =================================================================== --- trunk/src/login.php 2007-06-24 02:30:56 UTC (rev 231) +++ trunk/src/login.php 2007-06-24 02:31:24 UTC (rev 232) @@ -28,14 +28,26 @@ // Purpose: Log users in include_once("includes/globals.php"); + +if (isset($_REQUEST['return'])) + $_POST['return'] = $_REQUEST['return']; + include_once($ogHeader); - ?> <h1>User Log In</h1> <?php -ofShowLogin(); +if ($ogUser->isLoggedIn()) { +?> + <p>You have successfully logged in!</p> + + <p>Return to the <a href="<?php echo htmlentities(@$_REQUEST['return']); ?>">previous page</a>.</p> +<?php +} else { + ofShowLogin(); +} include_once($ogFooter); +# vim:set expandtab tabwidth=2 : ?> Modified: trunk/src/logout.php =================================================================== --- trunk/src/logout.php 2007-06-24 02:30:56 UTC (rev 231) +++ trunk/src/logout.php 2007-06-24 02:31:24 UTC (rev 232) @@ -35,7 +35,8 @@ ?> <h1>User Log Out</h1> <p>You are now logged out.</p> - +<p>Return to the <a href="<?php echo htmlentities(@$_REQUEST['return']); ?>">previous page</a>.</p> <?php include_once($ogFooter); +# vim:set expandtab tabwidth=2 : ?> Modified: trunk/src/style/headers.php =================================================================== --- trunk/src/style/headers.php 2007-06-24 02:30:56 UTC (rev 231) +++ trunk/src/style/headers.php 2007-06-24 02:31:24 UTC (rev 232) @@ -115,17 +115,22 @@ } ?> </td> - <td class="right" style="color: #333333;"> + <td class="right userbar" style="color: #333333;"> <?php - - // Check if messenger module has activated usersonline option then echo value - if(isset($usersonline)){ - echo htmlentities($usersonline); - } else { - echo "Welcome to the <b>".htmlentities($ogSiteTitle)."</b> website!"; - } - +#echo "Welcome to the <b>".htmlentities($ogSiteTitle)."</b> website!"; +if ($ogUser->isLoggedIn()) { + $icon = $ogUser->isAdmin() ? "/icons/user_suit.png" : "/icons/user.png"; ?> + <img src="<?php echo htmlentities($ogStylePath.$icon); ?>" /> + <a href="#"><?php echo htmlentities($ogUser->getName()); ?></a> | + <a href="<?php echo htmlentities($ogBasePath."/logout.php?return=".urlencode($_SERVER['REQUEST_URI'])); ?>">Log out</a> +<?php +} else { +?> + <a href="<?php echo htmlentities($ogBasePath."/login.php?return=".urlencode($_SERVER['REQUEST_URI'])); ?>">Log in</a> +<?php +} +?> </td> </tr> </table></td> @@ -153,4 +158,5 @@ unset($ogBasePath); } +# vim:set expandtab tabwidth=2 : ?> Modified: trunk/src/style/style.css =================================================================== --- trunk/src/style/style.css 2007-06-24 02:30:56 UTC (rev 231) +++ trunk/src/style/style.css 2007-06-24 02:31:24 UTC (rev 232) @@ -314,4 +314,8 @@ .big, .big * { font-size: large; -} \ No newline at end of file +} + +.userbar img { + vertical-align: middle; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |