Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
data
|
||||
dbconfig.php
|
||||
install.bak
|
||||
test.php
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
<?
|
||||
$g4_path = '.'; // common.php 의 상대 경로
|
||||
include_once($g4_path.'/common.php');
|
||||
include_once('./common.php');
|
||||
?>
|
||||
@ -1,9 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if (G4_IS_MOBILE) {
|
||||
include_once($g4['path'].'/mobile.head.php');
|
||||
} else {
|
||||
include_once($g4['path'].'/head.php');
|
||||
}
|
||||
include_once(G4_PATH.'/head.php');
|
||||
?>
|
||||
@ -1,8 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if (G4_IS_MOBILE)
|
||||
include_once($g4['path'].'/mobile.tail.php');
|
||||
else
|
||||
include_once($g4['path'].'/tail.php');
|
||||
include_once(G4_PATH.'/tail.php');
|
||||
?>
|
||||
@ -1,6 +1,5 @@
|
||||
<?
|
||||
$g4_path = ".."; // common.php 의 상대 경로
|
||||
include_once ($g4_path.'/common.php');
|
||||
include_once($g4['admin_path'].'/admin.lib.php');
|
||||
include_once ('../common.php');
|
||||
include_once(G4_ADM_PATH.'/admin.lib.php');
|
||||
$admin_index = false;
|
||||
?>
|
||||
@ -1,9 +1,9 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit;
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$begin_time = get_microtime();
|
||||
$administrator = 1;
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
function print_menu1($key, $no)
|
||||
{
|
||||
@ -69,17 +69,17 @@ function textarea_size(fld, size)
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="<?=$g4['path']?>/js/common.js"></script>
|
||||
<script src="<?=$g4['path']?>/js/sideview.js"></script>
|
||||
<script src="<?=G4_URL?>/js/common.js"></script>
|
||||
<script src="<?=G4_URL?>/js/sideview.js"></script>
|
||||
|
||||
<header>
|
||||
|
||||
<div id="to_content"><a href="#wrapper">본문 바로가기</a></div>
|
||||
<div id="logo"><a href=""><img src="<?=$g4['admin_path']?>/img/logo.png" alt="관리자 메인으로"></a></div>
|
||||
<div id="logo"><a href="<?=G4_ADM_URL?>"><img src="<?=G4_ADM_URL?>/img/logo.png" alt="관리자 메인으로"></a></div>
|
||||
<ul id="home_link">
|
||||
<li><a href="<?=$g4['path']?>/adm/member_form.php?w=u&mb_id=<?=$member['mb_id']?>">관리자정보수정</a></li>
|
||||
<li><a href="<?=$g4['path']?>/">홈페이지</a></li>
|
||||
<li><a href="<?=$g4['bbs_path']?>/logout.php">로그아웃</a></li>
|
||||
<li><a href="<?=G4_ADM_URL?>/member_form.php?w=u&mb_id=<?=$member['mb_id']?>">관리자정보수정</a></li>
|
||||
<li><a href="<?=G4_URL?>/">홈페이지</a></li>
|
||||
<li><a href="<?=G4_BBS_URL?>/logout.php">로그아웃</a></li>
|
||||
</ul>
|
||||
|
||||
<div id="current_location">
|
||||
@ -91,13 +91,13 @@ function textarea_size(fld, size)
|
||||
<nav id="gnb">
|
||||
<ul>
|
||||
<?
|
||||
foreach($amenu as $key=>$value)
|
||||
{
|
||||
foreach($amenu as $key=>$value) {
|
||||
$href1 = $href2 = '';
|
||||
if ($menu['menu'.$key][0][2])
|
||||
{
|
||||
if ($menu['menu'.$key][0][2]) {
|
||||
$href1 = '<a href="'.$menu['menu'.$key][0][2].'">';
|
||||
$href2 = '</a>';
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
$current_class = "";
|
||||
if (isset($sub_menu) && (substr($sub_menu, 0, 2) == substr($menu['menu'.$key][0][0], 0, 2)) || $admin_index)
|
||||
|
||||
@ -9,6 +9,19 @@ if (!get_session('ss_admin')) {
|
||||
}
|
||||
*/
|
||||
|
||||
// 스킨디렉토리를 SELECT 형식으로 얻음
|
||||
function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||
{
|
||||
$skins = get_skin_dir($skin_gubun);
|
||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||
for ($i=0; $i<count($skins); $i++) {
|
||||
$str .= option_selected($skins[$i], $selected);
|
||||
}
|
||||
$str .= "</select>";
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// 스킨경로를 얻는다
|
||||
function get_skin_dir($skin)
|
||||
{
|
||||
@ -16,7 +29,7 @@ function get_skin_dir($skin)
|
||||
|
||||
$result_array = array();
|
||||
|
||||
$dirname = $g4['path'].'/skin/'.$skin.'/';
|
||||
$dirname = G4_SKIN_PATH.'/'.$skin.'/';
|
||||
$handle = opendir($dirname);
|
||||
while ($file = readdir($handle)) {
|
||||
if($file == '.'||$file == '..') continue;
|
||||
@ -29,6 +42,7 @@ function get_skin_dir($skin)
|
||||
return $result_array;
|
||||
}
|
||||
|
||||
|
||||
// 회원 삭제
|
||||
function member_delete($mb_id)
|
||||
{
|
||||
@ -236,16 +250,13 @@ if (get_session('ss_mb_key') !== $admin_key) {
|
||||
unset($auth_menu);
|
||||
unset($menu);
|
||||
unset($amenu);
|
||||
$tmp = dir($g4['admin_path']);
|
||||
while ($entry = $tmp->read())
|
||||
{
|
||||
//if (!preg_match('/^admin.menu([0-9]{3}).php/', $entry, $m))
|
||||
//if (!preg_match('/^admin.menu([0-9]{3}).*\.php/', $entry, $m))
|
||||
$tmp = dir(G4_ADM_PATH);
|
||||
while ($entry = $tmp->read()) {
|
||||
if (!preg_match('/^admin.menu([0-9]{3}).*\.php$/', $entry, $m))
|
||||
continue; // 파일명이 menu 으로 시작하지 않으면 무시한다.
|
||||
|
||||
$amenu[$m[1]] = $entry;
|
||||
include_once($g4['admin_path'].'/'.$entry);
|
||||
include_once(G4_ADM_PATH.'/'.$entry);
|
||||
}
|
||||
@ksort($amenu);
|
||||
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?
|
||||
$menu['menu100'] = array (
|
||||
array('100000', '환경설정', $g4['admin_path'].'/config_form.php', 'config'),
|
||||
array('', '기본환경설정', $g4['admin_path'].'/config_form.php', 'cf_basic'),
|
||||
array('', '관리권한설정', $g4['admin_path'].'/auth_list.php', 'cf_auth'),
|
||||
array('100300', '메일 테스트', $g4['admin_path'].'/sendmail_test.php', 'cf_mailtest'),
|
||||
//array('100400', '버전정보', $g4['admin_path'].'/version.php', 'cf_version'),
|
||||
array('100500', 'phpinfo()', ''.$g4['admin_path'].'/phpinfo.php', 'cf_phpinfo'),
|
||||
//array('100600', '업그레이드', $g4['admin_path'].'/upgrade.php', 'cf_upgrade'),
|
||||
//array('100700', '복구/최적화', $g4['admin_path'].'/repair.php', 'cf_repair'),
|
||||
array('100800', '세션파일 일괄삭제', $g4['admin_path'].'/session_file_delete.php', 'cf_session'),
|
||||
array('100900','캐쉬파일 일괄삭제', $g4['admin_path'].'/cache_file_delete.php', 'cf_cache'),
|
||||
array('100000', '환경설정', $g4['admin_url'].'/config_form.php', 'config'),
|
||||
array('', '기본환경설정', $g4['admin_url'].'/config_form.php', 'cf_basic'),
|
||||
array('', '관리권한설정', $g4['admin_url'].'/auth_list.php', 'cf_auth'),
|
||||
array('100300', '메일 테스트', $g4['admin_url'].'/sendmail_test.php', 'cf_mailtest'),
|
||||
//array('100400', '버전정보', $g4['admin_url'].'/version.php', 'cf_version'),
|
||||
array('100500', 'phpinfo()', $g4['admin_url'].'/phpinfo.php', 'cf_phpinfo'),
|
||||
//array('100600', '업그레이드', $g4['admin_url'].'/upgrade.php', 'cf_upgrade'),
|
||||
//array('100700', '복구/최적화', $g4['admin_url'].'/repair.php', 'cf_repair'),
|
||||
array('100800', '세션파일 일괄삭제',$g4['admin_url'].'/session_file_delete.php', 'cf_session'),
|
||||
array('100900', '캐쉬파일 일괄삭제',$g4['admin_url'].'/cache_file_delete.php', 'cf_cache'),
|
||||
//array('', 'phpMyAdmin', ''.$g4['path'].'/'.$g4['phpmyadmin_dir'].'', 'cf_phpmyadmin')
|
||||
);
|
||||
?>
|
||||
@ -1,10 +1,10 @@
|
||||
<?
|
||||
$menu['menu200'] = array (
|
||||
array('200000', '회원관리', ''.$g4['admin_path'].'/member_list.php', 'member'),
|
||||
array('200100', '회원관리', ''.$g4['admin_path'].'/member_list.php', 'mb_list'),
|
||||
array('200200', '포인트관리', ''.$g4['admin_path'].'/point_list.php', 'mb_point'),
|
||||
array('200300', '회원메일발송', ''.$g4['admin_path'].'/mail_list.php', 'mb_mail'),
|
||||
array('200800', '접속자집계', ''.$g4['admin_path'].'/visit_list.php', 'mb_visit'),
|
||||
array('200900', '투표관리', ''.$g4['admin_path'].'/poll_list.php', 'mb_poll')
|
||||
array('200000', '회원관리', $g4['admin_url'].'/member_list.php', 'member'),
|
||||
array('200100', '회원관리', $g4['admin_url'].'/member_list.php', 'mb_list'),
|
||||
array('200200', '포인트관리', $g4['admin_url'].'/point_list.php', 'mb_point'),
|
||||
array('200300', '회원메일발송', $g4['admin_url'].'/mail_list.php', 'mb_mail'),
|
||||
array('200800', '접속자집계', $g4['admin_url'].'/visit_list.php', 'mb_visit'),
|
||||
array('200900', '투표관리', $g4['admin_url'].'/poll_list.php', 'mb_poll')
|
||||
);
|
||||
?>
|
||||
@ -1,9 +1,9 @@
|
||||
<?
|
||||
$menu['menu300'] = array (
|
||||
array('300000', '게시판관리', ''.$g4['admin_path'].'/board_list.php', 'board'),
|
||||
array('300100', '게시판관리', ''.$g4['admin_path'].'/board_list.php', 'bbs_board'),
|
||||
array('300200', '게시판그룹관리', ''.$g4['admin_path'].'/boardgroup_list.php', 'bbs_group'),
|
||||
array('300300', '인기검색어관리', ''.$g4['admin_path'].'/popular_list.php', 'bbs_poplist'),
|
||||
array('300400', '인기검색어순위', ''.$g4['admin_path'].'/popular_rank.php', 'bbs_poprank'),
|
||||
array('300000', '게시판관리', ''.$g4['admin_url'].'/board_list.php', 'board'),
|
||||
array('300100', '게시판관리', ''.$g4['admin_url'].'/board_list.php', 'bbs_board'),
|
||||
array('300200', '게시판그룹관리', ''.$g4['admin_url'].'/boardgroup_list.php', 'bbs_group'),
|
||||
array('300300', '인기검색어관리', ''.$g4['admin_url'].'/popular_list.php', 'bbs_poplist'),
|
||||
array('300400', '인기검색어순위', ''.$g4['admin_url'].'/popular_rank.php', 'bbs_poprank'),
|
||||
);
|
||||
?>
|
||||
@ -1,26 +1,29 @@
|
||||
<?
|
||||
$menu["menu400"] = array (
|
||||
array("400000", "쇼핑몰관리", "$g4[shop_admin_path]/"),
|
||||
array("400100", "쇼핑몰설정", "$g4[shop_admin_path]/configform.php"),
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('G4_IS_SHOP') || !G4_IS_SHOP) return;
|
||||
|
||||
array("400200", "분류관리", "$g4[shop_admin_path]/categorylist.php"),
|
||||
array("400300", "상품관리", "$g4[shop_admin_path]/itemlist.php"),
|
||||
array("400400", "주문관리", "$g4[shop_admin_path]/orderlist.php"),
|
||||
$menu["menu400"] = array (
|
||||
array("400000", "쇼핑몰관리", "$g4[shop_admin_path]/"),
|
||||
array("400100", "쇼핑몰설정", "$g4[shop_admin_path]/configform.php"),
|
||||
|
||||
array("400200", "분류관리", "$g4[shop_admin_path]/categorylist.php"),
|
||||
array("400300", "상품관리", "$g4[shop_admin_path]/itemlist.php"),
|
||||
array("400400", "주문관리", "$g4[shop_admin_path]/orderlist.php"),
|
||||
array("400410", "주문개별관리", "$g4[shop_admin_path]/orderstatuslist.php"),
|
||||
array("400420", "주문통합관리", "$g4[shop_admin_path]/orderlist2.php"),
|
||||
array("400500", "배송일괄처리", "$g4[shop_admin_path]/deliverylist.php"),
|
||||
|
||||
array("400610", "상품유형관리", "$g4[shop_admin_path]/itemtypelist.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("400650", "사용후기", "$g4[shop_admin_path]/itempslist.php"),
|
||||
array("400660", "상품문의", "$g4[shop_admin_path]/itemqalist.php"),
|
||||
array("400650", "사용후기", "$g4[shop_admin_path]/itempslist.php"),
|
||||
array("400660", "상품문의", "$g4[shop_admin_path]/itemqalist.php"),
|
||||
|
||||
array("400700", "내용관리", "$g4[shop_admin_path]/contentlist.php"),
|
||||
array("400710", "FAQ 관리", "$g4[shop_admin_path]/faqmasterlist.php"),
|
||||
array("400720", "새창관리", "$g4[shop_admin_path]/newwinlist.php"),
|
||||
array("400730", "배너관리", "$g4[shop_admin_path]/bannerlist.php"),
|
||||
array("400700", "내용관리", "$g4[shop_admin_path]/contentlist.php"),
|
||||
array("400710", "FAQ 관리", "$g4[shop_admin_path]/faqmasterlist.php"),
|
||||
array("400720", "새창관리", "$g4[shop_admin_path]/newwinlist.php"),
|
||||
array("400730", "배너관리", "$g4[shop_admin_path]/bannerlist.php"),
|
||||
array("400740", "배송회사관리", "$g4[shop_admin_path]/deliverycodelist.php"),
|
||||
array("400750", "추가배송비관리", "$g4[shop_admin_path]/sendcostlist.php"),
|
||||
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
<?
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('G4_IS_SHOP') || !G4_IS_SHOP) return;
|
||||
|
||||
$menu["menu500"] = array (
|
||||
array("500000", "쇼핑몰현황/기타", "$g4[shop_admin_path]/itemsellrank.php"),
|
||||
array("500100", "상품판매순위", "$g4[shop_admin_path]/itemsellrank.php"),
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit;
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
?>
|
||||
|
||||
<noscript>
|
||||
@ -16,8 +16,8 @@ if (!defined("_GNUBOARD_")) exit;
|
||||
|
||||
<!-- <p>실행시간 : <?=get_microtime() - $begin_time;?> -->
|
||||
|
||||
<script src="<?=$g4['admin_path']?>/admin.js"></script>
|
||||
<script src="<?=G4_ADM_PATH?>/admin.js"></script>
|
||||
|
||||
<?
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,7 +1,7 @@
|
||||
<?
|
||||
// board_delete.php , boardgroup_delete.php 에서 include 하는 파일
|
||||
|
||||
if (!defined("_GNUBOARD_")) exit;
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
if (!defined("_BOARD_DELETE_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// $tmp_bo_table 에는 $bo_table 값을 넘겨주어야 함
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?
|
||||
$sub_menu = "300100";
|
||||
define('G4_EDITOR', 1);
|
||||
include_once('./_common.php');
|
||||
include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
@ -94,7 +94,7 @@ include_once ('./admin.head.php');
|
||||
if ($w == '')
|
||||
echo '영문자, 숫자, _ 만 가능 (공백없이 20자 이내)';
|
||||
else
|
||||
echo '<a href="'.$g4['bbs_path'].'/board.php?bo_table='.$board['bo_table'].'">게시판 바로가기</a>';
|
||||
echo '<a href="'.G4_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'">게시판 바로가기</a>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -144,7 +144,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
</td>
|
||||
<td class="td_boid">
|
||||
<input type="hidden" name="board_table[<?=$i?>]" value="<?=$row['bo_table']?>">
|
||||
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$row['bo_table']?>"><?=$row['bo_table']?></a>
|
||||
<a href="<?=G4_BBS_URL?>/board.php?bo_table=<?=$row['bo_table']?>"><?=$row['bo_table']?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?=get_skin_select("board", "bo_skin_$i", "bo_skin[$i]", $row['bo_skin']);?>
|
||||
|
||||
@ -33,10 +33,7 @@ include_once("$g4[path]/head.sub.php");
|
||||
function _copy(link)
|
||||
{
|
||||
var new_it_id = document.getElementById('new_it_id').value;
|
||||
if (g4_charset.toUpperCase() == 'EUC-KR')
|
||||
opener.parent.location.href = link+'&new_it_id='+new_it_id;
|
||||
else
|
||||
opener.parent.location.href = encodeURI(link+'&new_it_id='+new_it_id);
|
||||
opener.parent.location.href = encodeURI(link+'&new_it_id='+new_it_id);
|
||||
self.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit;
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
include_once($g4['path'].'/lib/visit.lib.php');
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
<?
|
||||
$g4_path = '..'; // common.php 의 상대 경로
|
||||
include_once($g4_path.'/common.php');
|
||||
include_once('../common.php');
|
||||
?>
|
||||
@ -1,5 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
include_once($g4['path'].'/_head.php');
|
||||
include_once(G4_PATH.'/_head.php');
|
||||
?>
|
||||
@ -1,4 +1,4 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
?>
|
||||
@ -1,5 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
include_once($g4['path'].'/_tail.php');
|
||||
include_once(G4_PATH.'/_tail.php');
|
||||
?>
|
||||
@ -1,4 +1,4 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -3,7 +3,7 @@ global $lo_location;
|
||||
global $lo_url;
|
||||
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
// 필수 입력입니다.
|
||||
// 양쪽 공백 없애기
|
||||
// 필수 (선택 혹은 입력)입니다.
|
||||
@ -61,5 +61,5 @@ document.location.href = "<? echo $url; ?>";
|
||||
</noscript>
|
||||
|
||||
<?
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,6 +1,6 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$msg2 = str_replace("\\n", "<br>", $msg);
|
||||
|
||||
@ -43,5 +43,5 @@ window.close();
|
||||
</noscript>
|
||||
|
||||
<?
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,9 +1,8 @@
|
||||
<?
|
||||
define('G4_CAPTCHA', 1);
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$board['bo_table']) {
|
||||
alert('존재하지 않는 게시판입니다.', $g4['path']);
|
||||
alert('존재하지 않는 게시판입니다.', G4_PATH);
|
||||
}
|
||||
|
||||
if (isset($write['wr_is_comment']) && $write['wr_is_comment']) {
|
||||
@ -38,7 +37,7 @@ if (isset($wr_id) && $wr_id) {
|
||||
$sql = " select count(*) as cnt from {$g4['group_member_table']} where gr_id = '{$board['gr_id']}' and mb_id = '{$member['mb_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row['cnt']) {
|
||||
alert("접근 권한이 없으므로 글읽기가 불가합니다.\\n\\n궁금하신 사항은 관리자에게 문의 바랍니다.", $g4['path']);
|
||||
alert("접근 권한이 없으므로 글읽기가 불가합니다.\\n\\n궁금하신 사항은 관리자에게 문의 바랍니다.", $g4['url']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -46,7 +45,7 @@ if (isset($wr_id) && $wr_id) {
|
||||
// 로그인된 회원의 권한이 설정된 읽기 권한보다 작다면
|
||||
if ($member['mb_level'] < $board['bo_read_level']) {
|
||||
if ($is_member)
|
||||
alert('글을 읽을 권한이 없습니다.', $g4['path']);
|
||||
alert('글을 읽을 권한이 없습니다.', $g4['url']);
|
||||
else
|
||||
alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
}
|
||||
@ -124,7 +123,7 @@ if (isset($wr_id) && $wr_id) {
|
||||
} else {
|
||||
if ($member['mb_level'] < $board['bo_list_level']) {
|
||||
if ($member['mb_id'])
|
||||
alert('목록을 볼 권한이 없습니다.', $g4['path']);
|
||||
alert('목록을 볼 권한이 없습니다.', $g4['url']);
|
||||
else
|
||||
alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode('board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
}
|
||||
@ -134,7 +133,7 @@ if (isset($wr_id) && $wr_id) {
|
||||
$g4['title'] = $board['bo_subject'];
|
||||
}
|
||||
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$width = $board['bo_table_width'];
|
||||
if ($width <= 100) $width .= '%';
|
||||
@ -177,11 +176,11 @@ if ($board['bo_use_nogood'])
|
||||
$admin_href = "";
|
||||
// 최고관리자 또는 그룹관리자라면
|
||||
if ($member['mb_id'] && ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id']))
|
||||
$admin_href = $g4['admin_path'].'/board_form.php?w=u&bo_table='.$bo_table;
|
||||
$admin_href = G4_ADM_URL.'/board_form.php?w=u&bo_table='.$bo_table;
|
||||
|
||||
include_once('./board_head.php');
|
||||
|
||||
echo "<script src=\"".$g4['path']."/js/sideview.js\"></script>";
|
||||
echo "<script src=\"".$g4['url']."/js/sideview.js\"></script>";
|
||||
|
||||
// 게시물 아이디가 있다면 게시물 보기를 INCLUDE
|
||||
if (isset($wr_id) && $wr_id) {
|
||||
@ -197,5 +196,5 @@ include_once('./board_tail.php');
|
||||
|
||||
echo "\n<!-- 사용스킨 : {$board['bo_skin']} -->\n";
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 게시판 관리의 상단 파일 경로
|
||||
if ($board['bo_include_head']) {
|
||||
@ -8,7 +8,7 @@ if ($board['bo_include_head']) {
|
||||
|
||||
// 게시판 관리의 상단 이미지 경로
|
||||
if ($board['bo_image_head']) {
|
||||
echo '<img src="'.$g4['path'].'/data/file/'.$bo_table.'/'.$board['bo_image_head'].'">';
|
||||
echo '<img src="'.G4_PATH.'/data/file/'.$bo_table.'/'.$board['bo_image_head'].'">';
|
||||
}
|
||||
|
||||
// 게시판 관리의 상단 내용
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 게시판 관리의 하단 내용
|
||||
if ($board['bo_content_tail']) {
|
||||
@ -8,7 +8,7 @@ if ($board['bo_content_tail']) {
|
||||
|
||||
// 게시판 관리의 하단 이미지 경로
|
||||
if ($board['bo_image_tail']) {
|
||||
echo '<img src="'.$g4['path'].'/data/file/'.$bo_table.'/'.$board['bo_image_tail'].'">';
|
||||
echo '<img src="'.G4_PATH.'/data/file/'.$bo_table.'/'.$board['bo_image_tail'].'">';
|
||||
}
|
||||
|
||||
// 게시판 관리의 하단 파일 경로
|
||||
|
||||
@ -1,32 +1,40 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
function editor_html($id, $content, $class="")
|
||||
function editor_html($id, $content, $ckeditor=true, $class="")
|
||||
{
|
||||
if ( (isset($GLOBALS['is_dhtml_editor']) && $GLOBALS['is_dhtml_editor']) || !isset($GLOBALS['is_dhtml_editor']) ) {
|
||||
$str = "<textarea id=\"$id\" name=\"$id\" class=\"ckeditor $class\" rows=\"10\" style=\"width:100%;\">$content</textarea>\n";
|
||||
//if (G4_EDITOR) $str .= "<script>CKEDITOR.replace('$id',{height:'500px'});</script>\n";
|
||||
} else {
|
||||
$str = "<textarea id=\"$id\" name=\"$id\" class=\"$class\" rows=\"10\" style=\"width:100%;\">$content</textarea>\n";
|
||||
global $g4;
|
||||
static $js = true;
|
||||
|
||||
$html = "";
|
||||
if ($js) {
|
||||
$html .= PHP_EOL.'<script src="'.G4_CKEDITOR_URL.'/ckeditor.js"></script>';
|
||||
$html .= PHP_EOL.'<script>var g4_ckeditor_url = "'.G4_CKEDITOR_URL.'";</script>';
|
||||
$html .= PHP_EOL.'<script src="'.G4_CKEDITOR_URL.'/config.js"></script>';
|
||||
$js = false;
|
||||
}
|
||||
return $str;
|
||||
|
||||
$ckeditor_class = $ckeditor ? "ckeditor" : "";
|
||||
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$ckeditor_class $class\" style=\"width:100%;\">$content</textarea>";
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
// textarea 로 값을 넘긴다. javascript 반드시 필요
|
||||
function get_editor_js($id)
|
||||
function get_editor_js($id, $ckeditor=true)
|
||||
{
|
||||
if ( (isset($GLOBALS['is_dhtml_editor']) && $GLOBALS['is_dhtml_editor']) || !isset($GLOBALS['is_dhtml_editor']) ) {
|
||||
$str = "var {$id}_editor_data = CKEDITOR.instances.{$id}.getData();\n";
|
||||
if ( $ckeditor ) {
|
||||
return "var {$id}_editor_data = CKEDITOR.instances.{$id}.getData();\n";
|
||||
} else {
|
||||
$str = "var {$id}_editor = document.getElementById('{$id}');\n";
|
||||
return "var {$id}_editor = document.getElementById('{$id}');\n";
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// textarea 의 값이 비어 있는지 검사
|
||||
function chk_editor_js($id, $textarea_name="내용을")
|
||||
function chk_editor_js($id, $ckeditor=true, $textarea_name="내용을")
|
||||
{
|
||||
if ( (isset($GLOBALS['is_dhtml_editor']) && $GLOBALS['is_dhtml_editor']) || !isset($GLOBALS['is_dhtml_editor']) ) {
|
||||
if ( $ckeditor ) {
|
||||
return "if (!{$id}_editor_data) { alert(\"$textarea_name 입력해 주십시오.\"); CKEDITOR.instances.{$id}.focus(); return false; }\n";
|
||||
} else {
|
||||
return "if (!{$id}_editor.value) { alert(\"$textarea_name 입력해 주십시오.\"); {$id}_editor.focus(); return false; }\n";
|
||||
|
||||
@ -26,5 +26,5 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
config.fontSize_sizes = "7pt/9px;8pt/11px;9pt/12px;10pt/13px;11pt/15px;14pt/19px;18pt/24px;24pt/32px;36/48px;";
|
||||
config.enterMode = CKEDITOR.ENTER_BR;
|
||||
config.shiftEnterMode = CKEDITOR.ENTER_P;
|
||||
config.filebrowserUploadUrl = g4_ckeditor_path+"/upload.php?type=Images";
|
||||
config.filebrowserUploadUrl = g4_ckeditor_url+"/upload.php?type=Images";
|
||||
};
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
<?php
|
||||
define('G4_EDITOR', 1);
|
||||
$g4_path = "../.."; // common.php 의 상대 경로
|
||||
include_once("$g4_path/common.php");
|
||||
include_once("../../common.php");
|
||||
|
||||
$ym = date('ym', $g4['server_time']);
|
||||
$ym = date('ym', G4_SERVER_TIME);
|
||||
|
||||
$data_dir = $g4['ckeditor_data_path'].'/'.$ym;
|
||||
$data_url = $g4['ckeditor_data_url'].'/'.$ym;
|
||||
$data_dir = G4_EDITOR_PATH.'/'.$ym;
|
||||
$data_url = G4_EDITOR_URL.'/'.$ym;
|
||||
@mkdir($data_dir, 0707);
|
||||
@chmod($data_dir, 0707);
|
||||
|
||||
@ -14,8 +12,6 @@ $data_url = $g4['ckeditor_data_url'].'/'.$ym;
|
||||
$funcNum = $_GET['CKEditorFuncNum'] ;
|
||||
$CKEditor = $_GET['CKEditor'] ;
|
||||
$langCode = $_GET['langCode'] ;
|
||||
|
||||
header("Content-Type: text/html; charset=$g4[charset]");
|
||||
|
||||
if(isset($_FILES['upload']['tmp_name'])) {
|
||||
$file_name = $_FILES['upload']['name'];
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<article id="confirm_check">
|
||||
@ -20,5 +20,5 @@ include_once($g4['path'].'/head.sub.php');
|
||||
</article>
|
||||
|
||||
<?
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -26,7 +26,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$list[$i]['num'] = sprintf('%03d',$i+1);
|
||||
}
|
||||
|
||||
echo '<script src="'.$g4['path'].'/js/sideview.js"></script>';
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
|
||||
include_once($connect_skin_path.'/current_connect.skin.php');
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ while ($row = sql_fetch_array($result))
|
||||
$sql2 = " select * from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ";
|
||||
$result2 = sql_query($sql2);
|
||||
while ($row2 = sql_fetch_array($result2))
|
||||
@unlink($g4['path'].'/data/file/'.$bo_table.'/'.$row2['bf_file']);
|
||||
@unlink(G4_PATH.'/data/file/'.$bo_table.'/'.$row2['bf_file']);
|
||||
|
||||
// 파일테이블 행 삭제
|
||||
sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
@ -92,7 +92,7 @@ for ($i=count($tmp_array)-1; $i>=0; $i--)
|
||||
$result2 = sql_query($sql2);
|
||||
while ($row2 = sql_fetch_array($result2))
|
||||
// 파일삭제
|
||||
@unlink($g4['path'].'/data/file/'.$bo_table.'/'.$row2['bf_file']);
|
||||
@unlink(G4_PATH.'/data/file/'.$bo_table.'/'.$row2['bf_file']);
|
||||
|
||||
// 파일테이블 행 삭제
|
||||
sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
@ -34,7 +34,7 @@ if ($member['mb_level'] < $board['bo_download_level']) {
|
||||
alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode($g4['bbs_path'].'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
}
|
||||
|
||||
$filepath = $g4['path'].'/data/file/'.$bo_table.'/'.$file['bf_file'];
|
||||
$filepath = G4_PATH.'/data/file/'.$bo_table.'/'.$file['bf_file'];
|
||||
$filepath = addslashes($filepath);
|
||||
if (!is_file($filepath) || !file_exists($filepath))
|
||||
alert('파일이 존재하지 않습니다.');
|
||||
|
||||
@ -4,7 +4,7 @@ include_once('./_common.php');
|
||||
$sql = " select mb_id, mb_email, mb_datetime from {$g4[member_table]} where mb_id = '{$mb_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row[mb_id])
|
||||
alert('존재하는 회원이 아닙니다.', $g4['path']);
|
||||
alert('존재하는 회원이 아닙니다.', G4_PATH);
|
||||
|
||||
if ($mb_md5)
|
||||
{
|
||||
@ -13,9 +13,9 @@ if ($mb_md5)
|
||||
{
|
||||
sql_query(" update {$g4[member_table]} set mb_email_certify = '{$g4[time_ymdhis]}' where mb_id = '{$mb_id}' ");
|
||||
|
||||
alert('E-mail 인증 처리를 완료 하였습니다.', $g4['path']);
|
||||
alert('E-mail 인증 처리를 완료 하였습니다.', G4_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.', $g4['path']);
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.', G4_PATH);
|
||||
?>
|
||||
@ -4,7 +4,7 @@ include_once('./_common.php');
|
||||
$sql = " select mb_id, mb_email, mb_datetime from {$g4[member_table]} where mb_id = '{$mb_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row[mb_id])
|
||||
alert('존재하는 회원이 아닙니다.', $g4['path']);
|
||||
alert('존재하는 회원이 아닙니다.', G4_PATH);
|
||||
|
||||
if ($mb_md5)
|
||||
{
|
||||
@ -13,9 +13,9 @@ if ($mb_md5)
|
||||
{
|
||||
sql_query(" update {$g4[member_table]} set mb_mailling = 0 where mb_id = '{$mb_id}' ");
|
||||
|
||||
alert('정보메일을 보내지 않도록 수신거부 하였습니다.', $g4['path']);
|
||||
alert('정보메일을 보내지 않도록 수신거부 하였습니다.', G4_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.', $g4['path']);
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.', G4_PATH);
|
||||
?>
|
||||
@ -26,7 +26,7 @@ if ($sendmail_count > 3)
|
||||
alert_close('한번 접속후 일정수의 메일만 발송할 수 있습니다.\\n\\n계속해서 메일을 보내시려면 다시 로그인 또는 접속하여 주십시오.');
|
||||
|
||||
$g4['title'] = '메일 쓰기';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
if (!$name)
|
||||
$name = base64_decode($email);
|
||||
@ -39,5 +39,5 @@ $type_checked[$type] = 'checked';
|
||||
|
||||
include_once($member_skin_path.'/formmail.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?
|
||||
define('G4_CAPTCHA', 1);
|
||||
include_once('./_common.php');
|
||||
include_once("{$g4['path']}/lib/mailer.lib.php");
|
||||
include_once("{G4_PATH}/lib/mailer.lib.php");
|
||||
|
||||
if (!$config['cf_email_use'])
|
||||
alert('환경설정에서 "메일발송 사용"에 체크하셔야 메일을 발송할 수 있습니다.\\n\\n관리자에게 문의하시기 바랍니다.');
|
||||
@ -46,9 +46,9 @@ mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file);
|
||||
|
||||
//$html_title = $tmp_to . "님께 메일발송";
|
||||
$html_title = '메일 발송중';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
alert_close('메일을 정상적으로 발송하였습니다.');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -23,6 +23,7 @@ class gcaptcha
|
||||
var $shadow = array('r'=>128, 'g'=>128, 'b'=>128);
|
||||
|
||||
var $captcha_length = 6;
|
||||
var $captcha_filename = '';
|
||||
|
||||
// 이미지 크기
|
||||
function set_box_size($width, $height) {
|
||||
@ -99,7 +100,7 @@ class gcaptcha
|
||||
|
||||
// Replace path by your own font path
|
||||
$fonts = Array();
|
||||
foreach (glob($g4['gcaptcha_fonts'].'/*.ttf') as $filename) {
|
||||
foreach (glob(G4_GCAPTCHA_PATH.'/fonts/*.ttf') as $filename) {
|
||||
$fonts[] = $filename;
|
||||
}
|
||||
$font = $fonts[mt_rand(0, count($fonts)-1)];
|
||||
@ -119,10 +120,34 @@ class gcaptcha
|
||||
imagettftext($im, $size, $angle, $x-2, $y-2, $grey, $font, $captcha_key);
|
||||
}
|
||||
|
||||
imagepng($im, captcha_file('.png'), 0, NULL);
|
||||
$this->captcha_filename = $this->get_captcha_filename();
|
||||
|
||||
imagepng($im, G4_CACHE_PATH.'/'.$this->captcha_filename.'.png', 0, NULL);
|
||||
imagedestroy($im);
|
||||
|
||||
make_wav();
|
||||
$this->make_wav($this->captcha_filename.'.wav');
|
||||
}
|
||||
|
||||
function get_captcha_filename()
|
||||
{
|
||||
return 'gcaptcha-'.abs_ip2long().'_'.$_COOKIE['PHPSESSID'];
|
||||
}
|
||||
|
||||
function make_wav($captcha_filename)
|
||||
{
|
||||
global $g4;
|
||||
|
||||
$number = (string)$_SESSION['ss_captcha_key'];
|
||||
$wavs = array();
|
||||
for($i=0;$i<strlen($number);$i++){
|
||||
$file = G4_GCAPTCHA_PATH.'/wavs/'.$number[$i].'.wav';
|
||||
$wavs[] = $file;
|
||||
}
|
||||
|
||||
$wav_filepath = G4_CACHE_PATH.'/'.$captcha_filename;
|
||||
$fp = fopen($wav_filepath, 'w+');
|
||||
fwrite($fp, join_wavs($wavs));
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,10 +172,14 @@ function captcha_html($class="captcha")
|
||||
$obj = new gcaptcha();
|
||||
$obj->run();
|
||||
|
||||
$html = '<fieldset id="captcha" class="'.$class.'">';
|
||||
$png_file_url = G4_CACHE_URL.'/'.$obj->captcha_filename.'.png';
|
||||
$wav_file_url = G4_CACHE_URL.'/'.$obj->captcha_filename.'.wav';
|
||||
|
||||
$html .= PHP_EOL.'<script src="'.G4_GCAPTCHA_URL.'/gcaptcha.js"></script>';
|
||||
$html .= '<fieldset id="captcha" class="'.$class.'">';
|
||||
$html .= '<legend class="sound_only">스팸방지</legend>';
|
||||
$html .= '<img src="'.captcha_file('.png').'" alt="스팸방지 숫자">';
|
||||
$html .= '<a href="'.captcha_file('.wav').'" id="captcha_wav"><img src="'.$g4['bbs_path'].'/gcaptcha/img/sound.gif" alt="숫자를 음성으로 듣기"></a>';
|
||||
$html .= '<img src="'.$png_file_url.'" alt="스팸방지 숫자">';
|
||||
$html .= '<a href="'.$wav_file_url.'" id="captcha_wav" target="_blank"><img src="'.G4_GCAPTCHA_URL.'/img/sound.gif" alt="숫자를 음성으로 듣기"></a>';
|
||||
$html .= '<input type="text" id="captcha_key" name="captcha_key" class="captcha_box fieldset_input" size="6" maxlength="6" required title="스팸방지 숫자 입력">';
|
||||
$html .= '<p class="sound_only">스팸방지 숫자를 순서대로 입력하세요.</p>';
|
||||
$html .= '</fieldset>';
|
||||
@ -177,24 +206,6 @@ function chk_captcha_js()
|
||||
return "if (!chk_captcha()) return false;";
|
||||
}
|
||||
|
||||
|
||||
function make_wav()
|
||||
{
|
||||
global $g4;
|
||||
|
||||
$number = (string)$_SESSION['ss_captcha_key'];
|
||||
$wavs = array();
|
||||
for($i=0;$i<strlen($number);$i++){
|
||||
$file = $g4['gcaptcha_wavs'].'/'.$number[$i].'.wav';
|
||||
$wavs[] = $file;
|
||||
}
|
||||
|
||||
$wav_filepath = captcha_file('.wav');
|
||||
$fp = fopen($wav_filepath, 'w+');
|
||||
fwrite($fp, join_wavs($wavs));
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
function join_wavs($wavs)
|
||||
{
|
||||
$fields = join('/',array( 'H8ChunkID', 'VChunkSize', 'H8Format',
|
||||
@ -240,12 +251,4 @@ function join_wavs($wavs)
|
||||
.pack('V', strlen($data))
|
||||
.$data;
|
||||
}
|
||||
|
||||
|
||||
// 캡챠 파일의 상대 경로를 반환
|
||||
function captcha_file($extension='.png')
|
||||
{
|
||||
global $g4;
|
||||
return $g4['cache_captcha_path'].'/'.abs_ip2long().'_'.$_COOKIE['PHPSESSID'].$extension;
|
||||
}
|
||||
?>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// 상대 경로
|
||||
$g4_path = '..';
|
||||
include_once($g4_path.'/common.php');
|
||||
include_once($g4['path'].'/lib/latest.lib.php');
|
||||
include_once(G4_PATH.'/lib/latest.lib.php');
|
||||
|
||||
$g4['title'] = $group[gr_subject];
|
||||
include_once('./_head.php');
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 분류 사용 여부
|
||||
$is_category = false;
|
||||
@ -111,7 +111,7 @@ while ($row = sql_fetch_array($result))
|
||||
if ($sca || $stx)
|
||||
$row = sql_fetch(" select * from {$write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
|
||||
$list[$i] = get_list($row, $board, $board_skin_path, $board['bo_subject_len']);
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, $board['bo_subject_len']);
|
||||
if (strstr($sfl, 'subject')) {
|
||||
$list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ if ($is_member) {
|
||||
if ($url)
|
||||
goto_url($url);
|
||||
else
|
||||
goto_url($g4['path']);
|
||||
goto_url($g4['url']);
|
||||
}
|
||||
|
||||
if ($url)
|
||||
@ -51,7 +51,7 @@ else
|
||||
// 로그인 스킨이 없는 경우 관리자 페이지 접속이 안되는 것을 막기 위하여 기본 스킨으로 대체
|
||||
$login_file = $member_skin_path.'/login.skin.php';
|
||||
if (!file_exists($login_file)) {
|
||||
$member_skin_path = $g4['path'].'/'.$g4['skin_dir'].'/member/basic';
|
||||
$member_skin_path = G4_PATH.'/'.$g4['skin_dir'].'/member/basic';
|
||||
}
|
||||
|
||||
include_once($member_skin_path.'/login.skin.php');
|
||||
|
||||
@ -71,7 +71,7 @@ if ($url) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$link = $g4['path'];
|
||||
$link = G4_PATH;
|
||||
}
|
||||
|
||||
goto_url($link);
|
||||
|
||||
@ -18,9 +18,9 @@ if ($url) {
|
||||
|
||||
$link = $url;
|
||||
} else if ($bo_table) {
|
||||
$link = $g4['bbs_path'].'/board.php?bo_table='.$bo_table;
|
||||
$link = G4_BBS_URL.'/board.php?bo_table='.$bo_table;
|
||||
} else {
|
||||
$link = $g4['path'];
|
||||
$link = G4_URL;
|
||||
}
|
||||
|
||||
goto_url($link);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
$g4['title'] = 'E-mail 중복확인';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$mb_email = trim($mb_email);
|
||||
|
||||
@ -41,5 +41,5 @@ HEREDOC;
|
||||
}
|
||||
}
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -2,7 +2,7 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
$g4['title'] = '회원아이디 중복확인';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$mb_id = trim($mb_id);
|
||||
|
||||
@ -35,5 +35,5 @@ if ($mb[mb_id]) {
|
||||
}
|
||||
}
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -19,7 +19,7 @@ sql_query($sql);
|
||||
session_unregister("ss_mb_id");
|
||||
|
||||
if (!$url)
|
||||
$url = $g4['path'];
|
||||
$url = G4_PATH;
|
||||
|
||||
alert(''.$member[mb_nick].'님께서는 '. date("Y년 m월 d일") .'에 회원에서 탈퇴 하셨습니다.', $url);
|
||||
?>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
$g4['title'] = '별명 중복확인';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$mb_nick = trim($mb_nick);
|
||||
|
||||
@ -47,5 +47,5 @@ if ($mb[mb_nick]) {
|
||||
}
|
||||
}
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -5,7 +5,7 @@ if ($is_guest)
|
||||
alert_close('회원만 이용하실 수 있습니다.');
|
||||
|
||||
$g4['title'] = '내 쪽지함';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
// 설정일이 지난 메모 삭제
|
||||
$sql = " delete from {$g4['memo_table']}
|
||||
@ -74,9 +74,9 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&kind='.$kind;
|
||||
}
|
||||
|
||||
echo '<script src="'.$g4['path'].'/js/sideview.js"></script>';
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
|
||||
include_once($member_skin_path.'/memo.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -33,7 +33,7 @@ if ($me_recv_mb_id)
|
||||
}
|
||||
|
||||
$g4['title'] = '쪽지 보내기';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
if ($g4['https_url'])
|
||||
$memo_action_url = "{$g4['https_url']}/{$g4['bbs']}/memo_form_update.php";
|
||||
@ -42,5 +42,5 @@ else
|
||||
|
||||
include_once($member_skin_path.'/memo_form.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -27,7 +27,7 @@ else
|
||||
}
|
||||
|
||||
$g4['title'] = $t.' 쪽지 보기';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$sql = " select * from {$g4['memo_table']}
|
||||
where me_id = '$me_id'
|
||||
@ -63,11 +63,11 @@ else
|
||||
|
||||
$mb = get_member($memo['me_'.$unkind.'_mb_id']);
|
||||
|
||||
echo '<script src="'.$g4['path'].'/js/sideview.js"></script>';
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
|
||||
$member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin'];
|
||||
$member_skin_path = G4_PATH.'/skin/member/'.$config['cf_member_skin'];
|
||||
|
||||
include_once($member_skin_path.'/memo_view.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<script>
|
||||
@ -22,10 +22,10 @@ if(confirm("<? echo $memo_msg; ?>")) {
|
||||
</p>
|
||||
|
||||
<a href="<? echo $g4['bbs_path']; ?>/memo.php" target="_blank">확인</a>
|
||||
<a href="<? echo $$g4['path']; ?>">취소</a><br><br>
|
||||
<a href="<? echo $G4_PATH; ?>">취소</a><br><br>
|
||||
</article>
|
||||
</noscript>
|
||||
|
||||
<?php
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -13,7 +13,7 @@ if ($is_admin != 'board' && $is_admin != 'group' && $is_admin != 'super')
|
||||
alert_close("게시판 관리자 이상 접근이 가능합니다.");
|
||||
|
||||
$g4['title'] = '게시물 ' . $act;
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$wr_id_list = '';
|
||||
if ($wr_id)
|
||||
@ -134,5 +134,5 @@ function fboardmoveall_submit(f)
|
||||
</td></tr></table>
|
||||
|
||||
<?
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -12,7 +12,7 @@ if(!count($_POST['chk_bo_table']))
|
||||
alert("게시물을 ".$act."할 게시판을 한개 이상 선택해 주십시오.", $url);
|
||||
|
||||
// 원본 파일 디렉토리
|
||||
$src_dir = $g4['path'].'/data/file/'.$bo_table;
|
||||
$src_dir = G4_PATH.'/data/file/'.$bo_table;
|
||||
|
||||
$save = array();
|
||||
$save_count_write = 0;
|
||||
@ -31,8 +31,8 @@ while ($row = sql_fetch_array($result))
|
||||
$move_bo_table = $_POST['chk_bo_table'][$i];
|
||||
$move_write_table = $g4['write_prefix'] . $move_bo_table;
|
||||
|
||||
$src_dir = $g4['path'].'/data/file/'.$bo_table; // 원본 디렉토리
|
||||
$dst_dir = $g4['path'].'/data/file/'.$move_bo_table; // 복사본 디렉토리
|
||||
$src_dir = G4_PATH.'/data/file/'.$bo_table; // 원본 디렉토리
|
||||
$dst_dir = G4_PATH.'/data/file/'.$move_bo_table; // 복사본 디렉토리
|
||||
|
||||
$count_write = 0;
|
||||
$count_comment = 0;
|
||||
|
||||
@ -105,7 +105,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
$write_pages = get_paging($config['cf_write_pages'], $page, $total_page, "?gr_id=$gr_id&view=$view&mb_id=$mb_id&page=");
|
||||
|
||||
echo '<script src="'.$g4['path'].'/js/sideview.js"></script>'.PHP_EOL;
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>'.PHP_EOL;
|
||||
|
||||
include_once($new_skin_path.'/new.skin.php');
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ switch ($w) {
|
||||
alert('w 값이 제대로 넘어오지 않았습니다.');
|
||||
}
|
||||
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
if ($board['bo_include_head']) { @include ($board['bo_include_head']); }
|
||||
if ($board['bo_content_head']) { echo stripslashes($board['bo_content_head']); }
|
||||
@ -34,5 +34,5 @@ include_once($member_skin_path.'/password.skin.php');
|
||||
if ($board['bo_content_tail']) { echo stripslashes($board['bo_content_tail']); }
|
||||
if ($board['bo_include_tail']) { @include ($board['bo_include_tail']); }
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -7,7 +7,7 @@ if ($is_member) {
|
||||
}
|
||||
|
||||
$g4['title'] = '회원아이디/패스워드 찾기';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
if ($g4['https_url'])
|
||||
$action_url = "{$g4['https_url']}/{$g4['bbs']}/password_lost2.php";
|
||||
@ -16,5 +16,5 @@ else
|
||||
|
||||
include_once($member_skin_path.'/password_lost.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,7 +1,7 @@
|
||||
<?
|
||||
define('G4_CAPTCHA', 1);
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/lib/mailer.lib.php');
|
||||
include_once(G4_PATH.'/lib/mailer.lib.php');
|
||||
|
||||
if ($is_member) {
|
||||
alert("이미 로그인중입니다.");
|
||||
|
||||
@ -5,7 +5,7 @@ if (!$member[mb_id])
|
||||
alert_close('회원만 조회하실 수 있습니다.');
|
||||
|
||||
$g4['title'] = $member[mb_nick].' 님의 포인트 내역';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$list = array();
|
||||
|
||||
@ -117,5 +117,5 @@ $(function() {
|
||||
</script>
|
||||
|
||||
<?
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,6 +1,6 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/lib/mailer.lib.php');
|
||||
include_once(G4_PATH.'/lib/mailer.lib.php');
|
||||
|
||||
if ($w == "")
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?
|
||||
// 설문조사 기타의견 입력시 관리자께 보내는 메일을 수정하고 싶으시다면 이 파일을 수정하십시오.
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@ -84,12 +84,12 @@ for ($i=0; $row2=sql_fetch_array($result); $i++) {
|
||||
$list3[$i]['subject'] = cut_str($row2['po_subject'],60,"…");
|
||||
}
|
||||
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
echo '<script src="'.$g4['path'].'/js/sideview.js"></script>';
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
|
||||
if (!file_exists($poll_skin_path.'/poll_result.skin.php')) die('skin error');
|
||||
include_once ($poll_skin_path.'/poll_result.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -56,5 +56,5 @@ if (get_cookie('ck_po_id') != $po['po_id']) {
|
||||
set_cookie('ck_po_id', $po['po_id'], 86400 * 15); // 투표 쿠키 보름간 저장
|
||||
|
||||
//goto_url($g4['bbs_url'].'/poll_result.php?po_id='.$po_id.'&skin_dir='.$skin_dir);
|
||||
goto_url("{$g4['bbs_url']}/poll_result.php?po_id=$po_id&skin_dir={$_POST['skin_dir']}");
|
||||
goto_url(G4_BBS_URL."/poll_result.php?po_id=$po_id&skin_dir={$_POST['skin_dir']}");
|
||||
?>
|
||||
|
||||
@ -15,7 +15,7 @@ if (!$mb['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id)
|
||||
alert_close('정보공개를 하지 않았습니다.');
|
||||
|
||||
$g4['title'] = $mb['mb_nick'].'님의 자기소개';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$mb_nick = get_sideview($mb['mb_id'], $mb['mb_nick'], $mb['mb_email'], $mb['mb_homepage'], $mb['mb_open']);
|
||||
|
||||
@ -27,9 +27,9 @@ $mb_reg_after = $row['days'];
|
||||
$mb_homepage = set_http($mb['mb_homepage']);
|
||||
$mb_profile = $mb['mb_profile'] ? conv_content($mb['mb_profile'],0) : '소개 내용이 없습니다.';
|
||||
|
||||
echo '<script src="'.$g4['path'].'/js/sideview.js"></script>';
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
|
||||
include_once($member_skin_path.'/profile.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -3,7 +3,7 @@ include_once('./_common.php');
|
||||
|
||||
// 로그인중인 경우 회원가입 할 수 없습니다.
|
||||
if ($is_member) {
|
||||
goto_url($g4['path']);
|
||||
goto_url(G4_PATH);
|
||||
}
|
||||
|
||||
// 세션을 지웁니다.
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?
|
||||
define('G4_CAPTCHA', 1);
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/lib/register.lib.php');
|
||||
include_once(G4_PATH.'/lib/register.lib.php');
|
||||
|
||||
// 불법접근을 막도록 토큰생성
|
||||
$token = md5(uniqid(rand(), true));
|
||||
@ -13,7 +13,7 @@ if ($w == "") {
|
||||
// 경고창이 뜨는것을 막기위해 아래의 코드로 대체
|
||||
// alert("이미 로그인중이므로 회원 가입 하실 수 없습니다.", "./");
|
||||
if ($is_member) {
|
||||
goto_url($g4['path']);
|
||||
goto_url(G4_PATH);
|
||||
}
|
||||
|
||||
// 리퍼러 체크
|
||||
@ -45,10 +45,10 @@ if ($w == "") {
|
||||
} else if ($w == 'u') {
|
||||
|
||||
if ($is_admin)
|
||||
alert('관리자의 회원정보는 관리자 화면에서 수정해 주십시오.', $g4['path']);
|
||||
alert('관리자의 회원정보는 관리자 화면에서 수정해 주십시오.', $g4['url']);
|
||||
|
||||
if (!$member[mb_id])
|
||||
alert('로그인 후 이용하여 주십시오.', $g4['path']);
|
||||
alert('로그인 후 이용하여 주십시오.', $g4['url']);
|
||||
|
||||
if ($member[mb_id] != $mb_id)
|
||||
alert('로그인된 회원과 넘어온 정보가 서로 다릅니다.');
|
||||
@ -103,7 +103,7 @@ if ($w == "") {
|
||||
$captcha_html = captcha_html();
|
||||
|
||||
// 회원아이콘 경로
|
||||
$mb_icon = $g4['path'].'/data/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
|
||||
$mb_icon = G4_PATH.'/data/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
|
||||
|
||||
include_once('./_head.php');
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?
|
||||
define('G4_CAPTCHA', 1);
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/lib/register.lib.php');
|
||||
include_once($g4['path'].'/lib/mailer.lib.php');
|
||||
include_once(G4_PATH.'/lib/register.lib.php');
|
||||
include_once(G4_PATH.'/lib/mailer.lib.php');
|
||||
|
||||
// 리퍼러 체크
|
||||
referer_check();
|
||||
@ -12,7 +12,7 @@ if (!($w == '' || $w == 'u')) {
|
||||
}
|
||||
|
||||
if ($w == 'u' && $is_admin == 'super') {
|
||||
if (file_exists($g4['path'].'/DEMO'))
|
||||
if (file_exists(G4_PATH.'/DEMO'))
|
||||
alert('데모 화면에서는 하실(보실) 수 없는 작업입니다.');
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ if ($w == '' || $w == 'u') {
|
||||
if ($msg = exist_mb_email($mb_email, $mb_id)) alert($msg);
|
||||
}
|
||||
|
||||
$mb_dir = $g4['path'].'/data/member/'.substr($mb_id,0,2);
|
||||
$mb_dir = G4_PATH.'/data/member/'.substr($mb_id,0,2);
|
||||
|
||||
// 아이콘 삭제
|
||||
if (isset($_POST['del_mb_icon'])) {
|
||||
@ -307,7 +307,7 @@ if ($w == '') {
|
||||
|
||||
|
||||
// 사용자 코드 실행
|
||||
@include_once ($g4['path'].'/skin/member/'.$config['cf_member_skin'].'/register_update.skin.php');
|
||||
@include_once (G4_PATH.'/skin/member/'.$config['cf_member_skin'].'/register_update.skin.php');
|
||||
|
||||
|
||||
if ($msg)
|
||||
@ -321,7 +321,7 @@ if ($w == "") {
|
||||
|
||||
if ($old_email != $mb_email && $config['cf_use_email_certify']) {
|
||||
set_session("ss_mb_id", "");
|
||||
alert('회원 정보가 수정 되었습니다.\n\nE-mail 주소가 변경되었으므로 다시 인증하셔야 합니다.', $g4['path']);
|
||||
alert('회원 정보가 수정 되었습니다.\n\nE-mail 주소가 변경되었으므로 다시 인증하셔야 합니다.', G4_PATH);
|
||||
} else {
|
||||
alert('회원 정보가 수정 되었습니다.', $g4['url']);
|
||||
/*
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?
|
||||
// 회원가입축하 메일 (회원님께 발송)
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?
|
||||
// 회원가입 메일 (관리자 메일로 발송)
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?
|
||||
// E-mail 수정시 인증 메일 (회원님께 발송)
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@ -6,7 +6,7 @@ if (isset($_SESSION['ss_mb_reg']))
|
||||
|
||||
// 회원정보가 없다면 초기 페이지로 이동
|
||||
if (!$mb['mb_id'])
|
||||
goto_url($g4['path']);
|
||||
goto_url(G4_PATH);
|
||||
|
||||
$g4['title'] = '회원가입이 완료되었습니다.';
|
||||
include_once('./_head.php');
|
||||
|
||||
@ -5,7 +5,7 @@ if (!$is_member)
|
||||
alert_close('회원만 조회하실 수 있습니다.');
|
||||
|
||||
$g4['title'] = $member['mb_nick'].'님의 스크랩';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$list = array();
|
||||
|
||||
@ -58,5 +58,5 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
include_once($member_skin_path.'/scrap.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
if ($is_guest) {
|
||||
$href = './login.php?'.$qstr.'&url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
@ -55,5 +55,5 @@ HEREDOC;
|
||||
|
||||
include_once($member_skin_path.'/scrap_popin.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
if (!$is_member)
|
||||
{
|
||||
|
||||
@ -212,7 +212,7 @@ if ($stx) {
|
||||
|
||||
$write_pages = get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$search_query.'&gr_id='.$gr_id.'&srows='.$srows.'&onetable='.$onetable.'&page=');
|
||||
|
||||
echo '<script src="'.$g4['path'].'/js/sideview.js"></script>';
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
}
|
||||
|
||||
$group_select = '<select id="gr_id" name="gr_id" class="select" title="그룹선택"><option value="">전체 분류';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 게시판에서 두단어 이상 검색 후 검색된 게시물에 코멘트를 남기면 나오던 오류 수정
|
||||
$sop = strtolower($sop);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
|
||||
$captcha_html = "";
|
||||
if ($is_guest) {
|
||||
@ -114,10 +115,10 @@ include_once($board_skin_path.'/view_comment.skin.php');
|
||||
|
||||
// 필터
|
||||
//echo "<script> var g4_cf_filter = '$config['cf_filter']'; </script>\n";
|
||||
//echo "<script src='$g4['path']/js/filter.js'></script>\n";
|
||||
//echo "<script src='G4_PATH/js/filter.js'></script>\n";
|
||||
|
||||
if (!$member['mb_id']) // 비회원일 경우에만
|
||||
echo '<script src="'.$g4['path'].'/js/md5.js"></script>'.PHP_EOL;
|
||||
echo '<script src="'.G4_PATH.'/js/md5.js"></script>'.PHP_EOL;
|
||||
|
||||
@include_once($board_skin_path.'/view_comment.tail.skin.php');
|
||||
?>
|
||||
@ -1,5 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 컴퓨터의 아이피와 쿠키에 저장된 아이피가 다르다면 테이블에 반영함
|
||||
if (get_cookie('ck_visit_ip') != $_SERVER['REMOTE_ADDR']) {
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
<?
|
||||
define('G4_EDITOR', 1);
|
||||
define('G4_CAPTCHA', 1);
|
||||
include_once('./_common.php');
|
||||
include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php');
|
||||
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
|
||||
set_session('ss_bo_table', $bo_table);
|
||||
set_session('ss_wr_id', $wr_id);
|
||||
|
||||
// 090713
|
||||
if (!$board['bo_table']) {
|
||||
alert('존재하지 않는 게시판입니다.', $g4['path']);
|
||||
alert('존재하지 않는 게시판입니다.', G4_URL);
|
||||
}
|
||||
|
||||
if (!$bo_table) {
|
||||
alert("bo_table 값이 넘어오지 않았습니다.\\nwrite.php?bo_table=code 와 같은 방식으로 넘겨 주세요.", $g4['path']);
|
||||
alert("bo_table 값이 넘어오지 않았습니다.\\nwrite.php?bo_table=code 와 같은 방식으로 넘겨 주세요.", G4_URL);
|
||||
}
|
||||
|
||||
@include_once ($g4['path'].'/skin/board/write.head.skin.php');
|
||||
@include_once (G4_PATH.'/skin/board/write.head.skin.php');
|
||||
@include_once ($board_skin_path.'/write.head.skin.php');
|
||||
|
||||
$notice_array = explode(',', trim($board['bo_notice']));
|
||||
@ -25,7 +25,7 @@ if (!($w == '' || $w == 'u' || $w == 'r')) {
|
||||
}
|
||||
|
||||
if (($w == 'u' || $w == 'r') && !$write['wr_id']) {
|
||||
alert("글이 존재하지 않습니다.\\n삭제되었거나 이동된 경우입니다.", $g4['path']);
|
||||
alert("글이 존재하지 않습니다.\\n삭제되었거나 이동된 경우입니다.", G4_URL);
|
||||
}
|
||||
|
||||
if ($w == '') {
|
||||
@ -283,7 +283,7 @@ if ($w == '') {
|
||||
$email = $write['wr_email'];
|
||||
$homepage = get_text($write['wr_homepage']);
|
||||
|
||||
for ($i=1; $i<=$g4['link_count']; $i++) {
|
||||
for ($i=1; $i<=G4_LINK_COUNT; $i++) {
|
||||
$write['wr_link'.$i] = get_text($write['wr_link'.$i]);
|
||||
$link[$i] = $write['wr_link'.$i];
|
||||
}
|
||||
@ -309,7 +309,7 @@ if ($w == '') {
|
||||
|
||||
$password_required = "required";
|
||||
|
||||
for ($i=1; $i<=$g4['link_count']; $i++) {
|
||||
for ($i=1; $i<=G4_LINK_COUNT; $i++) {
|
||||
$write['wr_link'.$i] = get_text($write['wr_link'.$i]);
|
||||
}
|
||||
}
|
||||
@ -346,18 +346,18 @@ if ($is_guest) {
|
||||
$captcha_html = captcha_html();
|
||||
}
|
||||
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
include_once('./board_head.php');
|
||||
|
||||
if ($g4['https_url'])
|
||||
$action_url = "{$g4['https_url']}/{$g4['bbs']}/write_update.php";
|
||||
else
|
||||
$action_url = "{$g4['url']}/{$g4['bbs']}/write_update.php";
|
||||
$action_url = G4_BBS_URL."/write_update.php";
|
||||
|
||||
include_once ($board_skin_path.'/write.skin.php');
|
||||
|
||||
include_once('./board_tail.php');
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
|
||||
@include_once ($board_skin_path.'/write.tail.skin.php');
|
||||
?>
|
||||
@ -195,7 +195,7 @@ if ($w == 'c') // 코멘트 입력
|
||||
// 4.00.15 - 메일로 보내는 코멘트의 바로가기 링크 수정
|
||||
$link_url = $g4['url']."/".$g4['bbs']."/board.php?bo_table=".$bo_table."&wr_id=".$wr_id."&".$qstr."#c_".$comment_id;
|
||||
|
||||
include_once($g4['path'].'/lib/mailer.lib.php');
|
||||
include_once(G4_PATH.'/lib/mailer.lib.php');
|
||||
|
||||
ob_start();
|
||||
include_once ('./write_update_mail.php');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?
|
||||
define('G4_CAPTCHA', 1);
|
||||
include_once('./_common.php');
|
||||
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
|
||||
$g4['title'] = '게시글 저장';
|
||||
|
||||
@ -165,8 +165,8 @@ if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
|
||||
alert('제목을 입력하여 주십시오.');
|
||||
|
||||
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
||||
@mkdir($g4['path'].'/data/file/'.$bo_table, 0707);
|
||||
@chmod($g4['path'].'/data/file/'.$bo_table, 0707);
|
||||
@mkdir(G4_DATA_PATH.'/file/'.$bo_table, 0707);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$bo_table, 0707);
|
||||
|
||||
$chars_array = array_merge(range(0,9), range('a','z'), range('A','Z'));
|
||||
|
||||
@ -187,7 +187,7 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
|
||||
$upload[$i]['del_check'] = true;
|
||||
|
||||
$row = sql_fetch(" select bf_file from {$g4['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' ");
|
||||
@unlink($g4['path'].'/data/file/'.$bo_table.'/'.$row['bf_file']);
|
||||
@unlink(G4_DATA_PATH.'/file/'.$bo_table.'/'.$row['bf_file']);
|
||||
}
|
||||
else
|
||||
$upload[$i]['del_check'] = false;
|
||||
@ -235,7 +235,7 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
|
||||
if ($w == 'u') {
|
||||
// 존재하는 파일이 있다면 삭제합니다.
|
||||
$row = sql_fetch(" select bf_file from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' ");
|
||||
@unlink($g4['path'].'/data/file/'.$bo_table.'/'.$row['bf_file']);
|
||||
@unlink(G4_DATA_PATH.'/file/'.$bo_table.'/'.$row['bf_file']);
|
||||
}
|
||||
|
||||
// 프로그램 원래 파일명
|
||||
@ -256,7 +256,7 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
|
||||
//$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.str_replace('%', '', urlencode($filename));
|
||||
$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.str_replace('%', '', urlencode(str_replace(' ', '_', $filename)));
|
||||
|
||||
$dest_file = $g4['path'].'/data/file/'.$bo_table.'/'.$upload[$i]['file'];
|
||||
$dest_file = G4_DATA_PATH.'/file/'.$bo_table.'/'.$upload[$i]['file'];
|
||||
|
||||
// 업로드가 안된다면 에러메세지 출력하고 죽어버립니다.
|
||||
$error_code = move_uploaded_file($tmp_file, $dest_file) or die($_FILES['bf_file']['error'][$i]);
|
||||
@ -562,7 +562,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
|
||||
$subject = '"'.$board['bo_subject'].'" 게시판에 '.$str.'글이 올라왔습니다.';
|
||||
$link_url = $g4['url'].'/'.$g4['bbs'].'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&'.$qstr;
|
||||
|
||||
include_once($g4['path'].'/lib/mailer.lib.php');
|
||||
include_once(G4_PATH.'/lib/mailer.lib.php');
|
||||
|
||||
ob_start();
|
||||
include_once ('./write_update_mail.php');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?
|
||||
// 게시물 입력시 게시자, 관리자에게 드리는 메일을 수정하고 싶으시다면 이 파일을 수정하십시오.
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@ -63,9 +63,9 @@ if ($addr1)
|
||||
*/
|
||||
|
||||
$g4['title'] = '우편번호 검색';
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
include_once($member_skin_path.'/zip.skin.php');
|
||||
|
||||
include_once($g4['path'].'/tail.sub.php');
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
172
common.php
172
common.php
@ -49,86 +49,6 @@ if (!get_magic_quotes_gpc()) {
|
||||
//==============================================================================
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// XSS(Cross Site Scripting) 공격에 의한 데이터 검증 및 차단
|
||||
//------------------------------------------------------------------------------
|
||||
function xss_clean($data) {
|
||||
// If its empty there is no point cleaning it :\
|
||||
if(empty($data))
|
||||
return $data;
|
||||
|
||||
// Recursive loop for arrays
|
||||
if(is_array($data)) {
|
||||
foreach($data as $key => $value) {
|
||||
$data[$key] = xss_clean($value);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
// http://svn.bitflux.ch/repos/public/popoon/trunk/classes/externalinput.php
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Copyright (c) 2001-2006 Bitflux GmbH |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Licensed under the Apache License, Version 2.0 (the "License"); |
|
||||
// | you may not use this file except in compliance with the License. |
|
||||
// | You may obtain a copy of the License at |
|
||||
// | http://www.apache.org/licenses/LICENSE-2.0 |
|
||||
// | Unless required by applicable law or agreed to in writing, software |
|
||||
// | distributed under the License is distributed on an "AS IS" BASIS, |
|
||||
// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
|
||||
// | implied. See the License for the specific language governing |
|
||||
// | permissions and limitations under the License. |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Author: Christian Stocker <chregu@bitflux.ch> |
|
||||
// +----------------------------------------------------------------------+
|
||||
|
||||
// Fix &entity\n;
|
||||
$data = str_replace(array('&','<','>'), array('&amp;','&lt;','&gt;'), $data);
|
||||
$data = preg_replace('/(&#*\w+)[\x00-\x20]+;/', '$1;', $data);
|
||||
$data = preg_replace('/(&#x*[0-9A-F]+);*/i', '$1;', $data);
|
||||
|
||||
if (function_exists("html_entity_decode"))
|
||||
{
|
||||
$data = html_entity_decode($data);
|
||||
}
|
||||
else
|
||||
{
|
||||
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
|
||||
$trans_tbl = array_flip($trans_tbl);
|
||||
$data = strtr($data, $trans_tbl);
|
||||
}
|
||||
|
||||
// Remove any attribute starting with "on" or xmlns
|
||||
$data = preg_replace('#(<[^>]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#i', '$1>', $data);
|
||||
|
||||
// Remove javascript: and vbscript: protocols
|
||||
$data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#i', '$1=$2nojavascript...', $data);
|
||||
$data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#i', '$1=$2novbscript...', $data);
|
||||
$data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#', '$1=$2nomozbinding...', $data);
|
||||
|
||||
// Only works in IE: <span style="width: expression(alert('Ping!'));"></span>
|
||||
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
|
||||
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
|
||||
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#i', '$1>', $data);
|
||||
|
||||
// Remove namespaced elements (we do not need them)
|
||||
$data = preg_replace('#</*\w+:\w[^>]*+>#i', '', $data);
|
||||
|
||||
do {
|
||||
// Remove really unwanted tags
|
||||
$old_data = $data;
|
||||
$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);
|
||||
} while ($old_data !== $data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
$_GET = xss_clean($_GET);
|
||||
$_POST = xss_clean($_POST);
|
||||
//==========================================================================================================================
|
||||
|
||||
|
||||
//==========================================================================================================================
|
||||
// extract($_GET); 명령으로 인해 page.php?_POST[var1]=data1&_POST[var2]=data2 와 같은 코드가 _POST 변수로 사용되는 것을 막음
|
||||
// 081029 : letsgolee 님께서 도움 주셨습니다.
|
||||
@ -157,66 +77,26 @@ $board = array();
|
||||
$group = array();
|
||||
$g4 = array();
|
||||
|
||||
// index.php 가 있는곳의 상대경로
|
||||
// php 인젝션 ( 임의로 변수조작으로 인한 리모트공격) 취약점에 대비한 코드
|
||||
// prosper 님께서 알려주셨습니다.
|
||||
if (!$g4_path || preg_match("/:\/\//", $g4_path)) {
|
||||
echo "<meta http-equiv='content-type' content='text/html; charset={$g4['charset']}'>";
|
||||
echo "<h3>잘못된 방법으로 변수가 정의되었습니다. (g4_path)</h3>";
|
||||
echo "<a href=\"{$g4['path']}/install/\">설치하기</a>";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$g4['path'] = $g4_path;
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// g4_path unset
|
||||
//------------------------------------------------------------------------------
|
||||
if (isset($_GET['g4_path']) || isset($_POST['g4_path']) || isset($_COOKIE['g4_path'])) {
|
||||
unset($_GET['g4_path']);
|
||||
unset($_POST['g4_path']);
|
||||
unset($_COOKIE['g4_path']);
|
||||
}
|
||||
unset($g4_path);
|
||||
//==============================================================================
|
||||
|
||||
|
||||
include_once($g4['path'].'/config.php'); // 설정 파일
|
||||
include_once($g4['path'].'/lib/common.lib.php'); // 공통 라이브러리
|
||||
|
||||
// config.php 가 있는곳의 웹경로
|
||||
if (!$g4['url']) {
|
||||
$g4['url'] = 'http://' . $_SERVER['HTTP_HOST'];
|
||||
$dir = dirname($_SERVER['PHP_SELF']);
|
||||
if (!file_exists('config.php'))
|
||||
$dir = dirname($dir);
|
||||
$cnt = substr_count($g4['path'], '..');
|
||||
for ($i=2; $i<=$cnt; $i++)
|
||||
$dir = dirname($dir);
|
||||
$g4['url'] .= $dir;
|
||||
}
|
||||
// \ 를 / 롤 변경
|
||||
$g4['url'] = strtr($g4['url'], "\\", "/");
|
||||
// url 의 끝에 있는 / 를 삭제한다.
|
||||
$g4['url'] = preg_replace("/\/$/", "", $g4['url']);
|
||||
|
||||
//==============================================================================
|
||||
// 공통
|
||||
//------------------------------------------------------------------------------
|
||||
$dirname = dirname(__FILE__).'/';
|
||||
$dbconfig_file = 'data/dbconfig.php';
|
||||
if (file_exists($g4['path'].'/'.$dbconfig_file)) {
|
||||
include_once($g4['path'].'/'.$dbconfig_file);
|
||||
$config_user_file = dirname(__FILE__).'/config.user.php';
|
||||
if (file_exists($config_user_file)) {
|
||||
include_once($config_user_file);
|
||||
include_once(dirname(__FILE__).'/config.php'); // 설정 파일
|
||||
include_once(G4_LIB_PATH.'/common.lib.php'); // 공통 라이브러리
|
||||
|
||||
$connect_db = sql_connect(G4_MYSQL_HOST, G4_MYSQL_USER, G4_MYSQL_PASSWORD) or die('MySQL Connect Error!!!');
|
||||
$select_db = sql_select_db(G4_MYSQL_DB, $connect_db) or die('MySQL DB Error!!!');
|
||||
$select_db = sql_select_db(G4_MYSQL_DB, $connect_db) or die('MySQL DB Error!!!');
|
||||
} else {
|
||||
echo "<meta http-equiv='content-type' content='text/html; charset={$g4['charset']}'>";
|
||||
echo "<h3>DB 설정 파일이 존재하지 않습니다.<br>프로그램 설치 후 실행하시기 바랍니다.</h3>";
|
||||
echo "<a href=\"{$g4['path']}/install/\">설치하기</a>";
|
||||
echo "<meta http-equiv='content-type' content='text/html; charset=utf-8'>";
|
||||
echo "<h3>$config_user_file 파일을 찾을 수 없습니다.<br>프로그램 설치 후 실행하시기 바랍니다.</h3>";
|
||||
echo '<a href="'.G4_PATH.'/install/">설치하기</a>';
|
||||
exit;
|
||||
}
|
||||
//==============================================================================
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// SESSION 설정
|
||||
@ -224,7 +104,7 @@ if (file_exists($g4['path'].'/'.$dbconfig_file)) {
|
||||
ini_set("session.use_trans_sid", 0); // PHPSESSID를 자동으로 넘기지 않음
|
||||
ini_set("url_rewriter.tags",""); // 링크에 PHPSESSID가 따라다니는것을 무력화함 (해뜰녘님께서 알려주셨습니다.)
|
||||
|
||||
session_save_path($g4['path'].'/data/session');
|
||||
session_save_path(G4_DATA_PATH.'/session');
|
||||
|
||||
if (isset($SESSION_CACHE_LIMITER))
|
||||
@session_cache_limiter($SESSION_CACHE_LIMITER);
|
||||
@ -269,8 +149,8 @@ else if (is_mobile())
|
||||
$_SESSION['ss_is_mobile'] = $is_mobile;
|
||||
define('G4_IS_MOBILE', $is_mobile);
|
||||
if (G4_IS_MOBILE) {
|
||||
include_once($g4['path'].'/lib/mobile.lib.php'); // 모바일 전용 라이브러리
|
||||
$g4['mobile_path'] = $g4['path'].'/'.$g4['mobile_dir'];
|
||||
include_once(G4_PATH.'/lib/mobile.lib.php'); // 모바일 전용 라이브러리
|
||||
$g4['mobile_path'] = G4_PATH.'/'.$g4['mobile_dir'];
|
||||
}
|
||||
//==============================================================================
|
||||
|
||||
@ -502,28 +382,28 @@ if ($is_admin != 'super') {
|
||||
//==============================================================================
|
||||
// 스킨경로
|
||||
//------------------------------------------------------------------------------
|
||||
$skin_path = skin_path();
|
||||
$board_skin_path = $skin_path.'/board/'.$board['bo_skin'];
|
||||
$member_skin_path = $skin_path.'/member/'.$config['cf_member_skin'];
|
||||
$new_skin_path = $skin_path.'/new/'.$config['cf_new_skin'];
|
||||
$search_skin_path = $skin_path.'/search/'.$config['cf_search_skin'];
|
||||
$connect_skin_path = $skin_path.'/connect/'.$config['cf_connect_skin'];
|
||||
$poll_skin_path = $skin_path.'/poll/basic';
|
||||
$board_skin_path = G4_SKIN_PATH.'/board/'.$board['bo_skin'];
|
||||
$board_skin_url = G4_SKIN_URL.'/board/'.$board['bo_skin'];
|
||||
$member_skin_path = G4_SKIN_PATH.'/member/'.$config['cf_member_skin'];
|
||||
$new_skin_path = G4_SKIN_PATH.'/new/'.$config['cf_new_skin'];
|
||||
$search_skin_path = G4_SKIN_PATH.'/search/'.$config['cf_search_skin'];
|
||||
$connect_skin_path = G4_SKIN_PATH.'/connect/'.$config['cf_connect_skin'];
|
||||
$poll_skin_path = G4_SKIN_PATH.'/poll/basic';
|
||||
if (isset($_GET['skin_dir']))
|
||||
$poll_skin_path = $skin_path.'/poll/'.$_GET['skin_dir'];
|
||||
$poll_skin_path = G4_SKIN_PATH.'/poll/'.$_GET['skin_dir'];
|
||||
//==============================================================================
|
||||
|
||||
|
||||
// 방문자수의 접속을 남김
|
||||
include_once($g4['bbs_path'].'/visit_insert.inc.php');
|
||||
include_once(G4_BBS_PATH.'/visit_insert.inc.php');
|
||||
|
||||
|
||||
// common.php 파일을 수정할 필요가 없도록 확장합니다.
|
||||
$tmp = dir($g4['path'].'/extend');
|
||||
$tmp = dir(G4_EXTEND_PATH);
|
||||
while ($entry = $tmp->read()) {
|
||||
// php 파일만 include 함
|
||||
if (preg_match("/(\.php)$/i", $entry))
|
||||
include_once($g4['path'].'/extend/'.$entry);
|
||||
include_once(G4_EXTEND_PATH.'/'.$entry);
|
||||
}
|
||||
|
||||
// 자바스크립트에서 go(-1) 함수를 쓰면 폼값이 사라질때 해당 폼의 상단에 사용하면
|
||||
|
||||
248
config.php
248
config.php
@ -1,99 +1,149 @@
|
||||
<?php
|
||||
//==============================================================================
|
||||
// 상수 선언
|
||||
//------------------------------------------------------------------------------
|
||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||
define('_GNUBOARD_', 1);
|
||||
|
||||
// 입력값 검사 상수 (숫자를 변경하시면 안됩니다.)
|
||||
define('G4_ALPHAUPPER', 1); // 영대문자
|
||||
define('G4_ALPHALOWER', 2); // 영소문자
|
||||
define('G4_ALPHABETIC', 4); // 영대,소문자
|
||||
define('G4_NUMERIC', 8); // 숫자
|
||||
define('G4_HANGUL', 16); // 한글
|
||||
define('G4_SPACE', 32); // 공백
|
||||
define('G4_SPECIAL', 64); // 특수문자
|
||||
|
||||
// 모바일 인지 결정 $_SERVER['HTTP_USER_AGENT']
|
||||
define('G4_MOBILE_AGENT', 'phone|samsung|lgtel|mobile|skt|nokia|blackberry|android|sony');
|
||||
//==============================================================================
|
||||
|
||||
if (function_exists("date_default_timezone_set"))
|
||||
date_default_timezone_set("Asia/Seoul");
|
||||
|
||||
// 디렉토리
|
||||
$g4['bbs'] = 'bbs';
|
||||
$g4['bbs_path'] = $g4['path'].'/'.$g4['bbs'];
|
||||
|
||||
$g4['admin'] = 'adm';
|
||||
$g4['admin_path'] = $g4['path'].'/'.$g4['admin'];
|
||||
|
||||
$g4['skin_dir'] = 'skin';
|
||||
$g4['mobile_dir'] = 'mobile';
|
||||
|
||||
// 자주 사용하는 값
|
||||
// 서버의 시간과 실제 사용하는 시간이 틀린 경우 수정하세요.
|
||||
// 하루는 86400 초입니다. 1시간은 3600초
|
||||
// 6시간이 빠른 경우 time() + (3600 * 6);
|
||||
// 6시간이 느린 경우 time() - (3600 * 6);
|
||||
$g4['server_time'] = time();
|
||||
$g4['time_ymd'] = date("Y-m-d", $g4['server_time']);
|
||||
$g4['time_his'] = date("H:i:s", $g4['server_time']);
|
||||
$g4['time_ymdhis'] = date("Y-m-d H:i:s", $g4['server_time']);
|
||||
|
||||
//
|
||||
// 테이블 명
|
||||
// (상수로 선언한것은 함수에서 global 선언을 하지 않아도 바로 사용할 수 있기 때문)
|
||||
//
|
||||
$g4['table_prefix'] = 'g4_'; // 테이블명 접두사
|
||||
$g4['write_prefix'] = $g4['table_prefix'] . 'write_'; // 게시판 테이블명 접두사
|
||||
|
||||
$g4['auth_table'] = $g4['table_prefix'] . 'auth'; // 관리권한 설정 테이블
|
||||
$g4['config_table'] = $g4['table_prefix'] . 'config'; // 기본환경 설정 테이블
|
||||
$g4['group_table'] = $g4['table_prefix'] . 'group'; // 게시판 그룹 테이블
|
||||
$g4['group_member_table'] = $g4['table_prefix'] . 'group_member'; // 게시판 그룹+회원 테이블
|
||||
$g4['board_table'] = $g4['table_prefix'] . 'board'; // 게시판 설정 테이블
|
||||
$g4['board_file_table'] = $g4['table_prefix'] . 'board_file'; // 게시판 첨부파일 테이블
|
||||
$g4['board_good_table'] = $g4['table_prefix'] . 'board_good'; // 게시물 추천,비추천 테이블
|
||||
$g4['board_new_table'] = $g4['table_prefix'] . 'board_new'; // 게시판 새글 테이블
|
||||
$g4['login_table'] = $g4['table_prefix'] . 'login'; // 로그인 테이블 (접속자수)
|
||||
$g4['mail_table'] = $g4['table_prefix'] . 'mail'; // 회원메일 테이블
|
||||
$g4['member_table'] = $g4['table_prefix'] . 'member'; // 회원 테이블
|
||||
$g4['memo_table'] = $g4['table_prefix'] . 'memo'; // 메모 테이블
|
||||
$g4['poll_table'] = $g4['table_prefix'] . 'poll'; // 투표 테이블
|
||||
$g4['poll_etc_table'] = $g4['table_prefix'] . 'poll_etc'; // 투표 기타의견 테이블
|
||||
$g4['point_table'] = $g4['table_prefix'] . 'point'; // 포인트 테이블
|
||||
$g4['popular_table'] = $g4['table_prefix'] . 'popular'; // 인기검색어 테이블
|
||||
$g4['scrap_table'] = $g4['table_prefix'] . 'scrap'; // 게시글 스크랩 테이블
|
||||
$g4['visit_table'] = $g4['table_prefix'] . 'visit'; // 방문자 테이블
|
||||
$g4['visit_sum_table'] = $g4['table_prefix'] . 'visit_sum'; // 방문자 합계 테이블
|
||||
$g4['token_table'] = $g4['table_prefix'] . 'token'; // 토큰 테이블
|
||||
|
||||
//
|
||||
// 기타
|
||||
//
|
||||
|
||||
// www.sir.co.kr 과 sir.co.kr 도메인은 서로 다른 도메인으로 인식합니다. 쿠키를 공유하려면 .sir.co.kr 과 같이 입력하세요.
|
||||
// 이곳에 입력이 없다면 www 붙은 도메인과 그렇지 않은 도메인은 쿠키를 공유하지 않으므로 로그인이 풀릴 수 있습니다.
|
||||
$g4['cookie_domain'] = '';
|
||||
|
||||
// 게시판에서 링크의 기본갯수를 말합니다.
|
||||
// 필드를 추가하면 이 숫자를 필드수에 맞게 늘려주십시오.
|
||||
$g4['link_count'] = 2;
|
||||
|
||||
$g4['charset'] = 'utf-8';
|
||||
|
||||
$g4['token_time'] = 3; // 토큰 유효시간
|
||||
|
||||
// config.php 가 있는곳의 웹경로. 뒤에 / 를 붙이지 마세요.
|
||||
// 예) http://g4.sir.co.kr
|
||||
$g4['url'] = '';
|
||||
$g4['https_url'] = '';
|
||||
// 입력예
|
||||
//$g4['url'] = "http://www.sir.co.kr";
|
||||
//$g4['https_url'] = "https://www.sir.co.kr";
|
||||
|
||||
$g4['dbconfig'] = 'data/dbconfig.php';
|
||||
|
||||
$g4['js_file'] = array();
|
||||
?>
|
||||
<?php
|
||||
|
||||
// 절실함
|
||||
|
||||
if (function_exists("date_default_timezone_set"))
|
||||
date_default_timezone_set("Asia/Seoul");
|
||||
|
||||
function g4_path()
|
||||
{
|
||||
$path = dirname(__FILE__); // 예) /home/sir/www/g4s
|
||||
$linux_dir = str_replace("\\", "/", $path); // 예) /home/sir/www/g4s
|
||||
$document_root = str_replace("\\", "/", $_SERVER['DOCUMENT_ROOT']); // 예) /home/sir/www
|
||||
$base_dir = preg_replace('#^'.$document_root.'#i', '', $linux_dir); // 예) /g4s
|
||||
$port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : '';
|
||||
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';
|
||||
|
||||
$result = array();
|
||||
$result['path'] = $path;
|
||||
$result['url'] = $http.$_SERVER['SERVER_NAME'].$port.$base_dir;
|
||||
$result['curr_url'] = $http.$_SERVER['SERVER_NAME'].$port.$_SERVER['PHP_SELF'];
|
||||
$result['curr_uri'] = $result['curr_url'] . ($_SERVER['QUERY_STRING'] ? '?'.$_SERVER['QUERY_STRING'] : '');
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
$g4_path = g4_path();
|
||||
|
||||
//==============================================================================
|
||||
// 상수 선언
|
||||
//------------------------------------------------------------------------------
|
||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||
define('_GNUBOARD_', true);
|
||||
|
||||
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
|
||||
define('G4_URL', $g4_path['url']);
|
||||
define('G4_ADM_URL', G4_URL.'/adm');
|
||||
define('G4_BBS_URL', G4_URL.'/bbs');
|
||||
define('G4_CSS_URL', G4_URL.'/css');
|
||||
define('G4_DATA_URL', G4_URL.'/data');
|
||||
define('G4_IMG_URL', G4_URL.'/img');
|
||||
define('G4_JS_URL', G4_URL.'/js');
|
||||
define('G4_SKIN_URL', G4_URL.'/skin');
|
||||
define('G4_GCAPTCHA_URL', G4_BBS_URL.'/gcaptcha');
|
||||
define('G4_CKEDITOR_URL', G4_BBS_URL.'/ckeditor'); // CKEDITOR 의 라이브러리 경로
|
||||
define('G4_EDITOR_URL', G4_DATA_URL.'/editor'); // CKEDITOR 에서 업로드한 파일이 저장되는 경로
|
||||
define('G4_CACHE_URL', G4_DATA_URL.'/cache');
|
||||
|
||||
// PATH 는 서버상에서의 절대경로
|
||||
define('G4_PATH', $g4_path['path']);
|
||||
define('G4_ADM_PATH', G4_PATH.'/adm');
|
||||
define('G4_BBS_PATH', G4_PATH.'/bbs');
|
||||
define('G4_DATA_PATH', G4_PATH.'/data');
|
||||
define('G4_EXTEND_PATH', G4_PATH.'/extend');
|
||||
define('G4_LIB_PATH', G4_PATH.'/lib');
|
||||
define('G4_SKIN_PATH', G4_PATH.'/skin');
|
||||
define('G4_GCAPTCHA_PATH', G4_BBS_PATH.'/gcaptcha');
|
||||
define('G4_CKEDITOR_PATH', G4_BBS_PATH.'/ckeditor');
|
||||
define('G4_CACHE_PATH', G4_DATA_PATH.'/cache');
|
||||
define('G4_EDITOR_PATH', G4_DATA_PATH.'/editor');
|
||||
|
||||
// 입력값 검사 상수 (숫자를 변경하시면 안됩니다.)
|
||||
define('G4_ALPHAUPPER', 1); // 영대문자
|
||||
define('G4_ALPHALOWER', 2); // 영소문자
|
||||
define('G4_ALPHABETIC', 4); // 영대,소문자
|
||||
define('G4_NUMERIC', 8); // 숫자
|
||||
define('G4_HANGUL', 16); // 한글
|
||||
define('G4_SPACE', 32); // 공백
|
||||
define('G4_SPECIAL', 64); // 특수문자
|
||||
|
||||
// 모바일 인지 결정 $_SERVER['HTTP_USER_AGENT']
|
||||
define('G4_MOBILE_AGENT', 'phone|samsung|lgtel|mobile|skt|nokia|blackberry|android|sony');
|
||||
//==============================================================================
|
||||
|
||||
// 자주 사용하는 값
|
||||
// 서버의 시간과 실제 사용하는 시간이 틀린 경우 수정하세요.
|
||||
// 하루는 86400 초입니다. 1시간은 3600초
|
||||
// 6시간이 빠른 경우 time() + (3600 * 6);
|
||||
// 6시간이 느린 경우 time() - (3600 * 6);
|
||||
$g4['server_time'] = time();
|
||||
$g4['time_ymd'] = date("Y-m-d", $g4['server_time']);
|
||||
$g4['time_his'] = date("H:i:s", $g4['server_time']);
|
||||
$g4['time_ymdhis'] = date("Y-m-d H:i:s", $g4['server_time']);
|
||||
define('G4_SERVER_TIME', time());
|
||||
define('G4_TIME_YMDHIS', date("Y-m-d H:i:s", G4_SERVER_TIME));
|
||||
define('G4_TIME_YMD', substr(G4_TIME_YMDHIS, 0, 10));
|
||||
define('G4_TIME_HIS', substr(G4_TIME_YMDHIS, 11, 8));
|
||||
|
||||
|
||||
//
|
||||
// 테이블 명
|
||||
// (상수로 선언한것은 함수에서 global 선언을 하지 않아도 바로 사용할 수 있기 때문)
|
||||
//
|
||||
$g4['table_prefix'] = G4_TABLE_PREFIX; // 테이블명 접두사
|
||||
$g4['write_prefix'] = $g4['table_prefix'] . 'write_'; // 게시판 테이블명 접두사
|
||||
|
||||
$g4['auth_table'] = $g4['table_prefix'] . 'auth'; // 관리권한 설정 테이블
|
||||
$g4['config_table'] = $g4['table_prefix'] . 'config'; // 기본환경 설정 테이블
|
||||
$g4['group_table'] = $g4['table_prefix'] . 'group'; // 게시판 그룹 테이블
|
||||
$g4['group_member_table'] = $g4['table_prefix'] . 'group_member'; // 게시판 그룹+회원 테이블
|
||||
$g4['board_table'] = $g4['table_prefix'] . 'board'; // 게시판 설정 테이블
|
||||
$g4['board_file_table'] = $g4['table_prefix'] . 'board_file'; // 게시판 첨부파일 테이블
|
||||
$g4['board_good_table'] = $g4['table_prefix'] . 'board_good'; // 게시물 추천,비추천 테이블
|
||||
$g4['board_new_table'] = $g4['table_prefix'] . 'board_new'; // 게시판 새글 테이블
|
||||
$g4['login_table'] = $g4['table_prefix'] . 'login'; // 로그인 테이블 (접속자수)
|
||||
$g4['mail_table'] = $g4['table_prefix'] . 'mail'; // 회원메일 테이블
|
||||
$g4['member_table'] = $g4['table_prefix'] . 'member'; // 회원 테이블
|
||||
$g4['memo_table'] = $g4['table_prefix'] . 'memo'; // 메모 테이블
|
||||
$g4['poll_table'] = $g4['table_prefix'] . 'poll'; // 투표 테이블
|
||||
$g4['poll_etc_table'] = $g4['table_prefix'] . 'poll_etc'; // 투표 기타의견 테이블
|
||||
$g4['point_table'] = $g4['table_prefix'] . 'point'; // 포인트 테이블
|
||||
$g4['popular_table'] = $g4['table_prefix'] . 'popular'; // 인기검색어 테이블
|
||||
$g4['scrap_table'] = $g4['table_prefix'] . 'scrap'; // 게시글 스크랩 테이블
|
||||
$g4['visit_table'] = $g4['table_prefix'] . 'visit'; // 방문자 테이블
|
||||
$g4['visit_sum_table'] = $g4['table_prefix'] . 'visit_sum'; // 방문자 합계 테이블
|
||||
$g4['token_table'] = $g4['table_prefix'] . 'token'; // 토큰 테이블
|
||||
|
||||
//
|
||||
// 기타
|
||||
//
|
||||
|
||||
// www.sir.co.kr 과 sir.co.kr 도메인은 서로 다른 도메인으로 인식합니다. 쿠키를 공유하려면 .sir.co.kr 과 같이 입력하세요.
|
||||
// 이곳에 입력이 없다면 www 붙은 도메인과 그렇지 않은 도메인은 쿠키를 공유하지 않으므로 로그인이 풀릴 수 있습니다.
|
||||
$g4['cookie_domain'] = '';
|
||||
define('G4_COOKIE_DOMAIN', '');
|
||||
|
||||
// 게시판에서 링크의 기본갯수를 말합니다.
|
||||
// 필드를 추가하면 이 숫자를 필드수에 맞게 늘려주십시오.
|
||||
//$g4['link_count'] = 2;
|
||||
define('G4_LINK_COUNT', 2);
|
||||
|
||||
//$g4['charset'] = 'utf-8';
|
||||
|
||||
//$g4['token_time'] = 3; // 토큰 유효시간
|
||||
|
||||
// config.php 가 있는곳의 웹경로. 뒤에 / 를 붙이지 마세요.
|
||||
// 예) http://g4.sir.co.kr
|
||||
//$g4['url'] = '';
|
||||
$g4['https_url'] = '';
|
||||
define('G4_HTTPS_URL', '');
|
||||
// 입력예
|
||||
//$g4['url'] = "http://www.sir.co.kr";
|
||||
//$g4['https_url'] = "https://www.sir.co.kr";
|
||||
|
||||
//$g4['dbconfig'] = 'data/dbconfig.php';
|
||||
|
||||
//$g4['js_file'] = array();
|
||||
|
||||
unset($g4_path);
|
||||
?>
|
||||
|
||||
8
config.user.php
Normal file
8
config.user.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
define('G4_MYSQL_HOST', 'localhost');
|
||||
define('G4_MYSQL_USER', 'g4s');
|
||||
define('G4_MYSQL_PASSWORD', '');
|
||||
define('G4_MYSQL_DB', 'g4s');
|
||||
|
||||
define('G4_TABLE_PREFIX', 'g4_');
|
||||
?>
|
||||
@ -4,8 +4,6 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
//===================================================================================
|
||||
// g4s 디렉토리 경로
|
||||
//-----------------------------------------------------------------------------------
|
||||
$g4['bbs_url'] = $g4['url'].'/'.$g4['bbs'];
|
||||
$g4['admin_url'] = $g4['url'].'/'.$g4['admin'];
|
||||
|
||||
$g4['https_bbs_url'] = $g4['bbs_url'];
|
||||
if ($g4['https_url']) {
|
||||
|
||||
@ -1,7 +1,91 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once("$g4[path]/shop.config.php");
|
||||
include_once("$g4[path]/lib/shop.lib.php");
|
||||
//if (!defined('G4_IS_SHOP') || !G4_IS_SHOP) return;
|
||||
|
||||
include_once(G4_LIB_PATH.'/shop.lib.php');
|
||||
|
||||
//==============================================================================
|
||||
// 쇼핑몰 설정 상수 및 변수
|
||||
//------------------------------------------------------------------------------
|
||||
// 미수금에 대한 QUERY 문
|
||||
// 테이블 a 는 장바구니 ($g4[yc4_cart_table])
|
||||
// 테이블 b 는 주문서 ($g4[yc4_order_table])
|
||||
define(_MISU_QUERY_, "
|
||||
count(distinct b.od_id) as ordercount, /* 주문서건수 */
|
||||
count(a.ct_id) as itemcount, /* 상품건수 */
|
||||
(SUM((a.ct_amount + a.it_amount - a.cp_amount) * a.ct_qty) + b.od_send_cost + b.od_send_cost_area - b.od_coupon_amount - b.od_send_coupon) as orderamount , /* 주문합계 */
|
||||
(SUM(IF(a.ct_status = '취소' OR a.ct_status = '반품' OR a.ct_status = '품절', (a.ct_amount + a.it_amount) * a.ct_qty, 0))) as ordercancel, /* 주문취소 */
|
||||
(b.od_receipt_amount + b.od_receipt_point) as receiptamount, /* 입금합계 */
|
||||
(b.od_refund_amount) as receiptcancel, /* 입금취소 */
|
||||
(
|
||||
(SUM((a.ct_amount + a.it_amount - a.cp_amount) * a.ct_qty) + b.od_send_cost + b.od_send_cost_area - b.od_coupon_amount - b.od_send_coupon) -
|
||||
(SUM(IF(a.ct_status = '취소' OR a.ct_status = '반품' OR a.ct_status = '품절', (a.ct_amount + a.it_amount) * a.ct_qty, 0))) -
|
||||
b.od_dc_amount -
|
||||
(b.od_receipt_amount + b.od_receipt_point) +
|
||||
(b.od_refund_amount)
|
||||
) as misu /* 미수금 = 주문합계 - 주문취소 - DC - 입금합계 + 입금취소 */");
|
||||
|
||||
|
||||
// 쇼핑몰 디렉토리
|
||||
$g4['shop'] = "shop";
|
||||
$g4['shop_path'] = "$g4[path]/$g4[shop]";
|
||||
$g4['shop_url'] = "$g4[url]/$g4[shop]";
|
||||
define('G4_SHOP_PATH', G4_PATH.'/shop');
|
||||
define('G4_SHOP_URL', G4_URL.'/shop');
|
||||
|
||||
$g4['shop_admin'] = "shop_admin";
|
||||
$g4['shop_admin_path']= "$g4[path]/$g4[admin]/$g4[shop_admin]";
|
||||
$g4['shop_admin_url'] = "$g4[url]/$g4[admin]/$g4[shop_admin]";
|
||||
define('G4_SHOP_ADMIN_PATH', G4_ADMIN_PATH.'/shop_admin');
|
||||
define('G4_SHOP_ADMIN_URL', G4_ADMIN_URL.'/shop_admin');
|
||||
|
||||
$g4['shop_img'] = "img";
|
||||
$g4['shop_img_path'] = "$g4[path]/$g4[shop]/$g4[shop_img]";
|
||||
$g4['shop_img_url'] = "$g4[url]/$g4[shop]/$g4[shop_img]";
|
||||
define('G4_SHOP_IMG_URL', G4_SHOP_URL.'/img');
|
||||
|
||||
// 쇼핑몰 테이블명
|
||||
$g4['yc4_default_table'] = "yc4_default"; // 쇼핑몰설정 테이블
|
||||
$g4['yc4_banner_table'] = "yc4_banner"; // 배너 테이블
|
||||
$g4['yc4_card_history_table'] = "yc4_card_history"; // 전자결제이력 테이블
|
||||
$g4['yc4_cart_table'] = "yc4_cart"; // 장바구니 테이블
|
||||
$g4['yc4_category_table'] = "yc4_category"; // 상품분류 테이블
|
||||
$g4['yc4_content_table'] = "yc4_content"; // 내용(컨텐츠)정보 테이블
|
||||
$g4['yc4_delivery_table'] = "yc4_delivery"; // 배송정보 테이블
|
||||
$g4['yc4_event_table'] = "yc4_event"; // 이벤트 테이블
|
||||
$g4['yc4_event_item_table'] = "yc4_event_item"; // 상품, 이벤트 연결 테이블
|
||||
$g4['yc4_faq_table'] = "yc4_faq"; // 자주하시는 질문 테이블
|
||||
$g4['yc4_faq_master_table'] = "yc4_faq_master"; // 자주하시는 질문 마스터 테이블
|
||||
$g4['yc4_item_table'] = "yc4_item"; // 상품 테이블
|
||||
$g4['yc4_item_ps_table'] = "yc4_item_ps"; // 상품 사용후기 테이블
|
||||
$g4['yc4_item_qa_table'] = "yc4_item_qa"; // 상품 질문답변 테이블
|
||||
$g4['yc4_item_relation_table'] = "yc4_item_relation"; // 관련 상품 테이블
|
||||
$g4['yc4_new_win_table'] = "yc4_new_win"; // 새창 테이블
|
||||
$g4['yc4_onlinecalc_table'] = "yc4_onlinecalc"; // 온라인견적 테이블
|
||||
$g4['yc4_order_table'] = "yc4_order"; // 주문서 테이블
|
||||
$g4['yc4_wish_table'] = "yc4_wish"; // 보관함(위시리스트) 테이블
|
||||
$g4['yc4_on_uid_table'] = "yc4_on_uid"; // 주문번호생성 유니크키 테이블
|
||||
$g4['yc4_option_table'] = "yc4_option"; // 선택 옵션 테이블
|
||||
$g4['yc4_supplement_table'] = "yc4_supplement"; // 추가옵션 테이블
|
||||
$g4['yc4_coupon_table'] = "yc4_coupon"; // 쿠폰정보 테이블
|
||||
$g4['yc4_coupon_history_table']= "yc4_coupon_history"; // 쿠폰사용내역 테이블
|
||||
$g4['yc4_sendcost_table'] = "yc4_sendcost"; // 추가배송비 테이블
|
||||
$g4['yc4_uniqid_table'] = "yc4_uniqid";
|
||||
|
||||
// 신용카드결제대행사 URL
|
||||
$g4['yc4_cardpg']['kcp'] = "http://admin.kcp.co.kr";
|
||||
$g4['yc4_cardpg']['banktown'] = "http://ebiz.banktown.com/index.cs";
|
||||
$g4['yc4_cardpg']['telec'] = "http://www.ebizpro.co.kr";
|
||||
$g4['yc4_cardpg']['inicis'] = "https://iniweb.inicis.com/DefaultWebApp/index.html";
|
||||
$g4['yc4_cardpg']['allthegate'] = "http://www.allthegate.com/login/r_login.jsp";
|
||||
$g4['yc4_cardpg']['allat'] = "http://www.allatbiz.net/servlet/AllatBizSrvX/bizcon/jspx/login/login.jsp?next=/servlet/AllatBizSrvX/bizable/jspx/login/login.jsp";
|
||||
$g4['yc4_cardpg']['tgcorp'] = "https://npg.tgcorp.com/mdbop/login.jsp";
|
||||
$g4['yc4_cardpg']['kspay'] = "http://nims.ksnet.co.kr:7001/pg_infoc/src/login.jsp"; // ksnet
|
||||
$g4['yc4_cardpg']['dacom'] = "https://pgweb.dacom.net";
|
||||
$g4['yc4_cardpg']['dacom_xpay'] = "https://pgweb.dacom.net";
|
||||
|
||||
//==============================================================================
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// 쇼핑몰 필수 실행코드 모음 시작
|
||||
|
||||
63
head.php
63
head.php
@ -1,12 +1,13 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
include_once($g4['path'].'/head.sub.php');
|
||||
include_once($g4['path'].'/lib/outlogin.lib.php');
|
||||
include_once($g4['path'].'/lib/poll.lib.php');
|
||||
include_once($g4['path'].'/lib/visit.lib.php');
|
||||
include_once($g4['path'].'/lib/connect.lib.php');
|
||||
include_once($g4['path'].'/lib/popular.lib.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
include_once(G4_LIB_PATH.'/latest.lib.php');
|
||||
include_once(G4_LIB_PATH.'/outlogin.lib.php');
|
||||
include_once(G4_LIB_PATH.'/poll.lib.php');
|
||||
include_once(G4_LIB_PATH.'/visit.lib.php');
|
||||
include_once(G4_LIB_PATH.'/connect.lib.php');
|
||||
include_once(G4_LIB_PATH.'/popular.lib.php');
|
||||
|
||||
//print_r2(get_defined_constants());
|
||||
?>
|
||||
@ -14,31 +15,59 @@ include_once($g4['path'].'/lib/popular.lib.php');
|
||||
<header id="hd">
|
||||
<div id="hd_wrapper">
|
||||
<div id="to_content"><a href="#wrapper">본문 바로가기</a></div>
|
||||
<div id="logo"><a href="<?=$g4['path']?>/"><img src="<?=$g4['path']?>/img/logo.jpg" alt="처음으로"></a></div>
|
||||
<div id="logo"><a href="<?=G4_URL?>"><img src="<?=G4_IMG_URL?>/logo.jpg" alt="처음으로"></a></div>
|
||||
|
||||
<h1><?=$config['cf_title']?></h1>
|
||||
|
||||
<ul id="snb">
|
||||
<li><a href="<?=$g4['bbs_path']?>/current_connect.php">현재접속자 <?=connect(); // 현재 접속자수 ?></a></li>
|
||||
<li><a href="<?=$g4['bbs_path']?>/new.php">최근게시물</a></li>
|
||||
<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['path']?>/adm">관리자</a></li><? } ?>
|
||||
<li><a href="<?=$g4['bbs_path']?>/member_confirm.php?url=register_form.php">정보수정</a></li>
|
||||
<li><a href="<?=$g4['bbs_path']?>/logout.php">로그아웃</a></li>
|
||||
<? if ($is_admin) { ?><li><a href="<?=G4_ADM_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 { ?>
|
||||
<li><a href="<?=$g4['bbs_path']?>/register.php">회원가입</a></li>
|
||||
<li><a href="<?=$g4['bbs_path']?>/login.php">로그인</a></li>
|
||||
<li><a href="<?=G4_BBS_URL?>/register.php">회원가입</a></li>
|
||||
<li><a href="<?=G4_BBS_URL?>/login.php">로그인</a></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
|
||||
<fieldset id="schall">
|
||||
<legend>사이트 내 전체검색</legend>
|
||||
<form name="fsearchbox" method="get" action="<?=$g4['https_bbs_url'].'/search.php'?>" onsubmit="return fsearchbox_submit(this);">
|
||||
<form name="fsearchbox" method="get" action="<?=G4_BBS_URL?>./search.php" onsubmit="return fsearchbox_submit(this);">
|
||||
<input type="hidden" name="sfl" value="wr_subject||wr_content">
|
||||
<input type="hidden" name="sop" value="and">
|
||||
<input type="text" id="schall_stx" name="stx" title="검색어" maxlength="20">
|
||||
<input type="image" id="schall_submit" src="<?=$g4['path']?>/img/btn_search.jpg" alt="검색">
|
||||
<input type="image" id="schall_submit" src="<?=G4_IMG_URL?>/btn_search.jpg" alt="검색">
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fsearchbox_submit(f)
|
||||
{
|
||||
if (f.stx.value.length < 2) {
|
||||
alert("검색어는 두글자 이상 입력하십시오.");
|
||||
f.stx.select();
|
||||
f.stx.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
|
||||
var cnt = 0;
|
||||
for (var i=0; i<f.stx.value.length; i++) {
|
||||
if (f.stx.value.charAt(i) == ' ')
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt > 1) {
|
||||
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
|
||||
f.stx.select();
|
||||
f.stx.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</fieldset>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
43
head.sub.php
43
head.sub.php
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$begin_time = get_microtime();
|
||||
|
||||
@ -33,22 +33,17 @@ header("Pragma: no-cache"); // HTTP/1.0
|
||||
<!-- <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> -->
|
||||
<title><?=$g4['title']?></title>
|
||||
<? if (isset($administrator)) { ?>
|
||||
<link rel="stylesheet" href="<?=$g4['url']?>/css/adm.css?=<?=date("md")?>">
|
||||
<link rel="stylesheet" href="<?=G4_CSS_URL?>/adm.css?=<?=date("md")?>">
|
||||
<? } else { ?>
|
||||
<link rel="stylesheet" href="<?=$g4['url']?>/css/default.css?=<?=date("md")?>">
|
||||
<link rel="stylesheet" href="<?=G4_CSS_URL?>/default.css?=<?=date("md")?>">
|
||||
<?}?>
|
||||
<!--[if lte IE 8]>
|
||||
<script src="<?=$g4['url']?>/js/html5.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
// 자바스크립트에서 사용하는 전역변수 선언
|
||||
var g4_path = "<?=$g4['path']?>";
|
||||
var g4_bbs = "<?=$g4['bbs']?>";
|
||||
var g4_bbs_img = "<?=$g4['bbs_img']?>";
|
||||
var g4_url = "<?=$g4['url']?>";
|
||||
var g4_path = "<?=$g4['path']?>";
|
||||
var g4_bbs_url = "<?=$g4['bbs_url']?>";
|
||||
var g4_bbs_path = "<?=$g4['bbs_path']?>";
|
||||
var g4_url = "<?=G4_URL?>";
|
||||
var g4_bbs_url = "<?=G4_BBS_URL?>";
|
||||
var g4_is_member = "<?=isset($is_member)?$is_member:'';?>";
|
||||
var g4_is_admin = "<?=isset($is_admin)?$is_admin:'';?>";
|
||||
var g4_bo_table = "<?=isset($bo_table)?$bo_table:'';?>";
|
||||
@ -58,30 +53,10 @@ 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 "var g4_admin = '{$g4['admin']}';"; } ?>
|
||||
<?
|
||||
if (!empty($g4['js_code'])) {
|
||||
foreach ($g4['js_code'] as $key=>$value) {
|
||||
echo $value."\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</script>
|
||||
<script src="<?=$g4['url']?>/js/jquery-1.8.3.min.js"></script>
|
||||
<script src="<?=$g4['url']?>/js/common.js"></script>
|
||||
<script src="<?=$g4['url']?>/js/wrest.js"></script>
|
||||
<?
|
||||
if (!empty($g4['js_file'])) {
|
||||
foreach ($g4['js_file'] as $key=>$value) {
|
||||
echo "<script src=\"$value\"></script>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script src="<?=G4_JS_URL?>/jquery-1.8.3.min.js"></script>
|
||||
<script src="<?=G4_JS_URL?>/common.js"></script>
|
||||
<script src="<?=G4_JS_URL?>/wrest.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<a id="g4_head"></a>
|
||||
|
||||
<?
|
||||
if (G4_IS_MOBILE) {
|
||||
include_once($g4['path'].'/mobile.head.php');
|
||||
}
|
||||
?>
|
||||
<a id="g4_head"></a>
|
||||
36
index.php
36
index.php
@ -1,11 +1,37 @@
|
||||
<?php
|
||||
define('_INDEX_', true);
|
||||
include_once('./_common.php');
|
||||
include_once($g4['path'].'/lib/latest.lib.php');
|
||||
|
||||
if (G4_IS_MOBILE) {
|
||||
include_once($g4['path'].'/mobile.index.php');
|
||||
} else {
|
||||
include_once($g4['path'].'/main.php');
|
||||
include_once('./_head.php');
|
||||
?>
|
||||
|
||||
<div id="idx_catch"><img src="<?=G4_URL?>/img/idx_catch.jpg" alt="Sharing All Possibilities"></div>
|
||||
|
||||
<!-- 메인화면 최신글 시작 -->
|
||||
<?
|
||||
// 최신글
|
||||
$sql = " select bo_table from {$g4['board_table']} order by gr_id, bo_table ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$lt_style = "";
|
||||
if ($i%2==1) $lt_style = "margin-left:20px";
|
||||
else $lt_style = "";
|
||||
?>
|
||||
<div style="float:left;<?=$lt_style?>">
|
||||
<?
|
||||
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
|
||||
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
|
||||
|
||||
// 사용방법
|
||||
// latest(스킨, 게시판아이디, 출력라인, 글자수);
|
||||
echo latest("neo", $row['bo_table'], 5, 25);
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<!-- 메인화면 최신글 끝 -->
|
||||
|
||||
<?
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
if (typeof(CAPSLOCK_JS) == 'undefined') // 한번만 실행
|
||||
{
|
||||
if (typeof g4_path == 'undefined')
|
||||
alert('g4_path 변수가 선언되지 않았습니다. js/capslock.js');
|
||||
|
||||
var CAPSLOCK_JS = true;
|
||||
|
||||
var capslock_delay = 3000; // "CapsLock 이 켜져 있습니다." 이미지를 몇초간 출력할 것인지?
|
||||
@ -66,5 +63,5 @@ if (typeof(CAPSLOCK_JS) == 'undefined') // 한번만 실행
|
||||
return obj.offsetTop + obj.clientTop + get_real_top(obj.offsetParent);
|
||||
}
|
||||
|
||||
document.write("<div id='capslock_info' style='display:none; position:absolute;'><img src='"+g4_path+"/img/capslock.gif'></div>");
|
||||
document.write("<div id='capslock_info' style='display:none; position:absolute;'><img src='"+g4_url+"/img/capslock.gif'></div>");
|
||||
}
|
||||
152
js/common.js
152
js/common.js
@ -1,6 +1,6 @@
|
||||
// 전역 변수
|
||||
var errmsg = "";
|
||||
var errfld;
|
||||
var errfld = null;
|
||||
|
||||
// 필드 검사
|
||||
function check_field(fld, msg)
|
||||
@ -296,28 +296,6 @@ function win_zip(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2)
|
||||
win_open(url, "winZip", "left=50,top=50,width=616,height=460,scrollbars=1");
|
||||
}
|
||||
|
||||
// 쪽지 창
|
||||
function win_memo(url)
|
||||
{
|
||||
if (!url)
|
||||
url = g4_path + "/" + g4_bbs + "/memo.php";
|
||||
win_open(url, "winMemo", "left=50,top=50,width=620,height=460,scrollbars=1");
|
||||
}
|
||||
|
||||
// 포인트 창
|
||||
function win_point(url)
|
||||
{
|
||||
win_open(g4_path + "/" + g4_bbs + "/point.php", "winPoint", "left=20, top=20, width=616, height=635, scrollbars=1");
|
||||
}
|
||||
|
||||
// 스크랩 창
|
||||
function win_scrap(url)
|
||||
{
|
||||
if (!url)
|
||||
url = g4_path + "/" + g4_bbs + "/scrap.php";
|
||||
win_open(url, "scrap", "left=20, top=20, width=616, height=500, scrollbars=1");
|
||||
}
|
||||
|
||||
// 새로운 패스워드 분실 창 : 100902
|
||||
function win_password_lost()
|
||||
{
|
||||
@ -345,14 +323,6 @@ function win_formmail(mb_id, name, email)
|
||||
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");
|
||||
}
|
||||
|
||||
// 설문조사 창
|
||||
function win_poll(url)
|
||||
{
|
||||
if (!url)
|
||||
url = "";
|
||||
win_open(url, "winPoll", "left=50, top=50, width=616, height=500, scrollbars=1");
|
||||
}
|
||||
|
||||
// 자기소개 창
|
||||
function win_profile(mb_id)
|
||||
{
|
||||
@ -479,4 +449,124 @@ $(document).ready(function(){
|
||||
win_password_lost(this.href);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* 포인트 창
|
||||
**/
|
||||
var win_point = function(href) {
|
||||
var new_win = window.open(href, 'win_point', 'left=100,top=100,width=600, height=600, scrollbars=1');
|
||||
new_win.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 쪽지 창
|
||||
**/
|
||||
var win_memo = function(href) {
|
||||
var new_win = window.open(href, 'win_memo', 'left=100,top=100,width=620,height=500,scrollbars=1');
|
||||
new_win.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 메일 창
|
||||
**/
|
||||
var win_email = function(href) {
|
||||
var new_win = window.open(href, 'win_email', 'left=100,top=100,width=600,height=580,scrollbars=0');
|
||||
new_win.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 자기소개 창
|
||||
**/
|
||||
var win_profile = function(href) {
|
||||
var new_win = window.open(href, 'win_profile', 'left=100,top=100,width=620,height=510,scrollbars=1');
|
||||
new_win.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 스크랩 창
|
||||
**/
|
||||
var win_scrap = function(href) {
|
||||
var new_win = window.open(href, 'win_scrap', 'left=100,top=100,width=600,height=600,scrollbars=1');
|
||||
new_win.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 홈페이지 창
|
||||
**/
|
||||
var win_homepage = function(href) {
|
||||
var new_win = window.open(href, 'win_homepage', '');
|
||||
new_win.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 우편번호 창
|
||||
**/
|
||||
var win_zip = function(href) {
|
||||
var new_win = window.open(href, 'win_zip', 'width=616, height=460, scrollbars=1');
|
||||
new_win.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 새로운 패스워드 분실 창 : 101123
|
||||
**/
|
||||
win_password_lost = function(href)
|
||||
{
|
||||
var new_win = window.open(href, 'win_password_lost', 'width=617, height=330, scrollbars=1');
|
||||
new_win.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* 설문조사 결과
|
||||
**/
|
||||
var win_poll = function(href) {
|
||||
var new_win = window.open(href, 'win_poll', 'width=616, height=500, scrollbars=1');
|
||||
new_win.focus();
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('.win_point').click(function() {
|
||||
win_point(this.href);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.win_memo').click(function() {
|
||||
win_memo(this.href);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.win_email').click(function() {
|
||||
win_email(this.ref);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.win_scrap').click(function() {
|
||||
win_scrap(this.href);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.win_profile').click(function() {
|
||||
win_profile(this.ref);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.win_homepage').click(function() {
|
||||
win_homepage(this.ref);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.win_zip_find').click(function() {
|
||||
win_zip(this.href);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.win_password_lost').click(function() {
|
||||
win_password_lost(this.href);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.win_poll').click(function() {
|
||||
win_poll(this.href);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
@ -2,8 +2,6 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
{
|
||||
if (typeof g4_is_member == 'undefined')
|
||||
alert('g4_is_member 변수가 선언되지 않았습니다. js/sideview.js');
|
||||
if (typeof g4_path == 'undefined')
|
||||
alert('g4_path 변수가 선언되지 않았습니다. js/sideview.js');
|
||||
|
||||
var SIDEVIEW_JS = true;
|
||||
|
||||
@ -75,7 +73,7 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
// 쪽지보내기
|
||||
if (mb_id)
|
||||
// 불여우 자바스크립트창이 뜨는 오류를 수정
|
||||
this.insertTail("memo", "<a href=\"javascript:win_memo('"+g4_path+"/" + g4_bbs + "/memo_form.php?me_recv_mb_id="+mb_id+"');\">쪽지보내기</a>");
|
||||
this.insertTail("memo", "<a href=\"javascript:win_memo('"+g4_bbs_url+"/memo_form.php?me_recv_mb_id="+mb_id+"');\">쪽지보내기</a>");
|
||||
// 메일보내기
|
||||
if (email)
|
||||
this.insertTail("mail", "<a href=\"javascript:;\" onclick=\"win_formmail('"+mb_id+"','"+name+"','"+email+"');\">메일보내기</a>");
|
||||
@ -90,21 +88,21 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
// 게시판테이블 아이디가 넘어왔을 경우
|
||||
if (g4_bo_table) {
|
||||
if (mb_id) // 회원일 경우 아이디로 검색
|
||||
this.insertTail("mb_id", "<a href='"+g4_path+"/" + g4_bbs + "/board.php?bo_table="+g4_bo_table+"&sca="+g4_sca+"&sfl=mb_id,1&stx="+mb_id+"'>아이디로 검색</a>");
|
||||
this.insertTail("mb_id", "<a href='"+g4_bbs_url+"/board.php?bo_table="+g4_bo_table+"&sca="+g4_sca+"&sfl=mb_id,1&stx="+mb_id+"'>아이디로 검색</a>");
|
||||
else // 비회원일 경우 이름으로 검색
|
||||
this.insertTail("name", "<a href='"+g4_path+"/" + g4_bbs + "/board.php?bo_table="+g4_bo_table+"&sca="+g4_sca+"&sfl=wr_name,1&stx="+name+"'>이름으로 검색</a>");
|
||||
this.insertTail("name", "<a href='"+g4_bbs_url+"/board.php?bo_table="+g4_bo_table+"&sca="+g4_sca+"&sfl=wr_name,1&stx="+name+"'>이름으로 검색</a>");
|
||||
}
|
||||
if (mb_id)
|
||||
this.insertTail("new", "<a href='"+g4_path+"/" + g4_bbs + "/new.php?mb_id="+mb_id+"'>전체게시물</a>");
|
||||
this.insertTail("new", "<a href='"+g4_bbs_url+"/new.php?mb_id="+mb_id+"'>전체게시물</a>");
|
||||
|
||||
// 최고관리자일 경우
|
||||
if (g4_is_admin == "super") {
|
||||
// 회원정보변경
|
||||
if (mb_id)
|
||||
this.insertTail("modify", "<a href='"+g4_path+"/" + g4_admin + "/member_form.php?w=u&mb_id="+mb_id+"' target='_blank'>회원정보변경</a>");
|
||||
this.insertTail("modify", "<a href='"+g4_admin_url+"/member_form.php?w=u&mb_id="+mb_id+"' target='_blank'>회원정보변경</a>");
|
||||
// 포인트내역
|
||||
if (mb_id)
|
||||
this.insertTail("point", "<a href='"+g4_path+"/" + g4_admin + "/point_list.php?sfl=mb_id&stx="+mb_id+"' target='_blank'>포인트내역</a>");
|
||||
this.insertTail("point", "<a href='"+g4_admin_url+"/point_list.php?sfl=mb_id&stx="+mb_id+"' target='_blank'>포인트내역</a>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -274,10 +274,10 @@ function get_file($bo_table, $wr_id)
|
||||
while ($row = sql_fetch_array($result))
|
||||
{
|
||||
$no = $row['bf_no'];
|
||||
$file[$no]['href'] = "./download.php?bo_table=$bo_table&wr_id=$wr_id&no=$no" . $qstr;
|
||||
$file[$no]['href'] = G4_BBS_URL."/download.php?bo_table=$bo_table&wr_id=$wr_id&no=$no" . $qstr;
|
||||
$file[$no]['download'] = $row['bf_download'];
|
||||
// 4.00.11 - 파일 path 추가
|
||||
$file[$no]['path'] = $g4['path'].'/data/file/'.$bo_table;
|
||||
$file[$no]['path'] = G4_DATA_URL.'/file/'.$bo_table;
|
||||
//$file[$no]['size'] = get_filesize("{$file[$no]['path']}/$row['bf_file']");
|
||||
$file[$no]['size'] = get_filesize($row['bf_filesize']);
|
||||
//$file[$no]['datetime'] = date("Y-m-d H:i:s", @filemtime("$g4['path']/data/file/$bo_table/$row['bf_file']"));
|
||||
@ -398,9 +398,9 @@ function get_list($write_row, $board, $skin_path, $subject_len=40)
|
||||
$list['icon_link'] = '<img src="'.$skin_path.'/img/icon_link.gif" alt="관련링크">';
|
||||
|
||||
// 분류명 링크
|
||||
$list['ca_name_href'] = $g4['bbs_path'].'/board.php?bo_table='.$board['bo_table'].'&sca='.urlencode($list['ca_name']);
|
||||
$list['ca_name_href'] = G4_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'&sca='.urlencode($list['ca_name']);
|
||||
|
||||
$list['href'] = $g4['bbs_path'].'/board.php?bo_table='.$board['bo_table'].'&wr_id='.$list['wr_id'].$qstr;
|
||||
$list['href'] = G4_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'&wr_id='.$list['wr_id'].$qstr;
|
||||
$list['comment_href'] = $list['href'];
|
||||
|
||||
$list['icon_new'] = '';
|
||||
@ -416,10 +416,9 @@ function get_list($write_row, $board, $skin_path, $subject_len=40)
|
||||
$list['icon_secret'] = '<img src="'.$skin_path.'/img/icon_secret.gif" alt="비밀글">';
|
||||
|
||||
// 링크
|
||||
for ($i=1; $i<=$g4['link_count']; $i++)
|
||||
{
|
||||
for ($i=1; $i<=G4_LINK_COUNT; $i++) {
|
||||
$list['link'][$i] = set_http(get_text($list["wr_link{$i}"]));
|
||||
$list['link_href'][$i] = $g4['bbs_path'].'/link.php?bo_table='.$board['bo_table'].'&wr_id='.$list['wr_id'].'&no='.$i.$qstr;
|
||||
$list['link_href'][$i] = G4_BBS_URL.'/link.php?bo_table='.$board['bo_table'].'&wr_id='.$list['wr_id'].'&no='.$i.$qstr;
|
||||
$list['link_hit'][$i] = (int)$list["wr_link{$i}_hit"];
|
||||
}
|
||||
|
||||
@ -835,19 +834,6 @@ function get_group_select($name, $selected='', $event='')
|
||||
}
|
||||
|
||||
|
||||
// 스킨디렉토리를 SELECT 형식으로 얻음
|
||||
function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||
{
|
||||
$skins = get_skin_dir($skin_gubun);
|
||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||
for ($i=0; $i<count($skins); $i++) {
|
||||
$str .= option_selected($skins[$i], $selected);
|
||||
}
|
||||
$str .= "</select>";
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
function option_selected($value, $selected, $text='')
|
||||
{
|
||||
if (!$text) $text = $value;
|
||||
@ -1031,7 +1017,7 @@ function view_file_link($file, $width, $height, $content='')
|
||||
if (preg_match("/\.({$config['cf_image_extension']})$/i", $file))
|
||||
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
|
||||
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
|
||||
return "<img src='{$g4['path']}/data/file/{$board['bo_table']}/".urlencode($file)."' onclick='image_window(this);' alt='{$content}'>";
|
||||
return "<img src='".G4_DATA_URL."/file/{$board['bo_table']}/".urlencode($file)."' onclick='image_window(this);' alt='{$content}'>";
|
||||
/*
|
||||
// 110106 : FLASH XSS 공격으로 인하여 코드 자체를 막음
|
||||
else if (preg_match("/\.($config['cf_flash_extension'])$/i", $file))
|
||||
|
||||
@ -12,7 +12,7 @@ function connect($skin_dir='')
|
||||
|
||||
if (!$skin_dir)
|
||||
$skin_dir = $config['cf_connect_skin'];
|
||||
$connect_skin_path = skin_path().'/connect/'.$skin_dir;
|
||||
$connect_skin_path = G4_SKIN_PATH.'/connect/'.$skin_dir;
|
||||
|
||||
ob_start();
|
||||
include_once ($connect_skin_path.'/connect.skin.php');
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
// 로그를 파일에 쓴다
|
||||
function write_log($file, $log) {
|
||||
$fp = fopen($file, "a+");
|
||||
|
||||
@ -7,9 +7,10 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40)
|
||||
global $g4;
|
||||
|
||||
if (!$skin_dir) $skin_dir = 'basic';
|
||||
$latest_skin_path = skin_path().'/latest/'.$skin_dir;
|
||||
$latest_skin_path = G4_SKIN_PATH.'/latest/'.$skin_dir;
|
||||
$latest_skin_url = G4_SKIN_URL.'/latest/'.$skin_dir;
|
||||
|
||||
$cache_file = $g4['cache_latest_path']."/{$bo_table}_{$skin_dir}_{$rows}_{$subject_len}.php";
|
||||
$cache_file = G4_CACHE_PATH."/latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}.php";
|
||||
//if (!file_exists($cache_file)) {
|
||||
if (1) {
|
||||
$list = array();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user