close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Menu writer 1.0.4 dynamic

Thread began 2/27/2011 4:21 am by ccdantas101117 | Last modified 3/01/2011 9:19 am by Jason Byrnes | 1787 views | 3 replies |

ccdantas101117

Menu writer 1.0.4 dynamic

Menu writer 1.0.4 with dynamic main and nexted 1-level

testphp.php

Below page code: menu.pgp
-------------------------------------------------------------------------------------
<?php require_once($WA_dotDotSlash ."Connections/sdconn.php"); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$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;
}
}

mysql_select_db($database_sdconn, $sdconn);
$query_master1categories_ctg = "SELECT * FROM categories_ctg ORDER BY order_ctg";
$master1categories_ctg = mysql_query($query_master1categories_ctg, $sdconn) or die(mysql_error());
$row_master1categories_ctg = mysql_fetch_assoc($master1categories_ctg);
$totalRows_master1categories_ctg = mysql_num_rows($master1categories_ctg);

mysql_select_db($database_sdconn, $sdconn);
$query_detail3subcategory_stg = "SELECT count(products_prd.id_prd) AS count_prods, subcategory_stg.id_stg, subcategory_stg.id_ctg, subcategory_stg.name_ctg, subcategory_stg.order_ctg, subcategory_stg.visible_ctg FROM (subcategory_stg LEFT JOIN products_prd ON products_prd.idstg_prd=subcategory_stg.id_stg) WHERE subcategory_stg.id_ctg=123456789 AND subcategory_stg.visible_ctg=1 GROUP BY subcategory_stg.id_stg, subcategory_stg.id_ctg, subcategory_stg.order_ctg ORDER BY subcategory_stg.order_ctg ASC ";
$detail3subcategory_stg = mysql_query($query_detail3subcategory_stg, $sdconn) or die(mysql_error());
$row_detail3subcategory_stg = mysql_fetch_assoc($detail3subcategory_stg);
$totalRows_detail3subcategory_stg = mysql_num_rows($detail3subcategory_stg);

$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;
}
?>
<ul class="level-0" id="cssmw">
<?php do { ?>
<li><a href="#"><?php echo $row_master1categories_ctg['name_ctg']; ?></a>
<?php
if ($totalRows_master1categories_ctg>0) {
$nested_query_detail3subcategory_stg = str_replace("123456789", $row_master1categories_ctg['id_ctg'], $query_detail3subcategory_stg);
mysql_select_db($database_sdconn);
$detail3subcategory_stg = mysql_query($nested_query_detail3subcategory_stg, $sdconn) or die(mysql_error());
$row_detail3subcategory_stg = mysql_fetch_assoc($detail3subcategory_stg);
$totalRows_detail3subcategory_stg = mysql_num_rows($detail3subcategory_stg);
$nested_sw = false;
if (isset($row_detail3subcategory_stg) && is_array($row_detail3subcategory_stg)) {
do { //Nested repeat
?>
<ul class="level-1">
<li><a href="#"><?php echo $row_detail3subcategory_stg['name_ctg']; ?>&nbsp;(&nbsp;<?php echo $row_detail3subcategory_stg['count_prods']; ?>&nbsp;)</a></li>
</ul>
<?php
} while ($row_detail3subcategory_stg = mysql_fetch_assoc($detail3subcategory_stg)); //Nested move next
}
}
?>
<?php } while ($row_master1categories_ctg = mysql_fetch_assoc($master1categories_ctg)); ?>
</ul>
<?php
mysql_free_result($master1categories_ctg);

mysql_free_result($detail3subcategory_stg);
?>
<script type="text/javascript">if(window.attachEvent) { window.attachEvent("onload", function() { cssmw.intializeMenu('cssmw'); }); } else if(window.addEventListener) { window.addEventListener("load", function() { cssmw.intializeMenu('cssmw'); }, true); }</script>


--------------------------------------------------------------------------------
What is missing here all the nexted sub categories are not showing

See page (temp) --> index_tmp.php

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

Sign in to reply to this post

ccdantas101117

Support history not showing

Originally Said By: Jason Byrnes
  I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php  



Hi Jason,
I don't see the support ticket on my support history

Carlos

Sign in to reply to this post

Jason ByrnesWebAssist

I have created it again, it should be there now.

Sign in to reply to this post

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...