Location: PHPKode > projects > Mummi (Multi-user MOD_MP3 Interface) > mummi.0.6/htroot/home.php
<?
// Setting the title of the page
$GLOBALS[page_title] = "Users Homepage";

// Include files
include "common.php";
include "$GLOBALS[lib_path]/user_db.inc";
include "$GLOBALS[lib_path]/design.inc";

// user the userdb class
$udb = new USER_DB;
$udb->connect("$GLOBALS[dbhost]","$GLOBALS[dbusername]","$GLOBALS[dbuserpassword]","$GLOBALS[dbname]");

// Set the user navbars.
if(!$HTTP_COOKIE_VARS[login_active]) $nav_array = array(main);
elseif($os->num_rows("SELECT user_name FROM users WHERE user_name='$session_array[user_name]' AND user_type='1'")) $nav_array = array_merge($GLOBALS[admin_navbox_array], $os->get_navbox_array($session_array[user_name]));
else $nav_array = array_merge($GLOBALS[basic_navbox_array], $os->get_navbox_array($session_array[user_name]));
// ============================================================================


// Gathering information on the user so it can be used on this page
$userdata_array = $udb->get_user_info($session_array[user_name]);

// setting local variables
$user_id = $userdata_array[id];
$user_name = $userdata_array[user_name];
$user_realname = '';
$user_created = date("F dS, Y - g:i:s A",$userdata_array[created]);
$user_modified = date("F dS, Y - g:i:s A",$userdata_array[modified]);


// Starting the page contents
$GLOBALS[contents00] = <<<ENDcontents00
	<font face="$GLOBALS[body_font_face]" size="$GLOBALS[body_font_size]">
		Welcome, $session_array[user_name], to your personal start page.  Listed below is some information about
		your account on this server.</font><br><br>

		<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
			<td width="50%" align="left" valign="top">

ENDcontents00;


// Filling the left side of the table
// ============================================================================

$basic_account_info = <<<ENDbasic_account_info
					<table cellpadding="1" cellspacing="1" border="0"><tr>
						<td>UserID:&nbsp;</td>
						<td>$user_id&nbsp;</td>
						<td>&nbsp;</td>
					</tr><tr>
						<td>User Name&nbsp;</td>
						<td>&nbsp;$user_name&nbsp;</td>
						<td>&nbsp;</td>
					</tr><tr>
						<td>Created On:&nbsp;</td>
						<td>$user_created</td>
					</tr><tr>
						<td>Modified:&nbsp;</td>
						<td>$user_modified</td>
					</tr></table>
ENDbasic_account_info;
$GLOBALS[contents00] .= draw_innerbox($title="Basic Account Information", $basic_account_info) . "<br>\n";





// ============================================================================
// adding the correct table endings
$GLOBALS[contents00] .= "</td><td width=\"1\">&nbsp;</td><td width=\"50%\" align=\"right\" valign=\"top\">";



$quick_search = <<<ENDquick_search
					<table cellpadding="1" cellspacing="1" border="0"><tr>
						<td>Search For:&nbsp;</td>
						<td><center>(text box here)</center></td>
					</tr></table>
ENDquick_search;
$GLOBALS[contents00] .= draw_innerbox($title="Quick Search", $quick_search) . "<br>\n";


// adding the correct table endings
$GLOBALS[contents00] .= "</td></tr></table>";



// Final Step.. Output the page to the user.
$contents = array("Welcome $session_array[user_name]"=>"$GLOBALS[contents00]");
draw_header("$GLOBALS[page_title]");
draw_nav($nav_array);
draw_sect($contents);
draw_footer();
ob_end_flush();
?>
Return current item: Mummi (Multi-user MOD_MP3 Interface)