<?php

$template_matrix = array(
							array('index',				'webpage'),
							array('archives',			'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 {
margin: 0px auto;
padding: 0;
background: #8E8E8E;
}

h1, h2, h3 {
font-family: georgia, times new roman, times, serif;
letter-spacing: 0em;
}

h1 {
font-weight: bold;
font-size: 150%;
font-family: georgia, times new roman, times, serif;
color: #9E0B0E;
}

p {
font-family: georgia, times new roman, times, serif;
}

blockquote {
font-family: trebuchet ms, verdana, arial, helvetica, sans-serif;
}

ul {
list-style: square;
margin-top: 3px;
margin-bottom: 3px;
margin-left: 1em;
padding-left: 1em;
}

li {
font-size: 100%;
font-family: georgia, times new roman, times, serif;
}

img {
margin: 0;
padding: 0;
border: 0;
}

a:link { background-color: transparent; text-decoration: none; color: #9D080D; }
a:visited { background-color: transparent; text-decoration: none; color: #9D080D; }
a:hover { background-color: #9D080D; text-decoration: none; color: #FFFFFF; }
a:active { background-color: #9D080D; text-decoration: none; color: #FFFFFF; }

#weblog {
margin: 0px auto;
padding-bottom: 10px;
width: 752px;
}

#header {
margin: 0px;
padding: 0px;
width: 752px;
height: 144px;
background-image: url({site_url}themes/site_themes/notebook/notebook_header.gif);
background-repeat: no-repeat;
}

#blogtitle {
float: left;
margin: 0px;
padding: 0px;
width: 383px;
text-align: left;
}

.blog_title {
margin: 35px 0px 0px 70px;
padding: 0px;
font-size: 170%;
font-weight: bold;
font-family: georgia, times new roman, times, serif;
letter-spacing: 0em;
}

#nav {
float: left;
margin: 12px 0px 0px 0px;
padding: 0px;
width: 360px;
background: transparent;
color: #FFF;
font-size: 10px;
font-family: Verdana, Arial, Helvetica, sans-serif;
text-align: center;
}

.navlink a:link { background-color: transparent; text-decoration: none; color: #FFF; }
.navlink a:visited { background-color: transparent; text-decoration: none; color: #FFF; }
.navlink a:hover { background-color: #9D080D; text-decoration: none; color: #FFF568; }
.navlink a:active { background-color: #9D080D; text-decoration: none; color: #FFF568; }

#content {
float: left;
margin: 0px;
padding: 10px 0px 0px 30px;
width: 752px;
background-image: url({site_url}themes/site_themes/notebook/notebook_pattern.gif);
background-repeat: repeat-y;
}

#blog {
float: left;
margin: 0px;
padding: 20px;
border: 1px solid #B4B4B4;
width: 440px;
background: #FFF;
color: #333;
font-size: 11px;
line-height: 19px;
text-align:  left;
}

#sidebar {
float: left;
margin: 0px;
padding: 0px 0px 0px 15px;
width: 190px;
color: #333;
font-size: 10px;
line-height: 19px;
text-align: left;
}

#stats {
float: left;
margin: 0;
padding: 0px;
text-align: center;
width: 752px;
background-image: url({site_url}themes/site_themes/notebook/notebook_pattern.gif);
background-repeat: repeat;
}

.stats_txt {
margin: 10;
padding: 0px;
color: #333;
font-size: 11px;
font-family: georgia, times new roman, times, serif;
line-height: 18px;
text-align: center;
}

#footer {
float: left;
margin: 0px;
padding: 0px 18px 0px 18px;
width: 752px;
height: 41px;
background-image: url({site_url}themes/site_themes/notebook/notebook_footer.gif);
background-repeat: no-repeat;
}

#b1tit_bg {
margin: 0px;
padding: 7px 0px 0px 15px;
width: 440px;
height: 33px;
background-image: url({site_url}themes/site_themes/notebook/notebook_title_bg.gif);
background-repeat: no-repeat;
}

#calendar {
margin: 0px;
padding: 40px 0px 0px 20px;
width: 188px;
height: 239px;
background-image: url({site_url}themes/site_themes/notebook/notebook_paper_bg.gif);
background-repeat: no-repeat;
}

