카테고리 출력 문제에 대하여 문의드려요. > 질문답변

본문 바로가기

사이트 내 전체검색

뒤로가기 질문답변

카테고리 출력 문제에 대하여 문의드려요.

본문

개발자님 안녕하세요.
전에 말씀드렸듯이 영카트4 사용자입니다.
아쉽게도, 영카트4에는 모바일웹이 지원되지 않아서,
구글 검색을 통하여, 이제서야 이렇게 좋은 제나플러스 솔루션을 알게 되였습니다.

기존에 운영중인 영카트를 날려버리고, 제나플러스로 새로 만드는것은 엄두도 못낼것 같구요.
그냥 제나플러스의 모바일소스(m폴더) 만 가져와서 영카트4에서 사용하려고 합니다.
간단한 부분은 제가 수정을 해보았는데요..
카테고리 출력하는 문제가 출력하는 문제가 아직 해결되지 않았습니다.

작업주소 : http://dd88.cafe24.com/m
카테고리가 출력되지 않는데요, 카테고리를 어떻게 수정해야 되죠?
===========================================================================================================================================
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

//$QUERY = "select * from g4_category where c_depth='0' order by c_sort asc";
$QUERY = " select ca_id, ca_name from $g4[yc4_category_table]
          where ca_use = '1'
          order by ca_id ";
$RESULT = mysql_query($QUERY);
?>

<style type="text/css">
... ...
</style>

<div id="zp_boxcategory">
<div class='left_bar'>CATEGORY</div>
<ul class='bo_box'>
<?
$NO = 1;
while($LIST = @mysql_fetch_array($RESULT))
{
if($searchCate!="")
{
$strFind=mysql_num_rows(mysql_query("select c_name from yc4_category ca_id like '$ca%' and length(ca_id) = $ca_len"));
}
?>
<li class='bo_li'><img src='<?=$g4[shop_path]?>/img/caleft_icon.gif' border='0' style='vertical-align:middle;'>&nbsp;<a href="<?=$g4[path]?>/shop/goods_list.php?CODE=<?=$LIST[c_code]?>"><?=$LIST[c_name]?></a></li>
<?
$QUERY2 = "select c_name, c_code, c_pcode from yc4_category where c_depth='1' and c_pcode='$LIST[c_code]' order by c_name asc";
$RESULT2 = @mysql_query($QUERY2);
?>
<?
while($LIST2 = mysql_fetch_array($RESULT2))
{
?>
<li class='bo_li'><img src='<?=$g4[shop_path]?>/img/caleft_icon2.gif' border='0' style='vertical-align:middle;'><a href="<?=$g4[path]?>/shop/goods_list.php?CODE=<?=$LIST2[c_code]?>"><?=$LIST2[c_name]?></a></li>
<?
}
?>
<?
$NO++;
}
?>
</ul>
</div>
===========================================================================================================================================
좋은 프로그램을 사용하는것만으로도 너무너무 고마운데요.
염치불구한 질문까지 드려서 죄송합니다.
제나플러스 정말 괜찮은것 같구요. 잘 수정해서 한번 사용해보구 싶습니다.
바쁘신 시간이겠지만, 조언을 좀 해주시면 정말 고맙겠습니다.
추천0

댓글목록 4

제로님의 댓글

제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

<?php
if (!defined("_GNUBOARD_")) exit;
?>
<style type="text/css">
#boxcategory01 { border:1px solid #dddddd; text-align:left; margin:0 0 10px 0; }
#boxcategory01 .left_bar { padding:5px 0px 5px 10px; font-weight:bold; background:url(<?php echo $g4['shop_img_path']?>/title_bar.gif) repeat-x; text-align:left; }
#boxcategory01 .left_bar { padding:5px 0px 5px 10px; font-weight:bold; border-top:0px solid #739CB0; text-align:left; }
#boxcategory01 .left_bar a:link,
#boxcategory01 .left_bar a:visited,
#boxcategory01 .left_bar a:active { text-decoration:none; color:#333333; }
#boxcategory01 .left_bar a:hover { text-decoration:none; color:#333333; }
#boxcategory01 .out_box { border:0px solid #dddddd; }
#boxcategory01 .gr_box { padding:10px 0 10px 10px; }
#boxcategory01 .bo_box { background:#ffffff; border:0px solid #dbe1e4; padding:1px; }
#boxcategory01 .bo_li { list-style-type:none; }
#boxcategory01 .bo_li { border-bottom:1px dotted #dddddd; list-style-type:none; }
#boxcategory01 .bo_li1 { padding:6px 0; list-style-type:none; }
#boxcategory01 ul { list-style-type:none; }
#boxcategory01 li { padding:8px 5px 8px 10px; list-style-type:none; }
/*#boxcategory01 li:before { content:url(<?php echo $leftmenu_skin_path?>/img/icon_arrow05.gif); vertical-align: middle; }*/
/*#boxcategory01 li a:link,#boxcategory01 li a:visited
{
display:block;
background-color:#ffffff;
padding:8px 5px 8px 10px;
text-decoration:none;
text-transform:uppercase;
}
#boxcategory01 li a:hover,#boxcategory01 li a:active { background-color:#f9f9f9; }*/
</style>

