간이 쇼핑몰 스킨 - IE 관련 문제?? > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

간이 쇼핑몰 스킨 - IE 관련 문제?? 정보

간이 쇼핑몰 스킨 - IE 관련 문제??

본문

아래 소푸산님의 간이 쇼핑몰 소스를 적용하고 있는데,
 
약간 이상한 점이 있어서 글을 올립니다.
 
테스트 환경: 컴퓨터 4대 영문 xp 2
 
IE 7 (1대) - 정상적으로 수량이나 옵션 변경시 가격에 적용이 됩니다

Firefox 2.0 - 정상적으로 수량이나 옵션 변경시 가격에 적용이 됩니다.
 
IE 6 (3대) - 스크립트 오류가 있다고 나오면서 수량이나 옵션 적용시 가격에 변동이 없습니다.
 

 
테스트 주소:
 
 
입니다.
 
확인 부탁 드립니다. 감사합니다

댓글 전체

알라뷰님 관심 가져 주셔서 감사합니다
아래가 소스입니다


<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$board_skin_path/config.php");
//************************************************************
//
// 스킨명 : 카멜레온 간이몰 스킨
// 버  젼 : 2006-03-16일짜 버젼
// 제작자 : ⓒⓒⓒ (Soonho Choi) http://cm-builder.com
// MSN    : top-*** 개인정보보호를 위한 이메일주소 노출방지 ***
//
// 저작권 : 이 주석 부분을 훼손하지않은 상태에서 수정및 사용이 자유롭습니다.
//
//************************************************************
$icon_new = $icon_good = $icon_hit = $icon_point = $icon_aa = $icon_sellout ="";

if($view[wr_type1]) $icon_new = "<img src='$board_skin_path/img/icon_new2.gif' align=absmiddle>";
if($view[wr_type2]) $icon_good = "<img src='$board_skin_path/img/icon_good2.gif' align=absmiddle>";
if($view[wr_type3]) $icon_hit = "<img src='$board_skin_path/img/icon_hit2.gif' align=absmiddle>";
if($view[wr_type4]) $icon_point = "<img src='$board_skin_path/img/icon_point.gif' align=absmiddle>";

if($view[wr_type5]) $icon_aa = "<img src='$board_skin_path/img/icon_24_02.gif' align=absmiddle>";

if($view[wr_type6]) $icon_sellout = "<img src='$board_skin_path/img/icon_sellout.gif' align=absmiddle>";
?>

<script language="javascript" src="<?=$board_skin_path?>/money.js"></script>

<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspcing="0"><tr><td>


<? if($is_admin =='super') { ?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
    <td width=75%>
        <? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle'></a> "; } ?>
        <? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>

        <? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
        <?// if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle'></a> "; } ?>

<? if ($row9[wr_9] != 1) { ?>
        <? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_update.gif' border='0' align='absmiddle'></a> "; } ?>
        <? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? } ?>
        <? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle'></a> "; } ?>


    </td>
    <td width=25% align=right>
        <? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a>&nbsp;"; } ?>
        <? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a>&nbsp;"; } ?>
    </td>
</tr>
</table>
<? } ?>


<!-----<table cellpadding=0 cellspacing=0 border=0 width=773>
<tr><td><img src="<?=$board_skin_path?>/img/view_01.gif" width="773" height="5"></td>
</tr>
<tr><td height=25 background="<?=$board_skin_path?>/img/view_02.gif"></td></tr>
<tr><td background="<?=$board_skin_path?>/img/view_02.gif" align=center>---->


<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr><td></td>
</tr>
<tr><td height=25></td></tr>
<tr><td align=center>


<!--  pro spec list -->
<table cellpadding=0 cellspacing=0 border=0 align=center>
<form name=cart method="POST" action="javascript:cart_submit(document.cart);" autocomplete="off">
<input type=hidden name=bo_table value='<?=$bo_table?>'>
<input type=hidden name=wr_id value='<?=$wr_id?>'>
<tr>
<td width=210>

    <!-- image view -->
    <table cellpadding=0 cellspacing=1 border=0>
    <tr>
    <td class=cf>
   
        <table cellpadding=0 cellspacing=0 border=0>
        <tr><td height=10></td></tr>
        <tr><td>
               
                      <?
        // 파일 출력
        for ($i=0; $i < 1; $i++) {

//썸네일 코드 시작
$data_path = $g4['path'] . "/data/file/{$bo_table}";//라이브러리 파일 참조
$thumb_path = $data_path . '/thumbView';

$view_w = 250; //썸네일 가로사이즈
$view_h = 180; //썸네일 세로사이즈
$sch_q = 100; //썸네일 퀼리티

if (!is_dir($thumb_path)) {
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
}
    $filename = $view[file][$i][file]; //파일명
    $thumb = $thumb_path.'/'.$filename; //썸네일
    if (!file_exists($thumb))
    {
$file = $data_path.'/'.$filename; //원본
        if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file))
        {
            $size = getimagesize($file);
            if ($size[2] == 1)
                $src = imagecreatefromgif($file);
            else if ($size[2] == 2)
                $src = imagecreatefromjpeg($file);
            else if ($size[2] == 3)
                $src = imagecreatefrompng($file);
            else
                continue;

            $rate = $view_w / $size[0];
            $height = (int)($size[1] * $rate);

            if ($height < $view_h)
                $dst = imagecreatetruecolor($view_w, $height);
            else
                $dst = imagecreatetruecolor($view_w, $view_h);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $view_w, $height, $size[0], $size[1]);
            imagejpeg($dst, $thumb_path.'/'.$filename, $sch_q);
            chmod($thumb_path.'/'.$filename, 0707);
        }
    }

    if (file_exists($thumb) && $filename) {
echo "<img src='$thumb' style='border:1px solid #E2E2E2;'>";
    }
}
?></td>
</tr>
<tr>
<td width="250" height="25" align="center" valign="bottom">
<a href='#' onclick="javascript:window.open('<?=$board_skin_path?>/view_open.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>','view_open','width=800,height=560,top=50,left=50,scrollbars=yes,resizable=yes')">
<img src="<?=$board_skin_path?>/img/icon_open.gif" alt='큰이미지 보기' border="0"></a>     
               


        </td></tr>
       
        </table>

    </td></tr>
    </table>
    <!-- image view -->

</td>
<td width=50></td>
<td valign=top>

    <!-- spec list --> 





<table border="0" width="350" align=center>
    <tr>
        <td colspan="4"><img src="<?=$board_skin_path?>/img/view_06.gif"> <FONT STYLE="color:#CC00FF;font-size:16;font-style:normal;font-weight:"><b><?=$view[subject]?></b></font>
&nbsp;&nbsp;
<?=$icon_new?><?=$icon_good?><?=$icon_hit?><?=$icon_point?><?=$icon_aa?><?=$icon_sellout?></td>
    </tr>

    <tr><td colspan=4 height=5></td></tr>
    <tr><td colspan="4" height="1" background="<?=$board_skin_path?>/img/dot.gif"></td></tr>

    <tr>
        <td width="3" height=20><center><img src="<?=$board_skin_path?>/img/bul_07.gif"></td>
        <td width="100">판매가</td>
        <td width="2">:</td>
        <td width="200"><font color="#FF0066"><b>$ <?=number_format($view[wr_price])?></b></font></td>
    </tr>


<?
        $cn=0;
        for($i=1;$i<4;$i++) {

            if($view["wr_opt{$i}_price"]) {
                $cn++;
    ?>
    <tr><td width="3" height=20><center><img src="<?=$board_skin_path?>/img/bul_07.gif"></td>
        <td width="100"><font color="#7A8FDB"><?=$view["wr_opt{$i}_name"]?></font></td>
        <td width="2">:</td>
        <td width="200">$ <?=number_format($view["wr_opt{$i}_price"])?>
            <input type=hidden name=wr_opt<?=$i?>_price value='<?=$view["wr_opt{$i}_price"]?>'>
            <input type=checkbox name=chk_opt<?=$i?> value='1' onclick='add_sum()'>
        </td>
    </tr>
            <? } ?>
    <? } ?>


    <tr>
        <td width="3" height=20><center><img src="<?=$board_skin_path?>/img/bul_07.gif"></td>
        <td width="100">구매수량</td>
        <td width="2">:</td>
        <td width="200">


<table cellspacing=0 cellpadding=0>
            <tr>
                <td rowspan=2><input type=text name=wr_qty class=input onchange='add_sum()' style='IME-MODE: active' value='1' size=3></td>
                <td><img src='<?=$board_skin_path?>/img/up.gif' alt='증가' border=0 style='cursor:pointer;' onclick="qty_change('up');"></td>
                <td><img src='<?=$board_skin_path?>/img/down.gif' alt='감소' border=0 style='cursor:pointer;' onclick="qty_change('dn');"></td>
            </tr>
            </table>



