<?php

$template_matrix = array(
							array('index',				'webpage'),
							array('comments',			'webpage'),
							array('comment_preview',	'webpage'),
							array('trackbacks',			'webpage'),
							array('referrers',			'webpage'),
							array('smileys',			'webpage'),
							array('site_css',			'css')
						);


if ( ! isset($type))
	$type = 'core';

//-------------------------------------
//	Stylesheet template
//-------------------------------------

function site_css()
{
	global $type;

ob_start();
?>
body {
	font-family: verdana, arial, sans-serif;
	font-size:11px;
	margin: 0px 0px 0px 0px;
	background-color: #0099CC;
	background-attachment: fixed;
	background-image: url({site_url}themes/site_themes/blue_essense/blue_essense_bg.jpg);
	background-repeat: repeat-x;
	}

h1 	{
	font-family: Trebuchet MS, verdana, arial, sans-serif;
	font-size:32px;
	font-weight: normal;
	}

h2, h3, h4
	{
	font-family: Trebuchet MS, verdana, arial, sans-serif;
	font-weight: normal;
	}

A 		{ color: #0099CC; font-family: verdana, arial, sans-serif; font-size:11px; text-decoration: none; font-weight:normal;}
A:link		{ color: #0099CC; text-decoration: none; }
A:visited	{ color: #0099CC; text-decoration: none;  }
A:active	{ color: #99CC33; text-decoration: none;  }
A:hover		{ color: #99CC33; text-decoration: underline; }


#mainframe {

	width:750px;
	height: 100%;
	margin-right:auto;
	margin-left:auto;
	padding:0px;
	padding-bottom: 20px;
	text-align:left;
	background-color: #FFFFFF;
	background-image: url({site_url}themes/site_themes/blue_essense/blue_essense_top.jpg);
	background-repeat: no-repeat;
	}

#contentleft {

	width:225px;
	float:left;
	margin-left:20px;
	margin-top: 110px;
	border: 0px solid #000000;
	}

#title h1{

	float: right;
	margin-right: 40px;
	margin-top: 20px;
	color: #FFFFFF;
	}


#contentright {

	width:420px;
	float:right;
	margin-right:20px;
	margin-top: 80px;
	border: 0px solid #000000;
	}



.blog {
	font-family: verdana, arial, sans-serif;
	color:#1C2427;
	font-size:11px;
	font-weight:normal;
	text-align:left;
	line-height:140%;
	margin-bottom: 10px;
	margin-top: 2px;
	padding-left: 10px;
	padding-right: 10px;

	}

.title	{
	font-family: Trebuchet MS, verdana, arial, sans-serif;
	font-size: 18px;
	font-weight:normal;
	text-align: right;
	padding-bottom: 5px;
	color: #0099CC;
	border-bottom: 2px dotted #99CC33;
	}



.date {
	font-family: Trebuchet MS, verdana, arial, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color:#006699;
	text-align: left;
	margin-top:10px;
	}

.posted	{
	font-family:verdana, arial, sans-serif;
	font-size: 11px;
	color: #1C2427;
	margin-bottom:15px;
	text-align: center;
	font-weight: normal;
	padding-top: 5px;
	border-top: 2px dotted #99CC33;
	}

.sidetitle
	{
	font-size: 16px;
	margin-bottom: 5px;
	padding-bottom: 5px;
	color: #006699;
	border-bottom: 2px dotted #99CC33;
	text-align: left;
	}

.side {
	font-family:verdana, arial, sans-serif;
	color: #1C2427;
	font-size:11px;
	font-weight:normal;
	line-height:140%;
	padding: 10px;
	background-color: transparent;

	}

ul, li
	{
	list-style: disc;
	color: #99CC66;
	}

.row1 {
	font-family: verdana, arial, sans-serif;
	color:#000000;
	font-size:11px;
	font-weight:normal;
	text-align:left;
	line-height:140%;
	background-color: #99CC66;

	}

.row2 {
	font-family: verdana, arial, sans-serif;
	color:#000000;
	font-size:11px;
	font-weight:normal;
	text-align:left;
	line-height:140%;
	background-color: #FFFFFF;

	}

.calendarBG
	{
	background-color: #E0E0E0;
	}

.calendarBlank
	{
	background-color: #FFFFFF;
	}

.calendarHeader
	{
	font-weight: bold;
	color: #0099CC;
	text-align: center;
	background-color: #FFFFFF;
	}

.comments {
	font-family: verdana, arial, sans-serif;
	color: #000000;
	font-size:11px;
	font-weight:normal;
	background-color:#0099CC;
	line-height:140%;
	padding:10px;
	border:1px solid #000000;
	margin:10px;
	text-align:left;
	background-image: url({site_url}themes/site_themes/blue_essense/blue_essense_bgl.jpg);
	background-repeat: repeat-x;

	}


.big-title
	{
	font-family: Trebuchet MS, verdana, arial, sans-serif;
	font-size: 18px;
	font-weight:normal;
	text-align: right;
	color: #0099CC;
	border-bottom: 2px dotted #99CC33;
	}

.paginate
	{
	font-family: verdana, arial, sans-serif;
	font-size: 10px;
	font-weight:normal;
	text-align:center;
	color: #000000;
	}

input, option, textarea, select {
	color: #000000;
	background-color: #EDEDED;
	border: 1px solid #000000;
	font-size: 11px;
	font-family: verdana, arial, sans-serif;

	}

blockquote {
	background-color: #0099CC;
	color: #FFFFFF;
	padding: 10px;
	margin: 10px;
	border: 1px solid #000000;
}
<?php

$buffer = ob_get_contents();
ob_end_clean();
return $buffer;

}
// END



//-------------------------------------
//	Weblog index template
//-------------------------------------

function index()
{
	global $type;

ob_start();
?>
{assign_variable:my_weblog="default_site"}
{assign_variable:my_template_group="site"}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}</title>
<meta http-equiv="Content-Type" content="text/html; charset={charset}" />

<link rel='stylesheet' type='text/css' media='all' href='{stylesheet={my_template_group}/site_css}' />
<style type='text/css' media='screen'>@import "{stylesheet={my_template_group}/site_css}";</style>

</head>

<body>

<div id="mainframe">

<div id="title"><h1>Blue Essense</h1></div>

<div id="contentleft">

<h2 class="sidetitle">About This Site</h2>

<p>
Ingenium nulla olim nisl tincidunt appellatio minim nisl interdico luptatum proprius molior sino sit antehabeo. Haero duis luptatum fatua ille virtus minim rusticus augue.
</p>

<h2 class="sidetitle">Navigation</h2>

<p>
<a href="{homepage}">Home</a> | {encode="{webmaster_email}" title="Contact"}
</p>


<?php if ($type != 'core') { ?>
<h2 class="sidetitle">Members</h2>
<p>
{if logged_in}
 <a href="{path=member/profile}">Your Account</a>  | <a href="{path=logout}">Logout</a>
{/if}

{if logged_out}
 <a href="{path=member/login}">Login</a>  | <a href="{path=member/register}">Register</a>
{/if}

| <a href="{path=member/memberlist}">Member List</a>
</p>
<?php } ?>



{exp:search:simple_form search_in="everywhere"}
<h2 class="sidetitle">Search</h2>
<p>
<input type="text" name="keywords" value="" class="input" size="18" maxlength="100" />
<br />
<a href="{path=search/index}">Advanced Search</a>
</p>

<p><input type="submit" value="submit"  class="submit" /></p>

{/exp:search:simple_form}


<h2 class="sidetitle">Calendar</h2>



{exp:weblog:calendar switch="calendarToday|calendarCell"}

<table class="calendarBG" border="0" cellpadding="5" cellspacing="1" summary="My Calendar">
<tr>
<th class="calendarHeader"><div class="calendarMonthLinks"><a href="{previous_path={my_template_group}/index}">&lt;&lt;</a></div></th>
<th class="calendarHeader" colspan="5">{date format="%F %Y"}</th>
<th class="calendarHeader"><div class="calendarMonthLinks"><a class="calendarMonthLinks" href="{next_path={my_template_group}/index}">&gt;&gt;</a></div></th>
</tr>
<tr>
{calendar_heading}
<td class="calendarDayHeading">{lang:weekday_abrev}</td>
{/calendar_heading}
</tr>
{calendar_rows }
{row_start}<tr>{/row_start}
{if entries}<td class='{switch}' align='center'><a href="{day_path={my_template_group}/index}">{day_number}</a></td>{/if}
{if not_entries}<td class='{switch}' align='center'>{day_number}</td>{/if}
{if blank}<td class='calendarBlank'>&nbsp;</td>{/if}
{row_end}</tr>{/row_end}
{/calendar_rows}
</table>
{/exp:weblog:calendar}




<h2 class="sidetitle">Categories</h2>

{exp:weblog:categories weblog="{my_weblog}" style="nested"}
<a href="{path={my_template_group}/index}">{category_name}</a>
{/exp:weblog:categories}


<h2 class="sidetitle">Monthly Archives</h2>
<ul>
{exp:weblog:month_links weblog="{my_weblog}"}
<li><a href="{path={my_template_group}/index}">{month} {year}</a></li>
{/exp:weblog:month_links}
</ul>


<h2 class="sidetitle">Most recent entries</h2>
<ul>
{exp:weblog:entries orderby="date" sort="desc" limit="15" weblog="{my_weblog}" dynamic="off"}
<li><a href="{title_permalink={my_template_group}/comments}">{title}</a></li>
{/exp:weblog:entries}
</ul>


<h2 class="sidetitle">Syndicate</h2>
<ul>
<li><a href="{path={my_template_group}/rss_2.0}">RSS 2.0</a></li>
<li><a href="{path={my_template_group}/atom}">Atom</a></li>
</ul>

<?php if ($type != 'core') { ?>
<h2 class="sidetitle">Join our Mailing List</h2>
{exp:mailinglist:form}
<p><input type="text" name="email" value="" class="input" size="18" /></p>
<p><input type="submit" value="submit"  class="submit" /></p>
{/exp:mailinglist:form}
<?php } ?>



<h2 class="sidetitle">Site Statistics</h2>
<p>
This page has been viewed {hits} times<br />
Page rendered in {elapsed_time} seconds<br />
{total_queries} queries executed<br />
Debug mode is {debug_mode}<br />

{exp:stats}
Total Entries: {total_entries}<br />
Total Comments: {total_comments}<br />
Total Trackbacks: {total_trackbacks}<br />
Most Recent Entry: {last_entry_date format="%m/%d/%Y %h:%i %a"}<br />
Most Recent Comment on:  {last_comment_date format="%m/%d/%Y %h:%i %a"}<br />
Total Members: {total_members}<br />
Total Logged in members: {total_logged_in}<br />
Total guests: {total_guests}<br />
Total anonymous users: {total_anon}<br />
Most Recent Visitor on:  {last_visitor_date format="%m/%d/%Y %h:%i %a"}<br />
The most visitors ever was {most_visitors} on  {most_visitor_date format="%m/%d/%Y %h:%i %a"}
</p>

{if member_names}
<p>Current Logged-in Members:&nbsp;
{member_names  backspace='6'}
<a href="{member_path=member/index}">{name}</a>&nbsp;
{/member_names}
</p>
{/if}

{/exp:stats}
</p>


<p><a href="{path={my_template_group}/referrers}">Referrers</a></p>


<h2 class="sidetitle">Site Credits</h2>

<p>Powered by:<br /><a href="http://www.pmachine.com/">ExpressionEngine</a></p>

<p>Design by:<br /><a href="http://www.blogmoxie.com/">BlogMoxie</a></p>



</div> <!-- end contentleft -->


<div id="contentright">


{exp:weblog:category_heading weblog="{my_weblog}"}
<h1>{category_name}</h1>
{if category_description}
<p>{category_description}</p>
{/if}
{/exp:weblog:category_heading}


{exp:weblog:entries weblog="{my_weblog}" orderby="date" sort="desc" limit="15"}

{date_heading}
<div class="date">{entry_date format=' %l, %F %d, %Y '}</div>
{/date_heading}

<div class="title">{title}</div>
{summary}

{body}

{extended}

<div class="posted">Posted by <?php if ($type != 'core') { ?>{author}<?php } else { ?><a href="{profile_path=member/index}">{author}</a><?php } ?>  on {entry_date format='%m/%d'} at {entry_date format='%h:%i %A'}

<br />

{categories}
<a href="{path=site_index}">{category_name}</a> &#8226;
{/categories}

{if allow_comments}
({comment_total}) <a href="{url_title_path="{my_template_group}/comments"}">Comments</a> &#8226;
{/if}

{if allow_trackbacks}
({trackback_total}) <a href="{trackback_path="{my_template_group}/trackbacks"}">Trackbacks</a> &#8226;
{/if}
<a href="{title_permalink={my_template_group}/comments}">Permalink</a>

</div>

{paginate}
<div class="paginate">
<span class="pagecount">Page {current_page} of {total_pages} pages</span>  {pagination_links}
</div>
{/paginate}

{/exp:weblog:entries}


</div> <!-- end contentright -->

 <div style="clear: both;"></div>

</div><!-- mainframe -->


</body>
</html>
<?php

$buffer = ob_get_contents();
ob_end_clean();
return $buffer;

}
// END






