Code:<?php
if (!defined('NUKE_FILE')) die ('You can\'t access this file directly...');
$bgcolor1 = '#FAFAFA';
$bgcolor2 = '#F2F2F2';
$bgcolor3 = '#EFEFEF';
$bgcolor4 = '#FEFEFE';
$textcolor1 = '#000000';
$textcolor2 = '#000000';
// this will switch the blocks on/off in forums.
// true = blocks ON | false = blocks OFF
$forums_showblocks = false;
// Choose the Search Bar content:
// Possible Values (case sensitive)
// 'forums' = Searches forums
// 'news' = Searches articles
// 'welcome' = Show user welcome message
// '' = (<- empty single quotes) Show nothing
$theme_search_bar = 'welcome';
function themeheader() {
global $banners, $sitename, $user, $admin, $module_name, $admin_file;
echo '
<body>
<div id="wrap">
<div id="header">
<img alt="" src="themes/NC_MidTown/images/logo.gif" style="float: left; margin-top: 10px;" />
<ul>
<li'.((defined('HOME_FILE')) ? ' id="current"' : '').'><a href="index.php"><span>'._HOME.'</span></a></li>
<li'.(($module_name == 'Downloads') ? ' id="current"' : '').'><a href="modules.php?name=Downloads"><span>'._UDOWNLOADS.'</span></a></li>
<li'.(($module_name == 'Forums') ? ' id="current"' : '').'><a href="modules.php?name=Forums"><span>'._BBFORUMS.'</span></a></li>
<li'.(($module_name == 'Your_Account') ? ' id="current"' : '').'><a href="modules.php?name=Your_Account"><span>'._FSIYOURACCOUNT.'</span></a></li>
';
if (is_user($user))
{
echo '<li'.(($module_name == 'Your_Account' && $op == 'logout') ? ' id="current"' : '').'><a href="modules.php?name=Your_Account&op=logout"><span>'._LOGOUT.'</span></a></li>';
}
if (is_admin($admin))
{
echo '<li'.((defined('ADMIN_FILE')) ? ' id="current"' : '').'><a href="'.$admin_file.'.php"><span>'._FSIADMINMENU.'</span></a></li>';
}
echo '
</ul>
</div>
<div id="header-logo">
<div id="logo">Mid<span class="red">Town</span></div>
';
global $theme_search_bar;
switch($theme_search_bar)
{
case 'forums':
echo '
<form action="modules.php?name=Forums&file=search&mode=results" method="post" class="search">
<p>
<input name="search_keywords" class="textbox" type="text" />
<input type="hidden" name="search_terms" value="any" />
<input type="hidden" name="show_results" value="topics" />
<input name="search" class="searchbutton" value="'._SEARCH.'" type="submit" />
</p>
</form>
';
break;
case 'news':
echo '
<form method="post" class="search" action="modules.php?name=Search">
<p>
<input name="query" class="textbox" type="text" />
<input name="search" class="searchbutton" value="'._SEARCH.'" type="submit" />
</p>
</form>
';
break;
case 'welcome':
echo '
<script type="text/javascript">
<!--
function updateClock ( )
{
var currentTime = new Date ( );
var currentHours = currentTime.getHours ( );
var currentMinutes = currentTime.getMinutes ( );
var currentSeconds = currentTime.getSeconds ( );
currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";
currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;
currentHours = ( currentHours == 0 ) ? 12 : currentHours;
var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;
document.getElementById("header_clock").firstChild.nodeValue = currentTimeString;
}
function showDate() {
// Array ofmonth Names
var monthNames = new Array( "'._JANUARY.'","'._FEBRUARY.'","'._MARCH.'","'._APRIL.'","'._MAY.'","'._JUNE.'","'._JULY.'","'._AUGUST.'","'._SEPTEMBER.'","'._OCTOBER.'","'._NOVEMBER.'","'._DECEMBER.'");
var now = new Date();
thisYear = now.getYear();
if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem
current_day = now.getDate();
if (current_day.length < 2) {
check = current_day;
} else {
check = current_day;
if (check >= 20) {
check = check - 20;
} else if (check >= 10) {
//check = check - 10;
}
}
var suffix = "";
if (check == 1) {
suffix = "st";
} else if (check == 2) {
suffix = "nd";
} else if (check == 3) {
suffix = "rd";
} else {
suffix = "th";
}
document.getElementById("header_date").innerHTML = monthNames[now.getMonth()] + " " + current_day + suffix + ", " + thisYear;
}
window.onload = function() {showDate(); updateClock(); setInterval(\'updateClock()\', 1000 )}
// -->
</script>
<div class="search">
<span id="header_date"> </span> <span id="header_clock"> </span><br />
';
if (is_user($user)) {
$uinfo = cookiedecode($user);
echo _BWEL." ".stripslashes($uinfo[1]);
}
else
{
echo '
<a href="modules.php?name=Your_Account">'._LOGIN.'</a> '._OR.'
<a href="modules.php?name=Your_Account&op=new_user">'._BREG.'</a>
';
}
echo '</div>';
break;
default:
break;
}
echo '
</div>
<div id="content">
';
global $forums_showblocks, $name;
if ($name == 'Forums' && $forums_showblocks === false)
{
echo '<div id="middle_full"><!-- center column -->';
}
else
{
if(defined('INDEX_FILE')) {
// right blocks are showing
echo '<div id="middle"><!-- center column -->';
}
else
{
// right blocks are NOT showing
echo '<div id="middle_alt"><!-- center column -->';
}
}
}
function themefooter() {
global $module_name, $forums_showblocks;
echo '
</div><!-- end center column -->
</div><!-- end content -->
';
if ($module_name != 'Forums' || $forums_showblocks)
{
echo '<div id="left"><!-- left column -->'."\n";
blocks('l');
echo "\n".'</div><!-- end left column -->'."\n";
}
if(defined('INDEX_FILE')) {
echo '
<!-- start right column -->
<div id="right">
';
blocks('r');
echo '
</div>
<!-- end right column -->
';
}
echo '
</div>
<div style="clear: both"></div>
<div class="footer">
<p>
<a href="index.php">'._HOME.'</a> | <a href="modules.php?name=Downloads">'._UDOWNLOADS.'</a> | <a href="modules.php?name=Forums">'._BBFORUMS.'</a> | <a href="modules.php?name=Your_Account">'._FSIYOURACCOUNT.'</a>
</p>
Theme by: <a href="http://nukecoder.com/">nukecoder</a>
';
footmsg();
echo '
</div>
';
}
function OpenTable() {
echo '<div class="table">'."\n\n";
}
function CloseTable() {
echo '</div>'."\n\n";
}
function OpenTable2() {
echo '<div class="table2">'."\n\n";
}
function CloseTable2() {
echo '</div>'."\n\n";
}
function themesidebox($title, $content) {
echo '
<div class="block">
<div class="block_titlebar"><div>'.$title.'</div></div>
<div class="block_content">
'.$content.'
</div>
</div>
';
}
function themecenterbox($title, $content) {
echo '
<div class="centerbox">
<div class="centerbox_titlebar"><div>'.$title.'</div></div>
<div class="centerbox_content">
'.$content.'
</div>
</div>
';
}
function FormatStory($thetext, $notes, $aid, $informant) {
global $anonymous;
$content = '';
$thetext = '<div>'.$thetext.'</div>';
if (!empty($notes)) {
$notes = '<br /><strong>'._NOTE.'</strong> <div>'.$notes.'</div>';
} else {
$notes = '';
}
if ($aid == $informant) {
$content = $thetext.$notes;
} else {
if(!empty($informant)) {
global $admin, $user;
if (is_user($user)||is_admin($admin)) {
$content = '<a href="modules.php?name=Your_Account&op=userinfo&username='.$informant.'"><i>'.$informant.'</i></a> ';
} else {
$content = $informant.' ';
}
} else {
$content = $anonymous.' ';
}
$content .= '<em>'._WRITES.':</em> '.$thetext.$notes;
}
echo $content;
}
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath;
echo '
<div class="article">
<div class="article_title">
<h1>'.$title.'</h1>
<p>'._POSTEDBY.' ';
formatAidHeader($aid);
echo ' '._ON.' '.$time.' | '._TOPIC.': <a href="modules.php?name=News&new_topic='.$topic.'">'.$topictext.'</a>
</p>
</div>
<blockquote>
';
FormatStory($thetext, $notes, $aid, $informant);
echo '
</blockquote>
<div class="links">
';
echo substr($morelink, 1, strlen($morelink) - 2); //get rid of the ( ) around the $morelink :)
echo ' | '. $counter .' '. _READS;
echo '
</div>
</div>
';
}
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext, $notes) {
global $admin, $sid, $tipath;
echo '
<div class="article">
<div class="article_title">
<h1>'.$title.'</h1>
<p>'._POSTEDBY.' ';
formatAidHeader($aid);
echo ' '._ON.' '.$datetime.' | '._TOPIC.': <a href="modules.php?name=News&new_topic='.$topic.'">'.$topictext.'</a>
</p>
</div>
<blockquote>
';
FormatStory($thetext, $notes, $aid, $informant);
echo '
</blockquote>
</div>
';
}
?>
|