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

This commit is contained in:
gnuboard
2013-01-25 16:34:46 +09:00
14 changed files with 298 additions and 175 deletions

View File

@ -1,29 +1,29 @@
<? <?
$menu["menu400"] = array ( $menu["menu400"] = array (
array("", "쇼핑몰관리", "$g4[shop_admin_path]/"), array("400000", "쇼핑몰관리", "$g4[shop_admin_path]/"),
array("400100", "쇼핑몰설정", "$g4[shop_admin_path]/configform.php"), array("400100", "쇼핑몰설정", "$g4[shop_admin_path]/configform.php"),
array("-"),
array("400200", "분류관리", "$g4[shop_admin_path]/categorylist.php"), array("400200", "분류관리", "$g4[shop_admin_path]/categorylist.php"),
array("400300", "상품관리", "$g4[shop_admin_path]/itemlist.php"), array("400300", "상품관리", "$g4[shop_admin_path]/itemlist.php"),
array("400400", "주문관리", "$g4[shop_admin_path]/orderlist.php"), array("400400", "주문관리", "$g4[shop_admin_path]/orderlist.php"),
array("400410", "주문개별관리", "$g4[shop_admin_path]/orderstatuslist.php"), array("400410", "주문개별관리", "$g4[shop_admin_path]/orderstatuslist.php"),
array("400420", "주문통합관리", "$g4[shop_admin_path]/orderlist2.php"), array("400420", "주문통합관리", "$g4[shop_admin_path]/orderlist2.php"),
array("400500", "배송일괄처리", "$g4[shop_admin_path]/deliverylist.php"), array("400500", "배송일괄처리", "$g4[shop_admin_path]/deliverylist.php"),
array("-"),
array("400610", "상품유형관리", "$g4[shop_admin_path]/itemtypelist.php"), array("400610", "상품유형관리", "$g4[shop_admin_path]/itemtypelist.php"),
array("400620", "상품재고관리", "$g4[shop_admin_path]/itemstocklist.php"), array("400620", "상품재고관리", "$g4[shop_admin_path]/itemstocklist.php"),
array("400630", "이벤트관리", "$g4[shop_admin_path]/itemevent.php"), array("400630", "이벤트관리", "$g4[shop_admin_path]/itemevent.php"),
array("400640", "이벤트일괄처리", "$g4[shop_admin_path]/itemeventlist.php"), array("400640", "이벤트일괄처리", "$g4[shop_admin_path]/itemeventlist.php"),
array("400650", "사용후기", "$g4[shop_admin_path]/itempslist.php"), array("400650", "사용후기", "$g4[shop_admin_path]/itempslist.php"),
array("400660", "상품문의", "$g4[shop_admin_path]/itemqalist.php"), array("400660", "상품문의", "$g4[shop_admin_path]/itemqalist.php"),
array("-"),
array("400700", "내용관리", "$g4[shop_admin_path]/contentlist.php"), array("400700", "내용관리", "$g4[shop_admin_path]/contentlist.php"),
array("400710", "FAQ 관리", "$g4[shop_admin_path]/faqmasterlist.php"), array("400710", "FAQ 관리", "$g4[shop_admin_path]/faqmasterlist.php"),
array("400720", "새창관리", "$g4[shop_admin_path]/newwinlist.php"), array("400720", "새창관리", "$g4[shop_admin_path]/newwinlist.php"),
array("400730", "배너관리", "$g4[shop_admin_path]/bannerlist.php"), array("400730", "배너관리", "$g4[shop_admin_path]/bannerlist.php"),
array("400740", "배송회사관리", "$g4[shop_admin_path]/deliverycodelist.php"), array("400740", "배송회사관리", "$g4[shop_admin_path]/deliverycodelist.php"),
array("400750", "추가배송비관리", "$g4[shop_admin_path]/sendcostlist.php"), array("400750", "추가배송비관리", "$g4[shop_admin_path]/sendcostlist.php"),
array("-"),
array("400800", "쿠폰관리", "$g4[shop_admin_path]/couponlist.php") array("400800", "쿠폰관리", "$g4[shop_admin_path]/couponlist.php")
); );
?> ?>

View File

@ -1,12 +1,12 @@
<? <?
$menu["menu500"] = array ( $menu["menu500"] = array (
array("", "쇼핑몰현황/기타", ""), array("500000", "쇼핑몰현황/기타", "$g4[shop_admin_path]/itemsellrank.php"),
array("500100", "상품판매순위", "$g4[shop_admin_path]/itemsellrank.php"), array("500100", "상품판매순위", "$g4[shop_admin_path]/itemsellrank.php"),
array("500110", "매출현황", "$g4[shop_admin_path]/sale1.php"), array("500110", "매출현황", "$g4[shop_admin_path]/sale1.php"),
array("500120", "주문내역출력", "$g4[shop_admin_path]/orderprint.php"), array("500120", "주문내역출력", "$g4[shop_admin_path]/orderprint.php"),
array("500130", "전자결제내역", "$g4[shop_admin_path]/ordercardhistory.php"), array("500130", "전자결제내역", "$g4[shop_admin_path]/ordercardhistory.php"),
array("500140", "보관함현황", "$g4[shop_admin_path]/wishlist.php"), array("500140", "보관함현황", "$g4[shop_admin_path]/wishlist.php"),
array("-"),
array("500200", "SMS 문자전송", "$g4[shop_admin_path]/smssend.php"), array("500200", "SMS 문자전송", "$g4[shop_admin_path]/smssend.php"),
array("500210", "가격비교사이트", "$g4[shop_admin_path]/price.php") array("500210", "가격비교사이트", "$g4[shop_admin_path]/price.php")
); );

View File