//-------------------------------------
// Comments
//-------------------------------------

function comments()
{
	global $type;

ob_start();
?>
{assign_variable:my_weblog="default_site"}
{assign_variable:my_template_group="site"}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}</title>
<meta http-equiv="Content-Type" content="text/html; charset={charset}" />

<link rel='stylesheet' type='text/css' media='all' href='{stylesheet={my_template_group}/site_css}' />
<style type='text/css' media='screen'>@import "{stylesheet={my_template_group}/site_css}";</style>

</head>

<body>

<div id="mainframe">

<div id="title"><h1>Blue Essense</h1></div>

<div id="contentleft">

<h2 class="sidetitle">Navigation</h2>

<p>
<a href="{homepage}">Home</a> | {encode="{webmaster_email}" title="Contact"}
</p>


<?php if ($type != 'core') { ?>
<h2 class="sidetitle">Members</h2>
<p>
{if logged_in}
 <a href="{path=member/profile}">Your Account</a>  | <a href="{path=logout}">Logout</a>
{/if}

{if logged_out}
 <a href="{path=member/login}">Login</a>  | <a href="{path=member/register}">Register</a>
{/if}

| <a href="{path=member/memberlist}">Member List</a>
</p>
<?php } ?>



<h2 class="sidetitle">Categories</h2>

