/var/www/html/includes/body_header_variable.php
<?
require_once('/var/www/html/includes/lib_common.php');
require_once('/var/www/html/includes/lib_mysql.php');
include('/var/www/html/includes/menu_variable.php');
if (strpos(PHP_SELF, '/hdstore') === false) {
if ($user->data['is_registered'] || strpos(PHP_SELF, '/hdstore') === true) {}
else {
$subscription_box .= '<div align="right" style="float:right; width:455px"><div class="important"><span class="corners-top"><span></span></span>'.
'<div style="color:#800000; float:left; font-weight:bold; padding-top:4px">Free <a href="/daily.php" target="_blank">HDTV Magazine Daily</a>: </div>'.
'<form name="frmSub" method="post" action="/profile-create.php"'.
' onsubmit="if (!isValidEmail(this.email_address)) {return false;} else {return true;}">'.
'<input type="hidden" name="action" value="create" />'.
'<input type="hidden" name="type" value="email_only" />'.
'<input type="text" name="email_address" class="inputText" style="width:15em;color:#777777" maxlength="255" value="email address"'.
' onfocus="if (this.value == \'email address\') {this.value=\'\'; this.style.color = \'\';}" />'.
' <input type="submit" class="inputButton" value="Subscribe" />'.
'</form>'.
'<span class="corners-bottom"><span></span></span></div></div>'."\n";
}
if ($user->data['is_registered']) {
$login_string = 'Welcome, '. $user->data['username'] .' • '.
'<a href="'. BASE_URL .'/profile.php">Edit Profile</a> • '.
'<a href="'. BASE_URL .'/logout.php?r='. rawurlencode($_SERVER['REQUEST_URI']) .'">Sign Out</a>';
if (!access(ACCESS_PREMIUM)) $login_string .= ' • <a href="'. BASE_URL .'/subscribe.php">Subscribe</a>';
} elseif ($_SERVER['PHP_SELF'] == '/forum/login.php') {
$login_string = '(Not logged in) • <a href="'. BASE_URL .'/profile-create.php">Register</a>';
} else {
$redirect = '../'. substr($_SERVER['REQUEST_URI'], 1);
$login_string = '(Not logged in) <a href="'. FULL_URL_LOGIN .'?redirect='. $redirect .'">Sign In</a> • '.
'<a href="'. FULL_URL_PROFILE_CREATE .'">Register</a>';
}
$login_string .= ' • <a href="'. BASE_URL .'/help/index.php">Help</a>';
}
$body_header_output = ''.
'<div id="container">'."\n".
'<div style="float:left;"><a href="'. BASE_URL .'/"><img src="'. BASE_IMG_URL .'/images/hdtvmagazine.gif" alt="HDTV Magazine" height="57" width="338"/></a></div>'.
/var/www/html/includes/body_header_variable.php
<?
require_once('/var/www/html/includes/lib_common.php');
require_once('/var/www/html/includes/lib_mysql.php');
include('/var/www/html/includes/menu_variable.php');
if (strpos(PHP_SELF, '/hdstore') === false) {
if ($user->data['is_registered'] || strpos(PHP_SELF, '/hdstore') === true) {}
else {
$subscription_box .= '<div align="right" style="float:right; width:455px"><div class="important"><span class="corners-top"><span></span></span>'.
'<div style="color:#800000; float:left; font-weight:bold; padding-top:4px">Free <a href="/daily.php" target="_blank">HDTV Magazine Daily</a>: </div>'.
'<form name="frmSub" method="post" action="/profile-create.php"'.
' onsubmit="if (!isValidEmail(this.email_address)) {return false;} else {return true;}">'.
'<input type="hidden" name="action" value="create" />'.
'<input type="hidden" name="type" value="email_only" />'.
'<input type="text" name="email_address" class="inputText" style="width:15em;color:#777777" maxlength="255" value="email address"'.
' onfocus="if (this.value == \'email address\') {this.value=\'\'; this.style.color = \'\';}" />'.
' <input type="submit" class="inputButton" value="Subscribe" />'.
'</form>'.
'<span class="corners-bottom"><span></span></span></div></div>'."\n";
}
if ($user->data['is_registered']) {
$login_string = 'Welcome, '. $user->data['username'] .' • '.
'<a href="'. BASE_URL .'/profile.php">Edit Profile</a> • '.
'<a href="'. BASE_URL .'/logout.php?r='. rawurlencode($_SERVER['REQUEST_URI']) .'">Sign Out</a>';
if (!access(ACCESS_PREMIUM)) $login_string .= ' • <a href="'. BASE_URL .'/subscribe.php">Subscribe</a>';
} elseif ($_SERVER['PHP_SELF'] == '/forum/login.php') {
$login_string = '(Not logged in) • <a href="'. BASE_URL .'/profile-create.php">Register</a>';
} else {
$redirect = '../'. substr($_SERVER['REQUEST_URI'], 1);
$login_string = '(Not logged in) <a href="'. FULL_URL_LOGIN .'?redirect='. $redirect .'">Sign In</a> • '.
'<a href="'. FULL_URL_PROFILE_CREATE .'">Register</a>';
}
$login_string .= ' • <a href="'. BASE_URL .'/help/index.php">Help</a>';
}
$body_header_output = ''.
'<div id="container">'."\n".
'<div style="float:left;"><a href="'. BASE_URL .'/"><img src="'. BASE_IMG_URL .'/images/hdtvmagazine.gif" alt="HDTV Magazine" height="57" width="338"/></a></div>'.
/var/www/html/includes/body_header.php
<?
include('body_header_variable.php');
echo $body_header_output;
?>
/var/www/html/history/index.php
<?
require('../global.php');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--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">
<head>
<?require(BASE_DIR .'/includes/common_header.php');?>
<meta http-equiv="Content-Type" content="text/html; charset=<$MTPublishCharset$>" />
<title>HDTV Magazine - History & Interviews</title>
</head>
<body>
<?
include(BASE_DIR .'/includes/tracker.php');
include(BASE_DIR .'/includes/body_header.php');
include(BASE_DIR .'/ads/leaderboard.php');
?>
<table class="bare" cellpadding="0" cellspacing="0" style="width:100%"><tr>
<td style="vertical-align:top;padding-right:20px;">
<h2>HDTV History & Archives</h2>
<table cellpadding="3" cellspacing="0">
<?
$qry = "SELECT entry_created_on, entry_title, entry_basename, author_name".
" FROM mt_entry e, mt_author a".
" WHERE".
" e.entry_author_id = a.author_id".
" AND entry_blog_id = 5 AND entry_status = 2".
" ORDER BY entry_created_on DESC";
$result = mQuery($qry);
while ($entry = mysql_fetch_assoc($result)) {
$ts = strtotime($entry['entry_created_on']);
$y = date('Y', $ts);
$m = date('m', $ts);
echo '<tr>'.
// ' <td class="entrydate" nowrap>'. date('M j, Y', $ts) .'</td>'.
' <td><a href="'. URL_HISTORY_DIR .'/'. $y .'/'. $m .'/'. $entry['entry_basename'] .'.php">'. $entry['entry_title'] .'</a></td>'.
'</tr>';
}
?>