close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Included menu corrupts local page display

Thread began 9/30/2010 10:23 am by info97301 | Last modified 10/06/2010 1:40 pm by info97301 | 1033 views | 8 replies

info97301

Hi Kason

Thanks for the quick response. Unfortunately, I've lost my WinZip!!

However, I have created almost identical 2 pages - one without the menu, which passes the W3C test and one with, which fails.

W3Cpass.php
W3Cfail.php

Below is the code in the menu.php page

many thanks

Chris
-----------------
<?php
$WA_localRoot = "/";
$WA_remoteRoot = "/";
$WA_curURL = strtolower((isset($_SERVER["PHP_SELF"]))?$_SERVER["PHP_SELF"]:"");
$assumedRoot = $WA_remoteRoot;
if (strpos($WA_curURL,strtolower($WA_localRoot)) == 0 && (strlen($WA_localRoot) >= strlen($WA_remoteRoot) || strpos($WA_curURL,strtolower($WA_localRoot)) === 0)) {
$assumedRoot = $WA_localRoot;
}
$WA_thisFile = $_SERVER['PHP_SELF'];
if (strpos(strtolower($WA_thisFile), strtolower($assumedRoot)) === 0) {
$WA_thisFile = substr($WA_thisFile, strlen($assumedRoot));
}
else {
$WA_thisFile = substr($WA_thisFile, 1);
}
$WA_ddsArray = explode("/", $WA_thisFile);
$WA_dotDotSlash = "";
for ($n=0; $n<sizeof($WA_ddsArray)-1; $n++) {
$WA_dotDotSlash .= "../";
}
?>
<?php
// MenuWriter connection includes
require_once($WA_dotDotSlash . "Connections/connConwy.php");