@ -1,30 +1,24 @@
<? <?
include_once("./_common.php"); include_once("./_common.php");
include_once("$g4[path]/head.sub.php");
$name = "";
if ($it_id) if ($it_id)
{ {
$sql = " select it_name from $g4[yc4_item_table] where it_id = '$it_id' "; $sql = " select it_name from {$g4['yc4_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
$code = $it_id; $code = $it_id;
$name = $row[it_name]; $name = $row['it_name'];
} }
else if ($ca_id) else if ($ca_id)
{ {
$sql = " select ca_name from $g4[yc4_category_table] where ca_id = '$ca_id' "; $sql = " select ca_name from {$g4['yc4_category_table']} where ca_id = '$ca_id' ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
$code = $ca_id; $code = $ca_id;
$name = $row[ca_name]; $name = $row['ca_name'];
} }
echo $name;
// json 포맷으로 데이터 전달
//echo '{ "name": "' . $name . '", "code": "' . $code . '" }';
?> ?>
<SCRIPT LANGUAGE="JavaScript">
<!--
<? if ($name) { ?>
alert("코드 '<?=$code?>' 는 '<?=$name?>' (으)로 이미 등록되어 있으므로\n\n사용하실 수 없습니다.");
<? } else { ?>
alert("'<?=$code?>' 은(는) 등록된 코드가 없으므로 사용하실 수 있습니다.");
parent.document.<?=$frmname?>.codedup.value = '';
<? } ?>
window.close();
//-->
</SCRIPT>

View File

@ -1,7 +1,7 @@
<? <?
$sub_menu = "400700"; $sub_menu = "400700";
define('G4_EDITOR', 1);
include_once("./_common.php"); include_once("./_common.php");
include_once ("$g4[path]/lib/cheditor4.lib.php");
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], "w");
@ -34,9 +34,6 @@ include_once ("$g4[admin_path]/admin.head.php");
<?=subtitle($html_title)?><p> <?=subtitle($html_title)?><p>
<script src="<?=$g4[cheditor4_path]?>/cheditor.js"></script>
<?=cheditor1('co_content', '100%', '350');?>
<table cellpadding=0 cellspacing=0 width=100%> <table cellpadding=0 cellspacing=0 width=100%>
<form name=frmcontentform method=post action="./contentformupdate.php" enctype="MULTIPART/FORM-DATA" onsubmit="return frmcontentform_check(this);"> <form name=frmcontentform method=post action="./contentformupdate.php" enctype="MULTIPART/FORM-DATA" onsubmit="return frmcontentform_check(this);">
<input type=hidden name=w value='<? echo $w?>'> <input type=hidden name=w value='<? echo $w?>'>
@ -59,7 +56,7 @@ include_once ("$g4[admin_path]/admin.head.php");
<input type=hidden name=co_html value=1> <input type=hidden name=co_html value=1>
<tr> <tr>
<td>내용</td> <td>내용</td>
<td style='padding-top:5px; padding-bottom:5px;'><?=cheditor2('co_content', $co[co_content]);?></td> <td style='padding-top:5px; padding-bottom:5px;'><?=editor_html('co_content', $co[co_content]);?></td>
</tr> </tr>
<tr class=ht> <tr class=ht>
<td>상단 파일 경로</td> <td>상단 파일 경로</td>
@ -115,7 +112,7 @@ function frmcontentform_check(f)
errmsg = ""; errmsg = "";
errfld = ""; errfld = "";
<?=cheditor3('co_content');?> <?=get_editor_js('co_content');?>
check_field(f.co_id, "ID를 입력하세요."); check_field(f.co_id, "ID를 입력하세요.");
check_field(f.co_subject, "제목을 입력하세요."); check_field(f.co_subject, "제목을 입력하세요.");

View File

@ -1,7 +1,7 @@
<? <?
$sub_menu = "400710"; $sub_menu = "400710";
define('G4_EDITOR', 1);
include_once("./_common.php"); include_once("./_common.php");
include_once ("$g4[path]/lib/cheditor4.lib.php");
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], "w");
@ -33,10 +33,6 @@ include_once ("$g4[admin_path]/admin.head.php");
<?=subtitle($html_title)?><p> <?=subtitle($html_title)?><p>
<script src="<?=$g4[cheditor4_path]?>/cheditor.js"></script>
<?=cheditor1('fa_subject', '100%', '150');?>
<?=cheditor1('fa_content', '100%', '300');?>
<form name=frmfaqform method=post action='./faqformupdate.php' onsubmit="return frmfaqform_check(this);" style="margin:0px;"> <form name=frmfaqform method=post action='./faqformupdate.php' onsubmit="return frmfaqform_check(this);" style="margin:0px;">
<input type=hidden name=w value='<? echo $w ?>'> <input type=hidden name=w value='<? echo $w ?>'>
<input type=hidden name=fm_id value='<? echo $fm_id ?>'> <input type=hidden name=fm_id value='<? echo $fm_id ?>'>
@ -60,13 +56,13 @@ include_once ("$g4[admin_path]/admin.head.php");
?> ?>
</td> </td>
<td style='padding-top:5px; padding-bottom:5px;'> <td style='padding-top:5px; padding-bottom:5px;'>
<?=cheditor2('fa_subject', $fa[fa_subject]);?> <?=editor_html('fa_subject', $fa[fa_subject]);?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> 답변</td> <td> 답변</td>
<td style='padding-top:5px; padding-bottom:5px;'> <td style='padding-top:5px; padding-bottom:5px;'>
<?=cheditor2('fa_content', $fa[fa_content]);?> <?=editor_html('fa_content', $fa[fa_content]);?>
</td> </td>
</tr> </tr>
<tr><td colspan=2 height=1 bgcolor=CCCCCC><td></tr> <tr><td colspan=2 height=1 bgcolor=CCCCCC><td></tr>
@ -93,8 +89,8 @@ function frmfaqform_check(f)
return false; return false;
} }
<?=cheditor3('fa_subject');?> <?=get_editor_js('fa_subject');?>
<?=cheditor3('fa_content');?> <?=get_editor_js('fa_content');?>
return true; return true;
} }