<div id="boxcategory01">
    <h3 class='left_bar' style='font-size:100%;'>카테고리</h3>
<?
$bullet="<img src='$g4[shop_img_path]/img/icl.gif'>";
$bullet1="<img src='$g4[shop_img_path]/img/icl1.gif'>";
$left_icon = "<img src='$g4[shop_img_path]/left_icon.gif' style='vertical-align:middle;'>";
$left_icon2 = "<img src='$g4[shop_img_path]/caleft_icon2.gif' style='vertical-align:middle;'>";
// 1
$hsql = " select ca_id, ca_name from $g4[yc4_category_table]
          where length(ca_id) = '2'
            and ca_use = '1'
          order by ca_id";
$hresult = sql_query($hsql);
$hnum = @mysql_num_rows($hresult);
echo "<ul class='bo_box'>";
for ($i=0; $row=sql_fetch_array($hresult); $i++) {
    // 2
    $menubody = "";
    $sql2 = " select ca_id, ca_name from $g4[yc4_category_table]
              where LENGTH(ca_id) = '4'
                and SUBSTRING(ca_id,1,2) = '$row[ca_id]'
                and ca_use = '1'
              order by ca_id";
    $result2 = sql_query($sql2);
    $hnum2 = @mysql_num_rows($hresult);
    for ($j=0; $row2=sql_fetch_array($result2); $j++) {
        $himg = "$g4[path]/data/category/{$row2[ca_id]}_h";
        if (file_exists($himg)) {
            $menubody .= "<li class='bo_li'><h4 style='font-size:100%; font-weight:normal;'><a href='$g4[shop_path]/list.php?ca_id=$row2[ca_id]'>{$left_icon2}<img src='$himg' border=0 alt='{$row2[ca_name]}'></a></h4></li>";
        } else {
            $menubody .= "<li class='bo_li'><h4 style='font-size:100%; font-weight:normal;'><a href='$g4[shop_path]/list.php?ca_id=$row2[ca_id]'>{$left_icon2}{$row2[ca_name]}</a></h4></li>";
        }
    }
    $category_link = "<a href='$g4[shop_path]/list.php?ca_id=$row[ca_id]'>";

        $himg = "$g4[path]/data/category/{$row[ca_id]}_h";
        if (file_exists($himg)) {
            echo "<li class='bo_li''><h4 style='font-size:100%;'>{$category_link}<img src='$himg' border=0 alt='{$row[ca_name]}'></h4></a>\n";
        } else {
            echo "<li class='bo_li''><h4 style='font-size:100%;'>{$category_link}{$row[ca_name]}</h4></a>\n";
        }
    if ($menubody) {
        echo "$menubody";
    }
    echo "</li>";
}
echo "</ul>";
?>
</div>

************
응용해 보세요

이다올님의 댓글의 댓글

이다올쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

바쁘신 시간에 답변을 해주셔서 정말 감사합니다. 꾸벅^^

개발자님께서 조언해주셨던것처럼, 적용을 해보았는데요...

select ca_id, ca_name from yc4_category length(ca_id) = '2' and ca_use = '1' order by ca_id

1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(ca_id) = '2' and ca_use = '1' order by ca_id' at line 2

error file : /m/index.php

이렇게 에러문구가 나타납니다.  (  http://dd88.cafe24.com/m/  )

프로그램 실력이 딸려서, 이런 환영메시지를 보면, 어질어질 해나네요...ㅎㅎ

이다올님의 댓글의 댓글

이다올쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

개발자님, 잘 해결되였습니다.

감사합니다^^

제로님의 댓글의 댓글

제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

네 응용만 잘하시면 됩니다~

전체 1,640건 3 페이지
게시물 검색
Copyright (c) 株式会社YHPLUS. All rights reserved.

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒171-0014 東京都豊島区池袋2-41-5 アーバン154 8F
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

PC 버전으로 보기