{exp:weblog:categories weblog="{my_weblog}" style="nested"}
<a href="{path={my_template_group}/index}">{category_name}</a>
{/exp:weblog:categories}


<h2 class="sidetitle">Monthly Archives</h2>
<ul>
{exp:weblog:month_links weblog="{my_weblog}"}
<li><a href="{path={my_template_group}/index}">{month} {year}</a></li>
{/exp:weblog:month_links}
</ul>


<h2 class="sidetitle">Most recent entries</h2>
<ul>
{exp:weblog:entries orderby="date" sort="desc" limit="15" weblog="{my_weblog}" dynamic="off"}
<li><a href="{title_permalink={my_template_group}/comments}">{title}</a></li>
{/exp:weblog:entries}
</ul>


<h2 class="sidetitle">Syndicate</h2>
<ul>
<li><a href="{path={my_template_group}/rss_2.0}">RSS 2.0</a></li>
<li><a href="{path={my_template_group}/atom}">Atom</a></li>
</ul>


<h2 class="sidetitle">Site Credits</h2>

<p>Powered by:<br /><a href="http://www.pmachine.com/">ExpressionEngine</a></p>

<p>Design by:<br /><a href="http://www.blogmoxie.com/">BlogMoxie</a></p>

</div> <!-- end contentleft -->