View File

@ -1,7 +1,7 @@
<? <?
$sub_menu = "400710"; $sub_menu = "400710";
define('G4_EDITOR', 1);
include_once("./_common.php"); include_once("./_common.php");
include_once ("$g4[path]/lib/cheditor4.lib.php");
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], "w");
@ -26,10 +26,6 @@ include_once ("$g4[admin_path]/admin.head.php");
<?=subtitle($html_title)?> <?=subtitle($html_title)?>
<script src="<?=$g4[cheditor4_path]?>/cheditor.js"></script>
<?=cheditor1('fm_head_html', '100%', '150');?>
<?=cheditor1('fm_tail_html', '100%', '150');?>
<form name=frmfaqmasterform method=post action="./faqmasterformupdate.php" onsubmit="return frmfaqmasterform_check(this);"enctype="MULTIPART/FORM-DATA" style="margin:0px;"> <form name=frmfaqmasterform method=post action="./faqmasterformupdate.php" onsubmit="return frmfaqmasterform_check(this);"enctype="MULTIPART/FORM-DATA" style="margin:0px;">
<input type=hidden name=w value='<? echo $w ?>'> <input type=hidden name=w value='<? echo $w ?>'>
<input type=hidden name=fm_id value='<? echo $fm_id ?>'> <input type=hidden name=fm_id value='<? echo $fm_id ?>'>
@ -82,11 +78,11 @@ include_once ("$g4[admin_path]/admin.head.php");
<tr> <tr>
<td>상단 내용</td> <td>상단 내용</td>
<td style='padding-top:5px; padding-bottom:5px;'><?=cheditor2('fm_head_html', $fm[fm_head_html]);?></td> <td style='padding-top:5px; padding-bottom:5px;'><?=editor_html('fm_head_html', $fm[fm_head_html]);?></td>
</tr> </tr>
<tr> <tr>
<td>하단 내용</td> <td>하단 내용</td>
<td style='padding-top:5px; padding-bottom:5px;'><?=cheditor2('fm_tail_html', $fm[fm_tail_html]);?></td> <td style='padding-top:5px; padding-bottom:5px;'><?=editor_html('fm_tail_html', $fm[fm_tail_html]);?></td>
</tr> </tr>
<tr><td colspan=2 height=1 bgcolor=CCCCCC></td></tr> <tr><td colspan=2 height=1 bgcolor=CCCCCC></td></tr>
</table> </table>
@ -99,8 +95,8 @@ include_once ("$g4[admin_path]/admin.head.php");
<script language="javascript"> <script language="javascript">
function frmfaqmasterform_check(f) function frmfaqmasterform_check(f)
{ {
<?=cheditor3('fm_head_html');?> <?=get_editor_js('fm_head_html');?>
<?=cheditor3('fm_tail_html');?> <?=get_editor_js('fm_tail_html');?>
} }
document.frmfaqmasterform.fm_subject.focus(); document.frmfaqmasterform.fm_subject.focus();

View File

@ -1,7 +1,7 @@
<? <?
$sub_menu = "400630"; $sub_menu = "400630";
define('G4_EDITOR', 1);
include_once("./_common.php"); include_once("./_common.php");
include_once ("$g4[path]/lib/cheditor4.lib.php");
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], "w");
@ -37,10 +37,6 @@ include_once ("$g4[admin_path]/admin.head.php");
<?=subtitle($html_title);?><p> <?=subtitle($html_title);?><p>
<script src="<?=$g4[cheditor4_path]?>/cheditor.js"></script>
<?=cheditor1('ev_head_html', '100%', '150');?>
<?=cheditor1('ev_tail_html', '100%', '150');?>
<form name=feventform method=post action="./itemeventformupdate.php" enctype="MULTIPART/FORM-DATA" style="margin:0px;" onsubmit="return feventform_check(this);"> <form name=feventform method=post action="./itemeventformupdate.php" enctype="MULTIPART/FORM-DATA" style="margin:0px;" onsubmit="return feventform_check(this);">
<input type=hidden name=w value='<? echo $w ?>'> <input type=hidden name=w value='<? echo $w ?>'>
<input type=hidden name=ev_id value='<? echo $ev_id ?>'> <input type=hidden name=ev_id value='<? echo $ev_id ?>'>
@ -164,11 +160,11 @@ include_once ("$g4[admin_path]/admin.head.php");
<tr> <tr>
<td>상단 내용</td> <td>상단 내용</td>
<td colspan=3 align=right style='padding-top:5px; padding-bottom:5px;'><?=cheditor2('ev_head_html', $ev[ev_head_html]);?></td> <td colspan=3 align=right style='padding-top:5px; padding-bottom:5px;'><?=editor_html('ev_head_html', $ev[ev_head_html]);?></td>
</tr> </tr>
<tr> <tr>
<td>하단 내용</td> <td>하단 내용</td>
<td colspan=3 align=right style='padding-top:5px; padding-bottom:5px;'><?=cheditor2('ev_tail_html', $ev[ev_tail_html]);?></td> <td colspan=3 align=right style='padding-top:5px; padding-bottom:5px;'><?=editor_html('ev_tail_html', $ev[ev_tail_html]);?></td>
</tr> </tr>
<tr><td colspan=4 height=1 bgcolor=#CCCCCC></td></tr> <tr><td colspan=4 height=1 bgcolor=#CCCCCC></td></tr>
</table> </table>
@ -182,8 +178,8 @@ include_once ("$g4[admin_path]/admin.head.php");
<script language="javascript"> <script language="javascript">
function feventform_check(f) function feventform_check(f)
{ {
<?=cheditor3('ev_head_html');?> <?=get_editor_js('ev_head_html');?>
<?=cheditor3('ev_tail_html');?> <?=get_editor_js('ev_tail_html');?>
return true; return true;
} }

View File

@ -1,7 +1,7 @@
<? <?
$sub_menu = "400300"; $sub_menu = "400300";
define('G4_EDITOR', 1);
include_once("./_common.php"); include_once("./_common.php");
include_once ($g4['path'].'/lib/cheditor4.lib.php');
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], "w");
@ -76,11 +76,6 @@ $g4[title] = $html_title;
include_once ("$g4[admin_path]/admin.head.php"); include_once ("$g4[admin_path]/admin.head.php");
?> ?>
<script src="<?=$g4[cheditor4_path]?>/cheditor.js"></script>
<?=cheditor1('it_explan', '100%', '350');?>
<?=cheditor1('it_head_html', '100%', '150');?>
<?=cheditor1('it_tail_html', '100%', '150');?>
<style type="text/css"> <style type="text/css">
<!-- <!--
ul { margin: 0; padding: 0; list-style: none; } ul { margin: 0; padding: 0; list-style: none; }
@ -312,7 +307,7 @@ ul { margin: 0; padding: 0; list-style: none; }
<input type=hidden name=it_explan_html value=1> <input type=hidden name=it_explan_html value=1>
<tr> <tr>
<td>상품설명</td> <td>상품설명</td>
<td colspan=3 style='padding-top:7px; padding-bottom:7px;'><?=cheditor2('it_explan', $it[it_explan]);?></td> <td colspan=3 style='padding-top:7px; padding-bottom:7px;'><?=editor_html('it_explan', $it[it_explan]);?></td>
</tr> </tr>
<? if($default['de_send_cost_case'] == "개별배송") { ?> <? if($default['de_send_cost_case'] == "개별배송") { ?>
<tr class="ht"> <tr class="ht">
@ -792,11 +787,11 @@ ul { margin: 0; padding: 0; list-style: none; }
<tr> <tr>
<td>상품상단내용 <?=help("상품상세설명 페이지 상단에 출력하는 HTML 내용입니다.", -150);?></td> <td>상품상단내용 <?=help("상품상세설명 페이지 상단에 출력하는 HTML 내용입니다.", -150);?></td>
<td colspan=3 align=right style='padding-top:7px; padding-bottom:7px;'><?=cheditor2('it_head_html', $it[it_head_html]);?></td> <td colspan=3 align=right style='padding-top:7px; padding-bottom:7px;'><?=editor_html('it_head_html', $it[it_head_html]);?></td>
</tr> </tr>
<tr> <tr>
<td>상품하단내용 <?=help("상품상세설명 페이지 상단에 출력하는 HTML 내용입니다.", -150);?></td> <td>상품하단내용 <?=help("상품상세설명 페이지 상단에 출력하는 HTML 내용입니다.", -150);?></td>
<td colspan=3 align=right style='padding-top:7px; padding-bottom:7px;'><?=cheditor2('it_tail_html', $it[it_tail_html]);?></td> <td colspan=3 align=right style='padding-top:7px; padding-bottom:7px;'><?=editor_html('it_tail_html', $it[it_tail_html]);?></td>
</tr> </tr>
<? if ($w == "u") { ?> <? if ($w == "u") { ?>
@ -853,7 +848,21 @@ function codedupcheck(id)
f.it_id.focus(); f.it_id.focus();
return; return;
} }
window.open("./codedupcheck.php?it_id="+id+"&frmname=fitemform", "hiddenframe");
$.post(
"./codedupcheck.php",
{ id: id },
function(data)
{
if(data) {
alert("코드 "+id+" 는 '"+data+"' (으)로 이미 등록되어 있으므로\n\n사용하실 수 없습니다.");
return false;
} else {
alert("'"+id+"' 은(는) 등록된 코드가 없으므로 사용하실 수 있습니다.");
f.codedup.value = "";
}
}
);
} }
// 선택옵션창 // 선택옵션창
@ -918,9 +927,9 @@ function fitemformcheck(f)
} }
} }
<?=cheditor3('it_explan')."\n";?> <?=get_editor_js('it_explan');?>
<?=cheditor3('it_head_html')."\n";?> <?=get_editor_js('it_head_html');?>
<?=cheditor3('it_tail_html')."\n";?> <?=get_editor_js('it_tail_html');?>
return true; return true;
} }

View File

