[Astrospaces-commits] SF.net SVN: astrospaces: [9] trunk
Brought to you by:
p3net
From: <p3...@us...> - 2007-03-15 03:23:08
|
Revision: 9 http://astrospaces.svn.sourceforge.net/astrospaces/?rev=9&view=rev Author: p3net Date: 2007-03-14 20:23:04 -0700 (Wed, 14 Mar 2007) Log Message: ----------- -Edit profile function -Create a TODO so I can remember what I need to do -See the TODO to find out: --Need to create a space.tpl (anyone wanna help?) --Need to create a edit_profile.tpl (any takers?) Modified Paths: -------------- trunk/includes/profile.php trunk/install/install.php trunk/profile.php trunk/space.php trunk/styles/default/outer.tpl Modified: trunk/includes/profile.php =================================================================== --- trunk/includes/profile.php 2007-03-13 02:20:58 UTC (rev 8) +++ trunk/includes/profile.php 2007-03-15 03:23:04 UTC (rev 9) @@ -20,7 +20,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * -* ID: ID: $Id: $ +* ID: $Id: $ * Author: $Author$ ******************************************************************************/ class profile() @@ -127,5 +127,45 @@ header('location: profile.php?mode=login'); } } + function edit() + { + //Make sure we are logged in + if(!login_check) + { + redirect("profile.php?mode=register"); + } + //Get all of our profile information + $_query="SELECT " . DB_USERS . ".*, " . DB_SPACES . ".* FROM " . DB_USERS . + " JOIN " . DB_SPACES . " ON " . DB_USERS . ".id = " . DB_SPACES . ".id;"; + + $_query=$db->query($_query); + $_query=$db->array($_query); + + //Time to TPL assign! + $page =& new template('edit_profile.tpl'); + $outer =& new template('outer.tpl'); + + $page->set('username', $_query["username"]); + $page->set('aim', $_query["aim"]); + $page->set('msn', $_query["msn"]); + $page->set('irc', $_query["irc"]); + $page->set('icq', $_query["icq"]); + $page->set('yahoo', $_query["yahoo"]); + $page->set('website', $_query["website"]); + $page->set('theme', $_query["themes"]); + + //Theme list + $_themes="SELECT * FROM " . DB_THEMES; + $_themes=$db->query($_themes); + + $i=0; + while($temp==$db->array($_themes)) + { + $themes[$i]=$temp["name"]; + } + $page->set('themes', $themes); + + $outer->set('content', $page); + } } ?> \ No newline at end of file Modified: trunk/install/install.php =================================================================== --- trunk/install/install.php 2007-03-13 02:20:58 UTC (rev 8) +++ trunk/install/install.php 2007-03-15 03:23:04 UTC (rev 9) @@ -80,7 +80,7 @@ `aim` text, `msn` text, `irc` text, - `irc` text, + `icq` text, `yahoo` text, `website` text, `theme` text, Modified: trunk/profile.php =================================================================== --- trunk/profile.php 2007-03-13 02:20:58 UTC (rev 8) +++ trunk/profile.php 2007-03-15 03:23:04 UTC (rev 9) @@ -59,5 +59,8 @@ case 'logout': $profile->logout(); break; + case 'edit': + $profile->edit(); + break; } ?> \ No newline at end of file Modified: trunk/space.php =================================================================== --- trunk/space.php 2007-03-13 02:20:58 UTC (rev 8) +++ trunk/space.php 2007-03-15 03:23:04 UTC (rev 9) @@ -154,5 +154,4 @@ // ///That's all, folks! // $Id :$ -?> ?> \ No newline at end of file Modified: trunk/styles/default/outer.tpl =================================================================== --- trunk/styles/default/outer.tpl 2007-03-13 02:20:58 UTC (rev 8) +++ trunk/styles/default/outer.tpl 2007-03-15 03:23:04 UTC (rev 9) @@ -19,6 +19,7 @@ <!--Auth'd Only--> <?php if($level>-1) { ?> <a href="profile.php?mode=logout">Logout</a> + <a href="space.php">View Your Space</a> <?php } ?> <!--/Auth'd Only--> <!--Admin--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |