Hi, i have a major problem and i can't figure out what is causing it. Hope you can help me:
What it does is it includes the pages into the sections on the nav, but for some reason it only includes 1 section then the nav underneath screws up.
-table structure for 'site_pages_cat'-
sectionTitle | sectionName | sectionSide | sectionView sectionInclude | sectionOrder
-example row content-
Site Statistics | stats | R | Y | navStats.php | 1
-navTest3.php-
-navStats.php-
Any Ideas??
Please help and try to fix the problem
Regards,
Martin
Computing Help And Info:
What it does is it includes the pages into the sections on the nav, but for some reason it only includes 1 section then the nav underneath screws up.
-table structure for 'site_pages_cat'-
sectionTitle | sectionName | sectionSide | sectionView sectionInclude | sectionOrder
-example row content-
Site Statistics | stats | R | Y | navStats.php | 1
-navTest3.php-
Code:
<table width="90%" cellpadding="0" cellspacing="0">
<tr>
<td width="200" valign="top"> <br />
<?php
//get the section catergories first
$q = mysql_query("SELECT `sectionTitle`, `sectionName`, `sectionInclude` FROM `site_pages_cat` WHERE `sectionSide` = 'R' AND `sectionView` = 'Y' ORDER BY `sectionOrder` ASC");
while(list($sectionTitle,$sectionName,$sectionInclude) = mysql_fetch_row($q)){
?>
<table width="90%" cellpadding="0" cellspacing="0" class="tableBG" align="center" border="1" bordercolor="#CCCCCC" style="border-collapse: collapse">
<tr class="tableBGtitleRow">
<td><strong><?php echo $sectionTitle; ?></strong></td>
</tr>
<?php
if($sectionInclude != ""){
?>
<tr>
<td><?php echo "<script>alert('Page Include: " . $sectionInclude . "');</script>"; include($sectionInclude); //if(!@include($sectionInclude)){ echo "Error In Including Page: <strong>$sectionInclude</strong>"; } ?></td>
</tr>
<?php
}
//now get related links from the site_pages table
$qLinks = mysql_query("SELECT `title`, `pname`, `externalLink` FROM `site_pages` WHERE `section` = '$sectionName' ORDER BY `pageOrder` ASC");
while(list($linkTitle,$linkPname,$extLink) = mysql_fetch_row($qLinks)){
if($linkTitle == ""){
?>
<tr>
<td> </td>
</tr>
<?php
}
?>
<tr>
<td><a href="<?php if($extLink == "N"){ ?>/?p=<?php } else { ?>/?p=out&fwlink=<?php } ?><?php echo $linkPname; ?>"><?php echo $linkTitle; ?></a></td>
</tr>
<?php
}//end $qLinks
?>
</table>
<br />
<?php
} //end $q
?>
<br /></td>
</tr>
</table>
</td>
</tr>
</table>
Code:
<?php
//number of site hits
$query = mysql_query("SELECT ammount FROM count");
list($dacount) = mysql_fetch_row($query);
//guest and users online
$query2 = mysql_query("SELECT uid FROM online WHERE isuser='no'");
$ammountofnonusersonline = mysql_num_rows($query2);
$query3 = mysql_query("SELECT uid FROM online WHERE isuser='yes'");
$ammountofusersonline = mysql_num_rows($query3);
//people on page
$thePage = $PHP_SELF;
$q = mysql_query("SELECT page FROM online WHERE page = '$thePage'");
$usersonpage = mysql_num_rows($q);
?>
<table width="90%" cellpadding="0" cellspacing="0">
<tr>
<td>Site Hits: <?php echo $dacount; ?></td>
</tr>
<tr>
<td>Users Online: <?php echo $ammountofusersonline; ?></td>
</tr>
<tr>
<td>Guests Online: <?php echo $ammountofnonusersonline; ?></td>
</tr>
<tr>
<td>People On Page: <?php echo $usersonpage; ?></td>
</tr>
</table>
Any Ideas??
Please help and try to fix the problem
Regards,
Martin
Computing Help And Info: