g4s merge 충돌 수정
This commit is contained in:
@ -16,11 +16,13 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
$comment_id = $list[$i]['wr_id'];
|
||||
$cmt_depth = ""; // 댓글단계
|
||||
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 20;
|
||||
$str = $list[$i]['content'];
|
||||
$comment = $list[$i]['content'];
|
||||
/*
|
||||
if (strstr($list[$i]['wr_option'], "secret")) {
|
||||
$str = $str;
|
||||
}
|
||||
$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
|
||||
*/
|
||||
$comment = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $comment);
|
||||
?>
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
|
||||
<header>
|
||||
@ -33,12 +35,15 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php } ?>
|
||||
작성일
|
||||
<span class="bo_vc_hdinfo"><time datetime="<?php echo date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime'])) ?>"><?php echo $list[$i]['datetime'] ?></time></span>
|
||||
<?php if ($list[$i]['wr_facebook_user']) { ?><a href="https://www.facebook.com/profile.php?id=<?php echo $list[$i]['wr_facebook_user']; ?>" target="_blank"><img src="<?php echo G4_SNS_URL; ?>/icon/facebook.png" alt="페이스북에도 등록됨"></a><?php } ?>
|
||||
<?php if ($list[$i]['wr_twitter_user']) { ?><a href="https://www.twitter.com/<?php echo $list[$i]['wr_twitter_user']; ?>" target="_blank"><img src="<?php echo G4_SNS_URL; ?>/icon/twitter.png" alt="트위터에도 등록됨"></a><?php } ?>
|
||||
<?php if ($list[$i]['wr_me2day_user']) { ?><a href="http://me2day.net/<?php echo $list[$i]['wr_me2day_user']; ?>" target="_blank"><img src="<?php echo G4_SNS_URL; ?>/icon/me2day.png" alt="미투데이에도 등록됨"></a><?php } ?>
|
||||
</header>
|
||||
|
||||
<!-- 댓글 출력 -->
|
||||
<p>
|
||||
<?php if (strstr($list[$i]['wr_option'], "secret")) echo "<img src=\"".$board_skin_url."/img/icon_secret.gif\" alt=\"비밀글\">"; ?>
|
||||
<?php echo $str ?>
|
||||
<?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
|
||||
<?php echo $comment ?>
|
||||
</p>
|
||||
|
||||
<span id="edit_<?php echo $comment_id ?>"></span><!-- 수정 -->
|
||||
@ -113,16 +118,14 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<td><?php echo $captcha_html; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
include_once($board_skin_path."/view_comment.sns.skin.php");
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th scope="row">내용</th>
|
||||
<td>
|
||||
<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?php } ?>
|
||||
<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required"
|
||||
<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required" title="내용"
|
||||
<?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?php } ?>><?php echo $c_wr_content; ?></textarea>
|
||||
<?php if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?php } ?>
|
||||
<script>
|
||||
@ -141,7 +144,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" class="btn_submit" value="댓글등록">
|
||||
<input type="submit" id="btn_submit" class="btn_submit" value="댓글등록">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@ -168,16 +171,6 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
|
||||
f.is_good.value = 0;
|
||||
|
||||
/*
|
||||
var s;
|
||||
if (s = word_filter_check(document.getElementById('wr_content').value))
|
||||
{
|
||||
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
|
||||
document.getElementById('wr_content').focus();
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
@ -249,6 +242,8 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
|
||||
<?php if($is_guest) echo chk_captcha_js(); ?>
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -12,20 +12,23 @@ if (!$board['bo_use_sns']) return;
|
||||
// 페이스북
|
||||
//----------------------------------------------------------------------------
|
||||
if ($config['cf_facebook_appid']) {
|
||||
include_once(G4_SNS_PATH."/facebook/src/facebook.php");
|
||||
$facebook = new Facebook(array(
|
||||
'appId' => $config['cf_facebook_appid'],
|
||||
'secret' => $config['cf_facebook_secret']
|
||||
));
|
||||
$facebook_user = get_session("ss_facebook_user");
|
||||
if (!$facebook_user) {
|
||||
include_once(G4_SNS_PATH."/facebook/src/facebook.php");
|
||||
$facebook = new Facebook(array(
|
||||
'appId' => $config['cf_facebook_appid'],
|
||||
'secret' => $config['cf_facebook_secret']
|
||||
));
|
||||
|
||||
$facebook_user = $facebook->getUser();
|
||||
$facebook_user = $facebook->getUser();
|
||||
|
||||
if ($facebook_user) {
|
||||
try {
|
||||
$facebook_user_profile = $facebook->api('/me');
|
||||
} catch (FacebookApiException $e) {
|
||||
error_log($e);
|
||||
$facebook_user = null;
|
||||
if ($facebook_user) {
|
||||
try {
|
||||
$facebook_user_profile = $facebook->api('/me');
|
||||
} catch (FacebookApiException $e) {
|
||||
error_log($e);
|
||||
$facebook_user = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,17 +54,33 @@ if (!$board['bo_use_sns']) return;
|
||||
// 트위터
|
||||
//----------------------------------------------------------------------------
|
||||
if ($config['cf_twitter_key']) {
|
||||
include_once(G4_SNS_PATH."/twitter/twitteroauth/twitteroauth.php");
|
||||
include_once(G4_SNS_PATH."/twitter/twitterconfig.php");
|
||||
$twitter_user = get_session("ss_twitter_user");
|
||||
if (!$twitter_user) {
|
||||
include_once(G4_SNS_PATH."/twitter/twitteroauth/twitteroauth.php");
|
||||
include_once(G4_SNS_PATH."/twitter/twitterconfig.php");
|
||||
|
||||
$twitter_user = false;
|
||||
if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) {
|
||||
$twitter_url = G4_SNS_URL."/twitter/redirect.php";
|
||||
} else {
|
||||
$twitter_user = false;
|
||||
/*
|
||||
if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) {
|
||||
$twitter_url = G4_SNS_URL."/twitter/redirect.php";
|
||||
} else {
|
||||
$access_token = $_SESSION['access_token'];
|
||||
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);
|
||||
$content = $connection->get('account/verify_credentials');
|
||||
|
||||
switch ($connection->http_code) {
|
||||
case 200:
|
||||
$twitter_user = true;
|
||||
$twitter_url = $connection->getAuthorizeURL($token);
|
||||
break;
|
||||
default :
|
||||
$twitter_url = G4_SNS_URL."/twitter/redirect.php";
|
||||
}
|
||||
}
|
||||
*/
|
||||
$access_token = $_SESSION['access_token'];
|
||||
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);
|
||||
$content = $connection->get('account/verify_credentials');
|
||||
//print_r2($content);
|
||||
|
||||
switch ($connection->http_code) {
|
||||
case 200:
|
||||
@ -70,15 +89,6 @@ if (!$board['bo_use_sns']) return;
|
||||
break;
|
||||
default :
|
||||
$twitter_url = G4_SNS_URL."/twitter/redirect.php";
|
||||
// 안먹히는 코드 ㅠㅠ
|
||||
if ($member['mb_twitter_token'] && $member['mb_twitter_token_secret']) {
|
||||
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $member['mb_twitter_token'], $member['mb_twitter_token_secret']);
|
||||
$content = $connection->get('account/verify_credentials');
|
||||
if (200 == $connection->http_code) {
|
||||
$twitter_user = true;
|
||||
$twitter_url = $connection->getAuthorizeURL($token);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,6 +112,7 @@ if (!$board['bo_use_sns']) return;
|
||||
// 미투데이
|
||||
//----------------------------------------------------------------------------
|
||||
if ($config['cf_me2day_key']) {
|
||||
/*
|
||||
$me2day_user = false;
|
||||
if (empty($_SESSION['me2day']['user_id']) || empty($_SESSION['me2day']['user_key'])) {
|
||||
$result = json_decode(file_get_contents("http://me2day.net/api/get_auth_url.json?akey=".$config['cf_me2day_key']));
|
||||
@ -109,6 +120,13 @@ if (!$board['bo_use_sns']) return;
|
||||
} else {
|
||||
$me2day_user = true;
|
||||
}
|
||||
*/
|
||||
|
||||
$me2day_user = get_session("ss_me2day_user");
|
||||
if (!$me2day_user) {
|
||||
$result = json_decode(file_get_contents("http://me2day.net/api/get_auth_url.json?akey=".$config['cf_me2day_key']));
|
||||
$me2day_url = $result->url;
|
||||
}
|
||||
|
||||
echo '<li>';
|
||||
if ($me2day_user) {
|
||||
|
||||
@ -153,19 +153,6 @@ echo $option_hidden;
|
||||
</form>
|
||||
|
||||
<script>
|
||||
<?php
|
||||
// 관리자라면 분류 선택에 '공지' 옵션을 추가함
|
||||
if ($is_admin)
|
||||
{
|
||||
echo '
|
||||
if (ca_name_select = document.getElementById("ca_name")) {
|
||||
ca_name_select.options.length += 1;
|
||||
ca_name_select.options[ca_name_select.options.length-1].value = "공지";
|
||||
ca_name_select.options[ca_name_select.options.length-1].text = "공지";
|
||||
}';
|
||||
}
|
||||
?>
|
||||
|
||||
function html_auto_br(obj)
|
||||
{
|
||||
if (obj.checked) {
|
||||
@ -218,6 +205,8 @@ function fwrite_submit(f)
|
||||
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user