diff --git a/head.php b/head.php
index cb23f8712..d269f8148 100644
--- a/head.php
+++ b/head.php
@@ -23,7 +23,7 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
현재접속자 =connect(); // 현재 접속자수 ?>
최근게시물
if ($is_member) { ?>
- if ($is_admin) { ?>관리자 } ?>
+ if ($is_admin) { ?>관리자 } ?>
정보수정
로그아웃
} else { ?>
diff --git a/head.sub.php b/head.sub.php
index 975ed12bc..bf523464a 100644
--- a/head.sub.php
+++ b/head.sub.php
@@ -42,7 +42,7 @@ else $g4_css = "default";
">
}?>
diff --git a/js/common.js b/js/common.js
index 2585b29ab..06728a068 100644
--- a/js/common.js
+++ b/js/common.js
@@ -311,9 +311,9 @@ function win_comment(url)
function win_formmail(mb_id, name, email)
{
if (g4_charset.toLowerCase() == 'euc-kr')
- win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+name+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=500, scrollbars=0");
+ win_open(g4_bbs_url+"/formmail.php?mb_id="+mb_id+"&name="+name+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=500, scrollbars=0");
else
- win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+encodeURIComponent(name)+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=480, scrollbars=0");
+ win_open(g4_bbs_url+"/formmail.php?mb_id="+mb_id+"&name="+encodeURIComponent(name)+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=480, scrollbars=0");
}
// 자기소개 창
diff --git a/js/shop.js b/js/shop.js
index 64801f872..8ce6333d5 100644
--- a/js/shop.js
+++ b/js/shop.js
@@ -2,11 +2,10 @@ if (typeof(SHOP_JS) == 'undefined') { // 한번만 실행
var SHOP_JS = true;
// 큰이미지 창
- function popup_large_image(it_id, img, width, height, cart_dir)
+ function popup_large_image(url, width, height)
{
var top = 10;
var left = 10;
- url = cart_dir+"/largeimage.php?it_id=" + it_id + "&img=" + img;
width = width + 50;
height = height + 100;
opt = 'scrollbars=yes,width='+width+',height='+height+',top='+top+',left='+left;
diff --git a/lib/shop.lib.php b/lib/shop.lib.php
index e0dad79a5..68dd1ba72 100644
--- a/lib/shop.lib.php
+++ b/lib/shop.lib.php
@@ -211,12 +211,12 @@ function get_large_image($img, $it_id, $btn_image=true)
{
global $g4;
- if (file_exists("$g4[path]/data/item/$img") && $img != "")
+ if (file_exists(G4_DATA_PATH."/item/$img") && $img != "")
{
- $size = getimagesize("$g4[path]/data/item/$img");
+ $size = getimagesize(G4_DATA_PATH."/item/$img");
$width = $size[0];
$height = $size[1];
- $str = "";
+ $str = " ";
if ($btn_image)
$str .= " ";
}
diff --git a/shop/boxtodayview.inc.php b/shop/boxtodayview.inc.php
index 9f0bd6f81..bd5729696 100644
--- a/shop/boxtodayview.inc.php
+++ b/shop/boxtodayview.inc.php
@@ -1,4 +1,6 @@
+include_once(G4_LIB_PATH.'/thumbnail.lib.php');
+
$tv_idx = get_session("ss_tv_idx");
$tv_div[top] = 0;
@@ -54,9 +56,18 @@ echo "\n";
for ($i=1; $i<=$tv_idx; $i++)
{
$tv_it_id = get_session("ss_tv[$i]");
- $rowx = sql_fetch(" select it_name from $g4[yc4_item_table] where it_id = '$tv_it_id' ");
+ $sqlx = " select it_name, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
+ from $g4[yc4_item_table] where it_id = '$tv_it_id' ";
+ $rowx = sql_fetch($sqlx);
$it_name = get_text(addslashes($rowx['it_name']));
- $img = get_it_image($tv_it_id."_s", $tv_div['img_width'], $tv_div['img_height'], $tv_it_id);
+ $tv_filepath = G4_DATA_PATH.'/item/'.$tv_it_id;
+ for($k=1;$k<=10;$k++) {
+ $tv_filename = $rowx['it_img'.$k];
+ if(file_exists($tv_filepath.'/'.$tv_filename) && $tv_filename != "")
+ break;
+ }
+ $tv_it_img = $tv_it_id.'/'.it_img_thumb($tv_filename, $tv_filepath, $tv_div['img_width'], $tv_div['img_height']);
+ $img = get_it_image($tv_it_img, $tv_div['img_width'], $tv_div['img_height'], $tv_it_id);
$img = preg_replace("/\".cut_str($it_name,10,"")." \";\n";
}
diff --git a/shop/item.php b/shop/item.php
index 4828f7771..570881985 100644
--- a/shop/item.php
+++ b/shop/item.php
@@ -1,5 +1,6 @@
include_once('./_common.php');
+include_once(G4_LIB_PATH.'/thumbnail.lib.php');
// 불법접속을 할 수 없도록 세션에 아무값이나 저장하여 hidden 으로 넘겨서 다음 페이지에서 비교함
$token = md5(uniqid(rand(), true));
@@ -70,10 +71,6 @@ else
$ca_id = $it['ca_id'];
include G4_SHOP_PATH.'/navigation1.inc.php';
-$himg = G4_DATA_PATH.'/item/'.$it_id.'_h';
-if (file_exists($himg))
- echo ' ';
-
// 상단 HTML
echo stripslashes($it['it_head_html']);
@@ -179,26 +176,33 @@ else
- $middle_image = $it['it_id']."_m";
+ $filepath = G4_DATA_PATH.'/item/'.$it['it_id'];
+ for($i=1; $i<=10; $i++) {
+ if(file_exists($filepath.'/'.$it['it_img'.$i]) && $it['it_img'.$i] != "") {
+ $filename = $it['it_img'.$i];
+ break;
+ }
+ }
+
+ $middle_image = $it['it_id'].'/'.it_img_thumb($filename, $filepath, $default['de_mimg_width'], $default['de_mimg_height']);
?>
- =get_large_image($it['it_id']."_l1", $it['it_id'], false)?>=get_it_image($middle_image);?>
+ =get_large_image($it['it_id'].'/'.$filename, $it['it_id'], false)?>=get_it_image($middle_image);?>
- for ($i=1; $i<=5; $i++)
+ for ($i=1; $i<=10; $i++)
{
- if (file_exists(G4_DATA_PATH."/item/{$it_id}_l{$i}"))
+ $filename = $it['it_img'.$i];
+
+ if (file_exists($filepath.'/'.$filename) && $filename != "")
{
- echo get_large_image("{$it_id}_l{$i}", $it['it_id'], false);
- if ($i==1 && file_exists(G4_DATA_PATH."/item/{$it_id}_m"))
- echo " ";
echo " ";
}
@@ -1113,10 +1117,6 @@ $(function() {
// 하단 HTML
echo stripslashes($it['it_tail_html']);
-$timg = G4_DATA_PATH."/item/{$it_id}_t";
-if (file_exists($timg))
- echo " ";
-
if ($ca['ca_include_tail'])
@include_once($ca['ca_include_tail']);
else
diff --git a/shop/largeimage.php b/shop/largeimage.php
index 3d40da0ae..3ffefeb78 100644
--- a/shop/largeimage.php
+++ b/shop/largeimage.php
@@ -1,29 +1,33 @@
include_once("./_common.php");
-$sql = " select it_name from $g4[yc4_item_table] where it_id='$it_id' ";
+$sql = " select it_name, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10
+ from $g4[yc4_item_table]
+ where it_id='$it_id' ";
$row = sql_fetch_array(sql_query($sql));
-$imagefile = "$g4[path]/data/item/$img";
+$imagefile = G4_DATA_PATH."/item/$img";
+$imagefile_url = G4_DATA_URL."/item/$img";
$size = getimagesize($imagefile);
-$g4[title] = "$row[it_name] ($it_id)";
-include_once("$g4[path]/head.sub.php");
+$g4['title'] = "{$row['it_name']} ($it_id)";
+include_once(G4_PATH.'/head.sub.php');
?>
-
+
- for ($i=1; $i<=5; $i++)
+ for ($i=1; $i<=10; $i++)
{
- if (file_exists("$g4[path]/data/item/{$it_id}_l{$i}"))
- echo " ";
}
?>
@@ -31,5 +35,5 @@ include_once("$g4[path]/head.sub.php");
-include_once("$g4[path]/tail.sub.php");
+include_once(G4_PATH.'/tail.sub.php');
?>
\ No newline at end of file
diff --git a/skin/board/neo/view.skin.php b/skin/board/neo/view.skin.php
index 493641215..8d5f73413 100644
--- a/skin/board/neo/view.skin.php
+++ b/skin/board/neo/view.skin.php
@@ -7,7 +7,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($category_name) { // 분류가 지정되었다면 ?>=($category_name ? "{$view['ca_name']} " : "");?> } // 분류 출력 끝 ?>
- =cut_hangul_last(get_text($view['wr_subject'])) // 글제목 출력?>
+ =cut_str(get_text($view['wr_subject']), 70) // 글제목 출력?>