.calendar_body {
margin: 0px;
padding: 0px;
}

.nameby {
width: 700px;
margin: 0px;
padding: 3px;
color: #FFF;
background: #E30B13;
font-size: 10px;
font-family: Verdana, Arial, Helvetica, sans-serif;
text-align: right;
}

.date {
font-size: 11px;
background: transparent;
color: #000;
letter-spacing: 1px;
}

.title {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #FFF;
line-height: 14px;
}

.posted {
margin-bottom: 30px;
font: 10px lucida grande, verdana, arial, helvetica, sans-serif;
background: transparent;
color: #666;
}

.sidetitle {
margin: 0px;
font-size: 12px;
font-weight: bold;
letter-spacing: 0.09em;
background: transparent;
color: #E65E6E;
}

.center {
text-align: center;
}

.imgicon {
	padding-left: 2px;
	padding-right: 2px;
	padding-top: 2px;
	padding-bottom: 2px;
	float: left;
	margin-right: 4px;
	display: block;
}

.spacer {
clear: both;
}

.paginate {
 font-family:		Verdana, Geneva, Tahoma, Trebuchet MS, Arial, Sans-serif;
 font-size:			12px;
 font-weight: 		normal;
 letter-spacing:	.1em;
 padding:			10px 6px 10px 4px;
 margin:			0;
 background-color:	transparent;
}

.pagecount {
 font-family:		Verdana, Geneva, Tahoma, Trebuchet MS, Arial, Sans-serif;
 font-size:			10px;
 color:				#666;
 font-weight:		normal;
 background-color: transparent;
}

.calendarBG {

}

.calendarBlank {

}

.calendarHeader {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-weight: bold;
 color: #fff;
 text-align: center;
 background-color: #000;
}

.calendarMonthLinks {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size:         10px;
 font-weight:		bold;
 letter-spacing:	.1em;
 text-decoration:   none;
 color:             #fff;
 background-color:  transparent;
}

.calendarMonthLinks a {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 color:             #fff;
 text-decoration:   none;
 background-color:  transparent;
}

.calendarMonthLinks a:visited {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 color:             #fff;
 text-decoration:   none;
 background-color:  transparent;
}

.calendarMonthLinks a:hover {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 color:             #ccc;
 text-decoration:   underline;
 background-color:  transparent;
}

.calendarDayHeading {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-weight: bold;
 font-size:	9px;
 color: #fff;
 background-color: #9D080D;
 text-align:  center;
 vertical-align: middle;
}

.calendarToday {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size:         9px;
 font-weight:		bold;
 letter-spacing:	.1em;
 text-decoration:   none;
 text-align:  center;
 vertical-align: middle;
 color:             #000;
 background-color: 	#FFCFCF;
}

.calendarCell {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size:         9px;
 font-weight:		bold;
 line-height: 11px;
 letter-spacing:	.1em;
 text-decoration:   none;
 text-align:  center;
 vertical-align: middle;
 color:             #666;
 background-color:  #fff;
}

.calendarCell a {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 color:             #000;
 text-decoration:   underline;
 background-color:  transparent;
}

.calendarCell a:visited {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 color:             #000;
 text-decoration:   underline;
 background-color:  transparent;
}

.calendarCell a:hover {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 color:             #E30B13;
 text-decoration:   none;
 background-color:  transparent;
}

.input {
border-top:        1px solid #999999;
border-left:       1px solid #999999;
background-color:  #fff;
color:             #000;
font-family:       Verdana, Geneva, Tahoma, Trebuchet MS, Arial, Sans-serif;
font-size:         11px;
height:            1.6em;
padding:           .3em 0 0 2px;
margin-top:        6px;
margin-bottom:     3px;
}

.textarea {
border-top:        1px solid #999999;
border-left:       1px solid #999999;
background-color:  #fff;
color:             #000;
font-family:       Verdana, Geneva, Tahoma, Trebuchet MS, Arial, Sans-serif;
font-size:         11px;
margin-top:        3px;
margin-bottom:     3px;
}

