Merge branch 'master' of github.com:gnuboard/g4s

This commit is contained in:
whitedot
2013-01-29 18:02:33 +09:00
9 changed files with 54 additions and 44 deletions

View File

@ -23,7 +23,7 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
<li><a href="<?=G4_BBS_URL?>/current_connect.php">현재접속자 <?=connect(); // 현재 접속자수 ?></a></li>
<li><a href="<?=G4_BBS_URL?>/new.php">최근게시물</a></li>
<? if ($is_member) { ?>
<? if ($is_admin) { ?><li><a href="<?=G4_ADM_URL?>">관리자</a></li><? } ?>
<? if ($is_admin) { ?><li><a href="<?=G4_ADMIN_URL?>">관리자</a></li><? } ?>
<li><a href="<?=G4_BBS_URL?>/member_confirm.php?url=<?=G4_BBS_URL?>/register_form.php">정보수정</a></li>
<li><a href="<?=G4_BBS_URL?>/logout.php">로그아웃</a></li>
<? } else { ?>

View File

@ -42,7 +42,7 @@ else $g4_css = "default";
<link rel="stylesheet" href="<?=G4_CSS_URL?>/<?=$g4_css?>.css?=<?=date("md")?>">
<?}?>
<!--[if lte IE 8]>
<script src="<?=$g4['url']?>/js/html5.js"></script>
<script src="<?=G4_JS_URL?>/html5.js"></script>
<![endif]-->
<script>
// 자바스크립트에서 사용하는 전역변수 선언
@ -56,11 +56,7 @@ var g4_charset = "<?=$g4['charset']?>";
var g4_cookie_domain = "<?=$g4['cookie_domain']?>";
var g4_is_gecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
<?
if ($is_admin) {
echo PHP_EOL.'var g4_admin_url = "'.G4_ADMIN_URL.'";';
}
?>
<? if ($is_admin) { echo "var g4_admin = '{$g4['admin']}';"; } ?>
</script>
<script src="<?=G4_JS_URL?>/jquery-1.8.3.min.js"></script>
<script src="<?=G4_JS_URL?>/common.js"></script>

View File

@ -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");
}
// 자기소개 창

View File

@ -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;

View File

@ -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 = "<a href=\"javascript:popup_large_image('$it_id', '$img', $width, $height, '$g4[shop_path]')\">";
$str = "<a href=\"".G4_SHOP_URL."/largeimage.php?it_id=".$it['it_id']."&amp;img=".$img."\" target=\"_blank\" onclick=\"popup_large_image(this.href, $width, $height); return false;\">";
if ($btn_image)
$str .= "<img src='$g4[shop_img_path]/btn_zoom.gif' border='0'></a>";
}

View File

@ -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("/\<a /", "<a title='$it_name' ", $img);
echo "goods_link[$i] = \"{$img}<br/><span class=small>".cut_str($it_name,10,"")."</span>\";\n";
}

View File

@ -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 '<img src="'.$himg.'" border="0"><br>';
// 상단 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']);
?>
<td align=center valign=top>
<table cellpadding=0 cellspacing=0>
<tr><td height=22></td></tr>
<tr><td colspan=3 align=center>
<table cellpadding=1 cellspacing=0 bgcolor=#E4E4E4><tr><td><?=get_large_image($it['it_id']."_l1", $it['it_id'], false)?><?=get_it_image($middle_image);?></a></td></tr></table></td></tr>
<table cellpadding=1 cellspacing=0 bgcolor=#E4E4E4><tr><td><?=get_large_image($it['it_id'].'/'.$filename, $it['it_id'], false)?><?=get_it_image($middle_image);?></a></td></tr></table></td></tr>
<tr><td colspan=3 height=10></td></tr>
<tr>
<td colspan=3 align=center>
<?
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 "<img id='middle{$i}' src='".G4_DATA_URL."/item/{$it_id}_m' border=0 width=40 height=40 style='border:1px solid #E4E4E4;' ";
else
echo "<img id='middle{$i}' src='".G4_DATA_URL."/item/{$it_id}_l{$i}' border=0 width=40 height=40 style='border:1px solid #E4E4E4;' ";
echo get_large_image($it['it_id'].'/'.$filename, $it['it_id'], false);
echo "<img id='middle{$i}' src='".G4_DATA_URL."/item/{$it_id}/{$filename}' border=0 width=40 height=40 style='border:1px solid #E4E4E4;' ";
echo " onmouseover=\"document.getElementById('$middle_image').src=document.getElementById('middle{$i}').src;\">";
echo "</a> &nbsp;";
}
@ -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 "<img src='$timg' border=0><br>";
if ($ca['ca_include_tail'])
@include_once($ca['ca_include_tail']);
else

View File

@ -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');
?>
<br>
<div align=center>
<a href='#' onclick='window.close();'><img id='largeimage' src='<?=$imagefile?>' width='<?=$size[0]?>' height='<?=$size[1]?>' alt='<?=$row[it_name]?>' border=0 style='border:1 solid #E4E4E4;'></a>
<a href='#' onclick='window.close();'><img id='largeimage' src='<?=$imagefile_url?>' width='<?=$size[0]?>' height='<?=$size[1]?>' alt='<?=$row['it_name']?>' border=0 style='border:1 solid #E4E4E4;'></a>
</div>
<p>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=30% align=center><a href='#' onclick='window.close();'><img src='<? echo "$g4[shop_img_path]/" ?>/btn_close.gif' border=0 alt="창닫기"></a></td>
<td width=30% align=center><a href='#' onclick='window.close();'><img src='<? echo G4_SHOP_IMG_URL; ?>/btn_close.gif' border=0 alt="창닫기"></a></td>
<td width=70% align=right>
<?
for ($i=1; $i<=5; $i++)
for ($i=1; $i<=10; $i++)
{
if (file_exists("$g4[path]/data/item/{$it_id}_l{$i}"))
echo "<img id='large{$i}' src='$g4[path]/data/item/{$it_id}_l{$i}' border=0 width=50 height=50 style='border:1 solid #E4E4E4;'
$filename = $row['it_img'.$i];
if (file_exists(G4_DATA_PATH."/item/{$it_id}/{$filename}") && $filename != "")
echo "<img id='large{$i}' src='".G4_DATA_URL."/item/{$it_id}/{$filename}' border=0 width=50 height=50 style='border:1 solid #E4E4E4;'
onmouseover=\"document.getElementById('largeimage').src=document.getElementById('large{$i}').src;\"> &nbsp;";
}
?>
@ -31,5 +35,5 @@ include_once("$g4[path]/head.sub.php");
</tr>
</table>
<?
include_once("$g4[path]/tail.sub.php");
include_once(G4_PATH.'/tail.sub.php');
?>

View File

@ -7,7 +7,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<div id="bo_v" class="cbg">
<h1 id="bo_v_h1">
<? if ($category_name) { // 분류가 지정되었다면 ?><span><?=($category_name ? "{$view['ca_name']} " : "");?></span><? } // 분류 출력 끝 ?>
<?=cut_hangul_last(get_text($view['wr_subject'])) // 글제목 출력?>
<?=cut_str(get_text($view['wr_subject']), 70) // 글제목 출력?>
</h1>
<section id="bo_v_info">