g4를 g5로 변경
This commit is contained in:
@ -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';
|
||||
?>
|
||||
|
||||
@ -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 = '';
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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);
|
||||
?>
|
||||
@ -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&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&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&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&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>
|
||||
|
||||
Reference in New Issue
Block a user