Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
288da7f9e1 | ||
|
|
41aac91146 | ||
|
|
a949c32b4c |
+1
-1
@@ -492,7 +492,7 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_analytics">방문자분석 스크립트</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리스틱'); ?>
|
||||
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리틱스'); ?>
|
||||
<textarea name="cf_analytics" id="cf_analytics"><?php echo $config['cf_analytics']; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -62,7 +62,7 @@ include_once('./admin.head.php');
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_email">E-mail</label></th>
|
||||
<td>
|
||||
<?php echo help("메일 주소에 단어 포함 (예 : @sir.co.kr)") ?>
|
||||
<?php echo help("메일 주소에 단어 포함 (예 : @".preg_replace('#^(www[^\.]*\.){1}#', '', $_SERVER['HTTP_HOST']).")") ?>
|
||||
<input type="text" name="mb_email" value="<?php echo $mb_email ?>" id="mb_email" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<input type="hidden" name="nw_id" value="<?php echo $nw_id; ?>">
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>쇼핑몰 초기화면 접속 시 자동으로 뜰 팝업레이어를 설정합니다.</p>
|
||||
<p>초기화면 접속 시 자동으로 뜰 팝업레이어를 설정합니다.</p>
|
||||
</div>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ if (isset($wr_id) && $wr_id) {
|
||||
;
|
||||
} else {
|
||||
// 글읽기 포인트가 설정되어 있다면
|
||||
if ($board['bo_read_point'] && $member['mb_point'] + $board['bo_read_point'] < 0)
|
||||
if ($config['cf_use_point'] && $board['bo_read_point'] && $member['mb_point'] + $board['bo_read_point'] < 0)
|
||||
alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 글읽기('.number_format($board['bo_read_point']).')가 불가합니다.\\n\\n포인트를 모으신 후 다시 글읽기 해 주십시오.');
|
||||
|
||||
insert_point($member['mb_id'], $board['bo_read_point'], "{$board['bo_subject']} {$wr_id} 글읽기", $bo_table, $wr_id, '읽기');
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ if($_POST['js'] == "on") {
|
||||
|
||||
if (!$is_member)
|
||||
{
|
||||
$href = './login.php?$qstr&url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
$href = './login.php?'.$qstr.'&url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
|
||||
alert('회원만 가능합니다.', $href);
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
$title = str_replace('\"', '"',$_REQUEST['title']);
|
||||
$title = urlencode(str_replace('\"', '"',$_REQUEST['title']));
|
||||
$short_url = googl_short_url($_REQUEST['longurl']);
|
||||
$title_url = $title.' : '.$short_url;
|
||||
|
||||
switch($_REQUEST['sns']) {
|
||||
case 'facebook' :
|
||||
header("Location:http://www.facebook.com/sharer/sharer.php?s=100&p[url]=".$short_url."&p[title]=".$title);
|
||||
header("Location:http://www.facebook.com/sharer/sharer.php?s=100&u=".$short_url."&p=".$title);
|
||||
break;
|
||||
case 'twitter' :
|
||||
header("Location:http://twitter.com/home?status=".$title_url);
|
||||
|
||||
@@ -90,7 +90,7 @@ if (isset($_POST['notice']) && $_POST['notice']) {
|
||||
for ($i=1; $i<=10; $i++) {
|
||||
$var = "wr_$i";
|
||||
$$var = "";
|
||||
if (isset($_POST['wr_'.$i]) && $_POST['wr_'.$i]) {
|
||||
if (isset($_POST['wr_'.$i]) && settype($_POST['wr_'.$i], 'string')) {
|
||||
$$var = trim($_POST['wr_'.$i]);
|
||||
}
|
||||
}
|
||||
|
||||
+67
-32
@@ -25,14 +25,6 @@ for ($i=0; $i<$ext_cnt; $i++) {
|
||||
}
|
||||
//==========================================================================================================================
|
||||
|
||||
// 완두콩님이 알려주신 보안관련 오류 수정
|
||||
// $member 에 값을 직접 넘길 수 있음
|
||||
$config = array();
|
||||
$member = array();
|
||||
$board = array();
|
||||
$group = array();
|
||||
$g5 = array();
|
||||
|
||||
|
||||
function g5_path()
|
||||
{
|
||||
@@ -54,6 +46,73 @@ include_once($g5_path['path'].'/config.php'); // 설정 파일
|
||||
unset($g5_path);
|
||||
|
||||
|
||||
// multi-dimensional array에 사용자지정 함수적용
|
||||
function array_map_deep($fn, $array)
|
||||
{
|
||||
if(is_array($array)) {
|
||||
foreach($array as $key => $value) {
|
||||
if(is_array($value)) {
|
||||
$array[$key] = array_map_deep($fn, $value);
|
||||
} else {
|
||||
$array[$key] = call_user_func($fn, $value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$array = call_user_func($fn, $array);
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
|
||||
// SQL Injection 대응 문자열 필터링
|
||||
function sql_escape_string($str)
|
||||
{
|
||||
$pattern = G5_ESCAPE_PATTERN;
|
||||
$replace = G5_ESCAPE_REPLACE;
|
||||
|
||||
$str = preg_replace($pattern, $replace, $str);
|
||||
$str = call_user_func('addslashes', $str);
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// SQL Injection 등으로 부터 보호를 위해 sql_escape_string() 적용
|
||||
//------------------------------------------------------------------------------
|
||||
// magic_quotes_gpc 에 의한 backslashes 제거
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$_POST = array_map_deep('stripslashes', $_POST);
|
||||
$_GET = array_map_deep('stripslashes', $_GET);
|
||||
$_COOKIE = array_map_deep('stripslashes', $_COOKIE);
|
||||
$_REQUEST = array_map_deep('stripslashes', $_REQUEST);
|
||||
}
|
||||
|
||||
// sql_escape_string 적용
|
||||
$_POST = array_map_deep(G5_ESCAPE_FUNCTION, $_POST);
|
||||
$_GET = array_map_deep(G5_ESCAPE_FUNCTION, $_GET);
|
||||
$_COOKIE = array_map_deep(G5_ESCAPE_FUNCTION, $_COOKIE);
|
||||
$_REQUEST = array_map_deep(G5_ESCAPE_FUNCTION, $_REQUEST);
|
||||
//==============================================================================
|
||||
|
||||
|
||||
// PHP 4.1.0 부터 지원됨
|
||||
// php.ini 의 register_globals=off 일 경우
|
||||
@extract($_GET);
|
||||
@extract($_POST);
|
||||
@extract($_SERVER);
|
||||
|
||||
|
||||
// 완두콩님이 알려주신 보안관련 오류 수정
|
||||
// $member 에 값을 직접 넘길 수 있음
|
||||
$config = array();
|
||||
$member = array();
|
||||
$board = array();
|
||||
$group = array();
|
||||
$g5 = array();
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// 공통
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -71,30 +130,6 @@ if (file_exists($dbconfig_file)) {
|
||||
sql_query(" set names utf8 ");
|
||||
if(defined('G5_MYSQL_SET_MODE') && G5_MYSQL_SET_MODE) sql_query("SET SESSION sql_mode = ''");
|
||||
if (defined(G5_TIMEZONE)) sql_query(" set time_zone = '".G5_TIMEZONE."'");
|
||||
|
||||
//==============================================================================
|
||||
// SQL Injection 등으로 부터 보호를 위해 sql_escape_string() 적용
|
||||
//------------------------------------------------------------------------------
|
||||
// magic_quotes_gpc 에 의한 backslashes 제거
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$_POST = array_map_deep('stripslashes', $_POST);
|
||||
$_GET = array_map_deep('stripslashes', $_GET);
|
||||
$_COOKIE = array_map_deep('stripslashes', $_COOKIE);
|
||||
$_REQUEST = array_map_deep('stripslashes', $_REQUEST);
|
||||
}
|
||||
|
||||
// sql_escape_string 적용
|
||||
$_POST = array_map_deep(G5_ESCAPE_FUNCTION, $_POST);
|
||||
$_GET = array_map_deep(G5_ESCAPE_FUNCTION, $_GET);
|
||||
$_COOKIE = array_map_deep(G5_ESCAPE_FUNCTION, $_COOKIE);
|
||||
$_REQUEST = array_map_deep(G5_ESCAPE_FUNCTION, $_REQUEST);
|
||||
//==============================================================================
|
||||
|
||||
// PHP 4.1.0 부터 지원됨
|
||||
// php.ini 의 register_globals=off 일 경우
|
||||
@extract($_GET);
|
||||
@extract($_POST);
|
||||
@extract($_SERVER);
|
||||
} else {
|
||||
?>
|
||||
|
||||
|
||||
+6
-2
@@ -162,8 +162,12 @@ define('G5_SMTP', '127.0.0.1');
|
||||
define('G5_DISPLAY_SQL_ERROR', TRUE);
|
||||
|
||||
// escape string 처리 함수 지정
|
||||
// POST 등에서 한글이 깨질 경우 addslashes 로 변경
|
||||
define('G5_ESCAPE_FUNCTION', 'sql_real_escape_string');
|
||||
// addslashes 로 변경 가능
|
||||
define('G5_ESCAPE_FUNCTION', 'sql_escape_string');
|
||||
|
||||
// sql_escape_string 함수에서 사용될 패턴
|
||||
define('G5_ESCAPE_PATTERN', '/(and|or).*(union|select|insert|update|delete|from|where|limit|create|drop).*/i');
|
||||
define('G5_ESCAPE_REPLACE', '');
|
||||
|
||||
// 게시판에서 링크의 기본개수를 말합니다.
|
||||
// 필드를 추가하면 이 숫자를 필드수에 맞게 늘려주십시오.
|
||||
|
||||
@@ -51,11 +51,6 @@ if (defined('G5_IS_ADMIN')) {
|
||||
echo '<link rel="stylesheet" href="'.G5_ADMIN_URL.'/css/admin.css">'.PHP_EOL;
|
||||
} else {
|
||||
echo '<link rel="stylesheet" href="'.G5_CSS_URL.'/'.(G5_IS_MOBILE?'mobile':'default').'.css">'.PHP_EOL;
|
||||
// canonical 지정
|
||||
$canonical = '';
|
||||
if ($bo_table && $wr_id) $canonical = 'http://'.$_SERVER['HTTP_HOST'].'/bbs/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
else $canonical = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
|
||||
echo '<link rel="canonical" href="'.$canonical.'">'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
<!--[if lte IE 8]>
|
||||
|
||||
+14
-1
@@ -132,7 +132,20 @@ function no_comma(data)
|
||||
function del(href)
|
||||
{
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
document.location.href = encodeURI(href);
|
||||
var iev = -1;
|
||||
if (navigator.appName == 'Microsoft Internet Explorer') {
|
||||
var ua = navigator.userAgent;
|
||||
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
|
||||
if (re.exec(ua) != null)
|
||||
iev = parseFloat(RegExp.$1);
|
||||
}
|
||||
|
||||
// IE6 이하에서 한글깨짐 방지
|
||||
if (iev != -1 && iev < 7) {
|
||||
document.location.href = encodeURI(href);
|
||||
} else {
|
||||
document.location.href = href;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
var $img = this.find(cfg.selector);
|
||||
var $this = this;
|
||||
|
||||
$img.removeAttr("height")
|
||||
.css("height", "");
|
||||
|
||||
function image_resize()
|
||||
{
|
||||
var width = $this.width();
|
||||
|
||||
@@ -7,36 +7,6 @@ if (!defined('_GNUBOARD_')) exit;
|
||||
**
|
||||
*************************************************************************/
|
||||
|
||||
// multi-dimensional array에 사용자지정 함수적용
|
||||
function array_map_deep($fn, $array)
|
||||
{
|
||||
if(is_array($array)) {
|
||||
foreach($array as $key => $value) {
|
||||
if(is_array($value)) {
|
||||
$array[$key] = array_map_deep($fn, $value);
|
||||
} else {
|
||||
$array[$key] = call_user_func($fn, $value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$array = call_user_func($fn, $array);
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
// SQL Injection 대응 문자열 필터링
|
||||
function sql_escape_string($str)
|
||||
{
|
||||
$pattern = '/(and|or).*(union|select|insert|update|delete|from|where|limit|create|drop).*/i';
|
||||
$replace = '';
|
||||
|
||||
$str = preg_replace($pattern, $replace, $str);
|
||||
$str = call_user_func(G5_ESCAPE_FUNCTION, $str);
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
// 마이크로 타임을 얻어 계산 형식으로 만듦
|
||||
function get_microtime()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user