<div id="contentright">

<div>

{exp:weblog:next_entry weblog="{my_weblog}"}
<p>Next entry: <a href="{path={my_template_group}/comments}">{title}</a></p>
{/exp:weblog:next_entry}

{exp:weblog:prev_entry weblog="{my_weblog}"}
<p>Previous entry: <a href="{path={my_template_group}/comments}">{title}</a></p>
{/exp:weblog:prev_entry}

</div>

{exp:weblog:entries limit="1"}

<div class="title">{title}</div>
{summary}

{body}

{extended}

<div class="posted">Posted by <?php if ($type != 'core') { ?>{author}<?php } else { ?><a href="{profile_path=member/index}">{author}</a><?php } ?>  on {entry_date format='%m/%d'} at {entry_date format='%h:%i %A'}

<br />

{categories}
<a href="{path=site_index}">{category_name}</a> &#8226;
{/categories}

{if allow_comments}
({comment_total}) <a href="{url_title_path="{my_template_group}/comments"}">Comments</a> &#8226;
{/if}

{if allow_trackbacks}
({trackback_total}) <a href="{trackback_path="{my_template_group}/trackbacks"}">Trackbacks</a> &#8226;
{/if}
<a href="{title_permalink={my_template_group}/comments}">Permalink</a>

</div>

