Example #1
0
function dequy_menu_doc($id)
{
    $tv = "select * from menu where thuoc_menu='{$id}' and vitri_menu='doc' order by id";
    $tv_1 = mysql_query($tv);
    while ($tv_2 = mysql_fetch_array($tv_1)) {
        $id = $tv_2['id'];
        $ten = $tv_2['ten'];
        $link_menu = "?thamso=san_pham_left&ten_menu=" . $ten . "&id={$id}";
        echo "<li>";
        echo "<a href=\"{$link_menu}\">";
        echo $tv_2['ten_en'];
        echo "</a>";
        $xacdinh_menu_con_doc = xacdinh_menu_con_doc($id);
        if ($xacdinh_menu_con_doc == "co") {
            echo "<ul>";
            dequy_menu_doc($id);
            echo "</ul>";
        } else {
        }
        echo "</li>";
    }
}
Example #2
0
function dequy_menu_doc($id)
{
    $tv = "select * from menu where thuoc_menu='{$id}' and vitri_menu='doc' order by id";
    $tv_1 = mysql_query($tv);
    while ($tv_2 = mysql_fetch_array($tv_1)) {
        $id = $tv_2['id'];
        $ten = $tv_2['ten'];
        $url = khongdau($ten);
        $link_menu = "san-pham-" . $url . "-{$id}.html";
        echo "<li>";
        echo "<a href=\"{$link_menu}\">";
        echo $tv_2['ten'];
        echo "</a>";
        $xacdinh_menu_con_doc = xacdinh_menu_con_doc($id);
        if ($xacdinh_menu_con_doc == "co") {
            echo "<ul>";
            dequy_menu_doc($id);
            echo "</ul>";
        } else {
        }
        echo "</li>";
    }
}