@ -1,7 +1,7 @@
<? <?
$sub_menu = "400650"; $sub_menu = "400650";
define('G4_EDITOR', 1);
include_once("./_common.php"); include_once("./_common.php");
include_once ("$g4[path]/lib/cheditor4.lib.php");
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], "w");
@ -21,8 +21,6 @@ include_once ("$g4[admin_path]/admin.head.php");
$qstr = "page=$page&sort1=$sort1&sort2=$sort2"; $qstr = "page=$page&sort1=$sort1&sort2=$sort2";
?> ?>
<script src="<?=$g4[cheditor4_path]?>/cheditor.js"></script>
<?=cheditor1('is_content', '100%', '350');?>
<?=subtitle($g4[title])?> <?=subtitle($g4[title])?>
@ -58,7 +56,7 @@ $qstr = "page=$page&sort1=$sort1&sort2=$sort2";
<td> <td>
<!-- <?=textarea_size("is_content")?> <!-- <?=textarea_size("is_content")?>
<textarea id='is_content' name="is_content" rows="10" style='width:99%;' class=ed required itemname='내용'><? echo get_text($is[is_content]) ?></textarea> --> <textarea id='is_content' name="is_content" rows="10" style='width:99%;' class=ed required itemname='내용'><? echo get_text($is[is_content]) ?></textarea> -->
<?=cheditor2('is_content', $is['is_content']);?> <?=editor_html('is_content', $is['is_content']);?>
</td> </td>
</tr> </tr>
<tr height=25> <tr height=25>
@ -76,7 +74,7 @@ $qstr = "page=$page&sort1=$sort1&sort2=$sort2";
<script> <script>
function fitemps_submit(f) function fitemps_submit(f)
{ {
<? echo cheditor3('is_content'); ?> <? echo get_editor_js('is_content'); ?>
f.action="./itempsformupdate.php"; f.action="./itempsformupdate.php";
return true; return true;

View File

@ -1,7 +1,7 @@
<? <?
$sub_menu = "400720"; $sub_menu = "400720";
define('G4_EDITOR', 1);
include_once("./_common.php"); include_once("./_common.php");
include_once ("$g4[path]/lib/cheditor4.lib.php");
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], "w");
@ -30,9 +30,6 @@ include_once ("$g4[admin_path]/admin.head.php");
<?=subtitle($html_title)?> <?=subtitle($html_title)?>
<script src="<?=$g4[cheditor4_path]?>/cheditor.js"></script>
<?=cheditor1('nw_content', '100%', '350');?>
<form name=frmnewwin method=post action="./newwinformupdate.php" onsubmit="return frmnewwin_check(this);" style="margin:0px;"> <form name=frmnewwin method=post action="./newwinformupdate.php" onsubmit="return frmnewwin_check(this);" style="margin:0px;">
<input type=hidden name=w value='<? echo $w ?>'> <input type=hidden name=w value='<? echo $w ?>'>
<input type=hidden name=nw_id value='<? echo $nw_id ?>'> <input type=hidden name=nw_id value='<? echo $nw_id ?>'>
@ -75,7 +72,7 @@ include_once ("$g4[admin_path]/admin.head.php");
<input type=hidden name=nw_content_html value=1> <input type=hidden name=nw_content_html value=1>
<tr> <tr>
<td>내용</td> <td>내용</td>
<td colspan=3 style='padding-top:5px; padding-bottom:5px;'><?=cheditor2('nw_content', $nw[nw_content]);?></td> <td colspan=3 style='padding-top:5px; padding-bottom:5px;'><?=editor_html('nw_content', $nw[nw_content]);?></td>
</tr> </tr>
<tr><td colspan=4 height=1 bgcolor=CCCCCC></td></tr> <tr><td colspan=4 height=1 bgcolor=CCCCCC></td></tr>
</table> </table>
@ -91,7 +88,7 @@ function frmnewwin_check(f)
errmsg = ""; errmsg = "";
errfld = ""; errfld = "";
<?=cheditor3('nw_content');?> <?=get_editor_js('nw_content');?>
check_field(f.nw_subject, "제목을 입력하세요."); check_field(f.nw_subject, "제목을 입력하세요.");

View File