{/exp:weblog:entries}


{exp:comment:entries weblog="{my_weblog}" limit="25"}

<div class="comments">
{comment}

<div class="posted">Posted by {url_or_email_as_author}  &nbsp;on&nbsp; {comment_date format='%m/%d'} &nbsp;at&nbsp; {comment_date format='%h:%i %A'}</div></li>
</div>

{paginate}
<div class="paginate">
<span class="pagecount">Page {current_page} of {total_pages} pages</span>  {pagination_links}
</div>
{/paginate}

{/exp:comment:entries}


<div class="comments">
{exp:comment:form preview="{my_template_group}/comment_preview"}

{if logged_out}
<p>
Name:<br />
<input type="text" name="name" value="{name}" size="50" />
</p>
<p>
Email:<br />
<input type="text" name="email" value="{email}" size="50" />
</p>
<p>
Location:<br />
<input type="text" name="location" value="{location}" size="50" />
</p>
<p>
URL:<br />
<input type="text" name="url" value="{url}" size="50" />
</p>

{/if}

<p>
<a href="{path={my_template_group}/smileys}" onclick="window.open(this.href, '_blank', 'width=400,height=440');return false;" onkeypress="this.onclick()">Smileys</a>
</p>


<p>
<textarea name="comment" cols="50" rows="12">{comment}</textarea>
</p>

{if logged_out}
<p><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information</p>
{/if}

<p><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</p>

{if captcha}
<p>Submit the word you see below:</p>
<p>
{captcha}
<br />
<input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" />
</p>
{/if}

<p><input type="submit" name="submit" value="Submit" />
<input type="submit" name="preview" value="Preview" /></p>

{/exp:comment:form}
</div>


</div> <!-- end contentright -->

<div style="clear: both;"></div>

</div><!-- mainframe -->


</body>
</html>

<?php

$buffer = ob_get_contents();
ob_end_clean();
return $buffer;

}
// END




//-------------------------------------
//	Comment preview
//-------------------------------------

function comment_preview()
{
	global $type;

ob_start();
?>
{assign_variable:my_weblog="default_site"}
{assign_variable:my_template_group="site"}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}</title>
<meta http-equiv="Content-Type" content="text/html; charset={charset}" />

<link rel='stylesheet' type='text/css' media='all' href='{stylesheet={my_template_group}/site_css}' />
<style type='text/css' media='screen'>@import "{stylesheet={my_template_group}/site_css}";</style>

</head>

<body>

<div id="mainframe">

<div id="title"><h1>Blue Essense</h1></div>

<div id="contentleft">

<h2 class="sidetitle">Navigation</h2>

<p>
<a href="{homepage}">Home</a> |  {encode="{webmaster_email}" title="Contact"}
</p>


<?php if ($type != 'core') { ?>
<h2 class="sidetitle">Members</h2>
<p>
{if logged_in}
 <a href="{path=member/profile}">Your Account</a>  | <a href="{path=logout}">Logout</a>
{/if}

{if logged_out}
 <a href="{path=member/login}">Login</a>  | <a href="{path=member/register}">Register</a>
{/if}

| <a href="{path=member/memberlist}">Member List</a>
</p>
<?php } ?>



<h2 class="sidetitle">Categories</h2>

{exp:weblog:categories weblog="{my_weblog}" style="nested"}
<a href="{path={my_template_group}/index}">{category_name}</a>
{/exp:weblog:categories}


<h2 class="sidetitle">Monthly Archives</h2>
<ul>
{exp:weblog:month_links weblog="{my_weblog}"}
<li><a href="{path={my_template_group}/index}">{month} {year}</a></li>
{/exp:weblog:month_links}
</ul>


<h2 class="sidetitle">Most recent entries</h2>
<ul>
{exp:weblog:entries orderby="date" sort="desc" limit="15" weblog="{my_weblog}" dynamic="off"}
<li><a href="{title_permalink={my_template_group}/comments}">{title}</a></li>
{/exp:weblog:entries}
</ul>


<h2 class="sidetitle">Syndicate</h2>
<ul>
<li><a href="{path={my_template_group}/rss_2.0}">RSS 2.0</a></li>
<li><a href="{path={my_template_group}/atom}">Atom</a></li>
</ul>