.checkbox {
background-color:  transparent;
margin:            3px;
padding:           0;
border:            0;
}

.submit {
background-color:  #fff;
font-family:       Arial, Verdana, Sans-serif;
font-size:         10px;
font-weight:       normal;
letter-spacing:    .1em;
padding:           1px 3px 1px 3px;
margin-top:        6px;
margin-bottom:     4px;
text-transform:    uppercase;
color:             #000;
}

.topmenu {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
color: #FFFFFF;
}

.f10 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}

.f11 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}

.dot_line {
border-bottom: 1px dotted #ED1C24;
}
<?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="weblog">
<div id="header">
<div id="blogtitle">
<div class="blog_title">{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}</div>
</div>

<div id="nav">
<span class="navlink">
<a href="{homepage}">Home</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="35" height="10" alt="" /><a href="#">About</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" alt="" width="28" height="10" /><a href="{path={my_template_group}/archives}">Archives</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="30" height="10" alt="" /><a href="#">Links</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="32" height="10" alt="" />{encode="{webmaster_email}" title="Contact"}
</span>
</div>
</div>

<div id="content">

<div id="blog">



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

<div class="main">

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

<div id="b1tit_bg"><div class="title">{title}</div></div>


{summary}
{body}
{extended}

<p class="f10">
Posted by <?php if ($type != 'core') { ?>{author}<?php } else { ?><a href="{profile_path=member/index}">{author}</a><?php } ?>  in
{categories}
&#8226; <a href="{path=site_index}">{category_name}</a>
{/categories}
<br />

{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>
</p>


{paginate}
<p class="f10">
<img src="{site_url}/themes/site_themes/notebook/notebook_thumbtack.gif" alt="" />Page {current_page} of {total_pages} pages {pagination_links}
</p>
{/paginate}

</div>
{/exp:weblog:entries}


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

</div>


<div id="sidebar">


<?php if ($type != 'core') { ?>
<p><b>Members:</b><br />

{if logged_out}
<a href="{path=member/login}">Login</a> |
<a href="{path=member/register}">Register</a> |
{/if}
{if logged_in}
<a href="{path=member/profile}">Your Account</a> |
<a href="{path=logout}">Logout</a> |
{/if}
<a href="{path=member/memberlist}">Member List</a>
</p>
<?php } ?>



<h2 class="sidetitle">About</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.</p>


<div id="calendar">
<div class="calendar_body">
{exp:weblog:calendar switch="calendarToday|calendarCell"}

<table class="calendarBG" border="0" cellpadding="3" 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}
</div>
</div>




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

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


<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>
<li><a href="{path={my_template_group}/referrers}">Referrers</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="text"  size="20" maxlength="100"  /><br />
<input type="submit" value="submit"  class="button" />
</p>
{/exp:mailinglist:form}
<?php } ?>






</div>
</div>

<div id="footer">
<div class="nameby">Content &copy; 2004 Your Name</div>
</div>

</div>
</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="weblog">
<div id="header">
<div id="blogtitle">
<div class="blog_title">{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}</div>
</div>

<div id="nav">
<span class="navlink">
<a href="{homepage}">Home</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="35" height="10" alt="" /><a href="#">About</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" alt="" width="28" height="10" /><a href="{path={my_template_group}/archives}">Archives</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="30" height="10" alt="" /><a href="#">Links</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="32" height="10" alt="" />{encode="{webmaster_email}" title="Contact"}
</span>
</div>
</div>

<div id="content">

<div id="blog">



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

<div class="main">

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

<div id="b1tit_bg"><div class="title">{title}</div></div>


{summary}
{body}
{extended}

<p class="f10">
Posted by <?php if ($type != 'core') { ?>{author}<?php } else { ?><a href="{profile_path=member/index}">{author}</a><?php } ?>  in
{categories}
&#8226; <a href="{path=site_index}">{category_name}</a>
{/categories}
<br />

