링크 코드수정..
본문
https://search-co.kr/shop/item.php?it_id=1581052815&ca_id=80
이 링크를 php 문법으로 가져오고싶은데 감이 안잡히네요..
다른파일에 링크를 표시해줘야하는데 상품마다 다른링크인데 아래코드에서 가져다가 아무리 써봐도..
작동이 전혀되질 않네요 .. 짜집기의 한계인가봐요 .. 도와주세요 ㅠ
<div style="width:100%;float:right" class="oing">
<?php
// 리스트
for ($i=0; $i < $list_cnt; $i++) {
// DC
$cur_price = $dc_per = '';
if($list[$i]['it_cust_price'] > 0 && $list[$i]['it_price'] > 0) {
$cur_price = '<strike> '.number_format($list[$i]['it_cust_price']).' </strike>';
$dc_per = round((($list[$i]['it_cust_price']-$list[$i]['it_price'])/$list[$i]['it_cust_price']) * 100);
}
// 라벨
$item_label = '';
if($dc_per || $list[$i]['it_type5']) {
$item_label = '<div class="label-cap bg-red">DC</div>';
} else if($list[$i]['it_type3'] || $list[$i]['pt_num'] >= (G5_SERVER_TIME-($new_item * 3600))) {
$item_label = '<div class="label-cap '.$wset['new'].'">NEW</div>';
}
// 아이콘
$item_icon = item_icon($list[$i]);
$item_icon = ($item_icon) ? '<div class="label-tack">'.$item_icon.'</div>' : '';
$org_img = (is_file(G5_DATA_PATH."/item/".$list[$i]['it_img1'])) ? G5_DATA_URL."/item/".$list[$i]['it_img1'] : ''.G5_URL.'/img/who01.png'; //원본이미지
$img = apms_thumbnail($org_img, '썸네일너비', '썸네이높이'); //썸네일
?>
<div class="item-row" value="<?php echo $list[$i]['it_maker'];?>" title="">
<div class="item-list item-list2 sub_list">
<div class="item-image">
<a href="<?php echo $list[$i]['href'];?>">
<div class="img-wrap" >
<?php echo $shadow_in;?>
<?php echo $item_label;?>
<?php echo $item_icon;?>
<div class="two_img"> <!--로고-->
<img src="<?php echo $img['src'];?>" alt="<?php echo $img['alt'];?>">
</div>
</div>
</a>
<?php echo $shadow_out;?>
</div>
<div class="item-content" style="height:auto !important; padding: 0px 10px; padding-left:7px; padding-bottom:0 !important;">
<?php if($wset['star']) { ?>
<div class="item-star">
<?php echo apms_get_star($list[$i]['it_use_avg'], $wset['star']); //평균별점 ?>
</div>
<?php } ?>
<div class="item-name" >
<?php echo $author['mb_nick'];?>
<a class="nick_href" href="<?php echo $list[$i]['href'];?>">
<div class="tagggg" style="width:100%; float:left; letter-spacing:0; float:left;float: left; color: #989898; font-size: 11px;">
<span class="text_12" style="">
<?php echo ( $list[$i]['it_origin'] == '기업') ? '<span class="origin01">기업</span>' : '<span class="origin02">개인</span>'; ?>
</span>
<?php if($list[$i]['it_7']) { ?>
<span class="text_12" style="float:left; padding-top: 2px; font-size:11px; color:#000;">
<?php echo $list[$i]['it_7']; //등록자 ?>
</span>
<?php } else { ?>
<span class="text_12 text_15" style="float:left; padding-top: 2px; font-size:11px;">
<?php echo $author['mb_nick'];?>
</span>
<?php } ?>
<!--상담가능여부 가능/상담중 컬러다르게출력-->
<?php
$color = "#feff5b"; // 기본 상담가능 컬러
$border = ""; // 기본 상담가능 테두리컬러
$background = "#73bbfd"; // 기본 상담가능 배경컬러
if ( $list[$i]['it_basic'] == '상담중') {
$color = "#ff0054"; // 상담중 선택시 컬러
$border = "1px dashed #73bbfd"; // 상담중 선택시 테두리컬러
$background = "none"; // 상담중 선택시 배경컬러
}
?>
<span style="position: absolute; top: 40px;left: 71px; border-radius: 3px; padding:2px;color:<?php echo $color; ?>;border:<?php echo $border; ?>;background:<?php echo $background; ?>;">
<?php echo $list[$i]['it_basic']; ?>
</span>
<div class="text_12 area_12" style="width:100%;margin-top:20px">
<span style="float:right; letter-spacing:0; background: #f2f2f2; color: #555; font-size: 11px; padding: 0px 5px; font-weight: 600; margin-right:10px; display:inline-block;"><?php echo $list[$i]['it_maker'];?><!--지역--></span>
</div>
</div>
<b class="no_text" style="letter-spacing:0; text-align:left; color: #3b3b3b; width: 100%; height:38px; overflow:hidden; float: left;
color: #3b3b3b; font-size:13px; line-height: 1.5em; margin-top:5px;">
<?php echo $list[$i]['it_name'];?>
</b><!--제목-->
<div style="height:52px; overflow:hidden; margin-top:7px; letter-spacing:0; color:#666; width: 100%; float: left; ">
<span>
<?php if($list[$i]['it_1']) { ?>
<span class="tagg"><?php echo $list[$i]['it_1'] ?></span>
<?php } else { ?>
<span></span>
<?php } ?>
</span>
<span>
<?php if($list[$i]['it_2']) { ?>
<span class="tagg"><?php echo $list[$i]['it_2'] ?></span>
<?php } else { ?>
<span></span>
<?php } ?>
</span>
<span>
<?php if($list[$i]['it_3']) { ?>
<span class="tagg"><?php echo $list[$i]['it_3'] ?></span>
<?php } else { ?>
<span></span>
<?php } ?>
</span>
<span>
<?php if($list[$i]['it_4']) { ?>
<span class="tagg"><?php echo $list[$i]['it_4'] ?></span>
<?php } else { ?>
<span></span>
<?php } ?>
</span>
<span>
<?php if($list[$i]['it_5']) { ?>
<span class="tagg"><?php echo $list[$i]['it_5'] ?></span>
<?php } else { ?>
<span></span>
<?php } ?>
</span>
<span>
<?php if($list[$i]['it_6']) { ?>
<span class="tagg"><?php echo $list[$i]['it_6'] ?></span>
<?php } else { ?>
<span></span>
<?php } ?>
</span>
</div>
</a>
<div style="width:100%; float:left; border-top: 1px dotted #ddd; padding: 5px; margin-top: 5px; padding-bottom:5px;">
<div class="list_star" style="float:left; letter-spacing:0; color:#3ba9e6; text-align:left; ">
<?php echo apms_get_star($list[$i]['it_use_avg']); //평균별점 ?>
<span style="font-size: 10px; color: #989898;">(<?php echo $list[$i]['it_use_cnt'] ?>)</span>
</div>
<div class="item-price en" style="margin-top: 3px; color:#e68000; float:right; padding-right:5px !important; ">
<?php if($list[$i]['it_price']==0) { ?>
<b>합의</b>
<?php } else { ?>
<b>
<i class="fa fa-krw"></i>
<?php echo number_format($list[$i]['it_price']);?>원~
</b>
<?php } ?>
</div>
</div>
</div>
</div>
<?php if($wset['sns']) { ?>
<div class="item-sns">
<?php
$sns_url = G5_SHOP_URL.'/item.php?it_id='.$list[$i]['it_id'];
$sns_title = get_text($list[$i]['it_name']);
$sns_img = $list_skin_url.'/img';
echo get_sns_share_link('facebook', $sns_url, $sns_title, $sns_img.'/sns_fb.png').' ';
echo get_sns_share_link('twitter', $sns_url, $sns_title, $sns_img.'/sns_twt.png').' ';
echo get_sns_share_link('googleplus', $sns_url, $sns_title, $sns_img.'/sns_goo.png').' ';
echo get_sns_share_link('kakaostory', $sns_url, $sns_title, $sns_img.'/sns_kakaostory.png').' ';
echo get_sns_share_link('kakaotalk', $sns_url, $sns_title, $sns_img.'/sns_kakao.png').' ';
echo get_sns_share_link('naverband', $sns_url, $sns_title, $sns_img.'/sns_naverband.png').' ';
?>
</div>
<?php } ?>
</div>
</div>
<?php } // end for ?>
답변을 작성하시기 전에 로그인 해주세요.