Merge branch 'g4s'
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,8 +2,8 @@ dbconfig.php
|
||||
log
|
||||
.htaccess
|
||||
data
|
||||
config.php
|
||||
test
|
||||
config.php
|
||||
sirgle
|
||||
sr_*
|
||||
google*
|
||||
|
||||
@ -117,6 +117,7 @@ sql_query(" delete from {$g4['board_new_table']} where bo_table = '$bo_table' an
|
||||
// 스크랩 삭제
|
||||
sql_query(" delete from {$g4['scrap_table']} where bo_table = '$bo_table' and wr_id = '{$write['wr_id']}' ");
|
||||
|
||||
/*
|
||||
// 공지사항 삭제
|
||||
$notice_array = explode("\n", trim($board['bo_notice']));
|
||||
$bo_notice = "";
|
||||
@ -124,6 +125,8 @@ for ($k=0; $k<count($notice_array); $k++)
|
||||
if ((int)$write[wr_id] != (int)$notice_array[$k])
|
||||
$bo_notice .= $notice_array[$k] . "\n";
|
||||
$bo_notice = trim($bo_notice);
|
||||
*/
|
||||
$bo_notice = board_notice($board['bo_notice'], $write['wr_id']);
|
||||
sql_query(" update {$g4['board_table']} set bo_notice = '$bo_notice' where bo_table = '$bo_table' ");
|
||||
|
||||
// 글숫자 감소
|
||||
|
||||
@ -130,6 +130,7 @@ for ($i=count($tmp_array)-1; $i>=0; $i--)
|
||||
// 스크랩 삭제
|
||||
sql_query(" delete from {$g4['scrap_table']} where bo_table = '$bo_table' and wr_id = '{$write['wr_id']}' ");
|
||||
|
||||
/*
|
||||
// 공지사항 삭제
|
||||
$notice_array = explode(',', trim($board['bo_notice']));
|
||||
$bo_notice = "";
|
||||
@ -137,6 +138,8 @@ for ($i=count($tmp_array)-1; $i>=0; $i--)
|
||||
if ((int)$write['wr_id'] != (int)$notice_array[$k])
|
||||
$bo_notice .= $notice_array[$k].',';
|
||||
$bo_notice = trim($bo_notice);
|
||||
*/
|
||||
$bo_notice = board_notice($board['bo_notice'], $write['wr_id']);
|
||||
sql_query(" update {$g4['board_table']} set bo_notice = '$bo_notice' where bo_table = '$bo_table' ");
|
||||
$board['bo_notice'] = $bo_notice;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ $w = $_POST['w'];
|
||||
$wr_link1 = escape_trim(strip_tags($_POST['wr_link1']));
|
||||
$wr_link2 = escape_trim(strip_tags($_POST['wr_link2']));
|
||||
|
||||
$notice_array = explode(',', trim($board['bo_notice']));
|
||||
$notice_array = explode(",", $board['bo_notice']);
|
||||
|
||||
if ($w == 'u' || $w == 'r') {
|
||||
$wr = get_write($write_table, $wr_id);
|
||||
@ -454,6 +454,7 @@ if ($w == '' || $w == 'r') {
|
||||
$sql = " update {$write_table} set ca_name = '{$ca_name}' where wr_parent = '{$wr['wr_id']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
/*
|
||||
if ($notice) {
|
||||
//if (!preg_match("/[^0-9]{0,1}{$wr_id}[\r]{0,1}/",$board['bo_notice']))
|
||||
if (!in_array((int)$wr_id, $notice_array)) {
|
||||
@ -469,6 +470,10 @@ if ($w == '' || $w == 'r') {
|
||||
//$bo_notice = preg_replace("/^".$wr_id."[\n]?$/m", "", $board['bo_notice']);
|
||||
sql_query(" update {$g4['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
||||
}
|
||||
*/
|
||||
|
||||
$bo_notice = board_notice($board['bo_notice'], $wr_id, $notice);
|
||||
sql_query(" update {$g4['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
||||
}
|
||||
|
||||
// syndication ping
|
||||
|
||||
@ -121,15 +121,6 @@ define('G4_SPECIAL', 64); // 특수문자
|
||||
define('G4_MOBILE_AGENT', 'phone|samsung|lgtel|mobile|skt|nokia|blackberry|android|sony');
|
||||
|
||||
|
||||
/********************
|
||||
SNS 상수
|
||||
********************/
|
||||
|
||||
define('G4_FACEBOOK_APPID', '119146498278078');
|
||||
define('G4_FACEBOOK_SECRET', '311e0d6ff8ff43cfe0e75fe82d71777c');
|
||||
define('G4_FACEBOOK_CALLBACK', G4_SNS_URL.'/facebook/callback.php');
|
||||
|
||||
|
||||
/********************
|
||||
기타 상수
|
||||
********************/
|
||||
|
||||
@ -1983,6 +1983,7 @@ function hyphen_hp_number($hp)
|
||||
}
|
||||
|
||||
|
||||
// 로그인 후 이동할 URL
|
||||
function login_url($url='')
|
||||
{
|
||||
if (!$url) $url = G4_URL;
|
||||
@ -1991,6 +1992,7 @@ function login_url($url='')
|
||||
}
|
||||
|
||||
|
||||
// $dir 을 포함하여 https 또는 http 주소를 반환한다.
|
||||
function https_url($dir, $https=true)
|
||||
{
|
||||
if ($https) {
|
||||
@ -2009,4 +2011,24 @@ function https_url($dir, $https=true)
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
// 게시판의 공지사항을 , 로 구분하여 업데이트 한다.
|
||||
function board_notice($bo_notice, $wr_id, $insert=false)
|
||||
{
|
||||
$notice_array = explode(",", trim($bo_notice));
|
||||
$notice_array = array_merge(array($wr_id), $notice_array);
|
||||
$notice_array = array_unique($notice_array);
|
||||
foreach ($notice_array as $key=>$value) {
|
||||
if (!trim($value))
|
||||
unset($notice_array[$key]);
|
||||
}
|
||||
if (!$insert) {
|
||||
foreach ($notice_array as $key=>$value) {
|
||||
if ((int)$value == (int)$wr_id)
|
||||
unset($notice_array[$key]);
|
||||
}
|
||||
}
|
||||
return implode(",", $notice_array);
|
||||
}
|
||||
?>
|
||||
@ -36,7 +36,7 @@ function editor_html($id, $content, $ckeditor=true, $class="")
|
||||
}
|
||||
|
||||
$ckeditor_class = $ckeditor ? "ckeditor" : "";
|
||||
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$ckeditor_class $class required\" style=\"width:100%;\" required maxlength=\"65536\">$content</textarea>";
|
||||
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$ckeditor_class $class\" style=\"width:100%;\" maxlength=\"65536\">$content</textarea>";
|
||||
$html .= "\n<span class=\"sound_only\">웹 에디터 끝</span>";
|
||||
return $html;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user