</td>
    </tr>
    <tr>
        <td width="3" height=20><center><img src="<?=$board_skin_path?>/img/bul_07.gif"></td>
        <td width="100">합계</td>
        <td width="2">:</td>
        <td width="200">$
          <input type=text name=total_price_view class=input value='<?=number_format($view[wr_price])?>' readonly>
            <input type=hidden name=wr_price value='<?=$view[wr_price]?>'>
            <input type=hidden name=total_price value='<?=$view[wr_price]?>'></td>
    </tr>
    <tr>
        <td width="3" height=20><center><img src="<?=$board_skin_path?>/img/bul_07.gif"></td>
        <td width="100">상품코드</td>
        <td width="2">:</td>
        <td width="200"><font color="#0000ff"><?=$view[wr_10]?></font></td>
    </tr>
  <!--  <tr>
        <td width="3" height=20><center><img src="<?=$board_skin_path?>/img/bul_07.gif"></td>
        <td width="100">포인트적립금</td>
        <td width="2">:</td>
        <td width="200"><strong><?=$view[wr_2]?>원<strong></td>
    </tr> -->
    <tr>
        <td width="3" height=20><center><img src="<?=$board_skin_path?>/img/bul_07.gif"></td>
        <td width="100">옵션/기타</td>
        <td width="2">:</td>
        <td width="200"><?=$view[wr_4]?></td>
    </tr>

    <tr>
  <!-- <tr><td colspan=4 height=5></td></tr>-->
    <tr><td colspan="4" height="1" background="<?=$board_skin_path?>/img/dot.gif"></td></tr>

    <tr>
        <td colspan="4" align=right><? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\">
        <img src='$board_skin_path/img/scrap.gif' alt='장바구니 담기' border='0' align='absmiddle'></a> "; } ?>

<input type=image src='<?=$board_skin_path?>/img/view_14.gif' alt='바로 구매하기'></td>
    </tr>
</table>

           
    <!-- spec list -->                       
</td>
</tr>
</table>
</td></tr>
<!---<tr><td height=25 background="<?=$board_skin_path?>/img/view_02.gif"></td></tr>
<tr><td><img src="<?=$board_skin_path?>/img/view_03.gif" width="773" height="5"></td></tr></table>
<TABLE cellpadding=0 cellspacing=0 border=0>
<tr><td colspan=2 height=15></td></tr>--->

<tr><td height=25></td></tr>
<tr><td></td></tr></table>
<TABLE cellpadding=0 cellspacing=0 border=0>
<tr><td colspan=2 height=0></td></tr>


<TABLE cellpadding=0 cellspacing=0 border=0>
<TR>
<!---    <TD><img src="<?=$board_skin_path?>/img/view_21.gif" width="773" height="41"></TD>----->
</TR>

<!---<tr>
<td style='word-break:break-all; padding:10px;'  background="<?=$board_skin_path?>/img/view_15.gif">
<span class="ct lh"><?=conv_content($view[wr_content], 2);?>    </xml></xmp><a href=""></a><a href=''></a>
</td></tr>--->
<TR>
    <TD height="1" bgcolor="E7E7E7"></TD>
</TR>

<tr><td height=5></td></tr>


<TR>
<!---    <TD><img src="<?=$board_skin_path?>/img/view_22.gif" width="773" height="41"></TD>---->
</TR>

<!--<tr>
<td style='word-break:break-all; padding:10px;'  background="<?=$board_skin_path?>/img/view_15.gif">
    <span class="ct lh"><?=conv_content($view[wr_transport], 2);?></span>
    </xml></xmp><a href=""></a><a href=''></a>
   
</td></tr>--->
<TR>
    <TD height="1" bgcolor="E7E7E7"></TD>
</TR>
<!--<tr><td height=20></td></tr>--->
</form>
</table>




        <table cellpadding=0 cellspacing=0 border=0>
        <!-- img size 160 * 160 -->
        <tr><td height=10></td></tr>
        <tr><td class=c>
               
                <?
                // 파일 출력
                for ($i=0; $i<=count($view[file]); $i++) {
                    if ($view[file][$i][view])
                        echo "<img src='{$view[file][$i][path]}/{$view[file][$i][file]}' onclick='image_window(this);' style='cursor:pointer;' name='target_resize_image[]'><p>";
                }
                ?>     
               


        </td></tr>
        <tr><td height=7></td></tr>
        </table>





<!----------정보---------->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td bgcolor="#cacde2" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_01.gif" width="30" height="100"></td>
<td width="<?=$view_td?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#cacde2" width="<?=$view_td?>" height="1"></td>
</tr>
<tr>
<td style="padding:5 10 5 10px;" width="<?=$view_td?>" height="99">

<span class="ct lh"><?=conv_content($view[wr_content], 2);?><!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>


