ok (thanks soo much for your help thus far) Here is my PROVIDERS template
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">Providers</td>
</tr>
<tr>
<td class="panelsurround">
<div class="panel">
<table width='70%' cellpading=7 border=1 bordercolor='black' rules='rows' align='center'>
<tr><th width='120px' class='tcat'>Thumbnail</th>
<th align='left' class='tcat'>Name</th></tr>
$providers_providerbit
</table>
</div>
</td>
</tr>
</table>
$footer
</body>
</html>
Here is the providers_providerbit template
Code:
if(empty($provider[featured_pic])) {
$thumb_nail = "<img src='/images/ASP_Images/thumbs/default.jpg' border='0' />";
} else {
$thumb_nail = '<img src="'.$provider[featured_pic].'" alt="'.$provider[Name].'" border="0" />';
}
<tr>
<th class="$altclass">
<a href="/provider_page.php?ID=$provider[ID]">$thumb_nail</a>
</th>
<th class="$altclass" align="left">
<a href="/provider_page.php?ID=$provider[ID]" class="link">$provider[Name]</a>
</th></tr>
Lastly, heres my providers.php
Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'providers'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'PROVIDERS',
'providers_providerbit'
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
// ### STANDARD INITIALIZATIONS ###
$showlistbits = '';
$altclass = 'alt1';
//is it ok to include these variabl;es here
// how many rows to show per page
$rowsPerPage = 20;
// by default we show first page
$pageNum = 1;
// if $_GET['page'] defined, use it as page number
if(isset($_GET['page']))
{
$pageNum = $_GET['page'];
}
// counting the offset
$offset = ($pageNum - 1) * $rowsPerPage;
// ############################### show list of providers ###############################
$providers = $db->query_read("
SELECT Approve, ID, Name, featured_pic
FROM provider
WHERE Approve = '1'
ORDER BY rand()
LIMIT $offset, $rowsPerPage
");
while ($provider = $db->fetch_array($providers))
{
$altclass = ($altclass=='alt1') ? 'alt2' : alt1;
eval('$showlistbits .= "' . fetch_template('providers_providerbit') . '";');
}
$navbits = array();
$navbits[$parent] = 'Providers';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('PROVIDERS') . '");');
?>
Did I make an error?