메뉴 노출문의 채택완료

고수님들 이미지 처러 

지금은 1차에 마우스 오버하면 소메뉴만 출력되는데  소메뉴 위에 다시한번 1차메뉴 보여 주면서 소메뉴가 같이 보였이게 작업하려 합니다. 

 

 

 

1030060419_1595488334.8858.jpg

 

 

 

 

 

 

Copy
<?php
            $sql = " select *
                        from {$g5['menu_table']}
                        where me_use = '1'
                          and length(me_code) = '2'
                        order by me_order, me_id ";
            $result = sql_query($sql, false);
            $lnb_zindex = 999; // lnb_1dli z-index 값 설정용
            
            for ($i=0; $row=sql_fetch_array($result); $i++) {
                // link주소에 파라미터가 있는 경우
                if(strstr($row['me_link'], ".php?"))
                    $qstr2 = "&me_code=".$row['me_code'];
                // link주소에 파라미터가 없는 경우
                else
                $qstr2 = "?me_code=".$row['me_code'];

                $me_str = $me_code;
                $me_co = substr($me_str, 0, 1);
            ?>


                <li class="depth01<?php if($row[me_order]==$me_co){echo ' active'.$me_order;} ?>" style="z-index:<?php echo $lnb_zindex--; ?>">
                    <a href="<?php echo $row['me_link']; ?><?php echo $qstr2; ?>" target="_<?php echo $row['me_target']; ?>"><?php echo $row['me_name'] ?></a>

                    <?php
                    $sql2 = " select *
                                from {$g5['menu_table']}
                                where me_use = '1'
                                  and length(me_code) = '4'
                                  and substring(me_code, 1, 2) = '{$row['me_code']}'
                                order by me_order, me_id ";
                    $result2 = sql_query($sql2);
                
                    for ($k=0; $row2=sql_fetch_array($result2); $k++) {
                        // link주소에 파라미터가 있는 경우
                        if(strstr($row2['me_link'], ".php?"))
                            $qstr2 = "&me_code=".$row2['me_code'];
                        // link주소에 파라미터가 없는 경우
                        else
                        $qstr2 = "?me_code=".$row2['me_code'];
                
                        if($k == 0)
                            echo '<div class="depth02"><ul class="clearfix">'.PHP_EOL;
                    ?>
                    
                        
                        
                        
        

                
                    
                            <li>
                
                <a href="<?php echo $row2['me_link']; ?><?php echo $qstr2; ?>" target="_<?php echo $row2['me_target']; ?>"><?php echo $row2['me_name'] ?></a></li>

                    <?php
                    }
                
                    if($k > 0)
                        echo '</ul></div>'.PHP_EOL;
                    ?>
            </li>


    
            <?php } ?>

답변 1개

채택된 답변
+20 포인트

스타일 작업은 적절하게 하셔야됩니다.

<div class="depth02"><div> <?php echo $row['me_name'] ?> </div><ul class="clearfix">

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고