function apms_tag_post_rows($arr) { global $g5; $list = array(); $rows = isset($arr['rows']) && $arr['rows'] > 0 ? $arr['rows'] : 7; $newtime = isset($arr['newtime']) && $arr['newtime'] > 0 ? $arr['newtime'] : 24; $thumb_w = isset($arr['thumb_w']) && $arr['thumb_w'] > 0 ? $arr['thumb_w'] : 0; $thumb_h = isset($arr['thumb_h']) && $arr['thumb_h'] > 0 ? $arr['thumb_h'] : 0; $thumb_no = isset($arr['thumb_no']) && $arr['thumb_no'] ? true : false; $img_rows = isset($arr['img_rows']) && $arr['img_rows'] > 0 ? $arr['img_rows'] : 0; $no_img = isset($arr['no_img']) && $arr['no_img'] ? $arr['no_img'] : ''; $dayterm = isset($arr['dayterm']) && $arr['dayterm'] > 0 ? $arr['dayterm'] : 0; $term = isset($arr['term']) && $arr['term'] ? $arr['term'] : ''; $term = $term == 'day' && $dayterm > 0 ? $dayterm : $term; $gr_list = isset($arr['gr_list']) && $arr['gr_list'] ? apms_escape_string($arr['gr_list']) : ''; $bo_list = isset($arr['bo_list']) && $arr['bo_list'] ? apms_escape_string($arr['bo_list']) : ''; $bo_table = $gr_list ? apms_group_board($gr_list) : $bo_list; $sql_board = ''; if ($bo_table) { $sql_board = isset($arr['except']) && $arr['except'] ? "and find_in_set(bo_table, '{$bo_table}')=0" : "and find_in_set(bo_table, '{$bo_table}')"; } $result = sql_query(" select bo_table, wr_id from {$g5['apms_tag_log']} where bo_table <> '' {$sql_board} group by bo_table, wr_id order by regdate desc limit 0, {$rows} ", false); for ($i = 0; $row = sql_fetch_array($result); $i++) { $tmp_write_table = $g5['write_prefix'] . $row['bo_table']; $post = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ", false); $post['img_row'] = $arr['img_rows']; $list[$i] = thema_widget_write_list('post', $row['bo_table'], $post, $newtime, $thumb_w, $thumb_h, false, true); if ($thumb_w) { if (!$list[$i]['img']['src'] && $no_img) { $list[$i]['img'] = $thumb_no ? apms_thumbnail($no_img, 0, 0, false, true) : apms_thumbnail($no_img, $thumb_w, $thumb_h, false, true); // no-image $list[$i]['img']['org'] = $no_img; $list[$i]['img']['alt'] = ''; } } } return $list; }
function apms_banner_rows($arr) { global $g5, $demo_config; $list = array(); $bn_list = isset($arr['bn_list']) && $arr['bn_list'] ? apms_escape_string($arr['bn_list']) : ''; $position = isset($arr['loc']) && $arr['loc'] ? apms_escape_string($arr['loc']) : ''; $rows = isset($arr['rows']) && $arr['rows'] > 0 ? $arr['rows'] : 4; $sort = isset($arr['sort']) && $arr['sort'] ? $arr['sort'] : ''; $thumb_w = isset($arr['thumb_w']) && $arr['thumb_w'] > 0 ? $arr['thumb_w'] : 0; $thumb_h = isset($arr['thumb_h']) && $arr['thumb_h'] > 0 ? $arr['thumb_h'] : 0; $thumb_no = isset($arr['thumb_no']) && $arr['thumb_no'] ? true : false; //데모 if (isset($demo_config['bn_id']) && $demo_config['bn_id']) { $bn_list = $demo_config['bn_id']; } // 배너 $sql_bn = ''; if ($bn_list) { $sql_bn = isset($arr['except']) && $arr['except'] ? "and find_in_set(bn_id, '{$bn_list}')=0" : "and find_in_set(bn_id, '{$bn_list}')"; } //위치 $sql_loc = $position ? "and bn_position = '{$position}'" : ""; // 정렬 switch ($sort) { case 'rdm': $orderby = 'rand()'; break; case 'asc': $orderby = 'bn_order desc, bn_id'; break; default: $orderby = 'bn_order, bn_id desc'; break; } $sql = " select * from {$g5['g5_shop_banner_table']} where '" . G5_TIME_YMDHIS . "' between bn_begin_time and bn_end_time {$sql_po} {$sql_bn} {$sql_loc} order by {$orderby} "; $result = sql_query($sql); $j = 0; for ($i = 0; $row = sql_fetch_array($result); $i++) { if (!is_file(G5_DATA_PATH . '/banner/' . $row['bn_id'])) { continue; } $list[$j] = $row; $img = apms_thumbnail(G5_DATA_URL . '/banner/' . $row['bn_id'], $thumb_w, $thumb_h, false, true); $list[$j]['img'] = $img['src']; $list[$j]['alt'] = $row['bn_alt']; $list[$j]['target'] = $row['bn_new_win'] ? ' target="_blank"' : ''; if ($row['bn_url'][0] == '#') { $list[$j]['href'] = $row['bn_url']; } else { if ($row['bn_url'] && $row['bn_url'] != 'http://') { $list[$j]['href'] = G5_SHOP_URL . '/bannerhit.php?bn_id=' . $row['bn_id'] . '&url=' . urlencode($row['bn_url']); } } $j++; } return $list; }
/icon/facebook.png" alt="페이스북으로 보내기"></a></li> <li><a class="asideButton cursor"><img src="<?php echo G5_SNS_URL; ?> /icon/twitter.png" alt="트위터로 보내기"></a></li> <li><a class="asideButton cursor"><img src="<?php echo G5_SNS_URL; ?> /icon/gplus.png" alt="구글플러스로 보내기"></a></li> <li><a class="asideButton cursor"><img src="<?php echo G5_SNS_URL; ?> /icon/kakaostory.png" alt="카카오스토리로 보내기"></a></li> <?php if (G5_IS_MOBILE && $config['cf_kakao_js_apikey']) { $kakaothumb = apms_thumbnail($seometa['img']['src'], 300, 0); ?> <li><a class="asideButton cursor"><img src="<?php echo G5_SNS_URL; ?> /icon/kakaotalk.png" alt="카카오톡으로 보내기"></a></li> <?php } ?> <li><a class="asideButton cursor"><img src="<?php echo G5_SNS_URL; ?> /icon/naverband.png" alt="네이버밴드로 보내기"></a></li> <?php } ?>
if ($is_orderable) { echo '<script src="' . $item_skin_url . '/shop.js"></script>' . PHP_EOL; } // 이미지처리 $j = 0; $thumbnails = array(); $item_image = ''; $item_image_href = ''; for ($i = 1; $i <= 10; $i++) { if (!$it['it_img' . $i]) { continue; } $thumb = get_it_thumbnail($it['it_img' . $i], 60, 60); if ($thumb) { $org_url = G5_DATA_URL . '/item/' . $it['it_img' . $i]; $img = apms_thumbnail($org_url, 600, 600, false, true); $thumb_url = $img['src'] ? $img['src'] : $org_url; if ($j == 0) { $item_image = $thumb_url; // 큰이미지 $item_image_href = G5_SHOP_URL . '/largeimage.php?it_id=' . $it['it_id'] . '&ca_id=' . $ca_id . '&no=' . $i; // 큰이미지 주소 } $thumbnails[$j] = '<a data-href="' . G5_SHOP_URL . '/largeimage.php?it_id=' . $it['it_id'] . '&ca_id=' . $ca_id . '&no=' . $i . '" data-ref="' . $thumb_url . '" class="thumb_item_image">' . $thumb . '<span class="sound_only"> ' . $i . '번째 이미지 새창</span></a>'; $j++; } } // 카운팅 $it_comment_cnt = $it['pt_comment'] > 0 ? ' <b class="orangered en">' . number_format($it['pt_comment']) . '</b>' : ''; $it_use_cnt = $item_use_count > 0 ? ' <b class="orangered en">' . number_format($item_use_count) . '</b>' : ''; $it_qa_cnt = $item_qa_count > 0 ? ' <b class="orangered en">' . number_format($item_qa_count) . '</b>' : '';
<li> <a href="./tag.php?sort=index">색인</a> </li> </ul> </div> </aside> <div class="tagbox-media"> <?php for ($i = 0; $i < count($list); $i++) { ?> <div class="media"> <div class="photo pull-left"> <?php if ($list[$i]['img']['src']) { $img = apms_thumbnail($list[$i]['img']['src'], 80, 80); ?> <img src="<?php echo $img['src']; ?> " alt="<?php echo $img['alt']; ?> "> <?php } else { ?> <i class="fa fa-tag"></i> <?php } ?>