<h2 class="sidetitle">Site Credits</h2>

<p>Powered by:<br /><a href="http://www.pmachine.com/">ExpressionEngine</a></p>

<p>Design by:<br /><a href="http://www.blogmoxie.com/">BlogMoxie</a></p>



</div> <!-- end contentleft -->


<div id="contentright">


<div class="comments">
{exp:comment:preview}
{comment}
{/exp:comment:preview}
</div>


<div class="comments">
{exp:comment:form preview="{my_template_group}/comment_preview"}

{if logged_out}
<p>
Name:<br />
<input type="text" name="name" value="{name}" size="50" />
</p>
<p>
Email:<br />
<input type="text" name="email" value="{email}" size="50" />
</p>
<p>
Location:<br />
<input type="text" name="location" value="{location}" size="50" />
</p>
<p>
URL:<br />
<input type="text" name="url" value="{url}" size="50" />
</p>

{/if}

<p>
<a href="{path={my_template_group}/smileys}" onclick="window.open(this.href, '_blank', 'width=400,height=440');return false;" onkeypress="this.onclick()">Smileys</a>
</p>


<p>
<textarea name="comment" cols="50" rows="12">{comment}</textarea>
</p>

{if logged_out}
<p><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information</p>
{/if}

<p><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</p>

{if captcha}
<p>Submit the word you see below:</p>
<p>
{captcha}
<br />
<input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" />
</p>
{/if}

<input type="submit" name="submit" value="Submit" />
<input type="submit" name="preview" value="Preview" />

{/exp:comment:form}
</div>


</div> <!-- end contentright -->

 <div style="clear: both;"></div>

</div><!-- mainframe -->

</body>
</html>
<?php

$buffer = ob_get_contents();
ob_end_clean();
return $buffer;

}
// END





//-------------------------------------
//	Trackbacks
//-------------------------------------

function trackbacks()
{
	global $type;

ob_start();
?>
{assign_variable:my_weblog="default_site"}
{assign_variable:my_template_group="site"}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}</title>
<meta http-equiv="Content-Type" content="text/html; charset={charset}" />

<link rel='stylesheet' type='text/css' media='all' href='{stylesheet={my_template_group}/site_css}' />
<style type='text/css' media='screen'>@import "{stylesheet={my_template_group}/site_css}";</style>

</head>

<body>


<div id="mainframe">

<div id="title"><h1>Blue Essense</h1></div>

<div id="contentleft">

<h2 class="sidetitle">Navigation</h2>

<p>
<a href="{homepage}">Home</a> | {encode="{webmaster_email}" title="Contact"}
</p>



<?php if ($type != 'core') { ?>
<h2 class="sidetitle">Members</h2>
<p>
{if logged_in}
 <a href="{path=member/profile}">Your Account</a>  | <a href="{path=logout}">Logout</a>
{/if}

{if logged_out}
 <a href="{path=member/login}">Login</a>  | <a href="{path=member/register}">Register</a>
{/if}

| <a href="{path=member/memberlist}">Member List</a>
</p>
<?php } ?>


<h2 class="sidetitle">Categories</h2>

{exp:weblog:categories weblog="{my_weblog}" style="nested"}
<a href="{path={my_template_group}/index}">{category_name}</a>
{/exp:weblog:categories}


<h2 class="sidetitle">Monthly Archives</h2>
<ul>
{exp:weblog:month_links weblog="{my_weblog}"}
<li><a href="{path={my_template_group}/index}">{month} {year}</a></li>
{/exp:weblog:month_links}
</ul>


<h2 class="sidetitle">Most recent entries</h2>
<ul>
{exp:weblog:entries orderby="date" sort="desc" limit="15" weblog="{my_weblog}" dynamic="off"}
<li><a href="{title_permalink={my_template_group}/comments}">{title}</a></li>
{/exp:weblog:entries}
</ul>


<h2 class="sidetitle">Syndicate</h2>
<ul>
<li><a href="{path={my_template_group}/rss_2.0}">RSS 2.0</a></li>
<li><a href="{path={my_template_group}/atom}">Atom</a></li>
</ul>



<h2 class="sidetitle">Site Credits</h2>

<p>Powered by:<br /><a href="http://www.pmachine.com/">ExpressionEngine</a></p>

<p>Design by:<br /><a href="http://www.blogmoxie.com/">BlogMoxie</a></p>



