|
|
|
ช่วยด้วย sub menu ตัวสุดท้าย ไม่ขึ้น ซึ่งเป็นเมนูที่ีสามารถเพิ่มเองได้ผ่านทาง Backend |
|
|
|
|
|
|
|
Code (PHP)
<ul id="nav" class="dropdown dropdown-vertical">
<?
$database->setQuery( "SELECT sc.* FROM #__maincategories AS sc "
. "\nWHERE sc.parent_num = '$productID' and sc.published = '1'"
. "\nOrder by sc.ordering ASC"
);
if ($database->getErrorNum()) {
echo $database->stderr();
return false;
}
$itemrows = $database->loadObjectList();
for ($j=0, $k=count( $itemrows ); $j < $k; $j++) {
$itemrow = &$itemrows[$j];
if($itemrow->chkmakelink == '1'){
$CLink = $itemrow->usefile;
} else {
$CLink = "tvccontent.php?page=product&productid=".$itemrow->id."&category=".$itemrow->id;
}
?>
<li class="dir"><? echo $itemrow->categoryName; ?>
<ul>
<?
$database->setQuery( "SELECT sc.categoryName FROM #__maincategories AS sc "
. "\nWHERE sc.parent_num = '$itemrow->id' and sc.published = '1' "
. "\nOrder by sc.ordering ASC "
);
if ($database->getErrorNum()) {
echo $database->stderr();
return false;
}
$subrows = $database->loadObjectList();
for ($s=0, $q=count( $subrows ); $s < $q; $s++) {
$subrow = &$subrows[$s];
if($subrow->chkmakelink == '1'){
$CLink = $subrow->usefile;
} else {
$CLink = "tvccontent.php?page=product&productid=".$subrow->id."&category=".$subrow->id;
}
?>
<li class="dir"><? echo $subrow->categoryName; ?>
<ul>
<?
$database->setQuery( "SELECT cn.contentName FROM #__maincontent AS cn "
. "\n Where cn.catid = 'subrow->id' and cn.published ='1' "
. "\nOrder by ordering DESC "
);
if ($database->getErrorNum()) {
echo $database->stderr();
return false;
}
$rows = $database->loadObjectList();
for ($i=0, $n=count( $rows ); $i < $n; $i++) {
$row = &$rows[$i];
if($row->chkmakelink == '1'){
$CLink = $row->usefile;
} else {
$CLink = "tvccontent.php?page=product&subrow=".$row->id."&category=".$row->id;
}
?>
<li><a href="<? echo $CLink; ?>"><? echo $row->contentName; ?></a></li>
<?
}
?>
</ul>
</li>
<?
}
?>
</ul>
</li>
<?
}
?>
</ul>
|
|
|
|
|
Date :
2011-09-15 11:08:16 |
By :
Diamond Leu |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
เอาไฟล์ ที่include function มาด้วยได้ไม๊ครับ
|
|
|
|
|
Date :
2011-09-15 16:51:51 |
By :
deawx |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|