</td>
</tr>
</table></td>
</tr>
<tr height="1"><td></td><td></td></tr>
<tr>
<td bgcolor="#d6e1a7" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_02.gif" width="30" height="100"></td>
<td width="<?=$view_td?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#d6e1a7" width="<?=$view_td?>" height="1"></td>
</tr>
<tr>
<td style="padding:5 10 5 10px;" width="<?=$view_td?>" height="99">


<span class="ct lh"><?=conv_content($view[wr_transport], 2);?></span>
    <!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>


</td>
</tr>
</table></td>
</tr>
<tr height="1"><td></td><td></td></tr>
<tr>
<td bgcolor="#f6dbab" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_03.gif" width="30" height="100"></td>
<td width="<?=$view_td?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#f6dbab" width="<?=$view_td?>" height="1"></td>
</tr>
<tr>
<td style="padding:5 10 5 10px;" width="<?=$view_td?>" height="99">
<?
if ($view[wr_9]) {
echo $view[wr_9];
} else {
echo "교환 · 반품정보가 없습니다.";
}
?></td>
</tr>
</table></td>
</tr>
<tr height="1"><td></td><td></td></tr>
<tr>
<td bgcolor="#a7dfe1" width="30" valign="top"><img src="<?=$board_skin_path?>/img/item_04.gif" width="30" height="100"></td>
<td width="<?=$view_td?>">
<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">
<tr>
<td bgcolor="#a7dfe1" width="<?=$view_td?>" height="1"></td>
</tr>
<tr>
<td style="padding:0 0 5 10px;" width="<?=$view_td?>" height="99">
<?
include_once("./view_comment.php");
?></td>
</tr>
</table></td>
</tr>
</table>




<script language="javascript">

function add_sum()
{
    var bf = document.cart ;
    var total_price;
    total_price = bf.wr_price.value;

    <?
    $cn++;   
    for($i=1;$i<$cn;$i++) { ?>
    if(bf.chk_opt<?=$i?>.checked==true) total_price = parseInt(total_price) + parseInt(bf.wr_opt<?=$i?>_price.value);
    <? } ?>
   
    total_price = parseInt(total_price) * parseInt(bf.wr_qty.value);   
    bf.total_price_view.value = numchk(total_price);
    bf.total_price.value = total_price;

}

function qty_change(chg)
{
    var f = document.cart ;
    var qty = f.wr_qty.value;

    if(chg=='up') qty++;               
    if(chg=='dn') qty--;

    if(qty<1) qty = 1;
    f.wr_qty.value = qty;
    add_sum();

}

function cart_submit(f)
{
    f.action = "<?=$board_skin_path?>/order.php";
    f.submit();
}

</script>


</td></tr></table><br>

<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
    var target = document.getElementsByName('target_resize_image[]');
    var image_width = parseInt('<?=$board[bo_image_width]?>');
    var image_height = 0;

    for(i=0; i<target.length; i++) {
        // 원래 사이즈를 저장해 놓는다
        target[i].tmp_width  = target[i].width;
        target[i].tmp_height = target[i].height;
        // 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
        if(target[i].width > image_width) {
            image_height = parseFloat(target[i].width / target[i].height)
            target[i].width = image_width;
            target[i].height = parseInt(image_width / image_height);
        }
    }
}

window.onload = resize_image;

function file_download(link, file)
{
<? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href = link;
}
</script>
<!-- 게시글 보기 끝 -->
올려주신 뷰어스킨파일에는 오류 없습니다.
익스7 / 모질라 확인
상단이나 하단 또는 다른 부분에 스크립트 충돌이 없는지 살펴보세요.



먼저번 질문하신 내용 잠간 올립니다.

옵션부분 오데에 출력되게(수정 사용하세요)
order.php

<?
if ($chk_opt1 ==  1) echo "(".$view["wr_opt1_name"]."포함)";
if ($chk_opt2 ==  1) echo "(".$view["wr_opt2_name"]."포함)";
if ($chk_opt3 ==  1) echo "(".$view["wr_opt3_name"]."포함)";
?>



그리고
오더리스트나 오더뷰어에 옵션내용 출력관련해서..

디비로 들어가서 오더테이블에 필드를하나 만듭니다.
그리고 그 필드명으로 출력되게하면됩니다.
인픗부분은 오더스킨 다른부분에서 참고하심 되겠네요.
해결 되었습니다..
저는 utf-8 버전이 필요해서 스킨 전부를 변경해서 테스트 했는데,
다른 파일들은 이상없이 변환이 되었는데, money.js 파일이 변경되는중에 이상이 생겼네요.
원본 파일을 다시 변경해서 업로드 하니까 IE6에서도 정상적으로 작동이 되네요.
다시 한번 감사 드립니다.
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT