Merge branch 'g5'
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 884 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
@ -1,3 +0,0 @@
|
||||
<?php
|
||||
include_once("../../../common.php");
|
||||
?>
|
||||
@ -1,55 +0,0 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
$user_id = $_GET['user_id'];
|
||||
$user_key = $_GET['user_key'];
|
||||
$auth_key = "12345678" . md5("12345678" . $user_key);
|
||||
|
||||
$_SESSION['me2day']['user_id'] = $user_id;
|
||||
$_SESSION['me2day']['user_key'] = $user_key;
|
||||
|
||||
$g5['title'] = '미투데이 콜백';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$result = json_decode(file_get_contents("http://me2day.net/api/noop.json?uid={$user_id}&ukey={$auth_key}&akey=".$config['cf_me2day_key']));
|
||||
if ($result->code == 0) {
|
||||
|
||||
$user = json_decode(file_get_contents("http://me2day.net/api/get_person/{$user_id}.json"));
|
||||
$sns_name = $user->nickname;
|
||||
$sns_user = $user->id;
|
||||
|
||||
set_cookie('ck_sns_name', $sns_name, 86400);
|
||||
set_session('ss_me2day_user', $sns_user);
|
||||
|
||||
$g5_sns_url = G5_SNS_URL;
|
||||
|
||||
echo <<<EOT
|
||||
<script>
|
||||
$(function() {
|
||||
document.write("<strong>미투데이에 승인이 되었습니다.</strong>");
|
||||
|
||||
var opener = window.opener;
|
||||
opener.$("#wr_name").val("{$sns_name}");
|
||||
opener.$("#me2day_icon").attr("src", "{$g5_sns_url}/icon/me2day.png");
|
||||
opener.$("#me2day_checked").attr("disabled", false);
|
||||
opener.$("#me2day_checked").attr("checked", true);
|
||||
window.close();
|
||||
});
|
||||
</script>
|
||||
EOT;
|
||||
|
||||
} else {
|
||||
|
||||
echo <<<EOT
|
||||
<script>
|
||||
$(function() {
|
||||
alert("미투데이에 승인이 되지 않았습니다.");
|
||||
window.close();
|
||||
});
|
||||
</script>
|
||||
EOT;
|
||||
|
||||
}
|
||||
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -13,7 +13,6 @@ $kakao_appname = urlencode(str_replace('\"', '"', $g5['title']));
|
||||
|
||||
$facebook_url = 'http://www.facebook.com/sharer/sharer.php?s=100&p[url]='.$sns_url.'&p[title]='.$sns_msg;
|
||||
$twitter_url = 'http://twitter.com/home?status='.$msg_url;
|
||||
$me2day_url = 'http://me2day.net/posts/new?new_post[body]='.$msg_url;
|
||||
$gplus_url = 'https://plus.google.com/share?url='.$sns_url;
|
||||
|
||||
/*
|
||||
@ -26,7 +25,6 @@ $sns_send .= '&title='.$sns_msg;
|
||||
<ul id="bo_v_sns">
|
||||
<li><a href="<?php echo $facebook_url; ?>" target="_blank"><img src="<?php echo G5_SNS_URL; ?>/icon/facebook.png" alt="페이스북으로 보내기"></a></li>
|
||||
<li><a href="<?php echo $twitter_url; ?>" target="_blank"><img src="<?php echo G5_SNS_URL; ?>/icon/twitter.png" alt="트위터로 보내기"></a></li>
|
||||
<li><a href="<?php echo $me2day_url; ?>" target="_blank"><img src="<?php echo G5_SNS_URL; ?>/icon/me2day.png" alt="미투데이로 보내기"></a></li>
|
||||
<li><a href="<?php echo $gplus_url; ?>" target="_blank"><img src="<?php echo G5_SNS_URL; ?>/icon/gplus.png" alt="구글플러스로 보내기"></a></li>
|
||||
<?php
|
||||
if (G5_IS_MOBILE) {
|
||||
|
||||
@ -13,6 +13,3 @@ if (!$board['bo_use_sns']) return;
|
||||
<?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 G5_SNS_URL; ?>/icon/twitter<?php echo $sns_mc_icon; ?>.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 G5_SNS_URL; ?>/icon/me2day<?php echo $sns_mc_icon; ?>.png" alt="미투데이에도 등록됨"></a>
|
||||
<?php } ?>
|
||||
|
||||
@ -64,7 +64,7 @@ if (!$board['bo_use_sns']) return;
|
||||
if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) {
|
||||
$twitter_url = G5_SNS_URL."/twitter/redirect.php";
|
||||
} else {
|
||||
$access_token = $_SESSION['access_token'];
|
||||
$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');
|
||||
|
||||
@ -73,12 +73,12 @@ if (!$board['bo_use_sns']) return;
|
||||
$twitter_user = true;
|
||||
$twitter_url = $connection->getAuthorizeURL($token);
|
||||
break;
|
||||
default :
|
||||
default :
|
||||
$twitter_url = G5_SNS_URL."/twitter/redirect.php";
|
||||
}
|
||||
}
|
||||
*/
|
||||
$access_token = $_SESSION['access_token'];
|
||||
$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');
|
||||
|
||||
@ -87,7 +87,7 @@ if (!$board['bo_use_sns']) return;
|
||||
$twitter_user = true;
|
||||
$twitter_url = $connection->getAuthorizeURL($token);
|
||||
break;
|
||||
default :
|
||||
default :
|
||||
$twitter_url = G5_SNS_URL."/twitter/redirect.php";
|
||||
}
|
||||
}
|
||||
@ -106,42 +106,6 @@ if (!$board['bo_use_sns']) return;
|
||||
echo '</li>';
|
||||
}
|
||||
//============================================================================
|
||||
|
||||
|
||||
//============================================================================
|
||||
// 미투데이
|
||||
//----------------------------------------------------------------------------
|
||||
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']));
|
||||
$me2day_url = $result->url;
|
||||
} 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) {
|
||||
echo '<img src="'.G5_SNS_URL.'/icon/me2day.png" id="me2day_icon">';
|
||||
echo '<label for="" class="sound_only">미투데이 동시 등록</label>';
|
||||
echo '<input type="checkbox" name="me2day_checked" id="me2day_checked" '.(get_cookie('ck_me2day_checked')?'checked':'').' value="1">';
|
||||
} else {
|
||||
echo '<a href="'.$me2day_url.'" id="me2day_url" onclick="return false;"><img src="'.G5_SNS_URL.'/icon/me2day'.($me2day_user?'':'_off').'.png" id="me2day_icon"></a>';
|
||||
echo '<label for="" class="sound_only">미투데이 동시 등록</label>';
|
||||
echo '<input type="checkbox" name="me2day_checked" id="me2day_checked" disabled value="1">';
|
||||
echo '<script>$(function(){ $("#me2day_url").click(function(){ window.open(this.href, "me2day_url", "width=1000,height=800"); }); });</script>';
|
||||
}
|
||||
echo '</li>';
|
||||
}
|
||||
//============================================================================
|
||||
?>
|
||||
</ul>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user