g4를 g5로 변경

This commit is contained in:
chicpro
2013-09-13 14:32:06 +09:00
parent 9a18a049d5
commit 0f78b67eb7
563 changed files with 4097 additions and 4097 deletions

View File

@ -3,10 +3,10 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function editor_html($id, $content, $is_dhtml_editor=true)
{
global $g4, $config;
global $g5, $config;
static $js = true;
$editor_url = G4_EDITOR_URL.'/'.$config['cf_editor'];
$editor_url = G5_EDITOR_URL.'/'.$config['cf_editor'];
$html = "";
$html .= "<span class=\"sound_only\">웹에디터 시작</span>";

View File

@ -1,13 +1,13 @@
<?php
include_once("../../../common.php");
$ym = date('ym', G4_SERVER_TIME);
$ym = date('ym', G5_SERVER_TIME);
$data_dir = G4_DATA_PATH.'/editor/'.$ym;
$data_url = G4_DATA_URL.'/editor/'.$ym;
$data_dir = G5_DATA_PATH.'/editor/'.$ym;
$data_url = G5_DATA_URL.'/editor/'.$ym;
@mkdir($data_dir, G4_DIR_PERMISSION);
@chmod($data_dir, G4_DIR_PERMISSION);
@mkdir($data_dir, G5_DIR_PERMISSION);
@chmod($data_dir, G5_DIR_PERMISSION);
// 업로드 DIALOG 에서 전송된 값
$funcNum = $_GET['CKEditorFuncNum'] ;

View File

@ -9,7 +9,7 @@ include_once("./_common.php");
</form>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="<?php echo $g4[path]; ?>/plugin/captcha/captcha.js" type="text/javascript"></script>
<script src="<?php echo $g5[path]; ?>/plugin/captcha/captcha.js" type="text/javascript"></script>
<script>
function change_captcha()
{

View File

@ -79,7 +79,7 @@ class gcaptcha
function run()
{
global $g4;
global $g5;
// The text to draw
$captcha_key = $this->get_captcha_key();
@ -100,7 +100,7 @@ class gcaptcha
// Replace path by your own font path
$fonts = Array();
foreach (glob(G4_GCAPTCHA_PATH.'/fonts/*.ttf') as $filename) {
foreach (glob(G5_GCAPTCHA_PATH.'/fonts/*.ttf') as $filename) {
$fonts[] = $filename;
}
$font = $fonts[mt_rand(0, count($fonts)-1)];
@ -122,7 +122,7 @@ class gcaptcha
$this->captcha_filename = $this->get_captcha_filename();
imagejpeg($im, G4_DATA_PATH.'/cache/'.$this->captcha_filename.'.jpg');
imagejpeg($im, G5_DATA_PATH.'/cache/'.$this->captcha_filename.'.jpg');
imagedestroy($im);
$this->make_mp3($this->captcha_filename);
@ -135,16 +135,16 @@ class gcaptcha
function make_mp3($captcha_filename)
{
global $g4, $config;
global $g5, $config;
$number = (string)$_SESSION['ss_captcha_key'];
$mp3s = array();
for($i=0;$i<strlen($number);$i++){
$file = G4_GCAPTCHA_PATH.'/mp3/'.$config['cf_gcaptcha_mp3'].'/'.$number[$i].'.mp3';
$file = G5_GCAPTCHA_PATH.'/mp3/'.$config['cf_gcaptcha_mp3'].'/'.$number[$i].'.mp3';
$mp3s[] = $file;
}
$mp3_filepath = G4_DATA_PATH.'/cache/'.$captcha_filename.'.mp3';
$mp3_filepath = G5_DATA_PATH.'/cache/'.$captcha_filename.'.mp3';
$contents = '';
foreach ($mp3s as $mp3) {
@ -170,22 +170,22 @@ $gcaptcha->run();
// 캡챠이미지는 한개만 사용 가능함.
function captcha_html($class='captcha')
{
global $g4, $gcaptcha;
global $g5, $gcaptcha;
$obj = new gcaptcha();
$obj->run();
$rand = rand();
$jpg_file_url = G4_DATA_URL.'/cache/'.$obj->captcha_filename.'.jpg';
$mp3_file_url = G4_DATA_URL.'/cache/'.$obj->captcha_filename.'.mp3';
$jpg_file_url = G5_DATA_URL.'/cache/'.$obj->captcha_filename.'.jpg';
$mp3_file_url = G5_DATA_URL.'/cache/'.$obj->captcha_filename.'.mp3';
$html .= "\n".'<script>var g4_gcaptcha_url = "'.G4_GCAPTCHA_URL.'";</script>';
$html .= "\n".'<script src="'.G4_GCAPTCHA_URL.'/gcaptcha.js"></script>';
$html .= "\n".'<script>var g4_gcaptcha_url = "'.G5_GCAPTCHA_URL.'";</script>';
$html .= "\n".'<script src="'.G5_GCAPTCHA_URL.'/gcaptcha.js"></script>';
$html .= '<fieldset id="captcha" class="'.$class.'">';
$html .= '<legend class="sound_only">자동등록방지</legend>';
if (G4_IS_MOBILE) $html .= '<audio src="'.$mp3_file_url.'?_='.$rand.'" controls></audio>';
if (G5_IS_MOBILE) $html .= '<audio src="'.$mp3_file_url.'?_='.$rand.'" controls></audio>';
$html .= '<img src="'.$jpg_file_url.'?_='.$rand.'" alt="자동등록방지 숫자">';
if (!G4_IS_MOBILE) $html .= '<a href="'.$mp3_file_url.'?_='.$rand.'" id="captcha_mp3" target="_blank"><img src="'.G4_GCAPTCHA_URL.'/img/sound.gif" alt="숫자를 음성으로 듣기"></a>';
if (!G5_IS_MOBILE) $html .= '<a href="'.$mp3_file_url.'?_='.$rand.'" id="captcha_mp3" target="_blank"><img src="'.G5_GCAPTCHA_URL.'/img/sound.gif" alt="숫자를 음성으로 듣기"></a>';
$html .= '<input type="text" id="captcha_key" name="captcha_key" class="captcha_box frm_input" size="6" maxlength="6" required title="자동등록방지 숫자 입력">';
$html .= '<p class="sound_only">자동등록방지 숫자를 순서대로 입력하세요.</p>';
$html .= '</fieldset>';

View File

@ -1,6 +1,6 @@
<?php
include_once("./_common.php");
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
include_once(G5_GCAPTCHA_PATH.'/gcaptcha.lib.php');
echo chk_captcha();
?>

View File

@ -5,7 +5,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
certify_count_check($member['mb_id'], 'hp');
// 서버상 bin 폴더 이전까지 경로
$home_dir = G4_KCPCERT_PATH; // ct_cli 절대경로 ( bin 전까지 )
$home_dir = G5_KCPCERT_PATH; // ct_cli 절대경로 ( bin 전까지 )
// DI 를 위한 중복확인 식별 아이디
//web_siteid 값이 없으면 KCP 에서 지정한 값으로 설정됨
@ -23,10 +23,10 @@ if ($config['cf_cert_use'] == 2) { // 실서비스
}
if(!$site_cd)
alert('KCP 휴대폰 본인확인 서비스 사이트코드가 없습니다.\\관리자 > 기본환경설정에 KCP 사이트코드를 입력해 주십시오.', G4_URL);
alert('KCP 휴대폰 본인확인 서비스 사이트코드가 없습니다.\\관리자 > 기본환경설정에 KCP 사이트코드를 입력해 주십시오.', G5_URL);
// KCP 인증 라이브러리
require G4_KCPCERT_PATH.'/lib/ct_cli_lib.php';
require G5_KCPCERT_PATH.'/lib/ct_cli_lib.php';
/* ============================================================================== */
/* = null 값을 처리하는 메소드 = */

View File

@ -5,7 +5,7 @@ include_once('./_common.php');
certify_count_check($member['mb_id'], 'hp');
// kcp 휴대폰인증파일
include_once(G4_KCPCERT_PATH.'/kcpcert_config.php');
include_once(G5_KCPCERT_PATH.'/kcpcert_config.php');
$ordr_idxx = get_session('ss_uniqid');
if(!$ordr_idxx)
@ -30,7 +30,7 @@ if(!$ordr_idxx)
<!-- 사이트코드 -->
<input type="hidden" name="site_cd" value="<?php echo $site_cd; ?>" />
<!-- Ret_URL : 인증결과 리턴 페이지 ( 가맹점 URL 로 설정해 주셔야 합니다. ) -->
<input type="hidden" name="Ret_URL" value="<?php echo G4_KCPCERT_URL; ?>/kcpcert_result.php" />
<input type="hidden" name="Ret_URL" value="<?php echo G5_KCPCERT_URL; ?>/kcpcert_result.php" />
<!-- cert_otp_use 필수 ( 메뉴얼 참고)
Y : 실명 확인 + OTP 점유 확인 , N : 실명 확인 only
-->

View File

@ -1,6 +1,6 @@
<?php
include_once('./_common.php');
include_once(G4_KCPCERT_PATH.'/kcpcert_config.php');
include_once(G5_KCPCERT_PATH.'/kcpcert_config.php');
$site_cd = "";
$ordr_idxx = "";
@ -81,8 +81,8 @@ $ct_cert = new C_CT_CLI;
$ct_cert->mf_clear();
$g4['title'] = '휴대폰인증 결과';
include_once(G4_PATH.'/head.sub.php');
$g5['title'] = '휴대폰인증 결과';
include_once(G5_PATH.'/head.sub.php');
// 결과 처리
@ -135,7 +135,7 @@ if( $cert_enc_use == "Y" )
$phone_no = hyphen_hp_number($phone_no);
$sql = " select mb_id from {$g4['member_table']} where mb_id <> '{$member['mb_id']}' and mb_hp = '{$phone_no}' ";
$sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_hp = '{$phone_no}' ";
$row = sql_fetch($sql);
if ($row['mb_id']) {
alert_close("이미 가입되어 있는 휴대폰번호 입니다.\\n회원아이디 : ".$row['mb_id']);
@ -147,7 +147,7 @@ if( $cert_enc_use == "Y" )
$hash_data = md5($user_name.$cert_type.$birth_day.$md5_cert_no);
// 성인인증결과
$adult_day = date("Ymd", strtotime("-19 years", G4_SERVER_TIME));
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
set_session("ss_cert_type", $cert_type);
@ -187,5 +187,5 @@ $(function() {
</script>
<?php
include_once(G4_PATH.'/tail.sub.php');
include_once(G5_PATH.'/tail.sub.php');
?>

View File

@ -43,17 +43,17 @@ $returnMsg = 'x'; // 리턴메시지 (고정
// 실행모듈
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if(PHP_INT_MAX == 2147483647) // 32-bit
$exe = G4_OKNAME_PATH.'/bin/okname';
$exe = G5_OKNAME_PATH.'/bin/okname';
else
$exe = G4_OKNAME_PATH.'/bin/okname_x64';
$exe = G5_OKNAME_PATH.'/bin/okname_x64';
} else {
if(PHP_INT_MAX == 2147483647) // 32-bit
$exe = G4_OKNAME_PATH.'/bin/okname.exe';
$exe = G5_OKNAME_PATH.'/bin/okname.exe';
else
$exe = G4_OKNAME_PATH.'/bin/oknamex64.exe';
$exe = G5_OKNAME_PATH.'/bin/oknamex64.exe';
}
$logPath = G4_OKNAME_PATH.'/log'; // 로그파일을 남기는 경우 로그파일이 생성될 경로 option에 'L'이 포함된 경우에만 생성
$logPath = G5_OKNAME_PATH.'/log'; // 로그파일을 남기는 경우 로그파일이 생성될 경로 option에 'L'이 포함된 경우에만 생성
$targetId = ''; // 타겟ID (팝업오픈 스크립트의 window.name 과 동일하게 설정
if($config['cf_cert_use'] == 2) {
@ -71,5 +71,5 @@ if($config['cf_cert_use'] == 2) {
// ########################################################################
// # 리턴 URL 설정
// ########################################################################
$returnUrl = G4_OKNAME_URL.'/hpcert2.php'; // 본인인증 완료후 리턴될 URL (도메인 포함 full path)
$returnUrl = G5_OKNAME_URL.'/hpcert2.php'; // 본인인증 완료후 리턴될 URL (도메인 포함 full path)
?>

View File

@ -35,8 +35,8 @@ else {
$retcode=sprintf("S%03d", $ret);
}
$g4['title'] = 'KCB 휴대폰 본인확인';
include_once(G4_PATH.'/head.sub.php');
$g5['title'] = 'KCB 휴대폰 본인확인';
include_once(G5_PATH.'/head.sub.php');
?>
<script>
@ -68,5 +68,5 @@ if ($retcode == "B000") {
echo ("<script>alert(\"$retcode\"); self.close();</script>");
}
include_once(G4_PATH.'/tail.sub.php');
include_once(G5_PATH.'/tail.sub.php');
?>

View File

@ -35,7 +35,7 @@ $WEBSIGNATURE = trim($_POST['WEBSIGNATURE']);
// ########################################################################
// # 암호화키 파일 설정 (절대경로) - 파일은 주어진 파일명으로 자동 생성 됨
// ########################################################################
$keypath = G4_OKNAME_PATH.'/key/safecert_'.$idcfMbrComCd.'.key';
$keypath = G5_OKNAME_PATH.'/key/safecert_'.$idcfMbrComCd.'.key';
$cpubkey = $WEBPUBKEY; //server publickey
$csig = $WEBSIGNATURE; //server signature
@ -94,7 +94,7 @@ $mb_birth = $field[8];
// 휴대폰번호 중복체크
$phone_no = hyphen_hp_number($req_num);
$sql = " select mb_id from {$g4['member_table']} where mb_id <> '{$member['mb_id']}' and mb_hp = '{$phone_no}' ";
$sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_hp = '{$phone_no}' ";
$row = sql_fetch($sql);
if ($row['mb_id']) {
alert_close("이미 가입되어 있는 휴대폰번호 입니다.\\n회원아이디 : ".$row['mb_id']);
@ -106,7 +106,7 @@ $md5_cert_no = md5($req_num);
$hash_data = md5($mb_name.$cert_type.$mb_birth.$md5_cert_no);
// 성인인증결과
$adult_day = date("Ymd", strtotime("-19 years", G4_SERVER_TIME));
$adult_day = date("Ymd", strtotime("-19 years", G5_SERVER_TIME));
$adult = ((int)$mb_birth <= (int)$adult_day) ? 1 : 0;
set_session('ss_cert_type', $cert_type);
@ -116,8 +116,8 @@ set_session('ss_cert_adult', $adult);
set_session('ss_cert_birth', $mb_birth);
set_session('ss_cert_sex', ($field[9] == 1 ? 'M' : 'F'));
$g4['title'] = 'KCB 휴대폰 본인확인';
include_once(G4_PATH.'/head.sub.php');
$g5['title'] = 'KCB 휴대폰 본인확인';
include_once(G5_PATH.'/head.sub.php');
?>
<script>
@ -133,5 +133,5 @@ $(function() {
</script>
<?php
include_once(G4_PATH.'/tail.sub.php');
include_once(G5_PATH.'/tail.sub.php');
?>

View File

@ -10,14 +10,14 @@ include_once('./key_dir_check.php');
// 실행모듈
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if(PHP_INT_MAX == 2147483647) // 32-bit
$exe = G4_OKNAME_PATH.'/bin/okname';
$exe = G5_OKNAME_PATH.'/bin/okname';
else
$exe = G4_OKNAME_PATH.'/bin/okname_x64';
$exe = G5_OKNAME_PATH.'/bin/okname_x64';
} else {
if(PHP_INT_MAX == 2147483647) // 32-bit
$exe = G4_OKNAME_PATH.'/bin/okname.exe';
$exe = G5_OKNAME_PATH.'/bin/okname.exe';
else
$exe = G4_OKNAME_PATH.'/bin/oknamex64.exe';
$exe = G5_OKNAME_PATH.'/bin/oknamex64.exe';
}
if($config['cf_cert_use'] == 2) {
@ -35,10 +35,10 @@ if($config['cf_cert_use'] == 2) {
}
$idpCode = 'V';
$returnUrl = G4_OKNAME_URL.'/ipin2.php'; // 아이핀 인증을 마치고 돌아올 페이지 주소
$keypath = G4_OKNAME_PATH.'/key/okname.key'; // 키파일이 생성될 위치. 웹서버에 해당파일을 생성할 권한 필요.
$returnUrl = G5_OKNAME_URL.'/ipin2.php'; // 아이핀 인증을 마치고 돌아올 페이지 주소
$keypath = G5_OKNAME_PATH.'/key/okname.key'; // 키파일이 생성될 위치. 웹서버에 해당파일을 생성할 권한 필요.
$memid = $cpCode; // 회원사코드
$reserved1 = '0'; //reserved1
$reserved2 = '0'; //reserved2
$logpath = G4_OKNAME_PATH.'/log'; // 로그파일을 남기는 경우 로그파일이 생성될 경로 option에 'L'이 포함된 경우에만 생성
$logpath = G5_OKNAME_PATH.'/log'; // 로그파일을 남기는 경우 로그파일이 생성될 경로 option에 'L'이 포함된 경우에만 생성
?>

View File

@ -15,7 +15,7 @@ $cmd = "$exe $keypath $memid \"{$reserved1}\" \"{$reserved2}\" $EndPointURL $log
exec($cmd, $out, $ret);
if($ret == 127) {
alert_close('모듈실행 파일이 존재하지 않습니다.\\n\\n'.basename($exe).' 파일이 '.G4_PLUGIN_DIR.'/'.G4_OKNAME_DIR.'/bin 안에 있어야 합니다.');
alert_close('모듈실행 파일이 존재하지 않습니다.\\n\\n'.basename($exe).' 파일이 '.G5_PLUGIN_DIR.'/'.G5_OKNAME_DIR.'/bin 안에 있어야 합니다.');
}
if($ret == 126) {
@ -34,8 +34,8 @@ $pubkey=$out[0];
$sig=$out[1];
$curtime=$out[2];
$g4['title'] = 'KCB 아이핀 본인확인';
include_once(G4_PATH.'/head.sub.php');
$g5['title'] = 'KCB 아이핀 본인확인';
include_once(G5_PATH.'/head.sub.php');
?>
<form name="kcbInForm" method="post" action="<?php echo $kcbForm_action; ?>">
@ -53,5 +53,5 @@ document.kcbInForm.submit();
</script>
<?php
include_once(G4_PATH.'/tail.sub.php');
include_once(G5_PATH.'/tail.sub.php');
?>

View File

@ -79,8 +79,8 @@ set_session('ss_cert_adult', $adult);
set_session('ss_cert_birth', $mb_birth);
set_session('ss_cert_sex', ($field[9] == 1 ? 'M' : 'F'));
$g4['title'] = 'KCB 아이핀 본인확인';
include_once(G4_PATH.'/head.sub.php');
$g5['title'] = 'KCB 아이핀 본인확인';
include_once(G5_PATH.'/head.sub.php');
?>
<script>
@ -94,5 +94,5 @@ $(function() {
</script>
<?php
include_once(G4_PATH.'/tail.sub.php');
include_once(G5_PATH.'/tail.sub.php');
?>

View File

@ -1,9 +1,9 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
$key_dir = G4_OKNAME_PATH.'/key';
$key_dir = G5_OKNAME_PATH.'/key';
if(!is_dir($key_dir)) {
alert_close(G4_PLUGIN_DIR.'/'.G4_OKNAME_DIR.' 에 key 디렉토리를 생성해 주십시오.\\n\\n디렉토리 생성 후 쓰기권한을 부여해 주십시오. 예: chmod 707 key');
alert_close(G5_PLUGIN_DIR.'/'.G5_OKNAME_DIR.' 에 key 디렉토리를 생성해 주십시오.\\n\\n디렉토리 생성 후 쓰기권한을 부여해 주십시오. 예: chmod 707 key');
}
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
@ -11,13 +11,13 @@ if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if (substr($sapi_type, 0, 3) == 'cgi') {
if (!(is_readable($key_dir) && is_executable($key_dir)))
{
$msg = G4_PLUGIN_DIR.'/'.G4_OKNAME_DIR.'/key 디렉토리의 퍼미션을 705로 변경하여 주십시오.\\nchmod 705 key 또는 chmod uo+rx key';
$msg = G5_PLUGIN_DIR.'/'.G5_OKNAME_DIR.'/key 디렉토리의 퍼미션을 705로 변경하여 주십시오.\\nchmod 705 key 또는 chmod uo+rx key';
alert_close($msg);
}
} else {
if (!(is_readable($key_dir) && is_writeable($key_dir) && is_executable($key_dir)))
{
$msg = G4_PLUGIN_DIR.'/'.G4_OKNAME_DIR.'/key 디렉토리의 퍼미션을 707로 변경하여 주십시오.\\n\\nchmod 707 key 또는 chmod uo+rwx key';
$msg = G5_PLUGIN_DIR.'/'.G5_OKNAME_DIR.'/key 디렉토리의 퍼미션을 707로 변경하여 주십시오.\\n\\nchmod 707 key 또는 chmod uo+rwx key';
alert_close($msg);
}
}

View File

@ -1,6 +1,6 @@
<?php
include_once("./_common.php");
include_once(G4_SNS_PATH."/facebook/src/facebook.php");
include_once(G5_SNS_PATH."/facebook/src/facebook.php");
$facebook = new Facebook(array(
'appId' => $config['cf_facebook_appid'],
@ -18,8 +18,8 @@ if ($user) {
}
}
$g4['title'] = '페이스북 콜백';
include_once(G4_PATH.'/head.sub.php');
$g5['title'] = '페이스북 콜백';
include_once(G5_PATH.'/head.sub.php');
if ($user) {
$sns_name = $user_profile['name'];
@ -28,7 +28,7 @@ if ($user) {
set_cookie('ck_sns_name', $sns_name, 86400);
set_session('ss_facebook_user', $user);
$g4_sns_url = G4_SNS_URL;
$g5_sns_url = G5_SNS_URL;
echo <<<EOT
<script>
@ -37,7 +37,7 @@ if ($user) {
var opener = window.opener;
opener.$("#wr_name").val("{$sns_name}");
opener.$("#facebook_icon").attr("src", "{$g4_sns_url}/icon/facebook.png");
opener.$("#facebook_icon").attr("src", "{$g5_sns_url}/icon/facebook.png");
opener.$("#facebook_checked").attr("disabled", false);
opener.$("#facebook_checked").attr("checked", true);
window.close();
@ -58,5 +58,5 @@ EOT;
}
include_once(G4_PATH.'/tail.sub.php');
include_once(G5_PATH.'/tail.sub.php');
?>

View File

@ -8,8 +8,8 @@ $auth_key = "12345678" . md5("12345678" . $user_key);
$_SESSION['me2day']['user_id'] = $user_id;
$_SESSION['me2day']['user_key'] = $user_key;
$g4['title'] = '미투데이 콜백';
include_once(G4_PATH.'/head.sub.php');
$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) {
@ -21,7 +21,7 @@ if ($result->code == 0) {
set_cookie('ck_sns_name', $sns_name, 86400);
set_session('ss_me2day_user', $sns_user);
$g4_sns_url = G4_SNS_URL;
$g5_sns_url = G5_SNS_URL;
echo <<<EOT
<script>
@ -30,7 +30,7 @@ if ($result->code == 0) {
var opener = window.opener;
opener.$("#wr_name").val("{$sns_name}");
opener.$("#me2day_icon").attr("src", "{$g4_sns_url}/icon/me2day.png");
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();
@ -51,5 +51,5 @@ EOT;
}
include_once(G4_PATH.'/tail.sub.php');
include_once(G5_PATH.'/tail.sub.php');
?>

View File

@ -9,8 +9,8 @@ include_once("./_common.php");
/* Start session and load lib */
//session_start();
require_once(G4_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
require_once(G4_SNS_PATH.'/twitter/twitterconfig.php');
require_once(G5_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
require_once(G5_SNS_PATH.'/twitter/twitterconfig.php');
//print_r2($_SESSION); print_r2($_REQUEST); exit;
@ -43,8 +43,8 @@ if (200 == $connection->http_code) {
exit;
*/
$g4['title'] = '트위터 콜백';
include_once(G4_PATH.'/head.sub.php');
$g5['title'] = '트위터 콜백';
include_once(G5_PATH.'/head.sub.php');
if (200 == $connection->http_code) {
$content = $connection->get('account/verify_credentials');
@ -54,7 +54,7 @@ if (200 == $connection->http_code) {
set_cookie('ck_sns_name', $sns_name, 86400);
set_session('ss_twitter_user', $sns_user);
$g4_sns_url = G4_SNS_URL;
$g5_sns_url = G5_SNS_URL;
echo <<<EOT
<script>
@ -63,7 +63,7 @@ if (200 == $connection->http_code) {
var opener = window.opener;
opener.$("#wr_name").val("{$sns_name}");
opener.$("#twitter_icon").attr("src", "{$g4_sns_url}/icon/twitter.png");
opener.$("#twitter_icon").attr("src", "{$g5_sns_url}/icon/twitter.png");
opener.$("#twitter_checked").attr("disabled", false);
opener.$("#twitter_checked").attr("checked", true);
window.close();
@ -84,5 +84,5 @@ EOT;
}
include_once(G4_PATH.'/tail.sub.php');
include_once(G5_PATH.'/tail.sub.php');
?>

View File

@ -9,7 +9,7 @@ include_once("./_common.php");
/**
* Exit with an error message if the CONSUMER_KEY or CONSUMER_SECRET is not defined.
*/
require_once(G4_SNS_PATH.'/twitter/twitterconfig.php');
require_once(G5_SNS_PATH.'/twitter/twitterconfig.php');
if (CONSUMER_KEY === '' || CONSUMER_SECRET === '' || CONSUMER_KEY === 'CONSUMER_KEY_HERE' || CONSUMER_SECRET === 'CONSUMER_SECRET_HERE') {
echo 'You need a consumer key and secret to test the sample code. Get one from <a href="https://dev.twitter.com/apps">dev.twitter.com/apps</a>';
exit;

View File

@ -8,8 +8,8 @@ include_once("./_common.php");
/* Load required lib files. */
//session_start();
require_once(G4_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
require_once(G4_SNS_PATH.'/twitter/twitterconfig.php');
require_once(G5_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
require_once(G5_SNS_PATH.'/twitter/twitterconfig.php');
/* If access tokens are not available redirect to connect page. */
if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) {

View File

@ -3,8 +3,8 @@ include_once("./_common.php");
/* Start session and load library. */
//session_start();
require_once(G4_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
require_once(G4_SNS_PATH.'/twitter/twitterconfig.php');
require_once(G5_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
require_once(G5_SNS_PATH.'/twitter/twitterconfig.php');
/* Build TwitterOAuth object with client credentials. */
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);

View File

@ -6,5 +6,5 @@
define('CONSUMER_KEY', $config['cf_twitter_key']);
define('CONSUMER_SECRET', $config['cf_twitter_secret']);
define('OAUTH_CALLBACK', G4_SNS_URL.'/twitter/callback.php');
define('OAUTH_CALLBACK', G5_SNS_URL.'/twitter/callback.php');
//define('OAUTH_CALLBACK', '');

View File

@ -9,7 +9,7 @@ $msg_url = $sns_msg.' : '.$sns_url;
// 카카오톡 매뉴얼 : https://github.com/kakao/kakaolink-web
$kakao_appid = $_SERVER['HTTP_HOST']; // Mobile Site Domain 정확히 입력하지 않을 경우 이용이 제한될 수 있습니다.
$kakao_appname = $g4['title'];
$kakao_appname = $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;
@ -17,22 +17,22 @@ $me2day_url = 'http://me2day.net/posts/new?new_post[body]='.$msg_url;
$gplus_url = 'https://plus.google.com/share?url='.$sns_url;
/*
$sns_send = G4_BBS_URL.'/sns_send.php?longurl='.urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$sns_send = G5_BBS_URL.'/sns_send.php?longurl='.urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
//$sns_send .= '&amp;title='.urlencode(utf8_strcut(get_text($view['subject']),140));
$sns_send .= '&amp;title='.$sns_msg;
*/
?>
<ul id="bo_v_sns">
<li><a href="<?php echo $facebook_url; ?>" target="_blank"><img src="<?php echo G4_SNS_URL; ?>/icon/facebook.png" alt="페이스북으로 보내기"></a></li>
<li><a href="<?php echo $twitter_url; ?>" target="_blank"><img src="<?php echo G4_SNS_URL; ?>/icon/twitter.png" alt="트위터로 보내기"></a></li>
<li><a href="<?php echo $me2day_url; ?>" target="_blank"><img src="<?php echo G4_SNS_URL; ?>/icon/me2day.png" alt="미투데이로 보내기"></a></li>
<li><a href="<?php echo $gplus_url; ?>" target="_blank"><img src="<?php echo G4_SNS_URL; ?>/icon/gplus.png" alt="구글플러스로 보내기"></a></li>
<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 (G4_IS_MOBILE) {
if (G5_IS_MOBILE) {
$kakao_url = 'kakaolink://sendurl?msg='.$sns_msg.'&amp;url='.$sns_url.'&amp;appid='.$kakao_appid.'&amp;appver=1.0&amp;type=link&amp;appname='.$kakao_appname.'&amp;apiver=2.0';
?>
<li><a href="<?php echo $kakao_url; ?>" target="_blank"><img src="<?php echo G4_SNS_URL; ?>/icon/kakaotalk.png" alt="카카오톡으로 보내기"></a></li>
<li><a href="<?php echo $kakao_url; ?>" target="_blank"><img src="<?php echo G5_SNS_URL; ?>/icon/kakaotalk.png" alt="카카오톡으로 보내기"></a></li>
<?php
}
?>

View File

@ -2,17 +2,17 @@
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
$mobile_sns_icon = '';
if (G4_IS_MOBILE) $sns_mc_icon = '';
if (G5_IS_MOBILE) $sns_mc_icon = '';
else $sns_mc_icon = '_cmt';
if (!$board['bo_use_sns']) return;
?>
<?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<?php echo $sns_mc_icon; ?>.png" alt="페이스북에도 등록됨"></a>
<a href="https://www.facebook.com/profile.php?id=<?php echo $list[$i]['wr_facebook_user']; ?>" target="_blank"><img src="<?php echo G5_SNS_URL; ?>/icon/facebook<?php echo $sns_mc_icon; ?>.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<?php echo $sns_mc_icon; ?>.png" alt="트위터에도 등록됨"></a>
<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 G4_SNS_URL; ?>/icon/me2day<?php echo $sns_mc_icon; ?>.png" alt="미투데이에도 등록됨"></a>
<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 } ?>

View File

@ -14,7 +14,7 @@ if (!$board['bo_use_sns']) return;
if ($config['cf_facebook_appid']) {
$facebook_user = get_session("ss_facebook_user");
if (!$facebook_user) {
include_once(G4_SNS_PATH."/facebook/src/facebook.php");
include_once(G5_SNS_PATH."/facebook/src/facebook.php");
$facebook = new Facebook(array(
'appId' => $config['cf_facebook_appid'],
'secret' => $config['cf_facebook_secret']
@ -34,13 +34,13 @@ if (!$board['bo_use_sns']) return;
echo '<li>';
if ($facebook_user) {
echo '<img src="'.G4_SNS_URL.'/icon/facebook.png" id="facebook_icon">';
echo '<img src="'.G5_SNS_URL.'/icon/facebook.png" id="facebook_icon">';
echo '<label for="" class="sound_only">페이스북 동시 등록</label>';
echo '<input type="checkbox" name="facebook_checked" id="facebook_checked" '.(get_cookie('ck_facebook_checked')?'checked':'').' value="1">';
} else {
$facebook_url = $facebook->getLoginUrl(array("redirect_uri"=>G4_SNS_URL."/facebook/callback.php", "scope"=>"publish_stream,read_stream,offline_access", "display"=>"popup"));
$facebook_url = $facebook->getLoginUrl(array("redirect_uri"=>G5_SNS_URL."/facebook/callback.php", "scope"=>"publish_stream,read_stream,offline_access", "display"=>"popup"));
echo '<a href="'.$facebook_url.'" id="facebook_url" onclick="return false;"><img src="'.G4_SNS_URL.'/icon/facebook'.($facebook_user?'':'_off').'.png" id="facebook_icon"></a>';
echo '<a href="'.$facebook_url.'" id="facebook_url" onclick="return false;"><img src="'.G5_SNS_URL.'/icon/facebook'.($facebook_user?'':'_off').'.png" id="facebook_icon"></a>';
echo '<label for="" class="sound_only">페이스북 동시 등록</label>';
echo '<input type="checkbox" name="facebook_checked" id="facebook_checked" disabled value="1">';
echo '<script>$(function(){ $("#facebook_url").click(function(){ window.open(this.href, "facebook_url", "width=600,height=250"); }); });</script>';
@ -56,13 +56,13 @@ if (!$board['bo_use_sns']) return;
if ($config['cf_twitter_key']) {
$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");
include_once(G5_SNS_PATH."/twitter/twitteroauth/twitteroauth.php");
include_once(G5_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";
$twitter_url = G5_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']);
@ -74,7 +74,7 @@ if (!$board['bo_use_sns']) return;
$twitter_url = $connection->getAuthorizeURL($token);
break;
default :
$twitter_url = G4_SNS_URL."/twitter/redirect.php";
$twitter_url = G5_SNS_URL."/twitter/redirect.php";
}
}
*/
@ -88,17 +88,17 @@ if (!$board['bo_use_sns']) return;
$twitter_url = $connection->getAuthorizeURL($token);
break;
default :
$twitter_url = G4_SNS_URL."/twitter/redirect.php";
$twitter_url = G5_SNS_URL."/twitter/redirect.php";
}
}
echo '<li>';
if ($twitter_user) {
echo '<img src="'.G4_SNS_URL.'/icon/twitter.png" id="twitter_icon">';
echo '<img src="'.G5_SNS_URL.'/icon/twitter.png" id="twitter_icon">';
echo '<label for="" class="sound_only">트위터 동시 등록</label>';
echo '<input type="checkbox" name="twitter_checked" id="twitter_checked" '.(get_cookie('ck_twitter_checked')?'checked':'').' value="1">';
} else {
echo '<a href="'.$twitter_url.'" id="twitter_url" onclick="return false;"><img src="'.G4_SNS_URL.'/icon/twitter'.($twitter_user?'':'_off').'.png" id="twitter_icon"></a>';
echo '<a href="'.$twitter_url.'" id="twitter_url" onclick="return false;"><img src="'.G5_SNS_URL.'/icon/twitter'.($twitter_user?'':'_off').'.png" id="twitter_icon"></a>';
echo '<label for="" class="sound_only">트위터 동시 등록</label>';
echo '<input type="checkbox" name="twitter_checked" id="twitter_checked" disabled value="1">';
echo '<script>$(function(){ $("#twitter_url").click(function(){ window.open(this.href, "twitter_url", "width=600,height=250"); }); });</script>';
@ -130,11 +130,11 @@ if (!$board['bo_use_sns']) return;
echo '<li>';
if ($me2day_user) {
echo '<img src="'.G4_SNS_URL.'/icon/me2day.png" id="me2day_icon">';
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="'.G4_SNS_URL.'/icon/me2day'.($me2day_user?'':'_off').'.png" id="me2day_icon"></a>';
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>';

View File

@ -15,5 +15,5 @@ $GLOBALS['syndi_tag_year'] = '2010';
$GLOBALS['syndi_homepage_title'] = $config['cf_title'];
// Syndication 출력 url (syndi_echo.php의 웹경로)
$GLOBALS['syndi_echo_url'] = G4_SYNDI_URL.'/syndi_echo.php';
$GLOBALS['syndi_echo_url'] = G5_SYNDI_URL.'/syndi_echo.php';
?>

View File

@ -15,15 +15,15 @@
// include gnuboard config & lib
include G4_PATH.'/config.php';
//include G4_LIB_PATH.'/common.lib.php';
include G4_DATA_PATH.'/dbconfig.php';
include G5_PATH.'/config.php';
//include G5_LIB_PATH.'/common.lib.php';
include G5_DATA_PATH.'/dbconfig.php';
$connect_db = sql_connect(G4_MYSQL_HOST, G4_MYSQL_USER, G4_MYSQL_PASSWORD);
$connect_db = sql_connect(G5_MYSQL_HOST, G5_MYSQL_USER, G5_MYSQL_PASSWORD);
if(!$connect_db) return;
$GLOBALS['connect_db'] = $connect_db;
sql_select_db(G4_MYSQL_DB, $connect_db);
sql_select_db(G5_MYSQL_DB, $connect_db);
/**
@ -54,12 +54,12 @@ function Syndi_getSiteInfo($args)
**/
function Syndi_getChannelList($args)
{
global $g4;
global $g5;
$where = '';
if($args->target_channel_id) $where .= " and b.bo_table='". mysql_real_escape_string($args->target_channel_id) . "'";
$sql = "select b.bo_table,b.bo_subject from " . $g4['board_table'] . " b, ". $g4['group_table'] . " g where b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id ". $where;
$sql = "select b.bo_table,b.bo_subject from " . $g5['board_table'] . " b, ". $g5['group_table'] . " g where b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id ". $where;
$sql .= " order by b.gr_id,b.bo_table";
if($args->type=='channel')
@ -102,11 +102,11 @@ function Syndi_getChannelList($args)
**/
function _Syndi_getNextChannelId($channel_id=null)
{
global $g4;
global $g5;
if(!$channel_id)
{
$sql = "select b.bo_table from " . $g4['board_table'] . " b, ". $g4['group_table'] . " g where b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
$sql = "select b.bo_table from " . $g5['board_table'] . " b, ". $g5['group_table'] . " g where b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
$sql .= " order by b.gr_id,b.bo_table limit 1";
$row = sql_fetch($sql);
@ -116,7 +116,7 @@ function _Syndi_getNextChannelId($channel_id=null)
$channel_id = mysql_real_escape_string($channel_id);
$sql = "select b.bo_table from " . $g4['board_table'] . " b, ". $g4['group_table'] . " g where b.bo_table>'$channel_id' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
$sql = "select b.bo_table from " . $g5['board_table'] . " b, ". $g5['group_table'] . " g where b.bo_table>'$channel_id' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
$sql .= " order by b.gr_id,b.bo_table limit 1";
$result = sql_query($sql);
@ -134,7 +134,7 @@ function _Syndi_getNextChannelId($channel_id=null)
**/
function Syndi_getArticleList($args)
{
global $g4;
global $g5;
/*
$args->target_content_id //게시물 번호
@ -169,7 +169,7 @@ function Syndi_getArticleList($args)
**/
function _Syndi_getArticleList($args)
{
global $g4;
global $g5;
/*
$args->target_content_id //게시물 번호
@ -180,7 +180,7 @@ function _Syndi_getArticleList($args)
$args->page //페이지 번호
*/
$sql = "select count(*) as cnt from " . $g4['board_table'] . " b, ". $g4['group_table'] . " g where b.bo_table='" . mysql_real_escape_string($args->target_channel_id). "' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
$sql = "select count(*) as cnt from " . $g5['board_table'] . " b, ". $g5['group_table'] . " g where b.bo_table='" . mysql_real_escape_string($args->target_channel_id). "' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
$row = sql_fetch_array(sql_query($sql));
if($row['cnt']<1) return array();
@ -194,7 +194,7 @@ function _Syndi_getArticleList($args)
if($args->end_time) $where .= ' and wr_datetime <= '. _getTime($args->end_time);
$sql = "select wr_id, ca_name, wr_subject, wr_content, mb_id, wr_name, wr_homepage, wr_email, wr_datetime, wr_last
from " . $g4['write_prefix'] . $args->target_channel_id . " where 1=1" . $where;
from " . $g5['write_prefix'] . $args->target_channel_id . " where 1=1" . $where;
$sql .= " order by wr_id desc ";
$sql .= sprintf(" limit %s,%s", ($args->page-1)*$args->max_entry, $args->max_entry);
@ -242,8 +242,8 @@ function _Syndi_getArticleList($args)
**/
function Syndi_getDeletedList($args)
{
global $g4;
$table = $g4['syndi_log_table'];
global $g5;
$table = $g5['syndi_log_table'];
// get delete article list
$where = '';
@ -289,12 +289,12 @@ function Syndi_getDeletedList($args)
**/
function Syndi_getChannelNextPage($args)
{
global $g4;
global $g5;
$where = '';
if($args->target_channel_id) $where .= " and bo_table='". mysql_real_escape_string($args->target_channel_id) . "'";
$count_sql = "select count(*) as cnt from " . $g4['board_table'] . " where bo_read_level=1 and bo_list_level=1 " .$where;
$count_sql = "select count(*) as cnt from " . $g5['board_table'] . " where bo_read_level=1 and bo_list_level=1 " .$where;
$result = sql_query($count_sql);
$row = sql_fetch_array($result);
sql_free_result($result);
@ -320,7 +320,7 @@ function Syndi_getChannelNextPage($args)
**/
function Syndi_getArticleNextPage($args)
{
global $g4;
global $g5;
// 사이트 모든 글
if(!$args->target_channel_id)
@ -347,9 +347,9 @@ function Syndi_getArticleNextPage($args)
function _Syndi_getArticleNextPage($args)
{
global $g4;
global $g5;
$sql = "select count(*) as cnt from " . $g4['board_table'] . " b, ". $g4['group_table'] . " g where b.bo_table='" . mysql_real_escape_string($args->target_channel_id). "' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
$sql = "select count(*) as cnt from " . $g5['board_table'] . " b, ". $g5['group_table'] . " g where b.bo_table='" . mysql_real_escape_string($args->target_channel_id). "' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
if($row['cnt']==0) return false;
@ -359,7 +359,7 @@ function _Syndi_getArticleNextPage($args)
if($args->start_time) $where .= ' and wr_datetime >= '. _getTime($args->start_time);
if($args->end_time) $where .= ' and wr_datetime <= '. _getTime($args->end_time);
$count_sql = "select count(*) as cnt from " . $g4['write_prefix'] . $args->target_channel_id . " where 1=1 " .$where;
$count_sql = "select count(*) as cnt from " . $g5['write_prefix'] . $args->target_channel_id . " where 1=1 " .$where;
$result = sql_query($count_sql);
$row = sql_fetch_array($result);
@ -393,8 +393,8 @@ function _Syndi_getArticleNextPage($args)
**/
function Syndi_getDeletedNextPage($args)
{
global $g4;
$table = $g4['syndi_log_table'];
global $g5;
$table = $g5['syndi_log_table'];
// get delete article list
$where = '';

View File

@ -22,7 +22,7 @@ $oPing->setId(SyndicationHandler::getTag('site'));
$oPing->setType('channel');
// delete log
$_sql = "delete from {$g4['syndi_log_table']} where bbs_id='%s'";
$_sql = "delete from {$g5['syndi_log_table']} where bbs_id='%s'";
sql_query(sprintf($_sql, $tmp_bo_table));
$oPing->request();

View File

@ -11,7 +11,7 @@ if(!defined('_GNUBOARD_')) return;
if(!$write || !$row) return;
// 비회원 access가 불가능 한 게시판이면 pass
$sql = "select count(*) as cnt from " . $g4['board_table'] . " b, ". $g4['group_table'] . " g where b.bo_table='". $bo_table ."' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
$sql = "select count(*) as cnt from " . $g5['board_table'] . " b, ". $g5['group_table'] . " g where b.bo_table='". $bo_table ."' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id";
$cnt_row = sql_fetch($sql);
if($cnt_row['cnt']<1) return;
@ -27,7 +27,7 @@ $sql = "select wr_subject from $write_table where wr_id='" .$row['wr_id'] ."'";
$subject_row = sql_fetch($sql);
$_link = './bbs/board.php?bo_table=%s&wr_id=%s';
$_sql = "insert into {$g4['syndi_log_table']} (content_id, bbs_id, title, link_alternative, delete_date) values('%s','%s','%s','%s','%s')";
$_sql = "insert into {$g5['syndi_log_table']} (content_id, bbs_id, title, link_alternative, delete_date) values('%s','%s','%s','%s','%s')";
sql_query(sprintf($_sql, $row['wr_id'], $bo_table, addslashes($subject_row['wr_subject']), sprintf($_link, $bo_table, $row['wr_id']), date('YmdHis')), false);
$oPing = new SyndicationPing;

View File

@ -11,7 +11,7 @@ if(!defined('_GNUBOARD_')) return;
if(!$write || !$row) return;
// 비회원 access가 불가능 한 게시판이면 pass
$sql = 'select count(*) as cnt from ' . $g4['board_table'] . ' b, '. $g4['group_table'] . ' g where b.bo_table=\''. $bo_table .'\' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id';
$sql = 'select count(*) as cnt from ' . $g5['board_table'] . ' b, '. $g5['group_table'] . ' g where b.bo_table=\''. $bo_table .'\' and b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id';
$cnt_row = sql_fetch($sql);
if($cnt_row['cnt']<1) return;;
@ -26,7 +26,7 @@ $sql = "select wr_subject from $write_table where wr_id='" .$row['wr_id'] ."'";
$subject_row = sql_fetch($sql);
$_link = './bbs/board.php?bo_table=%s&wr_id=%s';
$_sql = "insert into {$g4['syndi_log_table']} (content_id, bbs_id, title, link_alternative, delete_date) values('%s','%s','%s','%s','%s')";
$_sql = "insert into {$g5['syndi_log_table']} (content_id, bbs_id, title, link_alternative, delete_date) values('%s','%s','%s','%s','%s')";
sql_query(sprintf($_sql, $row['wr_id'], $bo_table, addslashes($subject_row['wr_subject']), sprintf($_link, $bo_table, $row['wr_id']), date('YmdHis')), false);
$oPing = new SyndicationPing;

View File

@ -34,7 +34,7 @@ if($wr['wr_id'] || $wr_id)
$oPing->setType('article');
// if deleted
$_sql = "delete from {$g4['syndi_log_table']} where content_id='%s' and bbs_id='%s'";
$_sql = "delete from {$g5['syndi_log_table']} where content_id='%s' and bbs_id='%s'";
sql_query(sprintf($_sql, $wr_id ? $wr_id : $wr[wr_id], $board['bo_table']));
$oPing->request();

View File

@ -5,8 +5,8 @@ if ($is_admin != 'super') {
alert('최고관리자만 설치가 가능합니다.');
}
$sql = " CREATE TABLE IF NOT EXISTS `{$g4['syndi_log_table']}` ( `content_id` int(11) NOT NULL, `bbs_id` varchar(50) NOT NULL, `title` text NOT NULL, `link_alternative` varchar(250) NOT NULL, `delete_date` varchar(14) NOT NULL, PRIMARY KEY (`content_id`,`bbs_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ";
$sql = " CREATE TABLE IF NOT EXISTS `{$g5['syndi_log_table']}` ( `content_id` int(11) NOT NULL, `bbs_id` varchar(50) NOT NULL, `title` text NOT NULL, `link_alternative` varchar(250) NOT NULL, `delete_date` varchar(14) NOT NULL, PRIMARY KEY (`content_id`,`bbs_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ";
sql_query($sql, false);
alert('신디케이션 로그 테이블을 생성했습니다.', G4_URL);
alert('신디케이션 로그 테이블을 생성했습니다.', G5_URL);
?>

View File

@ -15,10 +15,10 @@ $syndi_path = dirname(__FILE__);
include $syndi_path . '/config/site.config.php';
$sql = " select bo_table from " . $g4['board_table'] . " b, ". $g4['group_table'] . " g where b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id order by b.gr_id, b.bo_table limit 1 ";
$sql = " select bo_table from " . $g5['board_table'] . " b, ". $g5['group_table'] . " g where b.bo_read_level=1 and b.bo_list_level=1 and g.gr_use_access=0 and g.gr_id = b.gr_id order by b.gr_id, b.bo_table limit 1 ";
$channel = sql_fetch($sql);
$sql = " select wr_id from {$g4['write_prefix']}{$channel['bo_table']} where wr_is_comment = 0 order by wr_num, wr_reply desc limit 1 ";
$sql = " select wr_id from {$g5['write_prefix']}{$channel['bo_table']} where wr_is_comment = 0 order by wr_num, wr_reply desc limit 1 ";
$article = sql_fetch($sql);
?>
@ -47,14 +47,14 @@ a:focus, a:hover {background:#333;color:#fff;text-decoration:none}
<ul>
<li><a href="http://dev.naver.com/openapi/apis/function/syndication">Syndication API</a></li>
<li><a href="http://syndication.openapi.naver.com/status/?site=<?php echo $syndi_tag_domain; ?>" class="left_line">Naver Syndication 연결확인</a></li>
<li><a href="<?php echo G4_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:site&amp;type=site" class="bg">사이트 정보</a></li>
<li><a href="<?php echo G4_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:channel:<?php echo $channel['bo_table']; ?>&type=channel" class="bg left_line">특정 채널 정보</a></li>
<li><a href="<?php echo G4_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:site&type=channel" class="bg">채널 목록</a></li>
<li><a href="<?php echo G4_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:site&type=article" class="left_line">사이트의 모든 문서 목록</a></li>
<li><a href="<?php echo G4_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:channel:<?php echo $channel['bo_table']; ?>&type=article">특정 채널의 문서 목록</a></li>
<li><a href="<?php echo G4_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:article:<?php echo $channel['bo_table']; ?>-<?php echo $article['wr_id']; ?>&type=article" class="left_line">특정 문서 정보</a></li>
<li class="no_bottom_line"><a href="<?php echo G4_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:site&amp;type=deleted" class="bg">사이트의 모든 삭제문서 목록</a></li>
<li class="no_bottom_line"><a href="<?php echo G4_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:channel:<?php echo $channel['bo_table']; ?>&type=deleted" class="bg left_line">특정 채널의 삭제 문서 목록</a></li>
<li><a href="<?php echo G5_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:site&amp;type=site" class="bg">사이트 정보</a></li>
<li><a href="<?php echo G5_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:channel:<?php echo $channel['bo_table']; ?>&type=channel" class="bg left_line">특정 채널 정보</a></li>
<li><a href="<?php echo G5_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:site&type=channel" class="bg">채널 목록</a></li>
<li><a href="<?php echo G5_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:site&type=article" class="left_line">사이트의 모든 문서 목록</a></li>
<li><a href="<?php echo G5_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:channel:<?php echo $channel['bo_table']; ?>&type=article">특정 채널의 문서 목록</a></li>
<li><a href="<?php echo G5_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:article:<?php echo $channel['bo_table']; ?>-<?php echo $article['wr_id']; ?>&type=article" class="left_line">특정 문서 정보</a></li>
<li class="no_bottom_line"><a href="<?php echo G5_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:site&amp;type=deleted" class="bg">사이트의 모든 삭제문서 목록</a></li>
<li class="no_bottom_line"><a href="<?php echo G5_SYNDI_URL; ?>/syndi_echo.php?id=tag:<?php echo $syndi_tag_domain.','.$syndi_tag_year; ?>:channel:<?php echo $channel['bo_table']; ?>&type=deleted" class="bg left_line">특정 채널의 삭제 문서 목록</a></li>
</ul>
</body>