{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>
</p>

</div>
{/exp:weblog:entries}



{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 class="dot_line"></div>


<ol>
{exp:comment:entries weblog="{my_weblog}" limit="25"}
<li>
{comment}
<div class="posted">{url_or_email_as_author}  &nbsp;on&nbsp; {comment_date format='%m/%d'} &nbsp;at&nbsp; {comment_date format='%h:%i %A'}</div>

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

</li>
{/exp:comment:entries}
</ol>


<div class="dot_line"></div>


{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" style="width:100%">{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}



<p><img src="{site_url}/images/more.gif" width="11" height="9" alt="" /><a href="index.php" class="f11">Back to main</a></p>


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

</div>



<div id="sidebar">

<?php if ($type != 'core') { ?>
<p><b>Members:</b><br />

{if logged_out}
<a href="{path=member/login}">Login</a> |
<a href="{path=member/register}">Register</a> |
{/if}
{if logged_in}
<a href="{path=member/profile}">Your Account</a> |
<a href="{path=logout}">Logout</a> |
{/if}
<a href="{path=member/memberlist}">Member List</a>
</p>
<?php } ?>


<h2 class="sidetitle">About</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.</p>


<div id="calendar">
<div class="calendar_body">
{exp:weblog:calendar switch="calendarToday|calendarCell"}

<table class="calendarBG" border="0" cellpadding="3" 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}
</div>
</div>




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

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


<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>
<li><a href="{path={my_template_group}/referrers}">Referrers</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="text"  size="20" maxlength="100"  /><br />
<input type="submit" value="submit"  class="button" />
</p>
{/exp:mailinglist:form}
<?php } ?>





</div>
</div>

<div id="footer">
<div class="nameby">Content &copy; 2004 Your Name</div>
</div>

</div>
</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="weblog">
<div id="header">
<div id="blogtitle">
<div class="blog_title">{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}</div>
</div>

<div id="nav">
<span class="navlink">
<a href="{homepage}">Home</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="35" height="10" alt="" /><a href="#">About</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" alt="" width="28" height="10" /><a href="{path={my_template_group}/archives}">Archives</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="30" height="10" alt="" /><a href="#">Links</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="32" height="10" alt="" />{encode="{webmaster_email}" title="Contact"}
</span>
</div>
</div>

<div id="content">

<div id="blog">



<div class="dot_line"></div>

{exp:comment:preview}
{comment}
{/exp:comment:preview}



<div class="dot_line"></div>




{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" style="width:100%">{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}



<p><img src="{site_url}/images/more.gif" width="11" height="9" alt="" /><a href="index.php" class="f11">Back to main</a></p>


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

</div>



<div id="sidebar">

<?php if ($type != 'core') { ?>
<p><b>Members:</b><br />

{if logged_out}
<a href="{path=member/login}">Login</a> |
<a href="{path=member/register}">Register</a> |
{/if}
{if logged_in}
<a href="{path=member/profile}">Your Account</a> |
<a href="{path=logout}">Logout</a> |
{/if}
<a href="{path=member/memberlist}">Member List</a>
</p>
<?php } ?>


<h2 class="sidetitle">About</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.</p>


<div id="calendar">
<div class="calendar_body">
{exp:weblog:calendar switch="calendarToday|calendarCell"}

<table class="calendarBG" border="0" cellpadding="3" 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}
</div>
</div>




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

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


<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>
<li><a href="{path={my_template_group}/referrers}">Referrers</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="text"  size="20" maxlength="100"  /><br />
<input type="submit" value="submit"  class="button" />
</p>
{/exp:mailinglist:form}
<?php } ?>





</div>
</div>

<div id="footer">
<div class="nameby">Content &copy; 2004 Your Name</div>
</div>

</div>
</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="weblog">
<div id="header">
<div id="blogtitle">
<div class="blog_title">{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}</div>
</div>

<div id="nav">
<span class="navlink">
<a href="{homepage}">Home</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="35" height="10" alt="" /><a href="#">About</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" alt="" width="28" height="10" /><a href="{path={my_template_group}/archives}">Archives</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="30" height="10" alt="" /><a href="#">Links</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="32" height="10" alt="" />{encode="{webmaster_email}" title="Contact"}
</span>
</div>
</div>

<div id="content">

<div id="blog">



