<?php
// Including the session, session stores user data and calls for it throughout the site //
include("include/session.php");
// Get the current username, used throughout the page for personalization of the site to the current user //
$username = $session->username;
// Trim the username for use by req_user //
$req_user = trim($session->username);
/* Display requested user information */
$req_user_info = $database->getUserInfo($req_user);
// Calls the user cookie bin //
$sql = mysql_query("SELECT * FROM `users_cookie_bin` WHERE username = '$username'");
$row = mysql_fetch_row($sql);
// $page is just used to identify
$page = "home";
// End of user cookie bin call //
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><!-- Start header -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><!-- Charicter set -->
<title>Adult Baby Comforts</title><!-- Remember to make the title dynamic to page -->
<style type="text/css" media="all">@import "stylesheet.css";</style><!-- Stylesheet import -->
</head><!-- End header -->
<body><!-- Start outputting the body -->
<div id="page_container"><!-- The page container for the entire page -->
<div id="header"><!-- Page header -->
<!-- Header image called by css -->
</div><!-- End of "header"-->
<div id="navagation"><!-- Main navagation bar -->
<!-- Navagation Links -->
<span class="nav_link"><a href="">Home</a></span>
<span class="nav_link"><a href="">Support</a></span>
<span class="nav_link"><a href="">Forum</a></span>
<span class="nav_link"><a href="">Blogs</a></span>
<span class="nav_link"><a href="">Chat</a></span>
<span class="nav_link"><a href="">Stories</a></span>
<span class="nav_link"><a href="">Tips</a></span>
<span class="nav_link"><a href="">Gallery</a></span>
<!-- Search button -->
<div class="search_box_area"><!-- Box that contains the search bar -->
<div class="search-cont"><!-- Box that contains the textfeald and button -->
<form action="" method="post"><!-- Search form, rember to link to the search page -->
<span class="search-textbox"><!-- Container for the text feild -->
<!-- Search text feild, label is hidden with css -->
<label>Search</label><input type="text" name="search_box" id="search-textfield" />
</span>
<span class="search-btn_cont"><!-- Container for the search button -->
<!-- Seach submit button, javascript used change the rollover effect of the image -->
<input type="submit" value="" style="cursor: pointer" class="search_btn" onmouseover="this.className='search_btn_hover'" onmouseout="this.className='search_btn'" alt="search" /></form>
</span>
</div><!-- End of "search-cont" -->
</div><!-- End of "search_box_area" -->
</div><!-- End of "navagation" -->
<div id="page_main"><!-- box element that keeps the sidebar and main body areas grouped together -->
<div id="sidebar"><!-- The side bar block, for user cp and contribue blocks -->
<?php
///User Control Panel///
include("classies/home/usercp.php");
///contrib///
include("classies/home/contrib.php");
///chatting time///
include("classies/home/chat_time.php");
?>
</div><!-- End of "sidebar" -->
<div id="content"><!-- This is the main text body of the page -->
<?php
// Call the required table //
$sql = "SELECT `id`, `page_id`, `title`, `body` FROM `articles` WHERE `page_id` = 'home' GROUP BY `id`";
// Preparing the results for use //
$result = mysql_query($sql) or die("Sorry there seems to be a problem with the database");
// Outputting the results //
if(mysql_num_rows($result))
{
while($row = mysql_fetch_array($result))
{
// Printing out the results, "main_block" is the CSS styling //
printf( "<div class=\"main_block\"><h3>%s" . "</h3>%s" . "</div>", $row["title"], $row["body"]);
}
}
else
{
// This displays if we find no results //
printf("<div class=\"main_block\"><h3>Nought</h3><p>Sorry there are no results here</p></div>");
}
// End of the output //
?>
</div><!-- End of "content" -->
</div><!-- End of "page_main" -->
<div id="footer"><!-- The page footer -->
<div class="footer_text"><!-- Contains the footer text -->
<span class="footer_left">
<a href="">Links</a> | <a href="">About</a> | <a href="">Contact Us</a> | <a href="">Site Map</a> | <a href="">FAQ</a>
</span>
<span class="footer_right">
<a href="">Report a Issue</a> | <a href="">Request a Feature</a>
</span>
</div><!-- End of "footer_text" -->
</div><!-- End of "footer" -->
</div><!-- End of "page_container" -->
</body>
</html>