@ -9,8 +9,9 @@ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
header ul, nav ul, footer ul {margin:0;padding:0;list-style:none} header ul, nav ul, footer ul {margin:0;padding:0;list-style:none}
label, input, select, img {vertical-align:middle} label, input, select, img {vertical-align:middle}
input {margin:0;padding:0;font-family:"dotum"} input {margin:0;padding:0;font-family:"dotum"}
p {margin:0;padding:10px 0;line-height:1.5em;word-break:break-all} p {margin:0;padding:10px 0;line-height:1.7em;word-break:break-all}
hr {display:none} hr {display:none}
pre {overflow-x:scroll}
/* 웹접근성 스킬 --- 기본 block 속성에는 적용 안됨*/ /* 웹접근성 스킬 --- 기본 block 속성에는 적용 안됨*/
.sound_only {display:inline-block;margin:0;padding:0;width:0;height:0;border:0;overflow:hidden} .sound_only {display:inline-block;margin:0;padding:0;width:0;height:0;border:0;overflow:hidden}
@ -86,11 +87,11 @@ hr {display:none}
.btn02 {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none;line-height:2.2em} .btn02 {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none;line-height:2.2em}
.btn03 {display:inline-block;padding:0 10px;height:24px;border:1px solid #494949 !important;background:#494949 !important;color:#fff !important;text-decoration:none;line-height:2.2em} .btn03 {display:inline-block;padding:0 10px;height:24px;border:1px solid #494949 !important;background:#494949 !important;color:#fff !important;text-decoration:none;line-height:2.2em}
.btn_confirm {text-align:center} /* 서식단계 진행 */ .btn_confirm {text-align:center} /* 서식단계 진행 */
.btn_submit {padding:0 10px;height:28px;border:0;background:#0075b8;color:#fff;letter-spacing:-0.1em;vertical-align:top} .btn_submit {padding:0 10px;height:24px;border:0;background:#484848;color:#fff;letter-spacing:-0.1em;vertical-align:top}
.btn_cancel {display:inline-block;padding:0 10px;height:26px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;line-height:2.5em} .btn_cancel {display:inline-block;padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;line-height:2em}
.btn_frmline {padding:0 7px 0 5px;height:22px;border:0;background:#0075b8;color:#fff;letter-spacing:-0.1em;vertical-align:top;line-height:2em} .btn_frmline {padding:0 7px 0 5px;height:22px;border:0;background:#0075b8;color:#fff;letter-spacing:-0.1em;vertical-align:top;line-height:2em}
.btn_win {clear:both;margin-bottom:20px;text-align:center} /* 새창용 */ .btn_win {clear:both;margin-bottom:20px;text-align:center} /* 새창용 */
.btn_win a {display:inline-block;padding:0 10px;height:28px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;line-height:2.5em;cursor:pointer} .btn_win a {display:inline-block;padding:0 10px;height:24px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;line-height:2em;cursor:pointer}
/* ///// 기본테이블 ///// */ /* ///// 기본테이블 ///// */
table {margin-bottom:10px;width:100%;border-collapse:collapse;border-spacing:0} table {margin-bottom:10px;width:100%;border-collapse:collapse;border-spacing:0}
@ -147,7 +148,7 @@ table a {color:#000;text-decoration:none}
.ol_pwlabel {position:absolute;top:35px;left:5px;color:#696969;font-size:0.9em} .ol_pwlabel {position:absolute;top:35px;left:5px;color:#696969;font-size:0.9em}
#auto_login {} #auto_login {}
#auto_login_label {letter-spacing:-0.1em} #auto_login_label {letter-spacing:-0.1em}
#ol_submit {width:60px;height:24px;border:1px solid #d1d1d1;background:#f7f7f2;font-size:0.9em;font-weight:bold;vertical-align:top} #ol_submit {width:60px;height:24px;border:1px solid #383838;background:#484848;color:#fff;font-size:0.9em;font-weight:bold;vertical-align:top}
#ol_before ul {float:right;margin:7px 0 13px;zoom:1} #ol_before ul {float:right;margin:7px 0 13px;zoom:1}
#ol_before ul:after {display:block;visibility:hidden;clear:both;content:""} #ol_before ul:after {display:block;visibility:hidden;clear:both;content:""}
#ol_before li {float:left;margin-left:5px;padding-top:2px} #ol_before li {float:left;margin-left:5px;padding-top:2px}
@ -160,7 +161,7 @@ table a {color:#000;text-decoration:none}
#ol_after_private:after {display:block;visibility:hidden;clear:both;content:""} #ol_after_private:after {display:block;visibility:hidden;clear:both;content:""}
#ol_after_private li {float:left} #ol_after_private li {float:left}
#ol_after_private a {display:block;padding-top:8px;height:37px;background:#f7f7f2;text-align:center} #ol_after_private a {display:block;padding-top:8px;height:37px;background:#f7f7f2;text-align:center}
#ol_after_private a strong {display:block;padding-top:5px;color:#ff4679} #ol_after_private a strong {display:block;padding-top:5px;color:#0075b8}
#ol_after_memo {width:50px;margin-right:1px} #ol_after_memo {width:50px;margin-right:1px}
#ol_after_pt {width:90px;margin-right:1px} #ol_after_pt {width:90px;margin-right:1px}
#ol_after_scrap {width:48px;line-height:2.6em !important} #ol_after_scrap {width:48px;line-height:2.6em !important}
@ -246,9 +247,10 @@ table a {color:#000;text-decoration:none}
/* 게시판 읽기 */ /* 게시판 읽기 */
#bo_v_title {} #bo_v_title {}
#bo_v {position:relative;margin-bottom:30px;border-top:2px solid #666;border-right:1px solid #eee;border-bottom:1px solid #eee;background:#fff} #bo_v {position:relative;margin-bottom:10px;border-top:5px solid #666;border-right:1px solid #eee;border-bottom:1px solid #eee;background:#fff}
#bo_v_h1 {margin:0 0 10px !important;padding:15px 20px 0;font-size:1.2em} #bo_v a {color:#000;text-decoration:none}
#bo_v_info {padding:0 0 10px;border-bottom:1px solid #efeada} #bo_v_h1 {padding:20px 20px 10px;font-size:1.2em}
#bo_v_info {padding:0 0 15px;border-bottom:1px solid #eee}
#bo_v_info h2 {margin:0;padding:0;height:0;overflow:hidden} #bo_v_info h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_info div {padding:0 20px} #bo_v_info div {padding:0 20px}
#bo_v_info strong {display:inline-block;margin:0 10px 0 5px;font-weight:normal} #bo_v_info strong {display:inline-block;margin:0 10px 0 5px;font-weight:normal}
@ -256,45 +258,47 @@ table a {color:#000;text-decoration:none}
#bo_v_top:after {display:block;visibility:hidden;clear:both;content:""} #bo_v_top:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_top h2 {margin:0;padding:0;height:0;overflow:hidden} #bo_v_top h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_top ul {padding:0 20px;list-style:none} #bo_v_top ul {padding:0 20px;list-style:none}
#bo_v_file {border-bottom:1px solid #eee;background:#fff} #bo_v_file {border-left:5px solid #ccc}
#bo_v_file h2 {margin:0;padding:0;height:0;overflow:hidden} #bo_v_file h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_file ul {margin:0;padding:0;list-style:none} #bo_v_file ul {margin:0;padding:0;list-style:none}
#bo_v_file a {display:inline-block;padding:8px 20px 7px} #bo_v_file li {padding:0 20px 0 15px;border-bottom:1px solid #eee;background:#f7f7f2}
#bo_v_file strong {text-decoration:underline} #bo_v_file a {display:inline-block;padding:8px 0 7px}
.bo_v_file_cnt {display:inline-block;margin:0 10px;color:#0075b8} .bo_v_file_cnt {display:inline-block;margin:0 10px}
#bo_v_link {border-bottom:1px solid #eee;background:#fff} #bo_v_link {border-left:5px solid #ccc}
#bo_v_link h2 {margin:0;padding:0;height:0;overflow:hidden} #bo_v_link h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_link ul {margin:0;padding:0;list-style:none} #bo_v_link ul {margin:0;padding:0;list-style:none}
#bo_v_link a {display:inline-block;padding:8px 20px 7px} #bo_v_link li {padding:0 20px 0 15px;border-bottom:1px solid #eee;background:#f7f7f2}
#bo_v_link strong {text-decoration:underline} #bo_v_link a {display:inline-block;padding:8px 0 7px}
.bo_v_link_cnt {display:inline-block;margin:0 10px;color:#0075b8} .bo_v_link_cnt {display:inline-block;margin:0 10px}
#bo_v_atc {zoom:1} #bo_v_atc {min-height:200px;height:auto !important;height:200px;zoom:1}
#bo_v_atc:after {display:block;visibility:hidden;clear:both;content:""} #bo_v_atc:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_atc h1 {margin:0;padding:0;height:0;overflow:hidden} #bo_v_atc h1 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_con {padding:20px;min-height:200px;height:auto !important;height:200px;background:#fff;line-height:1.8em} #bo_v_img {margin:0 20px}
#bo_v_act {padding:20px 0;border-bottom:1px solid #eee;text-align:center} /*#bo_v_img img {max-width:100%;height:auto}*/
#bo_v_con {padding:20px;line-height:1.8em}
#bo_v_act {padding:20px 0;text-align:center}
#bo_v_act a {margin-right:5px;vertical-align:top} #bo_v_act a {margin-right:5px;vertical-align:top}
#bo_v_act strong {color:#0075b8} #bo_v_act strong {color:#0075b8}
#bo_v form {padding-top:20px} #bo_v form {padding-top:20px}
#bo_v_bot {zoom:1} #bo_v_bot {zoom:1}
#bo_v_bot:after {display:block;visibility:hidden;clear:both;content:""} #bo_v_bot:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_bot h2 {margin:0;padding:0;height:0;overflow:hidden} #bo_v_bot h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_v_bot ul {padding:0 20px 15px;list-style:none} #bo_v_bot ul {margin:0;padding:0 0 15px;list-style:none}
#bo_v_nb {float:left;margin:10px 0} #bo_v_nb {float:left}
#bo_v_nb li {float:left;margin-right:5px} #bo_v_nb li {float:left;margin-right:5px}
.bo_v_com {float:right;margin:10px 0} .bo_v_com {float:right}
.bo_v_com li {float:left;margin-left:5px} .bo_v_com li {float:left;margin-left:5px}
/* 게시판 댓글 */ /* 게시판 댓글 */
#bo_vc {padding:10px 20px 20px;border-bottom:1px solid #eee;background:#fff} #bo_vc {padding:10px 20px 20px 20px;border-bottom:1px solid #eee;border-left:10px solid #eee;background:#f9f9f9}
#bo_vc h2 {margin:0;padding:0;height:0;overflow:hidden} #bo_vc h2 {margin:0;padding:0;height:0;overflow:hidden}
#bo_vc article {margin-bottom:5px;padding:0 0 10px;border-bottom:1px solid #f7f7f2} #bo_vc article {margin-bottom:5px;padding:0 0 10px;border-bottom:1px solid #eee}
#bo_vc header {position:relative;zoom:1} #bo_vc header {position:relative;zoom:1}
#bo_vc header:after {display:block;visibility:hidden;clear:both;content:""} #bo_vc header:after {display:block;visibility:hidden;clear:both;content:""}
#bo_vc header .icon_reply {position:absolute;top:15px;left:-20px} #bo_vc header .icon_reply {position:absolute;top:15px;left:-20px}
#bo_vc header span {} #bo_vc header span {}
#bo_vc h1 {display:inline-block;margin:15px 0 5px} #bo_vc h1 {display:inline-block;margin:15px 10px 5px 0}
#bo_vc h1 a {color:#000;text-decoration:none} #bo_vc a {color:#000;text-decoration:none}
#bo_vc p {padding:0 0 5px;line-height:1.8em} #bo_vc p {padding:0 0 5px;line-height:1.8em}
#bo_vc fieldset {margin:0 0 10px;padding:0} #bo_vc fieldset {margin:0 0 10px;padding:0}
#bo_vc #bo_vc_winfo {float:left} #bo_vc #bo_vc_winfo {float:left}

128
lib/thumb.lib.php Normal file
View File

@ -0,0 +1,128 @@
<?
if (!defined('_GNUBOARD_')) exit;
/*******************************************************************************
썸네일 Class
사용법 :
$thumb = new g4_thumbnail(경로, 썸네일이미지폭);
$thumb->run(이미지 경로가 포함된 컨텐츠);
*******************************************************************************/
class g4_thumb {
var $path;
var $width;
var $red = 0xff;
var $green = 0xff;
var $blue = 0xff;
var $quality = 100;
var $permission = 0606;
function g4_thumb($path, $width) {
$this->set_path($path);
$this->set_width($width);
}
// 경로
function set_path($path) {
$this->path = $path;
@mkdir($path, 0707);
@chmod($path, 0707);
}
function set_width($width) {
$this->width = $width;
}
function get_width() {
return $this->width;
}
function set_bgcolor($red, $green, $blue) {
$this->red = $red;
$this->green = $green;
$this->blue = $blue;
}
function set_quality($quality) {
$this->quality = $quality;
}
function set_permission($permission) {
$this->permission = $permission;
}
function create($srcimg, $thumbfile) {
$width = $this->get_width();
$source = null;
$size = @getimagesize($srcimg);
if ($size[2] == 1)
$source = @imagecreatefromgif($srcimg);
else if ($size[2] == 2)
$source = @imagecreatefromjpeg($srcimg);
else if ($size[2] == 3)
$source = @imagecreatefrompng($srcimg);
if ($source == null)
return '';
// 이미지의 폭이 설정폭 보다 작다면
if ($size[0] < $width) {
$width = $size[0];
$height = $size[1];
} else {
$rate = $width / $size[0];
$height = (int)($size[1] * $rate);
}
$target = @imagecreatetruecolor($width, $height);
$bgcolor = @imagecolorallocate($target, $this->red, $this->green, $this->blue); // 썸네일 배경
imagefilledrectangle($target, 0, 0, $width, $height, $bgcolor);
imagecopyresampled($source, $source, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);
imagecopy($target, $source, 0, 0, 0, 0, $size[0], $size[1]);
imagejpeg($target, $thumbfile, $this->quality);
chmod($thumbfile, $this->permission); // 추후 삭제를 위하여 파일모드 변경
return $thumbfile;
}
function thumbnail($matches)
{
foreach ($matches as $img) {
preg_match("/src=[\"\']?([^\"\'\s>]+)/i", $img, $m);
$src = trim($m[1]);
$result = true;
if (preg_match("/\.(jpe?g|png|gif)$/i", $src)) {
// 유일한 파일명을 만든다.
$filename = md5($src).'_'.$this->width;
$thumb = $this->path.'/'.$filename;
if (!file_exists($thumb)) {
$result = $this->create($src, $thumb);
}
}
else {
$thumb = $src;
}
if ($result) {
$size = @getimagesize($src);
if ($size[0] < $this->width) {
return "<img src='$thumb' width='$size[0]' />";
} else {
return "<a href='$src' target='_blank' title='클릭하시면 이미지가 크게 보입니다.'><img src='$thumb' width='{$this->width}' border='0' /></a>";
}
}
}
}
function run($content)
{
//return preg_replace_callback('#<img[^>]+>#iS', create_function('$matches', 'return g4_thumb::thumbnail($matches);'), $content);
//return preg_replace_callback('#<img[^>]+>#iS', array('g4_thumb', 'thumbnail'), $content);
//return preg_replace_callback('#<img[^>]+>#iS', 'g4_thumb::thumbnail', $content);
return preg_replace_callback('#<img[^>]+>#iS', array($this, 'thumbnail'), $content);
}
}
?>

View File

@ -114,7 +114,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<header> <header>
<h1>본문</h1> <h1>본문</h1>
</header> </header>
<div> <div id="bo_v_img">
<? <?
// 파일 출력 // 파일 출력
for ($i=0; $i<=count($view['file']); $i++) { for ($i=0; $i<=count($view['file']); $i++) {
@ -144,21 +144,21 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once('./view_comment.php'); include_once('./view_comment.php');
?> ?>
<aside id="bo_v_bot">
<h2>게시물 하단 버튼</h2>
<? if ($prev_href || $next_href) { ?>
<ul id="bo_v_nb">
<? if ($prev_href) { ?><li><a href="<?=$prev_href?>" class="btn02">이전</a></li><? } ?>
<? if ($next_href) { ?><li><a href="<?=$next_href?>" class="btn02">다음</a></li><? } ?>
</ul>
<? } ?>
<!-- 링크 버튼 -->
<?=$link_buttons?>
</aside>
</div> </div>
<aside id="bo_v_bot">
<h2>게시물 하단 버튼</h2>
<? if ($prev_href || $next_href) { ?>
<ul id="bo_v_nb">
<? if ($prev_href) { ?><li><a href="<?=$prev_href?>" class="btn02">이전</a></li><? } ?>
<? if ($next_href) { ?><li><a href="<?=$next_href?>" class="btn02">다음</a></li><? } ?>
</ul>
<? } ?>
<!-- 링크 버튼 -->
<?=$link_buttons?>
</aside>
<script> <script>
function file_download(link, file) { function file_download(link, file) {
<? if ($board['bo_download_point'] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board['bo_download_point'])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?> <? if ($board['bo_download_point'] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board['bo_download_point'])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
@ -176,19 +176,27 @@ function board_move(href)
<script> <script>
// 이미지 등비율 리사이징 // 이미지 등비율 리사이징
$(document).ready(function(){ $(window).load(function() {
var img = $('#bo_v_atc img'); view_image_resize();
var img_org_width = img.width();
$(window).resize(function(){
var wrapper_width = $('#bo_v_atc').width();
img.each(function() {
var img_width = $(this).width();
if (img_width > wrapper_width) {
$(this).addClass('img_fix');
} else if (img_width <= wrapper_width && img_width >= img_org_width) {
$(this).removeClass('img_fix');
}
});
}).resize();
}); });
$(window).resize(function(){
view_image_resize();
});
function view_image_resize()
{
var $img = $('#bo_v_img img');
var img_wrap = $('#bo_v_img').width();
$img.each(function() {
var img_width = $(this).width();
$(this).data("width", img_width); // 원래 이미지 사이즈
if (img_width > img_wrap) {
$(this).addClass('img_fix');
} else if (img_width <= img_wrap && img_width >= $(this).data("width")) {
$(this).removeClass('img_fix');
}
});
}
</script> </script>

View File

@ -8,7 +8,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<footer id="ft"> <footer id="ft">
<h1><?=$config['cf_title']?> 정보</h1> <h1><?=$config['cf_title']?> 정보</h1>
<?=popular('neo',100); // 인기검색어 ?> <?=popular('neo'); // 인기검색어 ?>
<?=visit("neo"); // 방문자수 ?> <?=visit("neo"); // 방문자수 ?>
<div id="ft_catch"><img src="<?=$g4['path']?>/img/ft_catch.jpg" alt="Sharing All Possibilities"></div> <div id="ft_catch"><img src="<?=$g4['path']?>/img/ft_catch.jpg" alt="Sharing All Possibilities"></div>
<div id="ft_copy"> <div id="ft_copy">