<p>The trackback URL for this entry is:</p>
<form action="">
<p><input type="text" value="{exp:trackback:url}" size="40" class="input" style="width:99%" /></p>
</form>

<div class="dot_line"></div>


<ol>
{exp:trackback:entries}
{if no_results}
<li>There are no trackbacks for this entry</li>
{/if}

<li>
<h2>{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>
</li>
{/exp:trackback:entries}
</ol>


<div class="dot_line"></div>

<p><img src="{site_url}/images/more.gif" width="11" height="9" alt="" /><a href="index.php" class="f11">Back to main</a></p>

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

</div>



<div id="sidebar">

<?php if ($type != 'core') { ?>
<p><b>Members:</b><br />

{if logged_out}
<a href="{path=member/login}">Login</a> |
<a href="{path=member/register}">Register</a> |
{/if}
{if logged_in}
<a href="{path=member/profile}">Your Account</a> |
<a href="{path=logout}">Logout</a> |
{/if}
<a href="{path=member/memberlist}">Member List</a>
</p>
<?php } ?>


<h2 class="sidetitle">About</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.</p>


<div id="calendar">
<div class="calendar_body">
{exp:weblog:calendar switch="calendarToday|calendarCell"}

<table class="calendarBG" border="0" cellpadding="3" 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}
</div>
</div>




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

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


<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>
<li><a href="{path={my_template_group}/referrers}">Referrers</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="text"  size="20" maxlength="100"  /><br />
<input type="submit" value="submit"  class="button" />
</p>
{/exp:mailinglist:form}
<?php } ?>





</div>
</div>

<div id="footer">
<div class="nameby">Content &copy; 2004 Your Name</div>
</div>

</div>
</body>
</html>
<?php

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

}
// END





//-------------------------------------
//	Archives template
//-------------------------------------

function archives()
{
	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="weblog">
<div id="header">
<div id="blogtitle">
<div class="blog_title">{exp:weblog:info weblog="{my_weblog}"}{blog_title}{/exp:weblog:info}</div>
</div>

<div id="nav">
<span class="navlink">
<a href="{homepage}">Home</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="35" height="10" alt="" /><a href="#">About</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" alt="" width="28" height="10" /><a href="{path={my_template_group}/archives}">Archives</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="30" height="10" alt="" /><a href="#">Links</a><img src="{site_url}/themes/site_themes/notebook/notebook_spacer.gif" width="32" height="10" alt="" />{encode="{webmaster_email}" title="Contact"}
</span>
</div>
</div>

<div id="content">

<div id="blog">

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

{date_heading display="yearly"}
<div id="b1tit_bg">{entry_date format="%Y"}</div>
{/date_heading}

{date_heading display="monthly"}
<h2>{entry_date format="%F"}</h2>
{/date_heading}

<ul>
<li><a href="{title_permalink="{my_template_group}/index"}">{title}</a></li>
</ul>

{/exp:weblog:entries}



<div class="dot_line"></div>


<p><img src="{site_url}/images/more.gif" width="11" height="9" alt="" /><a href="index.php" class="f11">Back to main</a></p>

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

</div>


<div id="sidebar">

<?php if ($type != 'core') { ?>
<p><b>Members:</b><br />

{if logged_out}
<a href="{path=member/login}">Login</a> |
<a href="{path=member/register}">Register</a> |
{/if}
{if logged_in}
<a href="{path=member/profile}">Your Account</a> |
<a href="{path=logout}">Logout</a> |
{/if}
<a href="{path=member/memberlist}">Member List</a>
</p>
<?php } ?>


<h2 class="sidetitle">About</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.</p>






<div id="calendar">
<div class="calendar_body">
{exp:weblog:calendar switch="calendarToday|calendarCell"}

<table class="calendarBG" border="0" cellpadding="3" 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}
</div>
</div>




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

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


<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>
<li><a href="{path={my_template_group}/referrers}">Referrers</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="text"  size="20" maxlength="100"  /><br />
<input type="submit" value="submit"  class="button" />
</p>
{/exp:mailinglist:form}
<?php } ?>




</div>
</div>

<div id="footer">
<div class="nameby">Content &copy; 2004 Your Name</div>
</div>

</div>
</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
?>