</div> <!-- end contentleft -->


<div id="contentright">


<h2 class="title">The trackback URL for this entry is:</h2>

<form action="">
<p>
<input type="text" value="{exp:trackback:url}" size="60" class="input" />
</p>
</form>


<h2 class="title">Trackbacks:</h2>

{exp:trackback:entries}

{if no_results}
<p>There are no trackbacks for this entry.</p>
{/if}

<div class="comments">

<h2 class="title">{title}</h2>

{content}

<div class="posted">Tracked on: <a href="{trackback_url}">{weblog_name}</a> ({trackback_ip}) at {trackback_date format="%Y %m %d %H:%i:%s"}</div>
</div>
{/exp:trackback:entries}


</div> <!-- end contentright -->

 <div style="clear: both;"></div>

</div><!-- mainframe -->


</body>
</html>

<?php

$buffer = ob_get_contents();
ob_end_clean();
return $buffer;

}
// END







//-------------------------------------
//	Smileys
//-------------------------------------

function smileys()
{
	global $type;

ob_start();
?>
<!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="{lang}" lang="{lang}">
<head>
<meta http-equiv="content-type" content="text/html; charset={charset}" />
<title>Smileys</title>

<style type="text/css">

body {
 background-color: #ffffff;
 margin-left: 40px;
 margin-right: 40px;
 margin-top: 30px;
 font-size: 11px;
 font-family: verdana,trebuchet,sans-serif;
}
a:link {
 color: #990000;
 font-size: 11px;
 font-weight: normal;
 text-decoration: underline;
}
a:visited {
 color: #990000;
 font-size: 11px;
 font-weight: normal;
 text-decoration: underline;
}
a:active {
 color: #990000;
 font-size: 11px;
 font-weight: normal;
 text-decoration: underline;
}
a:hover {
 color: #990000;
 font-size: 11px;
 font-weight: normal;
 text-decoration: none;
}

</style>

<script language="javascript">
<!--

function add_smiley(smiley)
{
    opener.document.comment_form.comment.value += " " + smiley + " ";
    opener.window.document.comment_form.comment.focus();
    window.close();
}
//-->
</script>


</head>
<body>

<p>Click on an image to add it to your comment</p>

<table border="0" width="100%" cellpadding="6" cellspacing="1">

{exp:emoticon columns="4"}
<tr>
<td><div>{smiley}</div></td>
</tr>
{/exp:emoticon}

</table>

</body>
</html>
<?php

$buffer = ob_get_contents();
ob_end_clean();
return $buffer;

}
// END


//-------------------------------------
//	Default referrers
//-------------------------------------

function referrers()
{
	global $type;

ob_start();
?>
<!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="{lang}" lang="{lang}">

<head>
<meta http-equiv="content-type" content="text/html; charset={charset}" />
<title>Referrers</title>

<style type="text/css">

body {
 background-color: #ffffff;
 margin-left: 40px;
 margin-right: 40px;
 margin-top: 30px;
 font-size: 11px;
 font-family: verdana,trebuchet,sans-serif;
}
h4 {
 font-size: 14px;
 font-family: verdana,trebuchet,sans-serif;
}
a:link {
 color: #990000;
 font-size: 11px;
 font-weight: normal;
 text-decoration: underline;
}
a:visited {
 color: #990000;
 font-size: 11px;
 font-weight: normal;
 text-decoration: underline;
}
a:active {
 color: #990000;
 font-size: 11px;
 font-weight: normal;
 text-decoration: underline;
}
a:hover {
 color: #990000;
 font-size: 11px;
 font-weight: normal;
 text-decoration: none;
}

</style>

</head>
<body>

<h4>Referrers</h4>

<table border="0" width="100%" cellpadding="6" cellspacing="1">
<tr>
<td>From</td>
<td>To</td>
<td>IP Address</td>
<td>Date</td>
</tr>

{exp:referrer limit="50" popup="yes"}
<tr class="row">
<td><div>{ref_from}</div></td>
<td><div>{ref_to}</div></td>
<td><div>{ref_ip}</div></td>
<td><div>{ref_date format="%m/%d/%Y"}</div></td>
</tr>
{/exp:referrer}

</table>

</body>
</html>
<?php

$buffer = ob_get_contents();
ob_end_clean();
return $buffer;

}
// END
?>