// end connection includes
// MenuWriter ignore connection includes
if (1 == 0) {
?>
<?php require_once('../../Connections/connConwy.php'); ?>
<?php } // End MenuWriter ignore connection includes ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<ul class="level-0" id="cssmw">
<li class="parent"><a href="<?php echo($assumedRoot); ?>index.php">Home</a>
<ul class="level-1">
</ul>
</li>
<li class="parent"><a href="#">Towns & Villages</a>
<?php
mysql_select_db($database_connConwy, $connConwy);
$query_menuwriter_townsvillages = "SELECT TownID, Town, under_TownID FROM towns_villages WHERE under_TownID IS NULL AND TownActive = 'Y' ORDER BY Town ASC";
$menuwriter_townsvillages = mysql_query($query_menuwriter_townsvillages, $connConwy) or die(mysql_error());
$row_menuwriter_townsvillages = mysql_fetch_assoc($menuwriter_townsvillages);
$totalRows_menuwriter_townsvillages = mysql_num_rows($menuwriter_townsvillages);
?>
<ul class="level-1">
<?php if ($totalRows_menuwriter_townsvillages > 0) { // Show if recordset not empty ?>
<?php do { ?>
<li class="parent"><a href="<?php echo($assumedRoot); ?>towns-in-conwy.php?TownID=<?php echo $row_menuwriter_townsvillages["TownID"]; ?>"><?php echo $row_menuwriter_townsvillages["Town"]; ?></a>
<?php
// MenuWriter Nested Filter Variable
$_POST["menuwriter_townsvillages1_TownID"] = $row_menuwriter_townsvillages["TownID"];
?>
<?php
$MenuWriter_menuwriter_townsvillages1 = "-1";
if (isset($_POST['menuwriter_townsvillages1_TownID'])) {
$MenuWriter_menuwriter_townsvillages1 = (get_magic_quotes_gpc()) ? $_POST['menuwriter_townsvillages1_TownID'] : addslashes($_POST['menuwriter_townsvillages1_TownID']);
}
mysql_select_db($database_connConwy, $connConwy);
$query_menuwriter_townsvillages1 = sprintf("SELECT TownID, Town, under_TownID FROM towns_villages WHERE under_TownID = %s AND TownActive = 'Y' ORDER BY Town ASC", GetSQLValueString($MenuWriter_menuwriter_townsvillages1, "int"));
$menuwriter_townsvillages1 = mysql_query($query_menuwriter_townsvillages1, $connConwy) or die(mysql_error());
$row_menuwriter_townsvillages1 = mysql_fetch_assoc($menuwriter_townsvillages1);
$totalRows_menuwriter_townsvillages1 = mysql_num_rows($menuwriter_townsvillages1);
?>
<ul class="level-2">
<?php if ($totalRows_menuwriter_townsvillages1 > 0) { // Show if recordset not empty ?>
<?php do { ?>
<li><a href="<?php echo($assumedRoot); ?>towns-in-conwy.php?TownID=<?php echo $row_menuwriter_townsvillages1["TownID"]; ?>"><?php echo $row_menuwriter_townsvillages1["Town"]; ?></a></li>
<?php } while ($row_menuwriter_townsvillages1 = mysql_fetch_assoc($menuwriter_townsvillages1)); ?>
<?php } // Show if recordset not empty ?>
</ul>
<?php
mysql_free_result($menuwriter_townsvillages1);
?>
</li>
<?php } while ($row_menuwriter_townsvillages = mysql_fetch_assoc($menuwriter_townsvillages)); ?>
<?php } // Show if recordset not empty ?>
</ul>
<?php
mysql_free_result($menuwriter_townsvillages);
?>
</li>
<li class="parent"><a href="<?php echo($assumedRoot); ?>listings_Search.php">Search & Listings</a>
<?php
mysql_select_db($database_connConwy, $connConwy);
$query_menuwriter_listtype = "SELECT LT_ID, ListType FROM list_type ORDER BY LT_ID ASC";
$menuwriter_listtype = mysql_query($query_menuwriter_listtype, $connConwy) or die(mysql_error());
$row_menuwriter_listtype = mysql_fetch_assoc($menuwriter_listtype);
$totalRows_menuwriter_listtype = mysql_num_rows($menuwriter_listtype);
?>
<ul class="level-1">
<?php if ($totalRows_menuwriter_listtype > 0) { // Show if recordset not empty ?>
<?php do { ?>
<li><a href="<?php echo($assumedRoot); ?>listings.php?lt=<?php echo $row_menuwriter_listtype["LT_ID"]; ?>"><?php echo $row_menuwriter_listtype["ListType"]; ?></a></li>
<?php } while ($row_menuwriter_listtype = mysql_fetch_assoc($menuwriter_listtype)); ?>
<?php } // Show if recordset not empty ?>
</ul>
<?php
mysql_free_result($menuwriter_listtype);
?>
<?php
mysql_free_result($menuwriter_listings);
?>
</li>
<li class="parent"><a href="<?php echo($assumedRoot); ?>tours.php">Tours</a>
<?php
mysql_select_db($database_connConwy, $connConwy);
$query_menuwriter_listings = "SELECT ListID, ListName, ListType FROM listings WHERE ListType=6";
$menuwriter_listings = mysql_query($query_menuwriter_listings, $connConwy) or die(mysql_error());
$row_menuwriter_listings = mysql_fetch_assoc($menuwriter_listings);
$totalRows_menuwriter_listings = mysql_num_rows($menuwriter_listings);
?>
<ul class="level-1">
<?php if ($totalRows_menuwriter_listings > 0) { // Show if recordset not empty ?>
<?php do { ?>
<li><a href="<?php echo($assumedRoot); ?>listingdetails.php?ListID=<?php echo $row_menuwriter_listings["ListID"]; ?>"><?php echo $row_menuwriter_listings["ListName"]; ?></a></li>
<?php } while ($row_menuwriter_listings = mysql_fetch_assoc($menuwriter_listings)); ?>
<?php } // Show if recordset not empty ?>
</ul>
</li>
<li><a href="<?php echo($assumedRoot); ?>activities.php">Things to do</a></li>
<li><a href="<?php echo($assumedRoot); ?>registration.php">Register</a></li>
<li><a href="<?php echo($assumedRoot); ?>contact.php">Contact</a></li>
<li><a href="<?php echo($assumedRoot); ?>login.php">Log In</a></li>
</ul>
<script type="text/javascript">if(window.attachEvent) { window.attachEvent("onload", function() { cssmw.intializeMenu('cssmw',{select_current: 0, orientation: 1}); }); } else if(window.addEventListener) { window.addEventListener("load", function() { cssmw.intializeMenu('cssmw',{select_current: 0, orientation: 1}); }, true); }</script>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...